|
1 | | -linters-settings: |
2 | | - exhaustive: |
3 | | - default-signifies-exhaustive: true |
4 | | - |
5 | | - gocritic: |
6 | | - enabled-tags: |
7 | | - - diagnostic |
8 | | - - experimental |
9 | | - - opinionated |
10 | | - - performance |
11 | | - - style |
12 | | - disabled-checks: |
13 | | - # cfn handlers generated automatically, below are exempted for the same |
14 | | - - hugeParam |
15 | | - - paramTypeCombine |
16 | | - govet: |
17 | | - enable-all: true |
18 | | - |
19 | | - revive: |
20 | | - # see https://github.com/mgechev/revive#available-rules for details. |
21 | | - ignore-generated-header: true |
22 | | - severity: warning |
23 | | - rules: |
24 | | - - name: blank-imports |
25 | | - - name: context-as-argument |
26 | | - - name: context-keys-type |
27 | | - - name: dot-imports |
28 | | - - name: error-return |
29 | | - - name: error-strings |
30 | | - - name: error-naming |
31 | | - - name: errorf |
32 | | - - name: exported |
33 | | - - name: indent-error-flow |
34 | | - - name: if-return |
35 | | - - name: increment-decrement |
36 | | - - name: var-naming |
37 | | - - name: var-declaration |
38 | | - - name: package-comments |
39 | | - - name: range |
40 | | - - name: receiver-naming |
41 | | - - name: time-naming |
42 | | - - name: unexported-return |
43 | | - - name: indent-error-flow |
44 | | - - name: errorf |
45 | | - - name: empty-block |
46 | | - - name: superfluous-else |
47 | | - - name: struct-tag |
48 | | - # Too many unusued parameters, skipping this check for now |
49 | | - #- name: unused-parameter |
50 | | - - name: unreachable-code |
51 | | - - name: redefines-builtin-id |
52 | | - misspell: |
53 | | - locale: US |
54 | | - ignore-words: |
55 | | - - cancelled |
56 | | - lll: |
57 | | - # Default is 120. '\t' is counted as 1 character. |
58 | | - # set our project to 500, as we are adding open api field description in the schema. |
59 | | - # also, for anyone using vscode, use the following configs: |
60 | | - # "rewrap.wrappingColumn": 500 ... requires the rewrap plugin |
61 | | - # "editor.rulers": [500] |
62 | | - line-length: 500 |
63 | | - nestif: |
64 | | - # minimal complexity of if statements to report, 5 by default |
65 | | - min-complexity: 7 |
66 | | - mnd: |
67 | | - checks: |
68 | | - - case |
69 | | - - operation |
70 | | - - return |
71 | | - funlen: |
72 | | - lines: 360 |
73 | | - statements: 120 |
| 1 | +version: "2" |
| 2 | +run: |
| 3 | + build-tags: |
| 4 | + - integration |
| 5 | + modules-download-mode: readonly |
| 6 | + tests: true |
74 | 7 | linters: |
75 | | - disable-all: true |
| 8 | + default: none |
76 | 9 | enable: |
| 10 | + - copyloopvar |
77 | 11 | - dogsled |
78 | 12 | - errcheck |
| 13 | + - exhaustive |
79 | 14 | - funlen |
80 | 15 | - gocritic |
81 | | - - gofmt |
82 | | - - goimports |
83 | | - - revive |
84 | | - - mnd |
85 | 16 | - goprintffuncname |
86 | 17 | - gosec |
87 | | - - gosimple |
88 | 18 | - govet |
89 | 19 | - ineffassign |
90 | 20 | - lll |
| 21 | + - makezero |
91 | 22 | - misspell |
| 23 | + - mnd |
92 | 24 | - nakedret |
| 25 | + - noctx |
93 | 26 | - nolintlint |
| 27 | + - revive |
94 | 28 | - rowserrcheck |
95 | | - - copyloopvar |
96 | 29 | - staticcheck |
97 | | - - stylecheck |
98 | | - - typecheck |
| 30 | + - testifylint |
| 31 | + - testpackage |
| 32 | + - thelper |
99 | 33 | - unconvert |
100 | 34 | - unused |
101 | 35 | - whitespace |
102 | | - - thelper |
103 | | - - testifylint |
104 | | - - exhaustive |
105 | | - - makezero |
106 | | - - noctx |
107 | | - - tenv |
108 | | - - testpackage |
109 | | - |
110 | | - # don't enable: |
111 | | - # - deadcode |
112 | | - # - varcheck |
113 | | - # - structcheck |
114 | | - # - depguard # Go linter that checks if package imports are in a list of acceptable packages [fast: true, auto-fix: false] |
115 | | - # - gocyclo # we already have funlen lint |
116 | | - # - dupl # we have a lot of duplicate test cases |
117 | | - # - gochecknoinits # we need the init function for the provider |
118 | | - # - gochecknoglobals # we need some global variables |
119 | | - # - unparam # Forces to create global variables when one variable is repeated in different functions |
120 | | - # - goerr113 # It does not allow you to return an error, you need to save the error in a variable to do it |
121 | | - # - goconst |
122 | | - # - gocognit |
123 | | -issues: |
124 | | - exclude: |
125 | | - - declaration of ".*" shadows declaration at line .* |
126 | | -run: |
127 | | - timeout: 10m |
128 | | - tests: true |
129 | | - build-tags: |
130 | | - - integration |
131 | | - modules-download-mode: readonly |
| 36 | + settings: |
| 37 | + exhaustive: |
| 38 | + default-signifies-exhaustive: true |
| 39 | + funlen: |
| 40 | + lines: 360 |
| 41 | + statements: 120 |
| 42 | + gocritic: |
| 43 | + disabled-checks: |
| 44 | + - hugeParam |
| 45 | + - paramTypeCombine |
| 46 | + enabled-tags: |
| 47 | + - diagnostic |
| 48 | + - experimental |
| 49 | + - opinionated |
| 50 | + - performance |
| 51 | + - style |
| 52 | + govet: |
| 53 | + enable-all: true |
| 54 | + lll: |
| 55 | + line-length: 500 |
| 56 | + misspell: |
| 57 | + locale: US |
| 58 | + ignore-rules: |
| 59 | + - cancelled |
| 60 | + mnd: |
| 61 | + checks: |
| 62 | + - case |
| 63 | + - operation |
| 64 | + - return |
| 65 | + nestif: |
| 66 | + min-complexity: 7 |
| 67 | + revive: |
| 68 | + severity: warning |
| 69 | + rules: |
| 70 | + - name: blank-imports |
| 71 | + - name: context-as-argument |
| 72 | + - name: context-keys-type |
| 73 | + - name: dot-imports |
| 74 | + - name: error-return |
| 75 | + - name: error-strings |
| 76 | + - name: error-naming |
| 77 | + - name: errorf |
| 78 | + - name: exported |
| 79 | + - name: indent-error-flow |
| 80 | + - name: if-return |
| 81 | + - name: increment-decrement |
| 82 | + - name: var-naming |
| 83 | + - name: var-declaration |
| 84 | + - name: package-comments |
| 85 | + - name: range |
| 86 | + - name: receiver-naming |
| 87 | + - name: time-naming |
| 88 | + - name: unexported-return |
| 89 | + - name: indent-error-flow |
| 90 | + - name: errorf |
| 91 | + - name: empty-block |
| 92 | + - name: superfluous-else |
| 93 | + - name: struct-tag |
| 94 | + - name: unreachable-code |
| 95 | + - name: redefines-builtin-id |
| 96 | + exclusions: |
| 97 | + generated: lax |
| 98 | + presets: |
| 99 | + - comments |
| 100 | + - common-false-positives |
| 101 | + - legacy |
| 102 | + - std-error-handling |
| 103 | + rules: |
| 104 | + - path: (.+)\.go$ |
| 105 | + text: declaration of ".*" shadows declaration at line .* |
| 106 | + paths: |
| 107 | + - third_party$ |
| 108 | + - builtin$ |
| 109 | + - examples$ |
| 110 | +formatters: |
| 111 | + enable: |
| 112 | + - gofmt |
| 113 | + - goimports |
| 114 | + exclusions: |
| 115 | + generated: lax |
| 116 | + paths: |
| 117 | + - third_party$ |
| 118 | + - builtin$ |
| 119 | + - examples$ |
0 commit comments