-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.golangci.yml
75 lines (65 loc) · 2.76 KB
/
.golangci.yml
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
run:
concurrency: 0
timeout: 10m
go: '1.20'
linters:
disable:
- errcheck
enable:
#- errcheck # checks unchecked errors
- gosimple # simplify code
- govet # examines Go source code and reports suspicious constructs
- ineffassign # detect unused assign
- staticcheck # cover Go vet edge cases
- unused # checks Go code for unused constants, variables, functions and types
- bidichk # checks for dangerous unicode character sequences
- bodyclose # checks whether HTTP response body is closed successfully
- contextcheck # check the function whether use a non-inherited context
#- dupl # code clone detection
- durationcheck # check for two durations multiplied together
- errname # checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error
- errorlint # find code that will cause problems with the error wrapping scheme
- exportloopref # checks for pointers to enclosing loop variables
- goconst # finds repeated strings that could be replaced by a constant
- gocritic # provides diagnostics that check for bugs, performance and style issues
#- godot # check if comments end in a period
#- gofmt # checks whether code was gofmt-ed
- gofumpt # Gofumpt checks whether code was gofumpt-ed
- goimports # fix imports, formats your code in the same style as gofmt
#- ifshort # checks that your code uses short syntax for if-statements whenever possible
- misspell # finds commonly misspelled English words in comments
- noctx # finds sending http request without context.Context
- predeclared # find code that shadows one of Go's predeclared identifiers
- revive # replacement of golint
- rowserrcheck # checks whether Err of rows is checked successfully
- sqlclosecheck # checks that sql.Rows and sql.Stmt are closed.
- unconvert # remove unnecessary type conversions
- wastedassign # finds wasted assignment statements.
- whitespace # tool for detection of leading and trailing whitespace
- usestdlibvars # A linter that detect the possibility to use variables/constants from the Go standard library.
#- wrapcheck # check that errors from external packages are wrapped during return to help identify the error source.
- prealloc
issues:
exclude-dirs:
- internal/golang.org/x
exclude-files:
- "internal/randutil/csprng.go"
- "internal/randutil/randutil.go"
exclude-rules:
- linters:
- typecheck
text: "lang was set to"
#fix: true
max-same-issues: 0
max-issues-per-linter: 0
linters-settings:
revive:
rules:
- name: var-naming
disabled: true
gocritic:
disabled-checks:
- commentFormatting
- captLocal
goimports:
local-prefixes: github.com/RyuaNerin/go-krypto