feat(ci): auto-fix formatting and linting on new PRs #108
Labels
internal-improvements
Related to internal publishing, building, workflows, formatting & linting
needs-investigation
Further information is requested
This is in response to your Cool things in '23 post:
I do not know know about rust-tooling, but in JavaScript-land there exists lint-staged to run pre-configured linters on files that were changed between main and the head of a branch the PR is on.
There is also husky for running lint-staged as a pre-commit hook in Git (so that devs get feedback even before commit is made, even if they don't have rustfmt in their IDEs)
I am not opening a PR for this as I am not sure if you would be open to having npm-based tools added in this repository, but here is how the above could be configured:
Create
lint-staged.config.js
:Install dependencies:
Add this to scripts section in package.json:
Create GitHub Action workflow
lint.yml
:Alternatively, instead of using npm's
lint-staged
, there is a GitHub action dorny/paths-filterExample usage in https://github.com/specify/specify7/blob/production/.github/workflows/test.yml
The text was updated successfully, but these errors were encountered: