| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Add default_stages and explicitly assign stages to hooks, separating local mutating hooks from CI-only checks. Configure check-* hooks (check-added-large-files, check-yaml, check-toml, check-merge-conflict) to run in pre-commit and manual where appropriate; mark end-of-file-fixer, trailing-whitespace and pyproject-fmt as local-only. Add validate-pyproject to pre-commit/manual. Rework ruff hooks into distinct local autofix entries (ruff-check with --fix/--unsafe-fixes and ruff-format write) and CI check-only entries (named ruff-check (ci) and ruff-format (ci) with non-writing args). Remove the prior name-tests-test entry and add clarifying comments and names for maintainability.
Switch workflow to run pre-commit only for pull requests and only on files changed in the PR. Adds a detect_changes job to fetch the base ref and output changed file list, then a conditional precommit job that runs only when there are changed files. Updates checkout and setup actions (actions/checkout@v4, setup-python@v5), bumps Python to 3.12, installs pre-commit, and runs pre-commit in a CI check-only mode on the changed files to speed up CI and avoid running on the whole repo.
There was a problem hiding this comment.
Great!!
Sorry, something went wrong.
Add standardized linting workflow and config
| Back | FazBrowse Home | New Git URL |
Standardized formatting
Updates the pre-commit workflow and configuration to ensure only changed files in a pull request are checked.
Introduces a clear separation between local autofix hooks and CI check-only hooks.
Updated hooks versions.
NOTE : Since pre-commit hooks were actively used in #38 no particular "Apply lint" PR is required as of now.
Workflow improvements:
Pre-commit configuration enhancements: