Debian Codegraph @

.pre-commit-config.yaml

raw
1 # See https://pre-commit.com for more information
2 # See https://pre-commit.com/hooks.html for more hooks
3 exclude: ^tests/fixtures/
4 repos:
5 - repo: https://github.com/pre-commit/pre-commit-hooks
6 rev: v6.0.0
7 hooks:
8 - id: check-added-large-files
9 - id: check-executables-have-shebangs
10 - id: check-json
11 exclude: '\.vscode/(cSpell|extensions)\.json' # cSpell.json and extensions.json use comments
12 - id: check-shebang-scripts-are-executable
13 exclude: '.+\.rs' # would be triggered by #![some_attribute]
14 - id: check-symlinks
15 - id: check-toml
16 - id: check-yaml
17 args: [ --allow-multiple-documents ]
18 - id: destroyed-symlinks
19 - id: end-of-file-fixer
20 - id: mixed-line-ending
21 args: [ --fix=lf ]
22 - id: trailing-whitespace
23
24 - repo: https://github.com/mozilla-l10n/moz-fluent-linter
25 rev: v0.4.9
26 hooks:
27 - id: fluent_linter
28 files: \.ftl$
29 args: [--config, .github/fluent_linter_config.yml, src/uu/]
30
31 - repo: https://github.com/streetsidesoftware/cspell-cli
32 rev: v10.2.0
33 hooks:
34 - id: cspell
35 # Pinned so the check does not depend on the node version a contributor
36 # happens to have installed; cspell v10 requires node >= 22.18.
37 language_version: '22.18.0'
38 args:
39 - --config
40 - .vscode/cSpell.json
41 - --no-must-find-files
42 - --no-progress
43 - --no-summary
44 - --gitignore
45 - --files # must stay last: pre-commit appends the filenames here
46
47 - repo: local
48 hooks:
49 - id: rust-linting
50 name: Rust linting
51 description: Run cargo fmt on files included in the commit.
52 entry: cargo +stable fmt --
53 pass_filenames: true
54 types: [file, rust]
55 language: system
56 - id: rust-clippy
57 name: Rust clippy
58 description: Run cargo clippy on files included in the commit.
59 entry: cargo +stable clippy --workspace --all-targets --all-features -- -D warnings
60 pass_filenames: false
61 types: [file, rust]
62 language: system
63 - id: cargo-lock-check
64 name: Cargo.lock sync check
65 description: Ensure Cargo.lock and fuzz/Cargo.lock are up-to-date.
66 entry: bash -c 'for dir in . fuzz; do ( cd "$dir" && cargo fetch --quiet ); done'
67 pass_filenames: false
68 files: 'Cargo\.(toml|lock)$'
69 language: system
70
71 ci:
72 skip: [cspell, rust-linting, rust-clippy, cargo-lock-check]