File tree Expand file tree Collapse file tree 4 files changed +159
-4
lines changed Expand file tree Collapse file tree 4 files changed +159
-4
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
kind : pipeline
3
- type : docker
3
+ type : vm
4
4
name : default
5
5
6
- platform :
7
- os : linux
8
- arch : amd64
6
+ pool :
7
+ use : ubuntu
9
8
10
9
steps :
11
10
- name : vet
15
14
volumes :
16
15
- name : gopath
17
16
path : /go
17
+ depends_on :
18
+ - clone
18
19
19
20
- name : test
20
21
image : golang:1.15
@@ -23,6 +24,30 @@ steps:
23
24
volumes :
24
25
- name : gopath
25
26
path : /go
27
+ depends_on :
28
+ - vet
29
+
30
+ - name : check go.mod is up to date
31
+ image : golang:1.15
32
+ commands :
33
+ - cp go.mod go.mod.bak
34
+ - go mod tidy
35
+ - diff go.mod go.mod.bak || (echo "go.mod is not up to date" && exit 1)
36
+ volumes :
37
+ - name : gopath
38
+ path : /go
39
+ depends_on :
40
+ - vet
41
+
42
+ - name : golangci-lint
43
+ image : golangci/golangci-lint
44
+ commands :
45
+ - golangci-lint run --timeout 500s
46
+ volumes :
47
+ - name : gopath
48
+ path : /go
49
+ depends_on :
50
+ - clone
26
51
27
52
volumes :
28
53
- name : gopath
Original file line number Diff line number Diff line change
1
+ linters-settings :
2
+ dupl :
3
+ threshold : 100
4
+ funlen :
5
+ lines : 400
6
+ statements : 100
7
+ gci :
8
+ local-prefixes : github.com/golangci/golangci-lint
9
+ goconst :
10
+ min-len : 3
11
+ min-occurrences : 3
12
+ gocritic :
13
+ enabled-tags :
14
+ - diagnostic
15
+ - experimental
16
+ - opinionated
17
+ - performance
18
+ - style
19
+ disabled-checks :
20
+ - dupImport # https://github.com/go-critic/go-critic/issues/845
21
+ - ifElseChain
22
+ - octalLiteral
23
+ - whyNoLint
24
+ - wrapperFunc
25
+ gocyclo :
26
+ min-complexity : 25
27
+ goimports :
28
+ local-prefixes : github.com/golangci/golangci-lint
29
+ gomnd :
30
+ settings :
31
+ mnd :
32
+ # don't include the "operation" and "assign"
33
+ checks : argument,case,condition,return
34
+ govet :
35
+ check-shadowing : true
36
+ settings :
37
+ printf :
38
+ funcs :
39
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Infof
40
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Warnf
41
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Errorf
42
+ - (github.com/golangci/golangci-lint/pkg/logutils.Log).Fatalf
43
+ lll :
44
+ line-length : 200
45
+ maligned :
46
+ suggest-new : true
47
+ misspell :
48
+ locale : US
49
+ nolintlint :
50
+ allow-leading-space : true # don't require machine-readable nolint directives (i.e. with no leading space)
51
+ allow-unused : false # report any unused nolint directives
52
+ require-explanation : false # don't require an explanation for nolint directives
53
+ require-specific : false # don't require nolint directives to be specific about which linter is being skipped
54
+ nakedret :
55
+ max-func-lines : 100
56
+
57
+ linters :
58
+ # please, do not use `enable-all`: it's deprecated and will be removed soon.
59
+ # inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
60
+ disable-all : true
61
+ enable :
62
+ - bodyclose
63
+ - deadcode
64
+ - depguard
65
+ - dogsled
66
+ - errcheck
67
+ - exportloopref
68
+ - exhaustive
69
+ - funlen
70
+ - gochecknoinits
71
+ - goconst
72
+ - gocritic
73
+ - gocyclo
74
+ - gofmt
75
+ - goimports
76
+ - gomnd
77
+ - goprintffuncname
78
+ - gosec
79
+ - gosimple
80
+ - govet
81
+ - ineffassign
82
+ - lll
83
+ - misspell
84
+ - nakedret
85
+ - noctx
86
+ - nolintlint
87
+ - revive
88
+ - rowserrcheck
89
+ - staticcheck
90
+ - structcheck
91
+ - stylecheck
92
+ - typecheck
93
+ - unconvert
94
+ - unparam
95
+ - unused
96
+ - varcheck
97
+ - whitespace
98
+
99
+ # don't enable:
100
+ # - asciicheck
101
+ # - dupl
102
+ # - scopelint
103
+ # - gochecknoglobals
104
+ # - gocognit
105
+ # - godot
106
+ # - godox
107
+ # - goerr113
108
+ # - interfacer
109
+ # - maligned
110
+ # - nestif
111
+ # - prealloc
112
+ # - testpackage
113
+ # - revive
114
+ # - wsl
115
+
116
+ issues :
117
+ # Excluding configuration per-path, per-linter, per-text and per-source
118
+ exclude-rules :
119
+ - path : _test\.go
120
+ linters :
121
+ - gomnd
122
+
123
+ # https://github.com/go-critic/go-critic/issues/926
124
+ - linters :
125
+ - gocritic
126
+ text : " unnecessaryDefer:"
127
+
128
+ run :
129
+ skip-files :
130
+ - _gen\.go
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments