|
| 1 | +{ |
| 2 | + "exclude": [ |
| 3 | + "(Doxyfile$)", |
| 4 | + "(LICENSE$)", |
| 5 | + "(\\.gen\\.go$)", |
| 6 | + "(\\.gitmodules$)", |
| 7 | + "(\\.idea/)", |
| 8 | + "(\\.patch$)", |
| 9 | + "(\\.pb\\.go$)", |
| 10 | + "(\\.tsx\\.snap$)", |
| 11 | + "(\\.pbtxt$)", |
| 12 | + "(\\.sublime-project$)", |
| 13 | + "(^docs/customer/)", |
| 14 | + "(^k8s/devinfra/prow/prow_setup_starter.yaml$)", |
| 15 | + "(^k8s/devinfra/prow/prowjob_customresourcedefinition.yaml$)", |
| 16 | + "(^k8s/operator/crd/base/px\\.dev_viziers\\.yaml$)", |
| 17 | + "(^private/users/)", |
| 18 | + "(^private\/.*\\.yaml)", |
| 19 | + "(^src/operator/client/versioned/)", |
| 20 | + "(^src/operator/apis/px.dev/v1alpha1/zz_generated.deepcopy.go)", |
| 21 | + "(^src/stirling/bpf_tools/bcc_bpf/system-headers)", |
| 22 | + "(^src/stirling/mysql/testing/.*\\.json$)", |
| 23 | + "(^src/stirling/obj_tools/testdata/go/test_go_binary.go)", |
| 24 | + "(^src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_client/main.go$)", |
| 25 | + "(^src/stirling/source_connectors/socket_tracer/protocols/http2/testing/go_grpc_server/main.go$)", |
| 26 | + "(^src/stirling/utils/testdata/config$)", |
| 27 | + "(^src/ui/\\.pnp.*)", |
| 28 | + "(^src/ui/\\.yarn/)", |
| 29 | + "(^src/ui/offline_package_cache)", |
| 30 | + "(^src/ui/src/segment.js$)", |
| 31 | + "(^src/ui/src/types/generated/)", |
| 32 | + "(^src/ui/src/types/schema\\.ts$)", |
| 33 | + "(^third_party/cpplint/cpplint.py$)", |
| 34 | + "(^third_party/github.com/gogo/protobuf/gogoproto/gogo.proto$)", |
| 35 | + "(c_cpp_properties.json$)", |
| 36 | + "(go\\.mod$)", |
| 37 | + "(go\\.sum$)" |
| 38 | + ], |
| 39 | + "linters": { |
| 40 | + "build-linter": { |
| 41 | + "type": "script-and-regex", |
| 42 | + "include": [ |
| 43 | + "(^WORKSPACE$)", |
| 44 | + "(^third_party/BUILD\\.bazel$)", |
| 45 | + "(\\.BUILD$)", |
| 46 | + "(BUILD\\.bazel$)", |
| 47 | + "(\\.bzl$)", |
| 48 | + "(\\.sky$)" |
| 49 | + ], |
| 50 | + "script-and-regex.script": "./tools/linters/buildifier.sh", |
| 51 | + "script-and-regex.regex": "/^(?P<file>.*):(?P<line>\\d+): (?P<severity>)(?P<error>.*): (?P<message>.*)$/m" |
| 52 | + }, |
| 53 | + "build-denylist": { |
| 54 | + "type": "script-and-regex", |
| 55 | + "include": [ |
| 56 | + "(^WORKSPACE$)", |
| 57 | + "(^third_party/BUILD\\.bazel$)", |
| 58 | + "(\\.BUILD$)", |
| 59 | + "(BUILD\\.bazel$)", |
| 60 | + "(\\.bzl$)", |
| 61 | + "(\\.sky$)" |
| 62 | + ], |
| 63 | + "script-and-regex.script": "./tools/linters/build_denylist.sh", |
| 64 | + "script-and-regex.regex": "/^(?P<file>.*):(?P<line>\\d+):(?P<severity>.*):(?P<message>.*)$/m" |
| 65 | + }, |
| 66 | + "clang-format": { |
| 67 | + "type": "clang-format", |
| 68 | + "include": [ |
| 69 | + "(\\.(m|h|mm|c|cc)$)", |
| 70 | + "(\\.proto$)" |
| 71 | + ] |
| 72 | + }, |
| 73 | + "cpplint": { |
| 74 | + "type": "cpplint", |
| 75 | + "include": [ |
| 76 | + "(\\.(c|cc|h)$)" |
| 77 | + ], |
| 78 | + "exclude": [ |
| 79 | + "(_objc\\.h$)" |
| 80 | + ], |
| 81 | + "bin": "./third_party/cpplint/cpplint.py", |
| 82 | + "flags": [ |
| 83 | + "--filter=-build/c++11", |
| 84 | + "--filter=-build/c++14", |
| 85 | + "--filter=-legal/copyright", |
| 86 | + "--filter=-whitespace/line_length" |
| 87 | + ] |
| 88 | + }, |
| 89 | + "eslint-ui": { |
| 90 | + "type": "eslint", |
| 91 | + "include": [ |
| 92 | + "(^src/ui/.*\\.(tsx|ts|js)$)" |
| 93 | + ] |
| 94 | + }, |
| 95 | + "filename": { |
| 96 | + "type": "filename", |
| 97 | + "exclude": [ |
| 98 | + "(^src/shared/metadata/testdata/sysfs.*$)" |
| 99 | + ] |
| 100 | + }, |
| 101 | + "flake8": { |
| 102 | + "type": "flake8", |
| 103 | + "flags": [ |
| 104 | + "--config=.flake8rc" |
| 105 | + ], |
| 106 | + "include": [ |
| 107 | + "(\\.py$)" |
| 108 | + ] |
| 109 | + }, |
| 110 | + "flake8-pxl": { |
| 111 | + "type": "flake8", |
| 112 | + "flags": [ |
| 113 | + "--config=.pxl.flake8rc" |
| 114 | + ], |
| 115 | + "include": [ |
| 116 | + "(\\.pxl$)" |
| 117 | + ] |
| 118 | + }, |
| 119 | + "gazelle": { |
| 120 | + "type": "script-and-regex", |
| 121 | + "include": [ |
| 122 | + "(BUILD\\.bazel$)", |
| 123 | + "(\\.go$)" |
| 124 | + ], |
| 125 | + "script-and-regex.script": "./tools/linters/gazelle.sh", |
| 126 | + "script-and-regex.regex": "/^(?P<severity>[[:alpha:]]+)\n(?P<file>[^\n]+)\n(?P<message>[^\n]+)\n((?P<line>\\d),(?P<char>\\d)\n<<<<<\n(?P<original>.*)=====\n(?P<replacement>.*)>>>>>\n)$/s" |
| 127 | + }, |
| 128 | + "goimports": { |
| 129 | + "type": "goimports", |
| 130 | + "include": [ |
| 131 | + "(\\.go$)" |
| 132 | + ] |
| 133 | + }, |
| 134 | + "golangci-lint": { |
| 135 | + "type": "golangci-lint", |
| 136 | + "include": [ |
| 137 | + "(\\.go$)" |
| 138 | + ], |
| 139 | + "flags": [ |
| 140 | + "--timeout=5m0s", |
| 141 | + "--out-format=checkstyle" |
| 142 | + ] |
| 143 | + }, |
| 144 | + "jshint-ui": { |
| 145 | + "type": "jshint", |
| 146 | + "jshint.jshintrc": "./src/ui/.jshintrc", |
| 147 | + "include": [ |
| 148 | + "(src/ui/.*\\.js$)" |
| 149 | + ] |
| 150 | + }, |
| 151 | + "json": { |
| 152 | + "type": "json", |
| 153 | + "exclude": [ |
| 154 | + "(\\.vscode/.*)" |
| 155 | + ], |
| 156 | + "include": [ |
| 157 | + "(^\\.arcconfig$)", |
| 158 | + "(^\\.arclint$)", |
| 159 | + "(\\.json$)" |
| 160 | + ] |
| 161 | + }, |
| 162 | + "license": { |
| 163 | + "type": "script-and-regex", |
| 164 | + "script-and-regex.script": "./tools/licenses/checker.py -f", |
| 165 | + "script-and-regex.regex": "/^(?P<file>[^\n]+)(?P<severity>)(?P<error>:)((?P<line>\\d),(?P<char>\\d)\n<<<<<\n(?P<original>.*)=====\n(?P<replacement>.*)>>>>>\n)$/s", |
| 166 | + "exclude": [ |
| 167 | + "(__phutil_library_init__\\.php$)", |
| 168 | + "(__phutil_library_map__\\.php$)" |
| 169 | + ] |
| 170 | + }, |
| 171 | + "merge-conflict": { |
| 172 | + "type": "merge-conflict" |
| 173 | + }, |
| 174 | + "php": { |
| 175 | + "type": "php", |
| 176 | + "include": [ |
| 177 | + "(\\.php$)" |
| 178 | + ] |
| 179 | + }, |
| 180 | + "phutil-library": { |
| 181 | + "type": "phutil-library", |
| 182 | + "include": [ |
| 183 | + "(^tools/arc_addons/.*\\.php$)" |
| 184 | + ] |
| 185 | + }, |
| 186 | + "proto-break-check": { |
| 187 | + "type": "proto-break-check", |
| 188 | + "include": [ |
| 189 | + "(.*\\.proto$)" |
| 190 | + ], |
| 191 | + "exclude": [ |
| 192 | + "(^src/stirling/source_connectors/dynamic_tracer/dynamic_tracing/ir/physicalpb/physical\\.proto$)" |
| 193 | + ] |
| 194 | + }, |
| 195 | + "shellcheck": { |
| 196 | + "type": "shellcheck", |
| 197 | + "include": [ |
| 198 | + "(.*\\.sh$)" |
| 199 | + ] |
| 200 | + }, |
| 201 | + "spelling": { |
| 202 | + "type": "spelling", |
| 203 | + "exclude": [ |
| 204 | + "(.*\\.crt$)", |
| 205 | + "(.*\\.key$)", |
| 206 | + "(^k8s\/operator\/helm\/crds\/olm_crd.yaml$)" |
| 207 | + ] |
| 208 | + }, |
| 209 | + "text": { |
| 210 | + "type": "pxtext", |
| 211 | + "text.max-line-length": 120 |
| 212 | + }, |
| 213 | + "xhpast": { |
| 214 | + "type": "xhpast", |
| 215 | + "include": [ |
| 216 | + "(^tools/arc_addons/.*\\.php$)" |
| 217 | + ] |
| 218 | + }, |
| 219 | + "yaml": { |
| 220 | + "type": "script-and-regex", |
| 221 | + "script-and-regex.script": "sh -c 'yamllint -f parsable \"$0\" || true'", |
| 222 | + "script-and-regex.regex": "/^(?P<file>.*):(?P<line>\\d+):(?P<char>\\d+): \\[(?P<severity>warning|error)\\] (?P<message>.*) \\((?P<name>.*)\\)$/m", |
| 223 | + "include": [ |
| 224 | + "(\\.yml$)", |
| 225 | + "(\\.yaml$)", |
| 226 | + "(^.yamllint$)" |
| 227 | + ], |
| 228 | + "exclude": [ |
| 229 | + "(^demos/)", |
| 230 | + "(^k8s/operator/helm/)" |
| 231 | + ] |
| 232 | + } |
| 233 | + } |
| 234 | +} |
0 commit comments