forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.restyled.yaml
246 lines (236 loc) · 7.85 KB
/
.restyled.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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
#
# Copyright (c) 2020 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Do anything at all
enabled: true
# Push the style fixes directly to the original PR
auto: false
# Open Restyle PRs?
pull_requests: true
# Add labels to any created Restyle PRs
labels:
- restyled
# Labels to ignore
ignore_labels:
- restyled-ignore
# Leave comments on the original PR linking to the Restyle PR?
comments: false
# Request review on the Restyle PR
request_review: none
# Patterns to exclude from all Restylers
exclude:
- ".github/workflows/**/*" # https://github.com/restyled-io/restyler/issues/73
- ".github/workflows/*" # https://github.com/restyled-io/restyler/issues/73
- ".github/**/*" # https://github.com/restyled-io/restyler/issues/73
- ".github/*" # https://github.com/restyled-io/restyler/issues/73
- "*/**/third_party/*" # https://github.com/restyled-io/restyled.io/issues/213
- "*/**/third_party/**" # https://github.com/restyled-io/restyled.io/issues/213
- "*/**/third_party/**/*" # https://github.com/restyled-io/restyled.io/issues/213
- "third_party/android/**/*"
- "third_party/inipp/repo/**/*"
- "third_party/jlink/**/*"
- "third_party/lwip/repo/**/*"
- "third_party/nlbuild-autotools/repo/**/*"
- "third_party/nlbuild-autotools/repo/.**/*" # "**/*" doesn't include directories that start with "."
- "third_party/nlassert/repo/**/*" # from here down built with $ awk '/path =/ {print $3 "/**/*"}' .gitmodules
- "third_party/nlfaultinjection/repo/**/*"
- "third_party/nlio/repo/**/*"
- "third_party/nlunit-test/repo/**/*"
- "third_party/mbedtls/repo/**/*"
- "examples/common/QRCode/repo/**/*"
- "examples/common/m5stack-tft/repo/**/*"
- "third_party/pigweed/repo/**/*"
- "third_party/openthread/repo/**/*"
- "third_party/ot-br-posix/repo/**/*"
- "third_party/bluez/repo/**/*"
- "third_party/cirque/repo/**/*"
- "third_party/nanopb/repo/**/*"
- "examples/android/CHIPTool/gradlew" # gradle wrapper generated file
- "third_party/android_deps/gradlew" # gradle wrapper generated file
- "src/controller/python/chip/clusters/Objects.py" # generated file, no point to restyle
- "src/controller/python/chip/clusters/CHIPClusters.py" # generated file, no point to restyle
- "scripts/py_matter_idl/matter_idl/tests/outputs/**/*" # Matches generated output 1:1
- "scripts/tools/zap/tests/outputs/**/*" # Matches generated output 1:1
- "examples/chef/sample_app_util/test_files/*.yaml"
- "examples/chef/zzz_generated/**/*"
- "examples/platform/nxp/k32w/k32w0/scripts/demo_generated_certs/**/*"
- "integrations/cloudbuild/*.yaml" # uglier long command line content
- "scripts/run_codegen_targets.sh" # shellharden breaks for loops over command outputs
- "scripts/tagging/tag_new_release.sh" # shellharden breaks parameter passing
- "src/darwin/Framework/CHIP/zap-generated/*" # already clang-formatted by our zap tooling
- "zzz_generated/**/*" # already clang-formatted by our zap tooling
- "src/controller/java/generated/java/**/*" # not formatted: generated files
- "src/controller/java/zap-generated/**/*" # not formatted: generated files
- "scripts/setup/bootstrap.sh" # tries to quote loop variable
- "integrations/docker/build-all.sh" # tries to quote loop variable
- "scripts/setup/pigweed.json" # TODO(#29547). This file is temporary copy from pigweed repo that has minor edits. No restyle help in diff.
- "docs/ERROR_CODES.md" # generated by scripts, not easy to align tables
- "docs/clusters.md" # generated by scripts, not easy to align tables
- "docs/testing/yaml_pseudocluster.md" # generated by scripts, restyler makes the tables render improperly
- "docs/testing/yaml_schema.md" # generated by scripts, restyler makes the tables render improperly
changed_paths:
maximum: 100000
outcome: error
# Restylers to run, and how
restylers:
- name: whitespace
enabled: true
image: restyled/restyler-whitespace:v0.1.0.1
command:
- whitespace
arguments: []
include:
- "**/Dockerfile"
- ".**/Dockerfile"
- "**/*.yml"
- "**/*.yaml"
- ".**/*.yml"
- ".**/*.yaml"
- "**/*.sh"
- "**/*.c"
- "**/*.cc"
- "**/*.cpp"
- "**/*.ipp"
- "**/*.cxx"
- "**/*.c++"
- "**/*.C"
- "**/*.cs"
- "**/*.h"
- "**/*.hh"
- "**/*.hpp"
- "**/*.hxx"
- "**/*.h++"
- "**/*.H"
- "**/*.java"
- "**/*.js"
- "**/*.json"
- ".**/*.js"
- ".**/*.json"
- "**/*.m"
- "**/*.mm"
- name: google-java-format
enabled: true
# Update https://github.com/project-chip/connectedhomeip/blob/master/scripts/tools/zap/generate.py if this version changes.
image: restyled/restyler-google-java-format:v1.6
command:
- google-java-format
- "--replace"
arguments: []
include:
- "**/*.java"
interpreters: []
- name: clang-format
enabled: true
image: restyled/restyler-clang-format:v16.0.6
command:
- clang-format
- "-i"
arguments: []
include:
- "**/*.c"
- "**/*.cc"
- "**/*.cpp"
- "**/*.ipp"
- "**/*.cxx"
- "**/*.c++"
- "**/*.C"
- "**/*.cs"
- "**/*.h"
- "**/*.hh"
- "**/*.hpp"
- "**/*.hxx"
- "**/*.h++"
- "**/*.H"
- "**/*.js"
- "**/*.m"
- "**/*.mm"
interpreters: []
- name: gn
image: restyled/restyler-gn:v1
enabled: true
include:
- "**/*.gn"
- "**/*.gni"
- name: prettier-json
image: restyled/restyler-prettier:v1.19.1-2
enabled: true
command:
- prettier
- "--write"
arguments: []
include:
- "**/*.json"
- ".**/*.json"
interpreters: []
- name: prettier-markdown
image: restyled/restyler-prettier:v1.19.1-2
command:
- prettier
- "--write"
arguments: []
enabled: true
include:
- "**/*.md"
- "**/*.markdown"
- name: prettier-yaml
image: restyled/restyler-prettier:v1.19.1-2
enabled: true
command:
- prettier
- "--write"
include:
- "**/*.yml"
- "**/*.yaml"
- name: shellharden
image: restyled/restyler-shellharden:v4.1.1-2
enabled: true
include:
- "**/*.sh"
- "**/*.bash"
- name: shfmt
image: restyled/restyler-shfmt:v3.0.1
enabled: true
command:
- shfmt
- "-w"
arguments:
- "-i"
- "4"
- "-ci"
interpreters:
- sh
- bash
include:
- "**/*.sh"
- "**/*.bash"
- name: autopep8
image: restyled/restyler-autopep8:v2.0.0
command:
- autopep8
- "--in-place"
arguments: []
include:
- "**/*.py"
interpreters:
- python
- name: isort
image: restyled/restyler-isort:v5.11.2
command:
- isort
arguments: []
include:
- "**/*.py"
interpreters:
- python