-
Notifications
You must be signed in to change notification settings - Fork 3
/
.golangci.yml
80 lines (77 loc) · 2.44 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
76
77
78
79
80
run:
timeout: 5m
linters-settings:
govet:
enable-all: true
disable:
- shadow
misspell:
locale: US
lll:
line-length: 160
revive:
rules:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md#var-naming
- name: var-naming
forbidigo:
forbid:
- t\.Fatal.*
- fmt\.Print.*
linters:
disable-all: true
enable:
# Errcheck is a program for checking for unchecked errors in go programs.
# These unchecked errors can be critical bugs in some cases
- errcheck
# Linter for Go source code that specializes in simplifying a code
- gosimple
# Vet examines Go source code and reports suspicious constructs,
# such as Printf calls whose arguments do not align with the format string
- govet
# Forbids identifiers
- forbidigo
# Staticcheck is a go vet on steroids, applying a ton of static analysis checks
- staticcheck
# Like the front-end of a Go compiler, parses and type-checks Go code
- typecheck
# Checks Go code for unused constants, variables, functions and types
- unused
# checks whether HTTP response body is closed successfully
- bodyclose
# containedctx is a linter that detects struct contained context.Context field
- containedctx
# Checks that sentinel errors are prefixed with the Err and error types are suffixed with the Error.
- errname
# checks for pointers to enclosing loop variables
- exportloopref
# Gofumpt checks whether code was gofumpt-ed.
- gofumpt
# Reports long lines
- lll
# Finds commonly misspelled English words in comments
- misspell
# Finds naked returns in functions greater than a specified function length
- nakedret
# paralleltest detects missing usage of t.Parallel() method in your Go test
- paralleltest
# Finds slice declarations that could potentially be pre-allocated
- prealloc
# find code that shadows one of Go's predeclared identifiers
- predeclared
# Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint
- revive
# Stylecheck is a replacement for golint
- stylecheck
# tenv is analyzer that detects using os.Setenv instead of t.Setenv since Go1.17
- tenv
issues:
exclude-use-default: true
max-per-linter: 0
max-same-issues: 0
exclude: []
exclude-rules:
# All
- path: \.go
text: "fieldalignment:"
linters:
- govet