feat: check linters match pre-commit config in lint-shared - #79
Merged
Conversation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Contributor
Author
|
линтовать надо до патч версии, хардкодить проверку наличия pre-commit-config или добавить во входной список? |
- Add .github/actions/check-precommit-sync/action.yml — composite action matching the existing lint-* pattern (calls hooks/ script via bash) - Add hooks/check-precommit-sync.py — Python script that compares baseline hook ids against workflow linters input - Replace inline heredoc in lint-shared.yml with a uses: reference gated on contains(inputs.linters, 'pre-commit') for explicit opt-in - Add pre-commit to supported linters in inputs description - Fix whitespace bug: strip() each token before set comparison - Exclude the pre-commit sentinel itself from the set comparison - Use ::notice:: / ::error:: annotations for GH Actions log integration Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Graceful skip made no sense with explicit opt-in: if pre-commit is in linters, all three conditions must hold — file exists, baseline repo entry exists, hook ids match. Any gap is now a hard failure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a sync-check step to
lint-shared.ymlthat runs before linting.If the calling repo has a
.pre-commit-config.yamlwith arubykatzen/baselineentry, the step compares its hook ids against thelintersworkflow input. Fails if they differ..pre-commit-config.yamlis absent (hashFilesguard)rubykatzen/baselinerepo section is found (no error, just a notice)inputs.lintersdirectly via env var — no workflow file parsing needed