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/**/*" |
Andrei Litvin | 5752205 | 2021-08-16 12:24:20 -0400 | [diff] [blame] | 68 | - "src/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 |
Andrei Litvin | 7f358b6 | 2022-01-24 12:25:12 -0500 | [diff] [blame] | 72 | - "scripts/idl/tests/outputs/**/*" # Matches generated output 1:1 |
cpagravel | bc5e79c | 2022-06-10 07:08:50 -0700 | [diff] [blame^] | 73 | - "examples/chef/sample_app_util/test_files/*.yaml" |
Austin Bozowski | 4a83d6f | 2022-06-06 15:13:07 -0700 | [diff] [blame] | 74 | - "examples/chef/zzz_generated/**/*" |
Rob Walker | 085b3d0 | 2020-09-08 14:11:59 -0700 | [diff] [blame] | 75 | |
| 76 | |
| 77 | changed_paths: |
| 78 | maximum: 100000 |
| 79 | outcome: error |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 80 | |
| 81 | # Restylers to run, and how |
| 82 | restylers: |
Rob Walker | 5a9f46d | 2020-05-26 14:32:28 -0700 | [diff] [blame] | 83 | - name: whitespace |
| 84 | enabled: true |
Rob Walker | 085b3d0 | 2020-09-08 14:11:59 -0700 | [diff] [blame] | 85 | image: restyled/restyler-whitespace:v0.1.0.1 |
Rob Walker | 5a9f46d | 2020-05-26 14:32:28 -0700 | [diff] [blame] | 86 | command: |
| 87 | - whitespace |
| 88 | arguments: [] |
| 89 | include: |
Rob Walker | 8478124 | 2020-06-03 18:15:33 -0700 | [diff] [blame] | 90 | - "**/Dockerfile" |
Rob Walker | 085b3d0 | 2020-09-08 14:11:59 -0700 | [diff] [blame] | 91 | - ".**/Dockerfile" |
Rob Walker | afdc90d | 2020-06-03 20:07:26 -0700 | [diff] [blame] | 92 | - "**/*.yml" |
| 93 | - "**/*.yaml" |
Rob Walker | 085b3d0 | 2020-09-08 14:11:59 -0700 | [diff] [blame] | 94 | - ".**/*.yml" |
| 95 | - ".**/*.yaml" |
Rob Walker | 8478124 | 2020-06-03 18:15:33 -0700 | [diff] [blame] | 96 | - "**/*.sh" |
Rob Walker | 5a9f46d | 2020-05-26 14:32:28 -0700 | [diff] [blame] | 97 | - "**/*.c" |
| 98 | - "**/*.cc" |
| 99 | - "**/*.cpp" |
| 100 | - "**/*.cxx" |
| 101 | - "**/*.c++" |
| 102 | - "**/*.C" |
| 103 | - "**/*.cs" |
| 104 | - "**/*.h" |
| 105 | - "**/*.hh" |
| 106 | - "**/*.hpp" |
| 107 | - "**/*.hxx" |
| 108 | - "**/*.h++" |
| 109 | - "**/*.H" |
| 110 | - "**/*.java" |
| 111 | - "**/*.js" |
Rob Walker | afdc90d | 2020-06-03 20:07:26 -0700 | [diff] [blame] | 112 | - "**/*.json" |
Rob Walker | 085b3d0 | 2020-09-08 14:11:59 -0700 | [diff] [blame] | 113 | - ".**/*.js" |
| 114 | - ".**/*.json" |
Rob Walker | 5a9f46d | 2020-05-26 14:32:28 -0700 | [diff] [blame] | 115 | - "**/*.m" |
| 116 | - "**/*.mm" |
randyrossi | c4964e3 | 2020-06-23 19:14:03 -0400 | [diff] [blame] | 117 | - name: google-java-format |
| 118 | enabled: true |
Austin Hsieh | ac2a2e6 | 2021-06-17 16:19:11 -0700 | [diff] [blame] | 119 | # 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] | 120 | image: restyled/restyler-google-java-format:v1.6 |
| 121 | command: |
| 122 | - google-java-format |
| 123 | - "--replace" |
| 124 | arguments: [] |
| 125 | include: |
| 126 | - "**/*.java" |
| 127 | interpreters: [] |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 128 | - name: clang-format |
| 129 | enabled: true |
| 130 | image: restyled/restyler-clang-format:v9.0.0 |
| 131 | command: |
| 132 | - clang-format |
| 133 | - "-i" |
| 134 | arguments: [] |
| 135 | include: |
| 136 | - "**/*.c" |
| 137 | - "**/*.cc" |
| 138 | - "**/*.cpp" |
| 139 | - "**/*.cxx" |
| 140 | - "**/*.c++" |
| 141 | - "**/*.C" |
| 142 | - "**/*.cs" |
| 143 | - "**/*.h" |
| 144 | - "**/*.hh" |
| 145 | - "**/*.hpp" |
| 146 | - "**/*.hxx" |
| 147 | - "**/*.h++" |
| 148 | - "**/*.H" |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 149 | - "**/*.js" |
| 150 | - "**/*.m" |
Rob Walker | 5a9f46d | 2020-05-26 14:32:28 -0700 | [diff] [blame] | 151 | - "**/*.mm" |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 152 | interpreters: [] |
Michael Spang | 65dd651 | 2020-08-18 12:07:01 -0400 | [diff] [blame] | 153 | - name: gn |
| 154 | image: restyled/restyler-gn:v1 |
| 155 | enabled: true |
| 156 | include: |
| 157 | - "**/*.gn" |
| 158 | - "**/*.gni" |
Justin Wood | 0a9545e | 2020-04-20 18:15:21 -0700 | [diff] [blame] | 159 | - name: prettier-json |
| 160 | image: restyled/restyler-prettier:v1.19.1-2 |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 161 | enabled: true |
Justin Wood | 0a9545e | 2020-04-20 18:15:21 -0700 | [diff] [blame] | 162 | command: |
| 163 | - prettier |
| 164 | - "--write" |
| 165 | arguments: [] |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 166 | include: |
| 167 | - "**/*.json" |
Rob Walker | 085b3d0 | 2020-09-08 14:11:59 -0700 | [diff] [blame] | 168 | - ".**/*.json" |
Justin Wood | 0a9545e | 2020-04-20 18:15:21 -0700 | [diff] [blame] | 169 | interpreters: [] |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 170 | - name: prettier-markdown |
Justin Wood | 0a9545e | 2020-04-20 18:15:21 -0700 | [diff] [blame] | 171 | image: restyled/restyler-prettier:v1.19.1-2 |
| 172 | command: |
| 173 | - prettier |
| 174 | - "--write" |
| 175 | arguments: [] |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 176 | enabled: true |
| 177 | include: |
| 178 | - "**/*.md" |
| 179 | - "**/*.markdown" |
| 180 | - name: prettier-yaml |
Justin Wood | 0a9545e | 2020-04-20 18:15:21 -0700 | [diff] [blame] | 181 | image: restyled/restyler-prettier:v1.19.1-2 |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 182 | enabled: true |
| 183 | include: |
| 184 | - "**/*.yml" |
| 185 | - "**/*.yaml" |
| 186 | - name: shellharden |
Justin Wood | 0a9545e | 2020-04-20 18:15:21 -0700 | [diff] [blame] | 187 | image: restyled/restyler-shellharden:v4.1.1-2 |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 188 | enabled: true |
| 189 | include: |
| 190 | - "**/*.sh" |
| 191 | - "**/*.bash" |
| 192 | - name: shfmt |
Justin Wood | 0a9545e | 2020-04-20 18:15:21 -0700 | [diff] [blame] | 193 | image: restyled/restyler-shfmt:v3.0.1 |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 194 | enabled: true |
Justin Wood | a923ce7 | 2020-05-13 18:59:48 -0700 | [diff] [blame] | 195 | command: |
| 196 | - shfmt |
| 197 | - "-w" |
| 198 | arguments: |
| 199 | - "-i" |
| 200 | - "4" |
| 201 | - "-ci" |
| 202 | interpreters: |
| 203 | - sh |
| 204 | - bash |
Justin Wood | 0c46b2e | 2020-04-17 14:20:48 -0700 | [diff] [blame] | 205 | include: |
| 206 | - "**/*.sh" |
| 207 | - "**/*.bash" |
Song GUO | f031500 | 2021-08-12 23:31:58 +0800 | [diff] [blame] | 208 | - name: autopep8 |
| 209 | image: 'restyled/restyler-autopep8:v1.5.7' |
| 210 | command: |
| 211 | - autopep8 |
| 212 | - '--in-place' |
| 213 | arguments: [] |
| 214 | include: |
| 215 | - '**/*.py' |
| 216 | interpreters: |
| 217 | - python |