Skip to content

Commit a843bdd

Browse files
authored
Merge pull request #5 from per1234/remove-golint-taskfile-dep
Reconfigure taskfile to avoid global golint dependency
2 parents d92bcbf + c1aaf51 commit a843bdd

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: Taskfile.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ tasks:
6161
desc: Lint Go code
6262
cmds:
6363
- go vet {{ default .DEFAULT_PACKAGES .PACKAGES }}
64-
- "'{{.GOLINTBIN}}' {{.GOLINTFLAGS}} {{ default .DEFAULT_TARGETS .TARGETS }}"
64+
- |
65+
GOLINT_PATH="$(go list -f '{{"{{"}}.Target{{"}}"}}' golang.org/x/lint/golint || echo "false")"
66+
"$GOLINT_PATH" {{.GOLINTFLAGS}} "{{ default .DEFAULT_TARGETS .TARGETS }}"
6567
6668
go:check-formatting:
6769
desc: Check Go code formatting
@@ -181,8 +183,6 @@ vars:
181183
sh: echo '`go list -f '{{"{{"}}.Dir{{"}}"}}' ./...`'
182184
GOFLAGS: "-timeout 10m -v -coverpkg=./... -covermode=atomic"
183185

184-
GOLINTBIN:
185-
sh: go list -f {{"{{"}}".Target{{"}}"}}" golang.org/x/lint/golint
186186
GOLINTFLAGS: "-min_confidence 0.8 -set_exit_status"
187187

188188

0 commit comments

Comments
 (0)