Repository navigation
fix: run the pre-commit hooks in CI and clear bandit and shellcheck (#59) - #63
Merged
Merged
Conversation
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.
Fixes #59.
Acceptance criterion (verbatim): "a CI job runs the full hook set on every PR and push to main, and it passes on
main."What changed
.github/workflows/hooks.yml(new): runsuvx prek@0.5.4 run --all-files --show-diff-on-failureon every pull request and every push tomain. Actions are SHA-pinned and uv is pinned to 0.11.28, matchingci.yml.ci.yml. I made it a separate workflow becauseci.ymlhaspaths-ignorefor prose, so a docs-only PR would skip markdownlint. That would contradict the criterion's "every PR".localgit.pyandorigin.pyare acknowledged with# nosecon the exact lines, plus a comment explaining why. The argv is fixed, there's no shell, andgitcomes from PATH on purpose. I didn't add a global bandit skip, so any new subprocess call is still flagged.image/entrypoint.shis silenced with a directive onstop(), which is only called throughtrap.collector/README.md: added the prek command to the from-the-root list of CI checks.Gates (run locally on this branch)
uvx prek@0.5.4 run --all-files: all 14 hooks pass (bandit and shellcheck were failing before)ruff checkandruff format --check: passmypy(strict, scope from[tool.mypy]): no issues in 11 filespytest --cov=jq_collector: 456 passed, 100% of lines and branchesbash -n image/entrypoint.sh: parsesNot addressed
stop()comment says the code signals the process group, but it signals each pid. That's Make entrypoint.sh stop() match its comment: group signal vs per-pid kill #62, which needs a decision, so this PR leaves it alone.Closes #59
🤖 Generated with Claude Code