-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.golangci.yml
More file actions
45 lines (36 loc) · 1.13 KB
/
.golangci.yml
File metadata and controls
45 lines (36 loc) · 1.13 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
version: "2"
linters:
default: none
enable:
# --- Correctness ---
- errcheck # unhandled errors
- govet # go vet (shadowing, printf mismatches, etc.)
- staticcheck # broad static analysis (replaces megacheck/gosimple/unused)
- ineffassign # assignments whose value is never used
# --- Style ---
- misspell # common English spelling errors in comments/strings
# --- Security ---
- gosec # common security issues (G-prefixed rules)
# --- Complexity ---
- cyclop # cyclomatic complexity per function
settings:
cyclop:
max-complexity: 15
gosec:
excludes:
# G204: RunCommand builds commands internally, not from user input
- G204
exclusions:
rules:
# Don't flag test files for gosec (intentional fake secrets in tests)
- path: "_test\\.go"
linters:
- gosec
formatters:
enable:
- gofmt # standard formatting
- goimports # import grouping (stdlib | external | internal)
settings:
goimports:
local-prefixes:
- github.com/Pringled/agentcheck