-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.pre-commit-config.yaml
44 lines (40 loc) · 1.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
# See https://pre-commit.com for more information
---
ci:
autoupdate_schedule: monthly
repos:
- repo: https://github.com/codespell-project/codespell
rev: db0100e9569b92719311a5bf6727ca1bb4664409 # frozen: v2.4.0
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: 36b36942c52d8ce8ae6314461f2d86b1fda158e3 # frozen: v0.9.3
hooks:
- id: ruff
args: [--fix, --show-fixes, --exit-non-zero-on-fix]
- id: ruff-format
- 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: 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