Repository navigation
🔧 Add a pre-commit config with hygiene checks - #60
Merged
Merged
Conversation
The repo is set up on pre-commit.ci but has never had a config, so every pull request gets a red `error during ci config` check. This adds one. The hook selection is deliberately limited to whitespace/EOF fixers and non-controversial file checks, plus yamllint and codespell, so that it lands green. The linters that would need actual code changes — ruff, flake8, mypy, pylint, shellcheck and bashate — are left for follow-ups. `.yamllint` is taken from tox-pre-commit, so zero-indent sequences are enforced, matching the existing YAML in this repo.
Applied by the `end-of-file-fixer` hook.
This was referenced Jul 27, 2026
Member
@LuShadowX I think it's time to try starting those separate PRs. Even for the things that don't have files to check. |
Contributor
Author
|
Starting with two rather than the whole set: #62 and #63, both split out of #57. On the deferred hooks — I'd rather take those two or three at a time than open the lot at once, so nothing sits half-reviewed. Say which you want first and I'll follow that order; otherwise I'll start with the ones that need no new tooling decisions. |
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.
You mentioned linters in #59 — this is the first pass, kept deliberately small.
The repo is enabled on pre-commit.ci but has never had a config, so every pull request gets a red
error during ci configcheck. #55, #57 and #58 all have it. This adds one.I limited the hook set to things that land green: the whitespace/EOF fixers, the non-controversial file checks, codespell, and yamllint with your
.yamllintfrom tox-pre-commit — so zero-indent sequences are enforced, which the YAML already here follows. The only content change is the missing newline at the end ofREADME.md, applied byend-of-file-fixerand split into its own commit.Left out on purpose, each worth a separate PR:
patchback/..profiletrips SC2155 and SC2086, and it is executable without a shebang, socheck-executables-have-shebangsfails on it as well. Fixing that touches deployment behaviour, so it shouldn't ride along with a tooling PR.check-github-workflowsand actionlint — nothing for them to check until there are workflows.Verified with
pre-commit run --all-files: green once the README newline is in.