Salome HOME
[FORUM 505] prepare command fix on windows
[tools/sat.git] / .pre-commit-config.yaml
1 ---
2 repos:
3     - repo: https://github.com/pre-commit/pre-commit-hooks
4       rev: v4.5.0  # Use the ref you want to point at
5       hooks:
6           - id: trailing-whitespace
7             exclude: |
8                 (?x)^(
9                   .*\.py
10                 )$
11           - id: check-added-large-files
12           - id: debug-statements
13           - id: detect-private-key
14           - id: end-of-file-fixer
15           - id: mixed-line-ending
16             exclude: |
17                 (?x)^(
18                   .*\.py
19                 )$
20           - id: check-case-conflict
21             exclude: |
22                 (?x)^(
23                   .*\.py
24                 )$
25           - id: check-json
26           - id: pretty-format-json
27           - id: check-merge-conflict
28           - id: check-toml
29           - id: check-xml
30           - id: requirements-txt-fixer
31     - repo: https://github.com/astral-sh/ruff-pre-commit
32       # Ruff version.
33       rev: v0.1.9
34       hooks:
35         # Run the linter.
36           - id: ruff
37             types_or: [python, pyi, jupyter]
38             args: [--fix]
39             exclude: |
40                 (?x)^(
41                     .*[Tt]est.*|
42                     __init__.py
43                 )$
44         # Run the formatter.
45           - id: ruff-format
46             types_or: [python, pyi, jupyter]
47     - repo: https://github.com/pre-commit/mirrors-mypy
48       rev: v1.8.0
49       hooks:
50           - id: mypy
51             exclude: |
52                 (?x)^(
53                     .*[Tt]est.*
54                 )$
55             args: [--ignore-missing-imports, --explicit-package-bases]
56     - repo: https://github.com/scop/pre-commit-shfmt
57       rev: v3.7.0-4
58       hooks:
59           # Choose one of:
60           - id: shfmt  # prebuilt upstream executable
61             args: [--indent=4, -w, -s]
62     - repo: https://github.com/shellcheck-py/shellcheck-py
63       rev: v0.9.0.6
64       hooks:
65           - id: shellcheck
66             args: [--severity=warning]
67     - repo: https://github.com/adrienverge/yamllint.git
68       rev: v1.21.0  # or higher tag
69       hooks:
70           - id: yamllint
71             args: [--strict, '--config-data={extends: relaxed, rules: {line-length: {max: 120}}}']
72     - repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
73       rev: 0.2.1  # or other specific tag
74       hooks:
75           - id: yamlfmt
76     - repo: https://github.com/pre-commit/pygrep-hooks
77       rev: v1.10.0  # Use the ref you want to point at
78       hooks:
79           - id: rst-backticks
80           - id: rst-directive-colons
81           - id: rst-inline-touching-normal