forked from dials/dials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
47 lines (42 loc) · 1.09 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
repos:
# Automatically sort imports
- repo: https://github.com/PyCQA/isort
rev: 5.9.2
hooks:
- id: isort
# Automatic source code formatting
- repo: https://github.com/psf/black
rev: 21.6b0
hooks:
- id: black
args: [--safe, --quiet]
files: \.pyi?$|SConscript$|^libtbx_config$
types: [file]
# Linting
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
hooks:
- id: flake8
additional_dependencies: ['flake8-comprehensions==3.5.0']
# 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$'
# Syntax validation and some basic sanity checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-ast
- id: check-yaml
args: ['--allow-multiple-documents']
- id: check-merge-conflict
- id: check-added-large-files
args: ['--maxkb=200']
- id: no-commit-to-branch
name: "Don't commit to 'main'"