blob: 28003f28532fd4819b47fee85e16838d16cdc211 [file] [log] [blame]
Robert Szewczyk38cf7312020-06-29 09:07:49 -07001#
2# Copyright (c) 2020 Project CHIP Authors
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
Justin Wood0c46b2e2020-04-17 14:20:48 -070017# Do anything at all
18enabled: true
19
20# Push the style fixes directly to the original PR
21auto: false
22
23# Open Restyle PRs?
24pull_requests: true
25
26# Add labels to any created Restyle PRs
27labels:
28 - restyled
29
30# Labels to ignore
31ignore_labels:
32 - restyled-ignore
33
34# Leave comments on the original PR linking to the Restyle PR?
35comments: false
36
37# Request review on the Restyle PR
38request_review: none
39
40# Patterns to exclude from all Restylers
41exclude:
42 - ".github/workflows/**/*" # https://github.com/restyled-io/restyler/issues/73
Vivien Nicolasdd625452020-07-09 04:56:45 +020043 - ".github/workflows/*" # https://github.com/restyled-io/restyler/issues/73
44 - ".github/**/*" # https://github.com/restyled-io/restyler/issues/73
45 - ".github/*" # https://github.com/restyled-io/restyler/issues/73
Boris Zbarsky775b2b12020-09-11 11:06:36 -040046 - "*/**/third_party/*" # https://github.com/restyled-io/restyled.io/issues/213
47 - "*/**/third_party/**" # https://github.com/restyled-io/restyled.io/issues/213
48 - "*/**/third_party/**/*" # https://github.com/restyled-io/restyled.io/issues/213
Rob Walker085b3d02020-09-08 14:11:59 -070049 - "third_party/android/**/*"
50 - "third_party/inipp/repo/**/*"
51 - "third_party/jlink/**/*"
52 - "third_party/lwip/repo/**/*"
53 - "third_party/nlbuild-autotools/repo/**/*"
54 - "third_party/nlbuild-autotools/repo/.**/*" # "**/*" doesn't include directories that start with "."
55 - "third_party/nlassert/repo/**/*" # from here down built with $ awk '/path =/ {print $3 "/**/*"}' .gitmodules
56 - "third_party/nlfaultinjection/repo/**/*"
57 - "third_party/nlio/repo/**/*"
58 - "third_party/nlunit-test/repo/**/*"
59 - "third_party/mbedtls/repo/**/*"
60 - "examples/common/QRCode/repo/**/*"
61 - "examples/common/m5stack-tft/repo/**/*"
62 - "third_party/pigweed/repo/**/*"
63 - "third_party/openthread/repo/**/*"
64 - "third_party/ot-br-posix/repo/**/*"
65 - "third_party/bluez/repo/**/*"
Rob Walker085b3d02020-09-08 14:11:59 -070066 - "third_party/cirque/repo/**/*"
szatmzf44fb762020-10-19 18:36:24 -040067 - "third_party/nanopb/repo/**/*"
Andrei Litvin57522052021-08-16 12:24:20 -040068 - "src/android/CHIPTool/gradlew" # gradle wrapper generated file
Austin Hsieh77a9f6a2021-09-28 16:30:16 -070069 - "third_party/android_deps/gradlew" # gradle wrapper generated file
Jerry Johnsbb608352021-12-06 11:01:02 -080070 - "src/controller/python/chip/clusters/Objects.py" # generated file, no point to restyle
71 - "src/controller/python/chip/clusters/CHIPClusters.py" # generated file, no point to restyle
Andrei Litvin7f358b62022-01-24 12:25:12 -050072 - "scripts/idl/tests/outputs/**/*" # Matches generated output 1:1
Rob Walker085b3d02020-09-08 14:11:59 -070073
74
75changed_paths:
76 maximum: 100000
77 outcome: error
Justin Wood0c46b2e2020-04-17 14:20:48 -070078
79# Restylers to run, and how
80restylers:
Rob Walker5a9f46d2020-05-26 14:32:28 -070081 - name: whitespace
82 enabled: true
Rob Walker085b3d02020-09-08 14:11:59 -070083 image: restyled/restyler-whitespace:v0.1.0.1
Rob Walker5a9f46d2020-05-26 14:32:28 -070084 command:
85 - whitespace
86 arguments: []
87 include:
Rob Walker84781242020-06-03 18:15:33 -070088 - "**/Dockerfile"
Rob Walker085b3d02020-09-08 14:11:59 -070089 - ".**/Dockerfile"
Rob Walkerafdc90d2020-06-03 20:07:26 -070090 - "**/*.yml"
91 - "**/*.yaml"
Rob Walker085b3d02020-09-08 14:11:59 -070092 - ".**/*.yml"
93 - ".**/*.yaml"
Rob Walker84781242020-06-03 18:15:33 -070094 - "**/*.sh"
Rob Walker5a9f46d2020-05-26 14:32:28 -070095 - "**/*.c"
96 - "**/*.cc"
97 - "**/*.cpp"
98 - "**/*.cxx"
99 - "**/*.c++"
100 - "**/*.C"
101 - "**/*.cs"
102 - "**/*.h"
103 - "**/*.hh"
104 - "**/*.hpp"
105 - "**/*.hxx"
106 - "**/*.h++"
107 - "**/*.H"
108 - "**/*.java"
109 - "**/*.js"
Rob Walkerafdc90d2020-06-03 20:07:26 -0700110 - "**/*.json"
Rob Walker085b3d02020-09-08 14:11:59 -0700111 - ".**/*.js"
112 - ".**/*.json"
Rob Walker5a9f46d2020-05-26 14:32:28 -0700113 - "**/*.m"
114 - "**/*.mm"
randyrossic4964e32020-06-23 19:14:03 -0400115 - name: google-java-format
116 enabled: true
Austin Hsiehac2a2e62021-06-17 16:19:11 -0700117 # Update https://github.com/project-chip/connectedhomeip/blob/master/scripts/tools/zap/generate.py if this version changes.
randyrossic4964e32020-06-23 19:14:03 -0400118 image: restyled/restyler-google-java-format:v1.6
119 command:
120 - google-java-format
121 - "--replace"
122 arguments: []
123 include:
124 - "**/*.java"
125 interpreters: []
Justin Wood0c46b2e2020-04-17 14:20:48 -0700126 - name: clang-format
127 enabled: true
128 image: restyled/restyler-clang-format:v9.0.0
129 command:
130 - clang-format
131 - "-i"
132 arguments: []
133 include:
134 - "**/*.c"
135 - "**/*.cc"
136 - "**/*.cpp"
137 - "**/*.cxx"
138 - "**/*.c++"
139 - "**/*.C"
140 - "**/*.cs"
141 - "**/*.h"
142 - "**/*.hh"
143 - "**/*.hpp"
144 - "**/*.hxx"
145 - "**/*.h++"
146 - "**/*.H"
Justin Wood0c46b2e2020-04-17 14:20:48 -0700147 - "**/*.js"
148 - "**/*.m"
Rob Walker5a9f46d2020-05-26 14:32:28 -0700149 - "**/*.mm"
Justin Wood0c46b2e2020-04-17 14:20:48 -0700150 interpreters: []
Michael Spang65dd6512020-08-18 12:07:01 -0400151 - name: gn
152 image: restyled/restyler-gn:v1
153 enabled: true
154 include:
155 - "**/*.gn"
156 - "**/*.gni"
Justin Wood0a9545e2020-04-20 18:15:21 -0700157 - name: prettier-json
158 image: restyled/restyler-prettier:v1.19.1-2
Justin Wood0c46b2e2020-04-17 14:20:48 -0700159 enabled: true
Justin Wood0a9545e2020-04-20 18:15:21 -0700160 command:
161 - prettier
162 - "--write"
163 arguments: []
Justin Wood0c46b2e2020-04-17 14:20:48 -0700164 include:
165 - "**/*.json"
Rob Walker085b3d02020-09-08 14:11:59 -0700166 - ".**/*.json"
Justin Wood0a9545e2020-04-20 18:15:21 -0700167 interpreters: []
Justin Wood0c46b2e2020-04-17 14:20:48 -0700168 - name: prettier-markdown
Justin Wood0a9545e2020-04-20 18:15:21 -0700169 image: restyled/restyler-prettier:v1.19.1-2
170 command:
171 - prettier
172 - "--write"
173 arguments: []
Justin Wood0c46b2e2020-04-17 14:20:48 -0700174 enabled: true
175 include:
176 - "**/*.md"
177 - "**/*.markdown"
178 - name: prettier-yaml
Justin Wood0a9545e2020-04-20 18:15:21 -0700179 image: restyled/restyler-prettier:v1.19.1-2
Justin Wood0c46b2e2020-04-17 14:20:48 -0700180 enabled: true
181 include:
182 - "**/*.yml"
183 - "**/*.yaml"
184 - name: shellharden
Justin Wood0a9545e2020-04-20 18:15:21 -0700185 image: restyled/restyler-shellharden:v4.1.1-2
Justin Wood0c46b2e2020-04-17 14:20:48 -0700186 enabled: true
187 include:
188 - "**/*.sh"
189 - "**/*.bash"
190 - name: shfmt
Justin Wood0a9545e2020-04-20 18:15:21 -0700191 image: restyled/restyler-shfmt:v3.0.1
Justin Wood0c46b2e2020-04-17 14:20:48 -0700192 enabled: true
Justin Wooda923ce72020-05-13 18:59:48 -0700193 command:
194 - shfmt
195 - "-w"
196 arguments:
197 - "-i"
198 - "4"
199 - "-ci"
200 interpreters:
201 - sh
202 - bash
Justin Wood0c46b2e2020-04-17 14:20:48 -0700203 include:
204 - "**/*.sh"
205 - "**/*.bash"
Song GUOf0315002021-08-12 23:31:58 +0800206 - name: autopep8
207 image: 'restyled/restyler-autopep8:v1.5.7'
208 command:
209 - autopep8
210 - '--in-place'
211 arguments: []
212 include:
213 - '**/*.py'
214 interpreters:
215 - python