-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
81 lines (72 loc) · 2.05 KB
/
.pre-commit-config.yaml
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# NOTE: pre-commit runs all hooks from the root folder of the repository,
# as regular git hooks do. Therefore, paths passed as arguments to the plugins
# should always be relative to the root folder.
default_stages: [pre-commit, pre-push]
default_language_version:
python: python3.10
minimum_pre_commit_version: 3.8.0
files: |
(?x)^(
model/.*|
tools/.*
)$
repos:
- repo: meta
hooks:
- id: check-hooks-apply
stages: [manual]
- id: check-useless-excludes
stages: [manual]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-yaml
- id: debug-statements
- id: destroyed-symlinks
# - repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
# rev: v2.6.0
# hooks:
# - id: pretty-format-ini
# args: [--autofix]
# - id: pretty-format-toml
# args: [--autofix]
# - id: pretty-format-yaml
# args: [--autofix, --preserve-quotes, --indent, "2"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.4
hooks:
- id: prettier
types_or: [markdown, json]
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: insert-license
name: add license for all ICON4Py Python source files
types: [python]
args: [--comment-style, "|#|", --license-filepath, HEADER.txt, --fuzzy-match-generates-todo]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.2.2
hooks:
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/gauge-sh/tach-pre-commit
rev: v0.16.0
hooks:
- id: tach
name: Check inter-package dependencies
# TODO(egparedes): fix and activate mypy hook
# - repo: local
# hooks:
# - id: mypy
# name: mypy static type checker
# entry: bash -c 'mypy tools/src/icon4py/tools model/common/src/icon4py/model/common'
# language: system
# types_or: [python, pyi]
# pass_filenames: false
# require_serial: true
# stages: [pre-commit]