forked from NanoComp/meep
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.pre-commit-config.yaml
58 lines (51 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# To use:
#
# pre-commit run -a
#
# Or:
#
# pre-commit install # (runs every time you commit in git)
#
# To update this file:
#
# pre-commit autoupdate
#
# See https://github.com/pre-commit/pre-commit
repos:
# Standard hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
# Black, the code formatter, natively supports pre-commit
- repo: https://github.com/psf/black
rev: "4f1772e2aed8356e57b923eacf45f813ec3324a0"
hooks:
- id: black
# Automatically upgrade syntax for newer versions of the language
- repo: https://github.com/asottile/pyupgrade
rev: v3.9.0
hooks:
- id: pyupgrade
args: [--py37-plus, --keep-runtime-typing]
# Collection of fast, cheap, regex based pre-commit hooks
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-use-type-annotations
# Find common security issues in Python code
- repo: https://github.com/PyCQA/bandit
rev: 1.7.5
hooks:
- id: bandit
args: [--exit-zero]
# ignore all tests, not just tests data
exclude: ^python/tests/
# Clang C/C++ formatter
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v16.0.6 # Use the sha / tag you want to point at
hooks:
- id: clang-format
types: [c++]