Skip to content

Commit 3d1759b

Browse files
committed
Run check for unused/missing Go packages only against latest Go version
The tidied up `go.mod` file tends to change between Go versions. Signed-off-by: beorn7 <[email protected]>
1 parent e6ea98b commit 3d1759b

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.circleci/config.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
parameters:
1010
go_version:
1111
type: string
12-
run_style:
12+
run_style_and_unused:
1313
type: boolean
1414
default: false
1515
run_lint:
@@ -28,15 +28,15 @@ jobs:
2828
steps:
2929
- go/load-cache:
3030
key: v1-go<< parameters.go_version >>
31-
- run: make check_license unused test
31+
- run: make check_license test
3232
- when:
3333
condition: << parameters.run_lint >>
3434
steps:
3535
- run: make lint
3636
- when:
37-
condition: << parameters.run_style >>
37+
condition: << parameters.run_style_and_unused >>
3838
steps:
39-
- run: make style
39+
- run: make style unused
4040
- when:
4141
condition: << parameters.use_gomod_cache >>
4242
steps:
@@ -78,5 +78,6 @@ workflows:
7878
name: go-1-15
7979
go_version: "1.15"
8080
run_lint: true
81-
# Style is only checked against the latest supported Go version.
82-
run_style: true
81+
# Style and unused/missing packages are only checked against
82+
# the latest supported Go version.
83+
run_style_and_unused: true

0 commit comments

Comments
 (0)