-
Notifications
You must be signed in to change notification settings - Fork 6
/
.pre-commit-config.yaml
67 lines (66 loc) · 1.95 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
60
61
62
63
64
65
66
67
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# Global excludes, override per repo below if different excludes required.
# exclude: >
# (?x)^(
# DIRNAME_OR_FILENAME_HERE
# | DIRNAME_OR_FILENAME_HERE
# | DIRNAME_OR_FILENAME_HERE
# )
repos:
# Note: hooks that add content must run before ones which check formatting, lint, etc
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.3.1
hooks:
- id: insert-license
language: python
files: \.py$
args:
- --license-filepath
- license_header/mpl2_header.txt
- --comment-style
- "|#|"
- id: insert-license
exclude: media\/.*\/libs\/.*$
files: \.js$
args:
- --license-filepath
- license_header/mpl2_header.txt
- --comment-style
- /*|*|*/
- id: insert-license
exclude: media\/.*\/libs\/.*$
files: \.s{0,1}css$
args:
- --license-filepath
- license_header/mpl2_header.txt
- --comment-style
- "//"
- id: insert-license
files: \.sh$
args:
- --license-filepath
- license_header/mpl2_header.txt
- id: insert-license
files: \.toml$
args:
- --license-filepath
- license_header/mpl2_header.txt
- id: insert-license
files: \.yaml$
args:
- --license-filepath
- license_header/mpl2_header.txt
- --comment-style
- "|#|"
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.0.287
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix] # autofix means we go BEFORE black
- repo: https://github.com/psf/black
rev: 22.12.0
hooks:
- id: black
language_version: python3