-
Notifications
You must be signed in to change notification settings - Fork 1
/
.pre-commit-config.yaml
75 lines (69 loc) · 1.82 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
minimum_pre_commit_version: '2.18.0'
default_install_hook_types: [pre-commit, commit-msg]
default_stages: [commit, push]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: no-commit-to-branch # prevent direct commits to main branch
alias: no-commit-to-main
- id: check-yaml
args: ['--unsafe']
# - id: check-toml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: no-commit-to-branch
alias: validate-branch-name
args: ['--pattern', '^(?!((fix|feat|style|ci|test|docs)\/[a-zA-Z0-9\-]+)$).*']
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
additional_dependencies:
- tomli
exclude: '^pdm\.lock$'
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.8
hooks:
# Run the linter.
- id: ruff
types_or: [ python, pyi, jupyter ]
# Run the linter and fix the errors.
- id: ruff
alias: ruff-fix
types_or: [ python, pyi, jupyter ]
args: [ --fix ]
stages: [manual]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi, jupyter ]
args: [ --check ]
# Run the formatter and fix the errors.
- id: ruff-format
alias: ruff-format-fix
types_or: [ python, pyi, jupyter ]
stages: [manual]
- repo: https://github.com/commitizen-tools/commitizen
rev: v3.13.0
hooks:
- id: commitizen
stages: [commit-msg]
- id: commitizen-branch
stages: [push]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.7.1'
hooks:
- id: mypy
args: [--strict, --ignore-missing-imports]
additional_dependencies: [tokenize-rt==3.2.0]
stages: [manual]
- repo: local
hooks:
- id: miniwdl-check
name: miniwdl check
language: system
files: ".+\\.wdl"
verbose: true
entry: .venv/bin/miniwdl
args: [check]