Skip to content

Latest commit

 

History

History
38 lines (30 loc) · 1.79 KB

git-hooks.md

File metadata and controls

38 lines (30 loc) · 1.79 KB

Git hooks

The repository offers git hooks to run lints and checks locally before committing changes. Under the hood this uses pre-commit plugins.

To install the git hooks, run the following:

$ make setup/git/hooks

Currently, the following plugins are enabled:

Troubleshooting: In case you run into any issues with the secrets, the output typically is enough to highlight the problem. However, in the case of the detect-secrets, you are required to do a few more steps:

# Ensure you have detect-secrets installed
$ pip3 install detect-secrets

# In the repository root, scan the repo for secrets and update the .secrets.baseline file.
$ detect-secrets scan --baseline .secrets.baseline

# Trigger an interactive audit of newly detected secrets. You will be asked to verify whether the detected secret
# is safe to be committed to the repository or not.
$ detect-secrets audit .secrets.baseline

# Afterwards, make sure you commit the updated .secrets.baseline file and the plugin should not return any errors
# anymore!

# To exclude a false positive secret use:
// pragma: allowlist secret