-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
211 lines (194 loc) · 7.44 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
# Leka - iOS Monorepo
# Copyright APF France handicap
# SPDX-License-Identifier: Apache-2.0
# ? See https://pre-commit.com for more information
# ? See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-shebang-scripts-are-executable
- id: check-symlinks
- id: detect-private-key
- id: end-of-file-fixer
exclude_types: [json]
exclude: '(.*\.xcstrings|\.xcassets|\.svg)'
- id: forbid-submodules
- id: mixed-line-ending
- id: no-commit-to-branch
args: [--branch, main, --branch, develop]
- id: trailing-whitespace
- id: check-yaml
exclude: exercise_templates.yml
- id: check-json
types: [file]
files: \.(json|xcstrings)$
exclude: '(.*\.xcassets/.*\.json$)'
- id: pretty-format-json
args: ["--autofix", "--indent=4", "--top-keys=version,sourceLanguage"]
types: [file]
files: \.(json|xcstrings)$
exclude: '(\.vscode/settings\.json|\.jtd\.json$|.*\.xcassets/.*|.*\.colorset/.*|\.animation\.lottie\.json$)'
- repo: local
hooks:
- id: swiftlint
name: SwiftLint
description: "Check Swift files for issues with SwiftLint"
entry: "swiftlint --quiet"
language: system
types: [swift]
args: ["--use-alternative-excluding"]
- id: swiftformat
name: SwiftFormat
description: "Check swift files for formatting issues with SwiftFormat"
entry: swiftformat
language: system
types: [swift]
- id: check_xcstrings
name: Check .xcstrings files for stale entries and unusual characters
description: This hook checks .xcstrings files for stale entries and unusual characters
entry: python3 Tools/Hooks/check_xcstrings.py
language: python
additional_dependencies: ["pygments"]
files: '.*\.xcstrings'
- id: check_yaml_definitions_avatars
name: Check avatars.yml
description: |
This hook checks avatars.yml for:
- non unique ids
- jtd schema validation
- filename and image consistency
It also formats the file
entry: python3 Tools/Hooks/check_yaml_definitions_avatars.py
language: python
additional_dependencies: ["ruamel.yaml"]
files: avatars.yml
- id: check_yaml_definitions_professions
name: Check professions.yml
description: |
This hook checks professions.yml for:
- non unique ids
- jtd schema validation
It also formats the file and sorts the entries
entry: python3 Tools/Hooks/check_yaml_definitions_professions.py
language: python
additional_dependencies: ["ruamel.yaml"]
files: professions.yml
- id: check_yaml_definitions_authors
name: Check authors.yml
description: |
This hook checks authors.yml for:
- non unique ids
- jtd schema validation
It also formats the file and sorts the entries
entry: python3 Tools/Hooks/check_yaml_definitions_authors.py
language: python
additional_dependencies: ["ruamel.yaml"]
files: authors.yml
- id: check_yaml_definitions_skills
name: Check skills.yml
description: |
This hook checks skills.yml for:
- non unique ids
- jtd schema validation
It also formats the file and sorts the entries
entry: python3 Tools/Hooks/check_yaml_definitions_skills.py
language: python
additional_dependencies: ["ruamel.yaml"]
files: skills.yml
- id: check_yaml_definitions_robot_assets
name: Check robot_assets.yml
description: |
This hook checks robot_assets.yml for:
- non unique ids
- jtd schema validation
It also formats the file and sorts the entries
entry: python3 Tools/Hooks/check_yaml_definitions_robot_assets.py
language: python
additional_dependencies: ["ruamel.yaml"]
files: robot_assets.yml
- id: check_yaml_definitions_tags
name: Check tags.yml
description: |
This hook checks tags.yml for:
- non unique ids
- jtd schema validation
It also formats the file and sorts the entries
entry: python3 Tools/Hooks/check_yaml_definitions_tags.py
language: python
additional_dependencies: ["ruamel.yaml"]
files: tags.yml
- id: check_yaml_content_activities
name: Check activity.yml files
description: |
This hook checks activity.yml files for:
- uuid and filename consistency
- jtd schema validation
entry: python3 Tools/Hooks/check_yaml_content_activities.py
language: python
additional_dependencies: ["ruamel.yaml"]
files: .*\.activity\.yml
types: [yaml]
pass_filenames: true
- id: check_yaml_content_activities_unique_uuid
name: Check activity.yml files for unique uuid
description: |
This hook checks activity.yml files for unique uuid
entry: python3 Tools/Hooks/check_yaml_content_activities_unique_uuid.py
language: python
files: .*\.activity\.yml
types: [yaml]
pass_filenames: false
- id: check_yaml_content_activities_assets
name: Check activity.asset.* files
description: |
This hook checks activity.asset.* files for:
- duplicates
entry: python3 Tools/Hooks/check_yaml_content_activities_assets.py
language: python
pass_filenames: false
always_run: true
- id: check_yaml_content_curriculums
name: Check curriculum.yml files
description: |
This hook checks curriculum.yml files for:
- uuid and filename consistency
- jtd schema validation
entry: python3 Tools/Hooks/check_yaml_content_curriculums.py
language: python
additional_dependencies: ["ruamel.yaml"]
files: .*\.curriculum\.yml
types: [yaml]
- id: check_yaml_content_curriculums_unique_uuid
name: Check curriculum.yml files for unique uuid
description: |
This hook checks curriculum.yml files for unique uuid
entry: python3 Tools/Hooks/check_yaml_content_curriculums_unique_uuid.py
language: python
files: .*\.curriculum\.yml
types: [yaml]
pass_filenames: false
- id: check_yaml_content_stories
name: Check story.yml files
description: |
This hook checks story.yml files for:
- uuid and filename consistency
- jtd schema validation
entry: python3 Tools/Hooks/check_yaml_content_stories.py
language: python
additional_dependencies: ["ruamel.yaml"]
files: .*\.story\.yml
types: [yaml]
- id: check_yaml_content_stories_unique_uuid
name: Check story.yml files for unique uuid
description: |
This hook checks story.yml files for unique uuid
entry: python3 Tools/Hooks/check_yaml_content_stories_unique_uuid.py
language: python
files: .*\.story\.yml
types: [yaml]
pass_filenames: false