Skip to content

Commit

Permalink
Add instructions on how to enable pre-commit
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Richardson <[email protected]>
  • Loading branch information
arichardson committed Jan 29, 2024
1 parent 3507342 commit a750450
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,18 @@ To clean up the generated files, run:
```shell
make clean
```


== Enabling pre-commit checks locally
The repository has some basic commit checks set up with https://pre-commit.com/[pre-commit] that will be enforced by the GitHub CI.
To ensure these checks are also run in the local repository while making changes the following command can be run:
[source,shell]
----
pip3 install pre-commit && pre-commit install
----

When enabling additional checks https://pre-commit.com/#plugins[by editing .pre-commit-config.yaml], it is recommended to run to newly added check on all files in the repository. This can be done with the following command:
[source,shell]
----
pre-commit run --all-files
----

0 comments on commit a750450

Please sign in to comment.