Set up pre-commit hooks
- add pre-commit hooks:
+ run `nox -s lint` on staged *.py files
+ run common pre-commit hooks for validations that could not be
achieved with tools in the develop environment so easily
- add pre-merge hook:
+ run `nox -s _pre-commit-test-hook` before merges
* ignores the paths to staged files
passed in by the pre-commit framework
* runs all test cases instead
This commit is contained in:
parent
c07a9ed19f
commit
7a5246556a
5 changed files with 196 additions and 2 deletions
|
|
@ -95,6 +95,13 @@ The second task lints all source code files with
|
|||
[ruff](https://pypi.org/project/ruff/).
|
||||
`flake8` is configured with a couple of plug-ins.
|
||||
|
||||
You may want to install the [pre-commit](https://pre-commit.com/) hooks
|
||||
that come with the project:
|
||||
|
||||
`nox -s pre-commit-install`
|
||||
|
||||
Then, the linting and testing occurs automatically before every commit.
|
||||
|
||||
|
||||
#### Test Suite
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue