-
Notifications
You must be signed in to change notification settings - Fork 4
/
.pre-commit-config.yaml
164 lines (163 loc) · 5.33 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
# SPDX-FileCopyrightText: Copyright DB Netz AG and the capella-collab-manager contributors
# SPDX-License-Identifier: CC0-1.0
default_install_hook_types: [commit-msg, pre-commit]
default_stages: [commit, merge-commit]
minimum_pre_commit_version: 3.2.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-builtin-literals
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: check-toml
- id: check-vcs-permalinks
- id: check-xml
exclude: "backend/t4cclient/extensions/backups/jenkins/config.xml"
- id: check-yaml
exclude: "helm/|mkdocs.yml"
- id: debug-statements
- id: destroyed-symlinks
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: trailing-whitespace
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.9.1
hooks:
- id: black
files: "^backend/"
args:
- "--config"
- "backend/pyproject.toml"
types: [python]
- id: black
types: [python]
exclude: "^backend/"
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort
entry: bash -c "cd backend && isort ."
types: [python]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.5.1
hooks:
- id: mypy
types_or: [python, spec]
files: "^backend/capellacollab"
exclude: "^backend/capellacollab/alembic/"
args: [--config-file=./backend/pyproject.toml]
additional_dependencies:
- fastapi
- pydantic
- sqlalchemy
- capellambse==0.5.36
- typer
- repo: local
hooks:
- id: pylint
name: pylint
entry: pylint
args: [--rcfile=./backend/pyproject.toml]
language: system
types: [python]
files: "^backend/capellacollab"
exclude: "^backend/capellacollab/alembic/"
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
types_or: [ts, css, html, markdown]
additional_dependencies:
- "prettier@^3.0.3"
- "prettier-plugin-tailwindcss@^0.5.5"
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.4
hooks:
- id: insert-license
name: Insert license headers (shell-style comments)
files: '(?:^|/)(?:.*\.(?:py|sh|toml|ya?ml|cfg|ini)|Dockerfile|Makefile|nginx.conf)$'
exclude: '(?:^|/)\..+|^docs/Makefile$'
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_apache.txt
- --comment-style
- "#"
- id: insert-license
name: Insert license headers (shell-style comments)
files: '(?:^|/)(?:codeql-analysis.yml|dependabot.yml|\.(?:pre-commit-config.yaml|browserslistrc|editorconfig|(?:git|helm|docker)ignore))$'
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_cc0.txt
- --comment-style
- "#"
- id: insert-license
name: Insert license headers (XML-style comments)
files: '\.(?:html|md|xml)$'
exclude: '(?:^|/)\..+'
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_apache.txt
- --comment-style
- "<!--| ~| -->"
- id: insert-license
name: Insert license headers (C-style comments)
files: '\.(?:s?css|js|ts)$'
exclude: '(?:^|/)\..+'
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_apache.txt
- --comment-style
- "/*| *| */"
- id: insert-license
name: Insert license headers (reST comments)
files: '\.rst$'
exclude: '(?:^|/)\..+'
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
- LICENSES/.license_header_apache.txtcomemnt
- --comment-style
- "..| |"
- repo: https://github.com/fsfe/reuse-tool
rev: v2.1.0
hooks:
- id: reuse
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.51.0
hooks:
- id: eslint
additional_dependencies:
- "eslint@^8.50.0"
- "@angular-eslint/[email protected]"
- "@angular-eslint/[email protected]"
- "@angular-eslint/[email protected]"
- "eslint-config-prettier@^9.0.0"
- "eslint-plugin-import@^2.29.0"
- "@typescript-eslint/eslint-plugin@^6.9.0"
- "@typescript-eslint/parser@^6.9.0"
- "eslint-plugin-unused-imports@^3.0.0"
- "eslint-plugin-deprecation@^2.0.0"
- "eslint-plugin-tailwindcss@^3.13.0"
args: ["--fix"]
types: []
exclude: '.+\.spec(-helper)?\.ts$'
types_or: ["html", "ts"]
- repo: https://github.com/qoomon/git-conventional-commits
rev: v2.6.5
hooks:
- id: conventional-commits
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
args: ["--py311-plus"]