Skip to content

Commit 7201e3f

Browse files
committed
Add pre-commit configuration
1 parent 6561d06 commit 7201e3f

1 file changed

Lines changed: 51 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: check-added-large-files
6+
args: [--maxkb=2000]
7+
- id: check-ast
8+
- id: check-case-conflict
9+
- id: check-executables-have-shebangs
10+
- id: check-merge-conflict
11+
- id: check-symlinks
12+
- id: check-toml
13+
- id: check-yaml
14+
- id: debug-statements
15+
- id: destroyed-symlinks
16+
- id: end-of-file-fixer
17+
files: \.(py|sh|rst|yml|yaml)$
18+
- id: mixed-line-ending
19+
- id: trailing-whitespace
20+
files: \.(py|sh|rst|yml|yaml)$
21+
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
22+
rev: v2.14.0
23+
hooks:
24+
- id: pretty-format-yaml
25+
args: [--autofix, --indent, '2']
26+
- repo: https://github.com/tox-dev/pyproject-fmt
27+
rev: v2.5.0
28+
hooks:
29+
- id: pyproject-fmt
30+
- repo: https://github.com/psf/black
31+
rev: 24.10.0
32+
hooks:
33+
- id: black
34+
- repo: https://github.com/astral-sh/ruff-pre-commit
35+
rev: v0.8.1
36+
hooks:
37+
- id: ruff
38+
args: [--fix]
39+
- repo: https://github.com/pre-commit/mirrors-mypy
40+
rev: v1.13.0
41+
hooks:
42+
- id: mypy
43+
files: ^openapi_generator_cli/
44+
args: [--strict]
45+
# additional_dependencies:
46+
- repo: https://github.com/igorshubovych/markdownlint-cli
47+
rev: v0.43.0
48+
hooks:
49+
- id: markdownlint
50+
exclude: ^.github/PULL_REQUEST_TEMPLATE.md
51+
args: [--disable=MD013]

0 commit comments

Comments
 (0)