forked from sonirico/go-hyperliquid
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
118 lines (112 loc) · 2.74 KB
/
Copy path.golangci.yml
File metadata and controls
118 lines (112 loc) · 2.74 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
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
tests: true
linters-settings:
govet: {}
gocyclo:
min-complexity: 15
dupl:
threshold: 100
goconst:
min-len: 2
min-occurrences: 3
misspell:
locale: US
lll:
line-length: 140
goimports:
local-prefixes: github.com/sonirico/go-hyperliquid
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated
- performance
- style
disabled-checks:
- dupImport # https://github.com/go-critic/go-critic/issues/845
- ifElseChain
- octalLiteral
- whyNoLint
funlen:
lines: 150
statements: 60
staticcheck:
checks: ["all", "-QF1003", "-QF1008", "-SA9003"]
linters:
disable-all: true
enable:
- bodyclose
# - depguard # Disabled to allow all imports
- dogsled
# - dupl # Disabled to reduce noise from similar test code
- errcheck
- copyloopvar
- exhaustive
# - funlen # Disabled - many functions are necessarily long
# - gochecknoinits # Disabled - init functions are sometimes needed
# - goconst # Disabled - not always worth creating constants
- gocritic
- gocyclo
# - mnd # Disabled - magic numbers are often acceptable
- goprintffuncname
- gosec
- govet
- ineffassign
# - lll # Disabled - line length is flexible
- misspell
# - nakedret # Disabled - naked returns are acceptable in some cases
- noctx
- nolintlint
- rowserrcheck
- staticcheck
- unconvert
# - unparam # Disabled - unused parameters are sometimes needed for interface compliance
- unused
- whitespace
issues:
exclude-dirs:
- examples
- testdata
exclude-rules:
- path: _test\.go
linters:
- mnd
- funlen
- gocyclo
- lll
- dupl
- path: examples/
linters:
- errcheck
- funlen
- dupl
- goconst
- path: _easyjson\.go
linters:
- stylecheck
- unused
- gocritic
# Exclude empty branch in debug code
- linters:
- staticcheck
source: "if e.debug"
# Allow embedded field access - test files often use this for convenience
- path: _test\.go
linters:
- staticcheck
# Allow if-else chain in tests
- linters:
- staticcheck
source: "if tt.jsonData"
# Allow unused parameters in interface implementations
- linters:
- unparam
text: "is unused"
exclude-use-default: false
exclude:
# errcheck: Almost all programs ignore errors on these functions and in most cases it's ok
- Error return value of .((os\.)?std(out|err)\..*|.*Close|.*Flush|os\.Remove(All)?|.*print.*|os\.(Un)?Setenv). is not checked
max-issues-per-linter: 0
max-same-issues: 0