repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: # - id: no-commit-to-branch # args: [--branch, master, --branch, main, --pattern, release/.*] - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml - id: check-added-large-files - id: mixed-line-ending - id: check-merge-conflict - id: check-shebang-scripts-are-executable - id: check-executables-have-shebangs - repo: https://github.com/jorisroovers/gitlint rev: v0.19.1 hooks: - id: gitlint args: [ "--ignore", "body-is-missing", "--contrib=CT1", "--msg-filename" ] stages: [commit-msg] - repo: local hooks: - id: clippy name: clippy language: system entry: cargo clippy -- -W clippy::all -W clippy::pedantic pass_filenames: false always_run: true - id: cargo-fmt name: cargo fmt language: system entry: cargo fmt --check pass_filenames: false always_run: true - id: check-todos # [NOGREP] name: check-todos # [NOGREP] language: system entry: sh -c "! grep --color=always --binary-files=without-match --dereference-recursive --exclude-dir='notes' --exclude-dir='target' --exclude-dir='node_modules' --exclude-dir='.git' --exclude='.pre-commit-config.yaml' --exclude-dir='venv' 'TODO' | grep -v '[NOGREP]'" # [NOGREP] pass_filenames: false always_run: true