forked from golangci/golangci-lint
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnolint.go
57 lines (44 loc) · 1.08 KB
/
nolint.go
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
package testdata
var nolintSpecific int //nolint:gofmt
var nolintSpace int // nolint: gofmt
var nolintSpaces int //nolint:gofmt, govet
var nolintAll int // nolint:all
var nolintAndAppendix int // nolint:all // another comment
//nolint:all
var nolintVarByPrecedingComment int
//nolint:all
var dontNolintVarByPrecedingCommentBecauseOfNewLine int
var nolintPrecedingVar string //nolint:all
var dontNolintVarByPrecedingCommentBecauseOfDifferentColumn int
//nolint:all
func nolintFuncByPrecedingComment() *string {
xv := "v"
return &xv
}
//nolint:all
// second line
func nolintFuncByPrecedingMultilineComment1() *string {
xv := "v"
return &xv
}
// first line
//nolint:all
func nolintFuncByPrecedingMultilineComment2() *string {
xv := "v"
return &xv
}
// first line
//nolint:all
// third line
func nolintFuncByPrecedingMultilineComment3() *string {
xv := "v"
return &xv
}
var nolintAliasGAS bool //nolint:gas
var nolintAliasGosec bool //nolint:gosec
var nolintAliasUpperCase int // nolint: GAS
//nolint:errcheck
var (
nolintVarBlockVar1 int
nolintVarBlockVar2 int
)