|
| 1 | +version: "2" |
1 | 2 | run:
|
2 |
| - deadline: 5m |
3 | 3 | allow-parallel-runners: true
|
| 4 | +linters: |
| 5 | + default: none |
| 6 | + enable: |
| 7 | + - goconst |
| 8 | + - govet |
| 9 | + - ineffassign |
| 10 | + - misspell |
| 11 | + - nakedret |
| 12 | + - revive |
| 13 | + - staticcheck |
| 14 | + - unparam |
| 15 | + - unused |
4 | 16 |
|
5 |
| -issues: |
6 |
| - # don't skip warning about doc comments |
7 |
| - # don't exclude the default set of lint |
8 |
| - exclude-use-default: false |
9 | 17 |
|
10 |
| -linters-settings: |
11 |
| - govet: |
12 |
| - enable=fieldalignment: true |
13 |
| - revive: |
14 |
| - rules: |
15 |
| - # The following rules are recommended https://github.com/mgechev/revive#recommended-configuration |
16 |
| - - name: blank-imports |
17 |
| - - name: context-as-argument |
18 |
| - - name: context-keys-type |
19 |
| - - name: dot-imports |
20 |
| - - name: error-return |
21 |
| - - name: error-strings |
22 |
| - disabled: true # TODO: fix errors first |
23 |
| - - name: error-naming |
24 |
| - - name: exported |
25 |
| - disabled: true # TODO: fix errors first |
26 |
| - - name: if-return |
27 |
| - - name: increment-decrement |
28 |
| - - name: var-naming |
29 |
| - disabled: true # Fails in places that you might cannot change pkg/rook/cephtypes/status.go:169:8: var-naming: struct field ZoneId should be ZoneID (revive) |
30 |
| - - name: var-declaration |
31 |
| - - name: package-comments |
32 |
| - disabled: true # TODO: fix errors first |
33 |
| - - name: range |
34 |
| - - name: receiver-naming |
35 |
| - - name: time-naming |
36 |
| - - name: unexported-return |
37 |
| - - name: indent-error-flow |
38 |
| - - name: errorf |
39 |
| - - name: empty-block |
40 |
| - - name: superfluous-else |
41 |
| - - name: unused-parameter |
42 |
| - - name: unreachable-code |
43 |
| - - name: redefines-builtin-id |
44 |
| - # |
45 |
| - # Rules in addition to the recommended configuration above. |
46 |
| - # |
47 |
| - - name: bool-literal-in-expr |
48 |
| - - name: constant-logical-expr |
49 | 18 |
|
50 |
| -linters: |
51 |
| - disable-all: true |
| 19 | + - asasalint |
| 20 | + - asciicheck |
| 21 | + - bidichk |
| 22 | + - bodyclose |
| 23 | + - canonicalheader |
| 24 | + - containedctx |
| 25 | + # - contextcheck |
| 26 | + - copyloopvar |
| 27 | + # - cyclop |
| 28 | + - decorder |
| 29 | + # - depguard |
| 30 | + - dogsled |
| 31 | + # - dupl |
| 32 | + # - dupword |
| 33 | + - durationcheck |
| 34 | + # - err113 |
| 35 | + # - errcheck |
| 36 | + - errchkjson |
| 37 | + - errname |
| 38 | + - errorlint |
| 39 | + - exhaustive |
| 40 | +# - exhaustruct |
| 41 | + - exptostd |
| 42 | + - fatcontext |
| 43 | +# - forbidigo |
| 44 | +# - forcetypeassert |
| 45 | +# - funlen |
| 46 | + - ginkgolinter |
| 47 | + - gocheckcompilerdirectives |
| 48 | +# - gochecknoglobals |
| 49 | +# - gochecknoinits |
| 50 | + - gochecksumtype |
| 51 | +# - gocognit |
| 52 | +# - gocritic |
| 53 | +# - gocyclo |
| 54 | +# - godot |
| 55 | +# - godox |
| 56 | + - goheader |
| 57 | +# - gomoddirectives |
| 58 | + - gomodguard |
| 59 | + - goprintffuncname |
| 60 | +# - gosec |
| 61 | + - gosmopolitan |
| 62 | + - grouper |
| 63 | + - iface |
| 64 | + - importas |
| 65 | + - inamedparam |
| 66 | + - interfacebloat |
| 67 | +# - intrange |
| 68 | +# - ireturn |
| 69 | +# - lll |
| 70 | + |
| 71 | + - loggercheck |
| 72 | +# - maintidx |
| 73 | + - makezero |
| 74 | +# - mirror |
| 75 | +# - mnd |
| 76 | + - musttag |
| 77 | +# - nestif |
| 78 | + - nilerr |
| 79 | + - nilnesserr |
| 80 | +# - nilnil |
| 81 | +# - nlreturn |
| 82 | + - noctx |
| 83 | +# - nolintlint |
| 84 | +# - nonamedreturns |
| 85 | + - nosprintfhostport |
| 86 | +# - paralleltest |
| 87 | +# - perfsprint |
| 88 | +# - prealloc |
| 89 | + - predeclared |
| 90 | + - promlinter |
| 91 | + - protogetter |
| 92 | + - reassign |
| 93 | + - recvcheck |
| 94 | + - rowserrcheck |
| 95 | + - sloglint |
| 96 | + - spancheck |
| 97 | + - sqlclosecheck |
| 98 | + - tagalign |
| 99 | +# - tagliatelle |
| 100 | + |
| 101 | + - testableexamples |
| 102 | + - testifylint |
| 103 | +# - testpackage |
| 104 | +# - thelper |
| 105 | + - tparallel |
| 106 | + - unconvert |
| 107 | + - usestdlibvars |
| 108 | + - usetesting |
| 109 | +# - varnamelen |
| 110 | + - wastedassign |
| 111 | +# - whitespace |
| 112 | +# - wrapcheck |
| 113 | +# - wsl |
| 114 | + - zerologlint |
| 115 | + settings: |
| 116 | + revive: |
| 117 | + rules: |
| 118 | + - name: blank-imports |
| 119 | + - name: context-as-argument |
| 120 | + - name: context-keys-type |
| 121 | + - name: dot-imports |
| 122 | + - name: error-return |
| 123 | + - name: error-strings |
| 124 | + disabled: true |
| 125 | + - name: error-naming |
| 126 | + - name: exported |
| 127 | + disabled: true |
| 128 | + - name: if-return |
| 129 | + - name: increment-decrement |
| 130 | + - name: var-naming |
| 131 | + disabled: true |
| 132 | + - name: var-declaration |
| 133 | + - name: package-comments |
| 134 | + disabled: true |
| 135 | + - name: range |
| 136 | + - name: receiver-naming |
| 137 | + - name: time-naming |
| 138 | + - name: unexported-return |
| 139 | + - name: indent-error-flow |
| 140 | + - name: errorf |
| 141 | + - name: empty-block |
| 142 | + - name: superfluous-else |
| 143 | + - name: unused-parameter |
| 144 | + - name: unreachable-code |
| 145 | + - name: redefines-builtin-id |
| 146 | + - name: bool-literal-in-expr |
| 147 | + - name: constant-logical-expr |
| 148 | + staticcheck: |
| 149 | + checks: |
| 150 | + - all |
| 151 | + - '-SA1006' # disable the rule SA1006 - this falsely flags using 'fmt.Errorf' with a string literal |
| 152 | + - '-ST1005' # disable the rule ST1005 - this warns against log lines with a leading capital letter which we use for some CLI output |
| 153 | + - '-ST1000' # disable the rule ST1000 - this requires a comment for all packages |
| 154 | + - '-ST1003' # disable the rule ST1000 - rules for names |
| 155 | + exclusions: |
| 156 | + generated: lax |
| 157 | + paths: |
| 158 | + - third_party$ |
| 159 | + - builtin$ |
| 160 | + - examples$ |
| 161 | +formatters: |
52 | 162 | enable:
|
53 |
| -# - dupl (TODO remove the code duplications to sort it out) |
54 |
| -# - errcheck (TODO: Sort out f.Close() calls, we are not checking if they fails) |
55 |
| - - exportloopref |
56 |
| - - goconst |
57 |
| -# - gocyclo (TODO: Sort out the func with high complexity) |
58 |
| - - gofmt |
59 |
| - - goimports |
60 |
| - - gosimple |
61 |
| - - govet |
62 |
| - - ineffassign |
63 |
| -# - lll (TODO: Fiz size of the lines, as a good practice we should not need to use scroll to read the code) |
64 |
| - - misspell |
65 |
| - - nakedret |
66 |
| - - revive |
67 |
| - - staticcheck |
68 |
| - - typecheck |
69 |
| -# - unconvert TODO: check the 2 unnecessary conversions found to enable this one |
70 |
| - - unparam |
71 |
| - - unused |
| 163 | + - gofmt |
| 164 | + - goimports |
| 165 | + exclusions: |
| 166 | + generated: lax |
| 167 | + paths: |
| 168 | + - third_party$ |
| 169 | + - builtin$ |
| 170 | + - examples$ |
0 commit comments