File tree 3 files changed +17
-28
lines changed
3 files changed +17
-28
lines changed Original file line number Diff line number Diff line change 30
30
repo-access-token : ${{ secrets.GITHUB_TOKEN }}
31
31
- run : ./hack/verify-no-patent.sh
32
32
working-directory : src/github.com/containerd/nerdctl
33
- - run : ./hack/verify-pkg-isolation.sh
34
- working-directory : src/github.com/containerd/nerdctl
Original file line number Diff line number Diff line change 5
5
linters :
6
6
disable-all : true
7
7
enable :
8
- # - depguard
8
+ - depguard
9
9
- gofmt
10
10
- goimports
11
11
- govet
@@ -135,6 +135,22 @@ linters-settings:
135
135
- unnamedResult
136
136
- unnecessaryBlock
137
137
138
+ depguard :
139
+ rules :
140
+ # pkg files must not depend on cobra nor anything in cmd
141
+ pkg :
142
+ files :
143
+ - " **/pkg/**/*.go"
144
+ deny :
145
+ - pkg : " github.com/spf13/cobra"
146
+ desc : " pkg must not depend on cobra"
147
+ - pkg : " github.com/spf13/pflag"
148
+ desc : " pkg must not depend on pflag"
149
+ - pkg : " github.com/spf13/viper"
150
+ desc : " pkg must not depend on viper"
151
+ - pkg : " github.com/containerd/nerdctl/v2/cmd"
152
+ desc : " pkg must not depend on any cmd files"
153
+
138
154
issues :
139
155
max-issues-per-linter : 0
140
156
max-same-issues : 0
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments