Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c1aaf51

Browse files
committed
Reconfigure taskfile to avoid global golint dependency
The previous approach for defining the `GOLINTBIN` variable caused any use of task to fail if golint was not installed, even though the task being run might have nothing to do with golint.
1 parent d92bcbf commit c1aaf51

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎Taskfile.yml‎

Lines changed: 3 additions & 3 deletions
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
PRETTIER: prettier@2.1.2

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /