mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-09 05:44:23 +00:00
1.2 KiB
1.2 KiB
Pre-commit
Table of contents
TL;DR
# Generate a very basic configuration.
pre-commit sample-config > .pre-commit-config.yaml
# Manually run checks.
pre-commit run --all-files
pre-commit run "ansible-lint" --files "ansible/"
# Automatically run checks at every commit.
pre-commit install
# Update all hooks to the latest version available.
# It is *not* always the latest *stable* release.
pre-commit autoupdate
# Skip check on commit.
SKIP="flake8" git commit -m "foo"
Troubleshooting
Some files are skipped during a run
Check they are tracked (have been added to the repository).
Further readings
- Pre-commit's website
- List of supported hooks