-
Notifications
You must be signed in to change notification settings - Fork 121
/
.pre-commit-config.yaml
97 lines (92 loc) · 2.8 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
default_stages: [pre-commit]
default_language_version:
python: python3
files: |
(?x)^(
.github/|
cobalt/|
media/starboard/|
starboard/|
components/viz/service/display/starboard/|
ui/ozone/platform/starboard/|
.pre-commit-config.yaml|
.pylintrc|
docker-compose.yaml
)
repos:
- repo: https://cobalt.googlesource.com/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-case-conflict
- id: check-xml
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://cobalt.googlesource.com/codespell
rev: v2.3.0
hooks:
- id: codespell
name: Spell Check
args: [-x, cobalt/precommit/.codespellignorelines,
# The --ignore-words-list argument has a bug where it needs to
# be lowercase, see
# https://github.com/codespell-project/codespell/issues/1390
--ignore-words-list, "atleast,varius,assertIn,requestor",
]
exclude: |
(?x)^(
starboard/content/ssl/certs/|
starboard/shared/starboard/player/testdata/|
starboard/android/apk/app/src/app/assets/web/link_android_splash_screen.html
)
- repo: local
hooks:
- id: clang-format
name: clang-format
entry: clang-format
language: python
types: [c++]
args: [-i, -style=file]
additional_dependencies: ['clang-format==17.0.1']
- id: yapf
name: yapf
entry: yapf
language: python
types: [python]
args: [-i, -vv]
additional_dependencies: ['yapf==0.40.2']
- id: pylint
name: pylint
entry: pylint
language: python
types: [python]
args: [-d W0201]
additional_dependencies: ['pylint==3.3.1']
- id: python3-compatibility-check
name: Python 3 Compatibility Check
entry: python3 ./cobalt/precommit/python3_check.py
language: python
types: [python]
- id: google-java-format
name: google-java-format
entry: python3 ./cobalt/precommit/google_java_format_wrapper.py
language: python
types: [java]
args: [-i]
- id: gcheckstyle
name: gcheckstyle
entry: python3 ./cobalt/precommit/gcheckstyle_wrapper.py
language: python
exclude: |
(?x)^(
starboard/android/apk/app/src/main/java/dev/cobalt/storage/StorageProto.java
)
types: [java]
- id: gn-format
name: gn-format
entry: gn format
language: system
files: '.*\.gni?$'