File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ functions:
120
120
${PREPARE_SHELL}
121
121
# any go tools that we need
122
122
go get -u github.com/golang/lint/golint
123
+ go get -u github.com/kisielk/errcheck
123
124
124
125
# initialize submodules
125
126
git submodule init
@@ -211,17 +212,9 @@ functions:
211
212
done
212
213
213
214
214
- install-dependencies :
215
- type : test
216
- params :
217
- working_dir : src/github.com/mongodb/mongo-go-driver
218
- script : |
219
- ${PREPARE_SHELL}
220
- file="${PROJECT_DIRECTORY}/.evergreen/install-dependencies.sh"
221
- [ -f ${file} ] && sh ${file} || echo "${file} not available, skipping"
222
-
223
215
run-make :
224
216
- command : shell.exec
217
+ type : test
225
218
params :
226
219
working_dir : src/github.com/mongodb/mongo-go-driver
227
220
script : |
292
285
- func : windows-fix
293
286
- func : fix-absolute-paths
294
287
- func : make-files-executable
295
- - func : install-dependencies
296
288
297
289
post :
298
290
- command : gotest.parse_files
@@ -309,6 +301,13 @@ tasks:
309
301
vars :
310
302
targets : check-fmt
311
303
304
+ - name : sa-errcheck
305
+ tags : ["static-analysis"]
306
+ commands :
307
+ - func : run-make
308
+ vars :
309
+ targets : errcheck
310
+
312
311
- name : sa-lint
313
312
tags : ["static-analysis"]
314
313
commands :
Original file line number Diff line number Diff line change @@ -43,8 +43,7 @@ func ParseExtJSONArray(s string) (*Array, error) {
43
43
}
44
44
45
45
buf := make ([]byte , b .RequiredBytes ())
46
- _ , err = b .WriteDocument (buf )
47
- if err != nil {
46
+ if _ , err = b .WriteDocument (buf ); err != nil {
48
47
return nil , err
49
48
}
50
49
You can’t perform that action at this time.
0 commit comments