...
1run:
2 timeout: 8m
3 tests: true
4 build-tags:
5 - admin
6 - functional
7 - integration
8 skip-dirs:
9 # paths are relative to module root
10 - cri-containerd/test-images
11
12linters:
13 enable:
14 # defaults:
15 # - errcheck
16 # - gosimple
17 # - govet
18 # - ineffassign
19 # - staticcheck
20 # - typecheck
21 # - unused
22
23 - gofmt # whether code was gofmt-ed
24 - nolintlint # ill-formed or insufficient nolint directives
25 - stylecheck # golint replacement
26 - thelper # test helpers without t.Helper()
27
28linters-settings:
29 stylecheck:
30 # https://staticcheck.io/docs/checks
31 checks: ["all"]
32
33issues:
34 exclude-rules:
35 # path is relative to module root, which is ./test/
36 - path: cri-containerd
37 linters:
38 - stylecheck
39 text: "^ST1003: should not use underscores in package names$"
40 source: "^package cri_containerd$"
41
42 # This repo has a LOT of generated schema files, operating system bindings, and other
43 # things that ST1003 from stylecheck won't like (screaming case Windows api constants for example).
44 # There's also some structs that we *could* change the initialisms to be Go friendly
45 # (Id -> ID) but they're exported and it would be a breaking change.
46 # This makes it so that most new code, code that isn't supposed to be a pretty faithful
47 # mapping to an OS call/constants, or non-generated code still checks if we're following idioms,
48 # while ignoring the things that are just noise or would be more of a hassle than it'd be worth to change.
49 - path: layer.go
50 linters:
51 - stylecheck
52 Text: "ST1003:"
53
54 - path: hcsshim.go
55 linters:
56 - stylecheck
57 Text: "ST1003:"
58
59 - path: cmd\\ncproxy\\nodenetsvc\\
60 linters:
61 - stylecheck
62 Text: "ST1003:"
63
64 - path: cmd\\ncproxy_mock\\
65 linters:
66 - stylecheck
67 Text: "ST1003:"
68
69 - path: internal\\hcs\\schema2\\
70 linters:
71 - stylecheck
72 - gofmt
73
74 - path: internal\\wclayer\\
75 linters:
76 - stylecheck
77 Text: "ST1003:"
78
79 - path: hcn\\
80 linters:
81 - stylecheck
82 Text: "ST1003:"
83
84 - path: internal\\hcs\\schema1\\
85 linters:
86 - stylecheck
87 Text: "ST1003:"
88
89 - path: internal\\hns\\
90 linters:
91 - stylecheck
92 Text: "ST1003:"
93
94 - path: ext4\\internal\\compactext4\\
95 linters:
96 - stylecheck
97 Text: "ST1003:"
98
99 - path: ext4\\internal\\format\\
100 linters:
101 - stylecheck
102 Text: "ST1003:"
103
104 - path: internal\\guestrequest\\
105 linters:
106 - stylecheck
107 Text: "ST1003:"
108
109 - path: internal\\guest\\prot\\
110 linters:
111 - stylecheck
112 Text: "ST1003:"
113
114 - path: internal\\windevice\\
115 linters:
116 - stylecheck
117 Text: "ST1003:"
118
119 - path: internal\\winapi\\
120 linters:
121 - stylecheck
122 Text: "ST1003:"
123
124 - path: internal\\vmcompute\\
125 linters:
126 - stylecheck
127 Text: "ST1003:"
128
129 - path: internal\\regstate\\
130 linters:
131 - stylecheck
132 Text: "ST1003:"
133
134 - path: internal\\hcserror\\
135 linters:
136 - stylecheck
137 Text: "ST1003:"
138
139 # v0 APIs are deprecated, but still retained for backwards compatability
140 - path: cmd\\ncproxy\\
141 linters:
142 - staticcheck
143 text: "^SA1019: .*(ncproxygrpc|nodenetsvc)[/]?v0"
144
145 - path: internal\\tools\\networkagent
146 linters:
147 - staticcheck
148 text: "^SA1019: .*nodenetsvc[/]?v0"
View as plain text