branch: elpa/flycheck
commit 558aaf3712605535451f91864ac621ec761a7dc0
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>
Fix Go build tags to use comma-separated format
Go expects build tags as a single comma-separated value
(e.g., -tags=dev,debug) rather than repeated flags. Change from
`option-list` to `option` with `flycheck-option-comma-separated-list`
in all four Go checkers (go-build, go-test, go-errcheck, go-staticcheck).
Fixes #1882
---
flycheck.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/flycheck.el b/flycheck.el
index 49d56b711a..99efcce6f1 100644
--- a/flycheck.el
+++ b/flycheck.el
@@ -9478,8 +9478,9 @@ details."
Requires Go 1.6 or newer. See URL `https://golang.org/cmd/go'."
:command ("go" "build"
(option-flag "-i" flycheck-go-build-install-deps)
- ;; multiple tags are listed as "dev debug ..."
- (option-list "-tags=" flycheck-go-build-tags concat)
+ ;; multiple tags are comma-separated: "dev,debug"
+ (option "-tags=" flycheck-go-build-tags concat
+ flycheck-option-comma-separated-list)
"-o" null-device)
:error-patterns
((error line-start (file-name) ":" line ":"
@@ -9518,7 +9519,8 @@ Requires Go 1.6 or newer. See URL
`https://golang.org/cmd/go'."
Requires Go 1.6 or newer. See URL `https://golang.org/cmd/go'."
:command ("go" "test"
(option-flag "-i" flycheck-go-build-install-deps)
- (option-list "-tags=" flycheck-go-build-tags concat)
+ (option "-tags=" flycheck-go-build-tags concat
+ flycheck-option-comma-separated-list)
"-c" "-o" null-device)
:error-patterns
((error line-start (file-name) ":" line ":"
@@ -9542,7 +9544,8 @@ Requires errcheck newer than commit 8515d34 (Aug 28th,
2015).
See URL `https://github.com/kisielk/errcheck'."
:command ("errcheck"
"-abspath"
- (option-list "-tags=" flycheck-go-build-tags concat)
+ (option "-tags=" flycheck-go-build-tags concat
+ flycheck-option-comma-separated-list)
".")
:error-patterns
((warning line-start
@@ -9582,7 +9585,8 @@ versions of go\". `staticcheck' can target earlier
versions (with
limited features) if `flycheck-go-version' is set. See URL
`https://staticcheck.io/'."
:command ("staticcheck" "-f" "json"
- (option-list "-tags" flycheck-go-build-tags concat)
+ (option "-tags" flycheck-go-build-tags nil
+ flycheck-option-comma-separated-list)
(option "-go" flycheck-go-version))
:error-parser flycheck-parse-go-staticcheck