|
1 | | -run: |
2 | | - timeout: 15m |
3 | | - |
| 1 | +version: "2" |
4 | 2 | linters: |
5 | | - disable-all: true |
| 3 | + default: none |
6 | 4 | enable: |
7 | | - - gofmt |
8 | 5 | - depguard |
9 | 6 | - gocritic |
10 | 7 | - goheader |
11 | | - - goimports |
12 | | - - gosimple |
13 | 8 | - ineffassign |
14 | 9 | - misspell |
15 | 10 | - prealloc |
16 | 11 | - staticcheck |
17 | | - - stylecheck |
18 | | - - typecheck |
19 | 12 | - unconvert |
20 | 13 | - unparam |
21 | 14 | # TODO: Enable these linters |
22 | 15 | # - errcheck |
23 | 16 | # - goerr113 |
24 | 17 | # - gosec |
25 | 18 |
|
26 | | -issues: |
27 | | - exclude-files: |
28 | | - - ^.*\.(pb|y)\.go$ |
29 | | - exclude-dirs: |
30 | | - - "vendor$" |
31 | | - - "pkg/app/piped/executor/analysis/mannwhitney" |
32 | | - exclude-rules: |
33 | | - - linters: |
34 | | - - staticcheck |
35 | | - text: "SA1019" |
36 | | - |
37 | | -output: |
38 | | - sort-results: true |
39 | | - |
40 | | -linters-settings: |
41 | | - depguard: |
42 | | - rules: |
43 | | - main: |
44 | | - deny: |
45 | | - - pkg: "sync/atomic" |
46 | | - desc: "Use go.uber.org/atomic instead of sync/atomic." |
47 | | - - pkg: "io/ioutil" |
48 | | - desc: "Use corresponding 'os' or 'io' functions instead." |
49 | | - pipedv1: |
50 | | - files: |
51 | | - - "**/pkg/app/pipedv1/**/*.go" |
52 | | - deny: |
53 | | - - pkg: "github.com/pipe-cd/pipecd/pkg/config$" |
54 | | - desc: "Use github.com/pipe-cd/pipecd/pkg/configv1 instead." |
55 | | - plugin: |
56 | | - files: |
57 | | - - "**/pkg/app/pipedv1/plugin/**/*.go" |
58 | | - deny: |
59 | | - - pkg: "^github.com/pipe-cd/pipecd/(?!pkg/app/pipedv1/plugin).*" |
60 | | - desc: "Use github.com/pipe-cd/piped-plugin-sdk-go instead." |
61 | | - gocritic: |
62 | | - disabled-checks: |
63 | | - - appendAssign |
64 | | - goimports: |
65 | | - local-prefixes: github.com/pipe-cd/pipecd |
66 | | - goheader: |
67 | | - values: |
68 | | - regexp: |
69 | | - any-year: \d{4} # the year of copyright means the first published year, so it can be any year. |
70 | | - # template does not contains the comment indicator '//' or '/*' '*/' |
71 | | - template: |- |
72 | | - Copyright {{any-year}} The PipeCD Authors. |
| 19 | + settings: |
| 20 | + depguard: |
| 21 | + rules: |
| 22 | + main: |
| 23 | + deny: |
| 24 | + - pkg: "sync/atomic" |
| 25 | + desc: "Use go.uber.org/atomic instead of sync/atomic." |
| 26 | + - pkg: "io/ioutil" |
| 27 | + desc: "Use corresponding 'os' or 'io' functions instead." |
| 28 | + pipedv1: |
| 29 | + files: |
| 30 | + - "**/pkg/app/pipedv1/**/*.go" |
| 31 | + deny: |
| 32 | + - pkg: "github.com/pipe-cd/pipecd/pkg/config$" |
| 33 | + desc: "Use github.com/pipe-cd/pipecd/pkg/configv1 instead." |
| 34 | + plugin: |
| 35 | + files: |
| 36 | + - "**/pkg/app/pipedv1/plugin/**/*.go" |
| 37 | + deny: |
| 38 | + - pkg: "^github.com/pipe-cd/pipecd/(?!pkg/app/pipedv1/plugin).*" |
| 39 | + desc: "Use github.com/pipe-cd/piped-plugin-sdk-go instead." |
| 40 | + gocritic: |
| 41 | + disabled-checks: |
| 42 | + - appendAssign |
| 43 | + goheader: |
| 44 | + values: |
| 45 | + regexp: |
| 46 | + any-year: \d{4} # the year of copyright means the first published year, so it can be any year. |
| 47 | + # template does not contains the comment indicator '//' or '/*' '*/' |
| 48 | + template: |- |
| 49 | + Copyright {{any-year}} The PipeCD Authors. |
73 | 50 |
|
74 | | - Licensed under the Apache License, Version 2.0 (the "License"); |
75 | | - you may not use this file except in compliance with the License. |
76 | | - You may obtain a copy of the License at |
| 51 | + Licensed under the Apache License, Version 2.0 (the "License"); |
| 52 | + you may not use this file except in compliance with the License. |
| 53 | + You may obtain a copy of the License at |
77 | 54 |
|
78 | | - http://www.apache.org/licenses/LICENSE-2.0 |
| 55 | + http://www.apache.org/licenses/LICENSE-2.0 |
79 | 56 |
|
80 | | - Unless required by applicable law or agreed to in writing, software |
81 | | - distributed under the License is distributed on an "AS IS" BASIS, |
82 | | - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
83 | | - See the License for the specific language governing permissions and |
84 | | - limitations under the License. |
| 57 | + Unless required by applicable law or agreed to in writing, software |
| 58 | + distributed under the License is distributed on an "AS IS" BASIS, |
| 59 | + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 60 | + See the License for the specific language governing permissions and |
| 61 | + limitations under the License. |
| 62 | + exclusions: |
| 63 | + generated: lax |
| 64 | + presets: |
| 65 | + - comments |
| 66 | + - common-false-positives |
| 67 | + - legacy |
| 68 | + - std-error-handling |
| 69 | + rules: |
| 70 | + - linters: |
| 71 | + - staticcheck |
| 72 | + text: SA1019 |
| 73 | + paths: |
| 74 | + - ^.*\.(pb|y)\.go$ |
| 75 | + - vendor$ |
| 76 | + - pkg/app/piped/executor/analysis/mannwhitney |
| 77 | + - third_party$ |
| 78 | + - builtin$ |
| 79 | + - examples$ |
| 80 | +formatters: |
| 81 | + enable: |
| 82 | + - gofmt |
| 83 | + - goimports |
| 84 | + settings: |
| 85 | + goimports: |
| 86 | + local-prefixes: |
| 87 | + - github.com/pipe-cd/pipecd |
| 88 | + exclusions: |
| 89 | + generated: lax |
| 90 | + paths: |
| 91 | + - ^.*\.(pb|y)\.go$ |
| 92 | + - vendor$ |
| 93 | + - pkg/app/piped/executor/analysis/mannwhitney |
| 94 | + - third_party$ |
| 95 | + - builtin$ |
| 96 | + - examples$ |
0 commit comments