-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
58 lines (52 loc) · 1.81 KB
/
.pre-commit-config.yaml
File metadata and controls
58 lines (52 loc) · 1.81 KB
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
# See https://pre-commit.com for more information
---
ci:
autoupdate_schedule: monthly
repos:
- repo: https://github.com/codespell-project/codespell
rev: 2ccb47ff45ad361a21071a7eedda4c37e6ae8c5a # frozen: v2.4.2
hooks:
- id: codespell
exclude: src/CSET/cset_workflow/app/metplus_point_stat/file/metoffice/PointStat_METplus_UKV.conf
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: d1b833175a5d08a925900115526febd8fe71c98e # frozen: v0.15.11
hooks:
- id: ruff-check
args: [--fix, --show-fixes, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: 745eface02aef23e168a8afb6b5737818efbea95 # frozen: v0.11.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: src/CSET/cset_workflow/meta/
additional_dependencies:
- jinja2
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: 3e8a8703264a2f4a69428a0aa4dcb512790b2c8c # frozen: v6.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