-
-
Notifications
You must be signed in to change notification settings - Fork 57
/
.pre-commit-config.yaml
59 lines (58 loc) · 1.62 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
exclude: >
(?x)(
^snuba/admin/dist/|
^snuba/admin/static/|
^snuba/protobufs/
)
repos:
- repo: https://github.com/psf/black
rev: 22.3.0
hooks:
- id: black
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-xml
- id: check-yaml
- id: detect-private-key
- id: end-of-file-fixer
- id: trailing-whitespace
- id: fix-encoding-pragma
args: ["--remove"]
- repo: https://github.com/pycqa/flake8
rev: 4.0.1
hooks:
- id: flake8
- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: no-commit-to-branch
args: ['--branch', 'master']
- repo: local
hooks:
- id: validate-configs-syntax
name: validate-configs-syntax
entry: env SNUBA_SETTINGS=test python3 -m snuba.validate_configs
language: python
additional_dependencies: [ 'fastjsonschema', 'pyyaml', 'sentry_sdk' ]
pass_filenames: false
files: 'snuba/datasets/configuration/.*'
- repo: local
hooks:
- id: cargo-fmt
name: format rust code
language: system
# keep in sync with Cargo.toml. There is no way to run cargo fmt for specific files
# https://github.com/rust-lang/rustfmt/issues/4485
entry: rustfmt --edition 2021
files: ^rust_snuba/.*\.rs$
default_language_version:
python: python3.11