File: .golangci.yaml

package info (click to toggle)
golang-github-spf13-viper 1.21.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 560 kB
  • sloc: makefile: 64
file content (118 lines) | stat: -rw-r--r-- 2,038 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: "2"

run:
  timeout: 5m

linters:
  enable:
    - bodyclose
    - dogsled
    - dupl
    - durationcheck
    - exhaustive
    - gocritic
    - godot
    - gomoddirectives
    - goprintffuncname
    - govet
    - importas
    - ineffassign
    - makezero
    - misspell
    - nakedret
    - nilerr
    - noctx
    - nolintlint
    - prealloc
    - predeclared
    - revive
    - rowserrcheck
    - sqlclosecheck
    - staticcheck
    - tparallel
    - unconvert
    - unparam
    - unused
    - wastedassign
    - whitespace

    # fixme
    # - cyclop
    # - errcheck
    # - errorlint
    # - exhaustivestruct
    # - forbidigo
    # - forcetypeassert
    # - gochecknoglobals
    # - gochecknoinits
    # - gocognit
    # - goconst
    # - gocyclo
    # - gosec
    # - gosimple
    # - ifshort
    # - lll
    # - nlreturn
    # - paralleltest
    # - scopelint
    # - thelper
    # - wrapcheck

    # unused
    # - depguard
    # - goheader
    # - gomodguard

    # don't enable:
    # - asciicheck
    # - funlen
    # - godox
    # - goerr113
    # - gomnd
    # - interfacer
    # - maligned
    # - nestif
    # - testpackage
    # - wsl

  exclusions:
    rules:
      - linters:
        - errcheck
        - noctx
        path: _test.go
    presets:
      - comments
      - std-error-handling

  settings:
    misspell:
      locale: US
    nolintlint:
      allow-unused: false # report any unused nolint directives
      require-specific: false # don't require nolint directives to be specific about which linter is being skipped
    gocritic:
      # Enable multiple checks by tags. See "Tags" section in https://github.com/go-critic/go-critic#usage.
      enabled-tags:
        - diagnostic
        - experimental
        - opinionated
        - style
      disabled-checks:
        - importShadow
        - unnamedResult

formatters:
  enable:
    - gci
    - gofmt
    - gofumpt
    - goimports
    # - golines

  settings:
    gci:
      sections:
        - standard
        - default
        - localmodule