Skip to content

Commit c1b42e4

Browse files
authored
Only install Go linters in sa-lint task. (#855)
1 parent b3fafc0 commit c1b42e4

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

.evergreen/config.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,22 @@ functions:
134134
script: |
135135
${PREPARE_SHELL}
136136
137-
# Install any go tools that we need. Use "go install" instead of "go get" to prevent
138-
# modifying the go.mod file.
139-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
140-
go install github.com/walle/lll/...@latest
141-
142137
# initialize submodules
143138
git submodule init
144139
git submodule update
145140
141+
install-linters:
142+
- command: shell.exec
143+
params:
144+
working_dir: src/go.mongodb.org/mongo-driver
145+
script: |
146+
${PREPARE_SHELL}
147+
148+
# Install linters. Use "go install" instead of "go get" to prevent modifying the go.mod
149+
# file.
150+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
151+
go install github.com/walle/lll/...@latest
152+
146153
upload-mo-artifacts:
147154
- command: shell.exec
148155
params:
@@ -953,6 +960,7 @@ tasks:
953960
- name: sa-lint
954961
tags: ["static-analysis"]
955962
commands:
963+
- func: install-linters
956964
- func: run-make
957965
vars:
958966
targets: lint

0 commit comments

Comments
 (0)