forked from dials/dials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
45 lines (41 loc) · 1.12 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
ci:
skip: [no-images]
autoupdate_schedule: quarterly
repos:
# Syntax validation and some basic sanity checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-merge-conflict
- id: check-ast
fail_fast: True
- id: check-json
- id: check-added-large-files
args: ['--maxkb=200']
- id: check-yaml
args: ['--allow-multiple-documents']
- id: no-commit-to-branch
name: "Don't commit to 'main' directly"
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
- id: ruff-format
files: \.pyi?$|SConscript$|^libtbx_config$
types: [file]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.6
hooks:
- id: clang-format
files: \.c(c|pp|xx)?$|\.h(pp)?$
# Give a specific warning for added image files
- repo: local
hooks:
- id: no-images
name: Check for image files
entry: >
Images for documentation should go into the documentation repository
https://github.com/dials/dials.github.io
language: fail
files: '.*\.png$'