-
Notifications
You must be signed in to change notification settings - Fork 1
/
.golangci.yml
52 lines (49 loc) · 2.74 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
run:
timeout: 5m
modules-download-mode: readonly
linters-settings:
gofmt:
simplify: true
govet:
check-shadowing: false # set this to true from time to time to check for possible issues
disable-all: true
enable:
- asmdecl # report mismatches between assembly files and Go declarations
- assign # check for useless assignments
- atomic # check for common mistakes using the sync/atomic package
- bools # check for common mistakes involving boolean operators
- buildtag # check that +build tags are well-formed and correctly located
- cgocall # detect some violations of the cgo pointer passing rules
- composites # check for unkeyed composite literals
- copylocks # check for locks erroneously passed by value
- errorsas # report passing non-pointer or non-error values to errors.As
- httpresponse # check for mistakes using HTTP responses
- loopclosure # check references to loop variables from within nested functions
- lostcancel # check cancel func returned by context.WithCancel is called
- nilfunc # check for useless comparisons between functions and nil
- printf # check consistency of Printf format strings and arguments
- shift # check for shifts that equal or exceed the width of the integer
- stdmethods # check signature of methods of well-known interfaces
- structtag # check that struct field tags conform to reflect.StructTag.Get
- tests # check for common mistaken usages of tests and examples
- unmarshal # report passing non-pointer or non-interface values to unmarshal
- unreachable # check for unreachable code
- unsafeptr # check for invalid conversions of uintptr to unsafe.Pointer
- unusedresult # check for unused results of calls to some functions
linters:
disable-all: true
enable:
- gofmt # Checks whether code was gofmt-ed
- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint
- gosimple # Linter for Go source code that specializes in simplifying a code
- govet # Examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string
- ineffassign # Detects when assignments to existing variables are not used
- unconvert # Removes unnecessary type conversions
- unused # Checks Go code for unused constants, variables, functions and types
- copyloopvar # Checks for pointers to enclosing loop variables
- errcheck # Detects unchecked errors.
issues:
exclude-rules:
- linters:
- unused
text: "getConfiguration"