emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/go-mode c65dd39 297/495: Complain about outdated goimports


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode c65dd39 297/495: Complain about outdated goimports
Date: Sat, 7 Aug 2021 09:05:35 -0400 (EDT)

branch: elpa/go-mode
commit c65dd390c590d208f442aef347d6fb5b52d0d865
Author: Dominik Honnef <dominik@honnef.co>
Commit: Dominik Honnef <dominik@honnef.co>

    Complain about outdated goimports
    
    Print a somewhat user-friendly message when the user has an old version
    of goimports that doesn't support the -srcdir flag.
    
    Closes gh-126
---
 go-mode.el | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/go-mode.el b/go-mode.el
index 3fe7e2b..f763562 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -1081,6 +1081,10 @@ with goflymake \(see URL 
`https://github.com/dougm/goflymake'), gocode
           (gofmt--kill-error-buffer errbuf))
       ;; Convert the gofmt stderr to something understood by the compilation 
mode.
       (goto-char (point-min))
+      (if (save-excursion
+            (save-match-data
+              (search-forward "flag provided but not defined: -srcdir" nil t)))
+          (insert "Your version of goimports is too old and doesn't support 
vendoring. Please update goimports!\n\n"))
       (insert "gofmt errors:\n")
       (while (search-forward-regexp (concat "^\\(" (regexp-quote tmpfile) 
"\\):") nil t)
         (replace-match (file-name-nondirectory filename) t t nil 1))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]