Skip to content

Commit 4cbe8d5

Browse files
authored
fix: extract major version from custom golangci-lint (#4817)
Allowed the "v" prefix in the version number because a custom binary of golangci-lint built using the module plugin system has the prefix.
1 parent 74e82c3 commit 4cbe8d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clients/lsp-golangci-lint.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@
147147
(with-temp-buffer
148148
(when (= 0 (call-process lsp-golangci-lint-path nil t nil "version"))
149149
(goto-char (point-min))
150-
(when (re-search-forward "has version \\([0-9]+\\)\\." nil t)
150+
(when (re-search-forward "has version v?\\([0-9]+\\)\\." nil t)
151151
(string-to-number (match-string 1))))))
152152

153153
(defun lsp-golangci-lint--get-initialization-options ()

0 commit comments

Comments
 (0)