Robert Szewczyk | 38cf731 | 2020-06-29 09:07:49 -0700 | [diff] [blame] | 1 | # |
| 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 Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 17 | # Do anything at all |
| 18 | enabled: true |
| 19 | |
| 20 | # Push the style fixes directly to the original PR |
| 21 | auto: false |
| 22 | |
| 23 | # Open Restyle PRs? |
| 24 | pull_requests: true |
| 25 | |
| 26 | # Add labels to any created Restyle PRs |
| 27 | labels: |
| 28 | - restyled |
| 29 | |
| 30 | # Labels to ignore |
| 31 | ignore_labels: |
| 32 | - restyled-ignore |
| 33 | |
| 34 | # Leave comments on the original PR linking to the Restyle PR? |
| 35 | comments: false |
| 36 | |
| 37 | # Request review on the Restyle PR |
| 38 | request_review: none |
| 39 | |
| 40 | # Patterns to exclude from all Restylers |
| 41 | exclude: |
| 42 | - ".github/workflows/**/*" # https://github.com/restyled-io/restyler/issues/73 |
Vivien Nicolas | dd62545 | 2020-07-09 04:56:45 +0200 | [diff] [blame] | 43 | - ".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 Zbarsky | 775b2b1 | 2020-09-11 11:06:36 -0400 | [diff] [blame] | 46 | - "*/**/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 Walker | 085b3d0 | 2020-09-08 14:11:59 -0700 | [diff] [blame] | 49 | - "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 Walker | 085b3d0 | 2020-09-08 14:11:59 -0700 | [diff] [blame] | 66 | - "third_party/cirque/repo/**/*" |
szatmz | f44fb76 | 2020-10-19 18:36:24 -0400 | [diff] [blame] | 67 | - "third_party/nanopb/repo/**/*" |
Yufeng Wang | a334714 | 2022-09-29 15:22:36 -0700 | [diff] [blame] | 68 | - "examples/android/CHIPTool/gradlew" # gradle wrapper generated file |
Austin Hsieh | 77a9f6a | 2021-09-28 16:30:16 -0700 | [diff] [blame] | 69 | - "third_party/android_deps/gradlew" # gradle wrapper generated file |
Jerry Johns | bb60835 | 2021-12-06 11:01:02 -0800 | [diff] [blame] | 70 | - "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 |
Terence Hampson | 260307b | 2023-01-05 09:56:23 -0500 | [diff] [blame] | 72 | - "scripts/py_matter_idl/matter_idl/tests/outputs/**/*" # Matches generated output 1:1 |
Andrei Litvin | 89c6fb6 | 2023-01-17 21:29:11 -0500 | [diff] [blame] | 73 | - "scripts/tools/zap/tests/outputs/**/*" # Matches generated output 1:1 |
cpagravel | bc5e79c | 2022-06-10 07:08:50 -0700 | [diff] [blame] | 74 | - "examples/chef/sample_app_util/test_files/*.yaml" |
Austin Bozowski | 4a83d6f | 2022-06-06 15:13:07 -0700 | [diff] [blame] | 75 | - "examples/chef/zzz_generated/**/*" |
andrei-menzopol | ea419ac | 2022-09-30 22:06:46 +0300 | [diff] [blame] | 76 | - "examples/platform/nxp/k32w/k32w0/scripts/demo_generated_certs/**/*" |
Andrei Litvin | 8eb1865 | 2022-10-11 13:39:21 -0400 | [diff] [blame] | 77 | - "integrations/cloudbuild/*.yaml" # uglier long command line content |
Andrei Litvin | 559c7d5 | 2022-10-21 13:38:11 -0400 | [diff] [blame] | 78 | - "scripts/run_codegen_targets.sh" # shellharden breaks for loops over command outputs |
Justin Wood | 9ff8254 | 2023-10-23 22:43:09 -0700 | [diff] [blame] | 79 | - "scripts/tagging/tag_new_release.sh" # shellharden breaks parameter passing |
Boris Zbarsky | 43dd327 | 2023-01-23 01:49:42 -0500 | [diff] [blame] | 80 | - "src/darwin/Framework/CHIP/zap-generated/*" # already clang-formatted by our zap tooling |
Andrei Litvin | 89c6fb6 | 2023-01-17 21:29:11 -0500 | [diff] [blame] | 81 | - "zzz_generated/**/*" # already clang-formatted by our zap tooling |
Andrei Litvin | 31e31cc | 2023-03-22 09:23:10 -0400 | [diff] [blame] | 82 | - "src/controller/java/generated/java/**/*" # not formatted: generated files |
Andrei Litvin | 2205eb6 | 2023-05-30 11:13:48 -0400 | [diff] [blame] | 83 | - "src/controller/java/zap-generated/**/*" # not formatted: generated files |
Andrei Litvin | 509a55c | 2023-06-21 19:13:31 -0400 | [diff] [blame] | 84 | - "scripts/setup/bootstrap.sh" # tries to quote loop variable |
Justin Wood | 3c75ed0 | 2023-07-18 19:00:42 -0700 | [diff] [blame] | 85 | - "integrations/docker/build-all.sh" # tries to quote loop variable |
Terence Hampson | 1691e9c | 2023-10-17 11:01:00 -0400 | [diff] [blame] | 86 | - "scripts/setup/pigweed.json" # TODO(#29547). This file is temporary copy from pigweed repo that has minor edits. No restyle help in diff. |
Andrei Litvin | e690996 | 2023-11-29 16:13:19 -0500 | [diff] [blame] | 87 | - "docs/ERROR_CODES.md" # generated by scripts, not easy to align tables |
Andrei Litvin | 44ea4eb | 2023-12-01 10:53:22 -0500 | [diff] [blame] | 88 | - "docs/clusters.md" # generated by scripts, not easy to align tables |
C Freeman | 8830ec1 | 2024-01-24 03:50:03 -0500 | [diff] [blame] | 89 | - "docs/testing/yaml_pseudocluster.md" # generated by scripts, restyler makes the tables render improperly |
| 90 | - "docs/testing/yaml_schema.md" # generated by scripts, restyler makes the tables render improperly |
Rob Walker | 085b3d0 | 2020-09-08 14:11:59 -0700 | [diff] [blame] | 91 | |
| 92 | changed_paths: |
Justin Wood | 3c75ed0 | 2023-07-18 19:00:42 -0700 | [diff] [blame] | 93 | maximum: 100000 |
| 94 | outcome: error |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 95 | |
| 96 | # Restylers to run, and how |
| 97 | restylers: |
Rob Walker | 5a9f46d | 2020-05-26 14:32:28 -0700 | [diff] [blame] | 98 | - name: whitespace |
| 99 | enabled: true |
Rob Walker | 085b3d0 | 2020-09-08 14:11:59 -0700 | [diff] [blame] | 100 | image: restyled/restyler-whitespace:v0.1.0.1 |
Rob Walker | 5a9f46d | 2020-05-26 14:32:28 -0700 | [diff] [blame] | 101 | command: |
| 102 | - whitespace |
| 103 | arguments: [] |
| 104 | include: |
Rob Walker | 8478124 | 2020-06-03 18:15:33 -0700 | [diff] [blame] | 105 | - "**/Dockerfile" |
Rob Walker | 085b3d0 | 2020-09-08 14:11:59 -0700 | [diff] [blame] | 106 | - ".**/Dockerfile" |
Rob Walker | afdc90d | 2020-06-03 20:07:26 -0700 | [diff] [blame] | 107 | - "**/*.yml" |
| 108 | - "**/*.yaml" |
Rob Walker | 085b3d0 | 2020-09-08 14:11:59 -0700 | [diff] [blame] | 109 | - ".**/*.yml" |
| 110 | - ".**/*.yaml" |
Rob Walker | 8478124 | 2020-06-03 18:15:33 -0700 | [diff] [blame] | 111 | - "**/*.sh" |
Rob Walker | 5a9f46d | 2020-05-26 14:32:28 -0700 | [diff] [blame] | 112 | - "**/*.c" |
| 113 | - "**/*.cc" |
| 114 | - "**/*.cpp" |
Boris Zbarsky | 27f9fb4 | 2022-09-08 20:54:12 -0400 | [diff] [blame] | 115 | - "**/*.ipp" |
Rob Walker | 5a9f46d | 2020-05-26 14:32:28 -0700 | [diff] [blame] | 116 | - "**/*.cxx" |
| 117 | - "**/*.c++" |
| 118 | - "**/*.C" |
| 119 | - "**/*.cs" |
| 120 | - "**/*.h" |
| 121 | - "**/*.hh" |
| 122 | - "**/*.hpp" |
| 123 | - "**/*.hxx" |
| 124 | - "**/*.h++" |
| 125 | - "**/*.H" |
| 126 | - "**/*.java" |
| 127 | - "**/*.js" |
Rob Walker | afdc90d | 2020-06-03 20:07:26 -0700 | [diff] [blame] | 128 | - "**/*.json" |
Rob Walker | 085b3d0 | 2020-09-08 14:11:59 -0700 | [diff] [blame] | 129 | - ".**/*.js" |
| 130 | - ".**/*.json" |
Rob Walker | 5a9f46d | 2020-05-26 14:32:28 -0700 | [diff] [blame] | 131 | - "**/*.m" |
| 132 | - "**/*.mm" |
randyrossi | c4964e3 | 2020-06-23 19:14:03 -0400 | [diff] [blame] | 133 | - name: google-java-format |
| 134 | enabled: true |
Austin Hsieh | ac2a2e6 | 2021-06-17 16:19:11 -0700 | [diff] [blame] | 135 | # Update https://github.com/project-chip/connectedhomeip/blob/master/scripts/tools/zap/generate.py if this version changes. |
randyrossi | c4964e3 | 2020-06-23 19:14:03 -0400 | [diff] [blame] | 136 | image: restyled/restyler-google-java-format:v1.6 |
| 137 | command: |
| 138 | - google-java-format |
| 139 | - "--replace" |
| 140 | arguments: [] |
| 141 | include: |
| 142 | - "**/*.java" |
| 143 | interpreters: [] |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 144 | - name: clang-format |
| 145 | enabled: true |
Karsten Sperling | f299acb | 2023-09-27 15:39:32 +1300 | [diff] [blame] | 146 | image: restyled/restyler-clang-format:v16.0.6 |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 147 | command: |
| 148 | - clang-format |
| 149 | - "-i" |
| 150 | arguments: [] |
| 151 | include: |
| 152 | - "**/*.c" |
| 153 | - "**/*.cc" |
| 154 | - "**/*.cpp" |
Boris Zbarsky | 27f9fb4 | 2022-09-08 20:54:12 -0400 | [diff] [blame] | 155 | - "**/*.ipp" |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 156 | - "**/*.cxx" |
| 157 | - "**/*.c++" |
| 158 | - "**/*.C" |
| 159 | - "**/*.cs" |
| 160 | - "**/*.h" |
| 161 | - "**/*.hh" |
| 162 | - "**/*.hpp" |
| 163 | - "**/*.hxx" |
| 164 | - "**/*.h++" |
| 165 | - "**/*.H" |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 166 | - "**/*.js" |
| 167 | - "**/*.m" |
Rob Walker | 5a9f46d | 2020-05-26 14:32:28 -0700 | [diff] [blame] | 168 | - "**/*.mm" |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 169 | interpreters: [] |
Michael Spang | 65dd651 | 2020-08-18 12:07:01 -0400 | [diff] [blame] | 170 | - name: gn |
| 171 | image: restyled/restyler-gn:v1 |
| 172 | enabled: true |
| 173 | include: |
| 174 | - "**/*.gn" |
| 175 | - "**/*.gni" |
Justin Wood | 0a9545e | 2020-04-20 18:15:21 -0700 | [diff] [blame] | 176 | - name: prettier-json |
| 177 | image: restyled/restyler-prettier:v1.19.1-2 |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 178 | enabled: true |
Justin Wood | 0a9545e | 2020-04-20 18:15:21 -0700 | [diff] [blame] | 179 | command: |
| 180 | - prettier |
| 181 | - "--write" |
| 182 | arguments: [] |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 183 | include: |
| 184 | - "**/*.json" |
Rob Walker | 085b3d0 | 2020-09-08 14:11:59 -0700 | [diff] [blame] | 185 | - ".**/*.json" |
Justin Wood | 0a9545e | 2020-04-20 18:15:21 -0700 | [diff] [blame] | 186 | interpreters: [] |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 187 | - name: prettier-markdown |
Justin Wood | 0a9545e | 2020-04-20 18:15:21 -0700 | [diff] [blame] | 188 | image: restyled/restyler-prettier:v1.19.1-2 |
| 189 | command: |
| 190 | - prettier |
| 191 | - "--write" |
| 192 | arguments: [] |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 193 | enabled: true |
| 194 | include: |
| 195 | - "**/*.md" |
| 196 | - "**/*.markdown" |
| 197 | - name: prettier-yaml |
Justin Wood | 0a9545e | 2020-04-20 18:15:21 -0700 | [diff] [blame] | 198 | image: restyled/restyler-prettier:v1.19.1-2 |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 199 | enabled: true |
Boris Zbarsky | f9eb6ce | 2023-06-15 17:48:26 -0400 | [diff] [blame] | 200 | command: |
| 201 | - prettier |
| 202 | - "--write" |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 203 | include: |
| 204 | - "**/*.yml" |
| 205 | - "**/*.yaml" |
| 206 | - name: shellharden |
Justin Wood | 0a9545e | 2020-04-20 18:15:21 -0700 | [diff] [blame] | 207 | image: restyled/restyler-shellharden:v4.1.1-2 |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 208 | enabled: true |
| 209 | include: |
| 210 | - "**/*.sh" |
| 211 | - "**/*.bash" |
| 212 | - name: shfmt |
Justin Wood | 0a9545e | 2020-04-20 18:15:21 -0700 | [diff] [blame] | 213 | image: restyled/restyler-shfmt:v3.0.1 |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 214 | enabled: true |
Justin Wood | a923ce7 | 2020-05-13 18:59:48 -0700 | [diff] [blame] | 215 | command: |
| 216 | - shfmt |
| 217 | - "-w" |
| 218 | arguments: |
| 219 | - "-i" |
| 220 | - "4" |
| 221 | - "-ci" |
| 222 | interpreters: |
| 223 | - sh |
| 224 | - bash |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 225 | include: |
| 226 | - "**/*.sh" |
| 227 | - "**/*.bash" |
Song GUO | f031500 | 2021-08-12 23:31:58 +0800 | [diff] [blame] | 228 | - name: autopep8 |
Justin Wood | 3c75ed0 | 2023-07-18 19:00:42 -0700 | [diff] [blame] | 229 | image: restyled/restyler-autopep8:v2.0.0 |
Song GUO | f031500 | 2021-08-12 23:31:58 +0800 | [diff] [blame] | 230 | command: |
Justin Wood | 3c75ed0 | 2023-07-18 19:00:42 -0700 | [diff] [blame] | 231 | - autopep8 |
| 232 | - "--in-place" |
Song GUO | f031500 | 2021-08-12 23:31:58 +0800 | [diff] [blame] | 233 | arguments: [] |
| 234 | include: |
Justin Wood | 3c75ed0 | 2023-07-18 19:00:42 -0700 | [diff] [blame] | 235 | - "**/*.py" |
Song GUO | f031500 | 2021-08-12 23:31:58 +0800 | [diff] [blame] | 236 | interpreters: |
Justin Wood | 3c75ed0 | 2023-07-18 19:00:42 -0700 | [diff] [blame] | 237 | - python |
Arkadiusz Bokowy | d5bfb4b | 2023-01-09 16:15:00 +0100 | [diff] [blame] | 238 | - name: isort |
Justin Wood | 3c75ed0 | 2023-07-18 19:00:42 -0700 | [diff] [blame] | 239 | image: restyled/restyler-isort:v5.11.2 |
Arkadiusz Bokowy | d5bfb4b | 2023-01-09 16:15:00 +0100 | [diff] [blame] | 240 | command: |
Justin Wood | 3c75ed0 | 2023-07-18 19:00:42 -0700 | [diff] [blame] | 241 | - isort |
Arkadiusz Bokowy | d5bfb4b | 2023-01-09 16:15:00 +0100 | [diff] [blame] | 242 | arguments: [] |
| 243 | include: |
Justin Wood | 3c75ed0 | 2023-07-18 19:00:42 -0700 | [diff] [blame] | 244 | - "**/*.py" |
Arkadiusz Bokowy | d5bfb4b | 2023-01-09 16:15:00 +0100 | [diff] [blame] | 245 | interpreters: |
Justin Wood | 3c75ed0 | 2023-07-18 19:00:42 -0700 | [diff] [blame] | 246 | - python |