fork/gdu

git clone https://git.julia.blue/fork/gdu

Daniel Mildeci: use golangci-lint 2.6 (#449)8b8f1e9

master
3.0 KiB133 linesraw
1version: "2"
2output:
3  formats:
4    text:
5      path: stdout
6linters:
7  default: none
8  enable:
9    - bodyclose
10    - copyloopvar
11    - dogsled
12    - errcheck
13    - errorlint
14    - exhaustive
15    - funlen
16    - goconst
17    - gocritic
18    - gocyclo
19    - govet
20    - ineffassign
21    - lll
22    - nakedret
23    - revive
24    - staticcheck
25    - unparam
26    - unused
27    - whitespace
28  settings:
29    dupl:
30      threshold: 100
31    errcheck:
32      check-blank: true
33    funlen:
34      lines: 500
35      statements: 50
36    goconst:
37      min-len: 3
38      min-occurrences: 3
39    gocritic:
40      disabled-checks:
41        - whyNoLint
42      enabled-tags:
43        - diagnostic
44        - experimental
45        - opinionated
46        - performance
47        - style
48    gocyclo:
49      min-complexity: 25
50    govet:
51      enable:
52        - shadow
53    lll:
54      line-length: 160
55    revive:
56      rules:
57        - name: blank-imports
58        - name: context-as-argument
59        - name: context-keys-type
60        - name: dot-imports
61        - name: error-return
62        - name: error-strings
63        - name: error-naming
64        - name: exported
65        - name: increment-decrement
66        - name: var-naming
67        - name: var-declaration
68        - name: package-comments
69        - name: range
70        - name: receiver-naming
71        - name: time-naming
72        - name: unexported-return
73        - name: indent-error-flow
74        - name: errorf
75        - name: empty-block
76        - name: superfluous-else
77        - name: unreachable-code
78        - name: redefines-builtin-id
79        # While we agree with this rule, right now it would break too many
80        # projects. So, we disable it by default.
81        - name: unused-parameter
82          disabled: true
83  exclusions:
84    generated: lax
85    presets:
86      - comments
87      - common-false-positives
88      - legacy
89      - std-error-handling
90    rules:
91      - linters:
92          - errcheck
93          - funlen
94          - gochecknoglobals # Globals in test files are tolerated.
95          - goconst # Repeated consts in test files are tolerated.
96          - gocritic
97          - gocyclo
98          - gosec
99        path: _test\.go
100      # This rule is buggy and breaks on our `///Block` lines.  Disable for now.
101      - linters:
102          - gocritic
103        text: 'commentFormatting: put a space'
104      # This rule incorrectly flags nil references after assert.Assert(t, x != nil)
105      - linters:
106          - staticcheck
107        path: _test\.go
108        text: SA5011
109      - linters:
110          - lll
111        source: '^//go:generate '
112      - linters:
113          - gocritic
114          - lll
115        path: \.resolvers\.go
116        source: '^func \(r \*[a-zA-Z]+Resolvers\) '
117      - path: (.+)\.go$
118        # We allow error shadowing
119        text: declaration of "err" shadows declaration at
120    paths:
121      - third_party$
122      - builtin$
123      - examples$
124formatters:
125  enable:
126    - gofmt
127    - goimports
128  exclusions:
129    generated: lax
130    paths:
131      - third_party$
132      - builtin$
133      - examples$