|
1 | 1 | # See https://golangci-lint.run/usage/configuration/ |
2 | 2 | linters-settings: |
3 | | - goconst: |
4 | | - min-len: 4 |
5 | | - min-occurrences: 3 |
6 | 3 | gocognit: |
7 | 4 | # tunnel.go has a 150 line function. Someone should fix it and |
8 | 5 | # decrement this back down to a rational number. |
9 | 6 | min-complexity: 52 |
| 7 | + goconst: |
| 8 | + min-len: 4 |
| 9 | + min-occurrences: 3 |
10 | 10 | nestif: |
11 | 11 | min-complexity: 10 |
12 | | - govet: |
13 | | - settings: |
14 | | - printf: |
15 | | - funcs: # Run `go tool vet help printf` to see available settings for `printf` analyzer. |
16 | | - - (cdr.dev/coder-cli/pkg/clog).Tipf |
17 | | - - (cdr.dev/coder-cli/pkg/clog).Hintf |
18 | | - - (cdr.dev/coder-cli/pkg/clog).Causef |
| 12 | + revive: |
| 13 | + # see https://github.com/mgechev/revive#available-rules for details. |
| 14 | + ignore-generated-header: true |
| 15 | + severity: warning |
| 16 | + rules: |
| 17 | + - name: atomic |
| 18 | + # - name: bare-return |
| 19 | + - name: blank-imports |
| 20 | + - name: bool-literal-in-expr |
| 21 | + - name: call-to-gc |
| 22 | + - name: confusing-naming |
| 23 | + - name: confusing-results |
| 24 | + - name: constant-logical-expr |
| 25 | + - name: context-as-argument |
| 26 | + - name: context-keys-type |
| 27 | + # - name: deep-exit |
| 28 | + - name: defer |
| 29 | + - name: dot-imports |
| 30 | + - name: duplicated-imports |
| 31 | + # - name: early-return |
| 32 | + # - name: empty-block |
| 33 | + - name: empty-lines |
| 34 | + - name: error-naming |
| 35 | + - name: error-return |
| 36 | + - name: error-strings |
| 37 | + - name: errorf |
| 38 | + - name: exported |
| 39 | + # - name: flag-parameter |
| 40 | + - name: get-return |
| 41 | + - name: identical-branches |
| 42 | + # - name: if-return |
| 43 | + # - name: import-shadowing |
| 44 | + - name: increment-decrement |
| 45 | + - name: indent-error-flow |
| 46 | + - name: modifies-parameter |
| 47 | + - name: modifies-value-receiver |
| 48 | + - name: package-comments |
| 49 | + - name: range |
| 50 | + - name: range-val-address |
| 51 | + - name: range-val-in-closure |
| 52 | + - name: receiver-naming |
| 53 | + - name: redefines-builtin-id |
| 54 | + - name: string-of-int |
| 55 | + - name: struct-tag |
| 56 | + - name: superfluous-else |
| 57 | + - name: time-naming |
| 58 | + - name: unconditional-recursion |
| 59 | + - name: unexported-naming |
| 60 | + - name: unexported-return |
| 61 | + # - name: unhandled-error |
| 62 | + - name: unnecessary-stmt |
| 63 | + - name: unreachable-code |
| 64 | + # - name: unused-parameter |
| 65 | + # - name: unused-receiver |
| 66 | + # - name: var-declaration |
| 67 | + - name: var-naming |
| 68 | + - name: waitgroup-by-value |
| 69 | + |
| 70 | +issues: |
| 71 | + fix: true |
| 72 | + max-issues-per-linter: 0 |
| 73 | + max-same-issues: 0 |
| 74 | + |
| 75 | +run: |
| 76 | + timeout: 5m |
| 77 | + |
19 | 78 | linters: |
20 | 79 | disable-all: true |
21 | | - exclude-use-default: false |
22 | 80 | enable: |
23 | | - - megacheck |
24 | | - - govet |
25 | | - - golint |
26 | | - - goconst |
27 | | - - gocognit |
28 | | - - nestif |
29 | | - - misspell |
30 | | - - unparam |
31 | | - - unused |
32 | 81 | - bodyclose |
33 | 82 | - deadcode |
34 | | - - depguard |
35 | 83 | - dogsled |
36 | 84 | - errcheck |
37 | | - - unconvert |
38 | | - - unparam |
39 | | - - varcheck |
40 | | - - whitespace |
| 85 | + # - errorlint |
| 86 | + - exportloopref |
| 87 | + # - forcetypeassert |
| 88 | + - gocognit |
| 89 | + - goconst |
| 90 | + - gocritic |
| 91 | + - gocyclo |
| 92 | + - godot |
| 93 | + - gofmt |
| 94 | + - goimports |
| 95 | + - golint |
| 96 | + - gomodguard |
| 97 | + - goprintffuncname |
| 98 | + # - gosec |
| 99 | + - gosimple |
| 100 | + - govet |
| 101 | + - ineffassign |
| 102 | + - makezero |
| 103 | + - megacheck |
| 104 | + - misspell |
| 105 | + - nestif |
| 106 | + - noctx |
| 107 | + - nolintlint |
| 108 | + - revive |
| 109 | + - rowserrcheck |
| 110 | + - sqlclosecheck |
| 111 | + - staticcheck |
41 | 112 | - structcheck |
42 | 113 | - stylecheck |
43 | 114 | - typecheck |
44 | | - - nolintlint |
45 | | - - rowserrcheck |
46 | | - - scopelint |
47 | | - - goprintffuncname |
48 | | - - gofmt |
49 | | - - godot |
50 | | - - ineffassign |
51 | | - - gocritic |
52 | | - |
53 | | -issues: |
54 | | - exclude-use-default: false |
55 | | - exclude: |
56 | | - # errcheck: Almost all programs ignore errors on these functions and in most cases it's ok |
57 | | - - Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*printf?|os\.(Un)?Setenv). is not checked |
58 | | - # golint: False positive when tests are defined in package 'test' |
59 | | - - func name will be used as test\.Test.* by other packages, and that stutters; consider calling this |
60 | | - # govet: Common false positives |
61 | | - - (possible misuse of unsafe.Pointer|should have signature) |
62 | | - # staticcheck: Developers tend to write in C-style with an explicit 'break' in a 'switch', so it's ok to ignore |
63 | | - - ineffective break statement. Did you mean to break out of the outer loop |
64 | | - # gosec: Too many false-positives on 'unsafe' usage |
65 | | - - Use of unsafe calls should be audited |
66 | | - # gosec: Too many false-positives for parametrized shell calls |
67 | | - - Subprocess launch(ed with variable|ing should be audited) |
68 | | - # gosec: Duplicated errcheck checks |
69 | | - - G104 |
70 | | - # gosec: Too many issues in popular repos |
71 | | - - (Expect directory permissions to be 0750 or less|Expect file permissions to be 0600 or less) |
72 | | - # gosec: False positive is triggered by 'src, err := ioutil.ReadFile(filename)' |
73 | | - - Potential file inclusion via variable |
| 115 | + - unconvert |
| 116 | + - unparam |
| 117 | + - unused |
| 118 | + - varcheck |
| 119 | + - wastedassign |
| 120 | + - whitespace |
0 commit comments