-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
65 lines (58 loc) · 1.78 KB
/
.golangci.yml
File metadata and controls
65 lines (58 loc) · 1.78 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
# golangci-lint v2 configuration
version: "2"
linters:
default: standard
enable:
- revive # Better replacement for golint
- gocritic # Additional style/performance checks
- unconvert # Unnecessary type conversions
- copyloopvar # Go 1.22+ loop variable issues
- usestdlibvars # Use standard library constants
- zerologlint # Detect incorrect zerolog usage
- forbidigo # Forbid certain function calls
disable:
- errcheck # Too noisy for this project
- misspell # Disabled spelling checks
settings:
revive:
# Enable all rules except those explicitly disabled
rules:
- name: var-naming
disabled: true # Too strict for short variable names
- name: exported
disabled: true # Let's start without requiring docs for all exports
forbidigo:
forbid:
- pattern: ^log\.
msg: "Usage of the 'log' package is forbidden"
- pattern: ^fmt\.Print(f|ln|)\(?
msg: "Usage of fmt.Print functions is forbidden"
exclusions:
rules:
- path: _test\.go
linters:
- errcheck # Don't require error checking in tests
- path: ^cmd/
linters:
- forbidigo # Allow log and fmt.Print in cmd/ binaries
- path: ^sdk/examples/
linters:
- forbidigo # Examples may use log/fmt for simplicity
issues:
# Don't hide multiple issues in the same line
max-same-issues: 0
formatters:
enable:
- gofmt
- goimports
settings:
gofmt:
simplify: true
rewrite-rules:
- pattern: interface{}
replacement: any
- pattern: a[b:len(a)]
replacement: a[b:]
goimports:
local-prefixes:
- "github.com/lachlan/pokerforbots"