File: .pre-commit-config.yaml

package info (click to toggle)
rust-coreutils 0.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 485,976 kB
  • sloc: ansic: 103,608; asm: 28,570; sh: 8,672; python: 5,662; makefile: 474; cpp: 97; javascript: 72
file content (51 lines) | stat: -rw-r--r-- 1,882 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: check-added-large-files
      - id: check-executables-have-shebangs
      - id: check-json
        exclude: '.vscode/cSpell\.json' # cSpell.json uses comments
      - id: check-shebang-scripts-are-executable
        exclude: '.+\.rs' # would be triggered by #![some_attribute]
      - id: check-symlinks
      - id: check-toml
      - id: check-yaml
        args: [ --allow-multiple-documents ]
      - id: destroyed-symlinks
      - id: end-of-file-fixer
      - id: mixed-line-ending
        args: [ --fix=lf ]
      - id: trailing-whitespace

  - repo: https://github.com/mozilla-l10n/moz-fluent-linter
    rev: v0.4.8
    hooks:
      - id: fluent_linter
        files: \.ftl$
        args: [--config, .github/fluent_linter_config.yml, src/uu/]

  - repo: local
    hooks:
      - id: rust-linting
        name: Rust linting
        description: Run cargo fmt on files included in the commit.
        entry: cargo +stable fmt --
        pass_filenames: true
        types: [file, rust]
        language: system
      - id: rust-clippy
        name: Rust clippy
        description: Run cargo clippy on files included in the commit.
        entry: cargo +stable clippy --workspace --all-targets --all-features -- -D warnings
        pass_filenames: false
        types: [file, rust]
        language: system
      - id: cspell
        name: Code spell checker (cspell)
        description: Run cspell to check for spelling errors (if available).
        entry: bash -c 'if command -v cspell >/dev/null 2>&1; then cspell --no-must-find-files -- "$@"; else echo "cspell not found, skipping spell check"; exit 0; fi' --
        pass_filenames: true
        language: system