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

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

[nongnu] elpa/go-mode 1949b57 184/495: match unused imports where path a


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 1949b57 184/495: match unused imports where path and package name differ
Date: Sat, 7 Aug 2021 09:05:09 -0400 (EDT)

branch: elpa/go-mode
commit 1949b57cfd460de9317e97d54c0ba6e0587b93aa
Author: Dominik Honnef <dominikh@fork-bomb.org>
Commit: Dominik Honnef <dominikh@fork-bomb.org>

    match unused imports where path and package name differ
    
    When the import path and package don't match, Go emits an error a la
    
      imported and not used: "sandbox/foo_bar" as bar
---
 go-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/go-mode.el b/go-mode.el
index 7493672..a9782df 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -915,7 +915,7 @@ If IGNORE-CASE is non-nil, the comparison is 
case-insensitive."
   (reverse (remove nil
                    (mapcar
                     (lambda (line)
-                      (if (string-match "^\\(.+\\):\\([[:digit:]]+\\): 
imported and not used: \".+\"$" line)
+                      (if (string-match "^\\(.+\\):\\([[:digit:]]+\\): 
imported and not used: \".+\".*$" line)
                           (if (string= (file-truename (match-string 1 line)) 
(file-truename buffer-file-name))
                               (string-to-number (match-string 2 line)))))
                     (split-string (shell-command-to-string



reply via email to

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