Skip to content

Commit

Permalink
Merge pull request riscv#32 from arichardson/pre-commit
Browse files Browse the repository at this point in the history
Add instructions on how to enable pre-commit
  • Loading branch information
wmat authored Jan 29, 2024
2 parents 3507342 + 182f02c commit e1c38be
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 e1c38be

Please sign in to comment.