@@ -64,6 +64,12 @@ import (
64
64
)
65
65
66
66
var (
67
+ // List of go modules for linting/testing/etc.
68
+ workspaceModules = []string {
69
+ "." ,
70
+ "./cmd/keeper" ,
71
+ }
72
+
67
73
// Files that end up in the geth*.zip archive.
68
74
gethArchiveFiles = []string {
69
75
"COPYING" ,
@@ -322,7 +328,7 @@ func doTest(cmdline []string) {
322
328
gotest .Args = append (gotest .Args , "-short" )
323
329
}
324
330
325
- packages := [] string { "./..." }
331
+ packages := workspacePackagePatterns ()
326
332
if len (flag .CommandLine .Args ()) > 0 {
327
333
packages = flag .CommandLine .Args ()
328
334
}
@@ -364,7 +370,7 @@ func doCheckGenerate() {
364
370
protocPath = downloadProtoc (* cachedir )
365
371
protocGenGoPath = downloadProtocGenGo (* cachedir )
366
372
)
367
- c := tc .Go ("generate" , "./..." )
373
+ c := tc .Go ("generate" , workspacePackagePatterns () ... )
368
374
pathList := []string {filepath .Join (protocPath , "bin" ), protocGenGoPath , os .Getenv ("PATH" )}
369
375
c .Env = append (c .Env , "PATH=" + strings .Join (pathList , string (os .PathListSeparator )))
370
376
build .MustRun (c )
@@ -424,7 +430,7 @@ func doLint(cmdline []string) {
424
430
cachedir = flag .String ("cachedir" , "./build/cache" , "directory for caching golangci-lint binary." )
425
431
)
426
432
flag .CommandLine .Parse (cmdline )
427
- packages := [] string { "./..." }
433
+ packages := workspacePackagePatterns ()
428
434
if len (flag .CommandLine .Args ()) > 0 {
429
435
packages = flag .CommandLine .Args ()
430
436
}
@@ -1169,3 +1175,11 @@ func doSanityCheck() {
1169
1175
csdb := download .MustLoadChecksums ("build/checksums.txt" )
1170
1176
csdb .DownloadAndVerifyAll ()
1171
1177
}
1178
+
1179
+ func workspacePackagePatterns () []string {
1180
+ p := make ([]string , len (workspaceModules ))
1181
+ for i := range workspaceModules {
1182
+ p [i ] = workspaceModules [i ] + "/..."
1183
+ }
1184
+ return p
1185
+ }
0 commit comments