1
- # options for analysis running
2
- run :
3
- # timeout for analysis, e.g. 30s, 5m, default is 1m
4
- timeout : 2m
5
-
6
- issues :
7
- # Only report issues for changes since master
8
- new-from-rev : origin/master
9
-
10
- # output configuration options
1
+ version : " 2"
11
2
output :
12
- # colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
13
3
formats :
14
- - format : colored-line-number
15
-
16
- linters-settings :
17
- errcheck :
18
- # report about not checking of errors in type assertions: `a := b.(MyStruct)`;
19
- # default is false: such cases aren't reported by default.
20
- check-type-assertions : true
21
-
22
- # Function length check
23
- funlen :
24
- lines : 60
25
- statements : 40
26
-
27
- # Report deeply nested if statements
28
- nestif :
29
- # minimal complexity of if statements to report, 5 by default
30
- min-complexity : 4
31
-
32
- gofmt :
33
- # simplify code: gofmt with `-s` option, true by default
34
- simplify : true
35
-
36
- govet :
37
- # report about shadowed variables
38
- enable-all : true
39
- disable :
40
- # Do not check field memory alignment because in most cases the performance gain is not worth the headache
41
- - fieldalignment
42
-
4
+ text :
5
+ path : stdout
43
6
linters :
44
- # Disable the default linters so we can explicitly name the linters we want
45
- disable-all : true
46
-
47
- # List of enabled linters
7
+ default : none
48
8
enable :
49
- # ####################
50
- # Default linters
51
- # ####################
52
- - gofmt
53
- # Checks error handling
54
9
- errcheck
55
- # Linter for Go source code that specializes in simplifying a code
56
- - gosimple
57
- # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose
58
- # arguments do not align with the format string
59
10
- govet
60
- # Detects when assignments to existing variables are not used
61
11
- ineffassign
62
- # Static code analytics
63
12
- staticcheck
64
- # Reports unused function parameters.
13
+ - unconvert
65
14
- unparam
66
- # Check if variables or functions are unused
67
15
- unused
68
- # Remove unnecessary type conversions.
69
- - unconvert
16
+ settings :
17
+ errcheck :
18
+ check-type-assertions : true
19
+ funlen :
20
+ lines : 60
21
+ statements : 40
22
+ govet :
23
+ disable :
24
+ - fieldalignment
25
+ enable-all : true
26
+ nestif :
27
+ min-complexity : 4
28
+ exclusions :
29
+ generated : lax
30
+ presets :
31
+ - comments
32
+ - common-false-positives
33
+ - legacy
34
+ - std-error-handling
35
+ paths :
36
+ - third_party$
37
+ - builtin$
38
+ - examples$
39
+ issues :
40
+ new-from-rev : origin/master
41
+ formatters :
42
+ enable :
43
+ - gofmt
44
+ settings :
45
+ gofmt :
46
+ simplify : true
47
+ exclusions :
48
+ generated : lax
49
+ paths :
50
+ - third_party$
51
+ - builtin$
52
+ - examples$
0 commit comments