-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.pre-commit-config.yaml
60 lines (54 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
# See https://pre-commit.com for more information
---
ci:
autoupdate_schedule: monthly
repos:
- repo: https://github.com/codespell-project/codespell
rev: 63c8f8312b7559622c0d82815639671ae42132ac # frozen: v2.4.1
hooks:
- id: codespell
# Additional dependency needed until Python 3.11 is our minimum version.
additional_dependencies:
- tomli
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 895ebb389825c29bd4e0addcf7579d6c69d199cc # frozen: v0.9.6
hooks:
- id: ruff
args: [--fix, --show-fixes, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: a23f6b85d0fdd5bb9d564e2579e678033debbdff # frozen: v0.10.0.1
hooks:
- id: shellcheck
- repo: local
hooks:
- id: sort-json
name: Sort JSON
description: Recursively sort JSON files by key.
entry: ./scripts/sort_json.py
language: script
types: [json]
files: src/CSET/operators/_colorbar_definition.json
- repo: local
hooks:
- id: regenerate-rose-meta
name: Regenerate rose metadata
description: Ensure the rose metadata has been generated from its template.
entry: ./scripts/generate_rose_meta.py
language: python
files: cset-workflow/meta/
additional_dependencies:
- jinja2
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: cef0300fd0fc4d2a87a85fa2093c6b283ea36f4b # frozen: v5.0.0
hooks:
- id: check-added-large-files
args: ["--maxkb=10240"]
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
# Prevent PP files being inappropriately "fixed".
exclude: ^.+\.pp$
- id: trailing-whitespace