-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.golangci.yml
More file actions
95 lines (84 loc) · 2.32 KB
/
.golangci.yml
File metadata and controls
95 lines (84 loc) · 2.32 KB
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
version: 2
run:
timeout: 10m
concurrency: 2
modules-download-mode: readonly
linters:
# 1. Enable EVERY available linter
default: all
# 2. Disable specific linters.
disable:
# --- DEPRECATED / REMOVED LINTERS ---
- noinlineerr # Disabled: We prefer the standard idiom 'if err := ...; err != nil' to reduce scope.
- wsl
# --- LEVEL 1: CRITICAL BUGS & SECURITY ---
# - forcetypeassert
# - gosec
# --- LEVEL 2: STYLE & MODERNIZATION ---
# - modernize
# - perfsprint
# - revive
# - unused
# - goconst
# --- LEVEL 3: ERROR HANDLING & BEST PRACTICES ---
# - err113
# - nilerr
# - nlreturn
# - staticcheck
# - errcheck # Unchecked errors
# - nonamedreturns # Named returns usage
# --- LEVEL 4: COMPLEXITY & REFACTORING ---
# - cyclop
# - funlen
# - gocognit
# - maintidx
# - mnd
# - nestif
# - wrapcheck
# --- LEVEL 5: STRICT STANDARDS & OPINIONS ---
# - depguard
# - exhaustruct
# - gochecknoglobals
# - godoclint
# - ireturn
# - lll
# - varnamelen
# - wsl_v5
# - forbidigo # Forbidden identifiers (fmt.Print, etc)
# - funcorder # Function ordering
# - gochecknoinits # Init functions
# - godox # TODOs
# - goprintffuncname # Printf-like naming
# - tagliatelle # JSON struct tags
# - nolintlint
# --- TESTING ---
# - testifylint
# - usetesting
# - paralleltest # (Added to ensure tests run without forcing parallel)
# --- NOISE / LOW VALUE ---
# - gocritic
# - thelper
# - unparam
# - exhaustive # Exhaustive switch statements
settings:
ireturn:
allow:
- error
- github.com/contextvibes/cli/internal/workitem.Provider
- github.com/contextvibes/cli/internal/exec.CommandExecutor
depguard:
rules:
main:
list-mode: lax
files:
- "!**/*_a _file.go"
allow:
- $gostd
- github.com/OpenPeeDeeP
deny:
- pkg: "math/rand$"
desc: use math/rand/v2
- pkg: "github.com/sirupsen/logrus"
desc: not allowed
- pkg: "github.com/pkg/errors"
desc: Should be replaced by standard lib errors package