Update docs/pre-commit-hook-setup.md

Co-authored-by: Cornelius Riemenschneider <criemen@github.com>
This commit is contained in:
Mathias Vorreiter Pedersen
2021-01-05 16:27:53 +01:00
committed by GitHub
parent 11e2bc3b78
commit ae388ec796

View File

@@ -3,7 +3,7 @@
As stated in [CONTRIBUTING](../CONTRIBUTING.md) all CodeQL files must be formatted according to our [CodeQL style guide](ql-style-guide.md). You can use our pre-commit hook to avoid committing incorrectly formatted code. To use it, simply copy the [pre-commit](../misc/scripts/pre-commit) script to `.git/modules/ql/hooks/pre-commit` and make sure that: As stated in [CONTRIBUTING](../CONTRIBUTING.md) all CodeQL files must be formatted according to our [CodeQL style guide](ql-style-guide.md). You can use our pre-commit hook to avoid committing incorrectly formatted code. To use it, simply copy the [pre-commit](../misc/scripts/pre-commit) script to `.git/modules/ql/hooks/pre-commit` and make sure that:
- The script is executable. On Linux and macOS this can be done using `chmod +x`. - The script is executable. On Linux and macOS this can be done using `chmod +x`.
- The CodeQL CLI has in added to your `PATH`. - The CodeQL CLI has been added to your `PATH`.
The script will abort a commit that contains incorrectly formatted code in .ql or .qll files and print an error message like: The script will abort a commit that contains incorrectly formatted code in .ql or .qll files and print an error message like: