From 511c889226fb2ad17e5b759462855ef237b11308 Mon Sep 17 00:00:00 2001 From: Tim Landscheidt Date: Mon, 28 Apr 2025 03:05:22 +0300 Subject: [PATCH] Fix ruby lint output regexps * doc/misc/flymake.texi (An annotated example backend): Fix regexp. * lisp/progmodes/ruby-mode.el (ruby-flymake-simple) (ruby-flymake-rubocop): Fix regexp (https://lists.gnu.org/archive/html/emacs-devel/2025-04/msg00851.html). (cherry picked from commit 4765a3b3f2b83e6a2ba4e63f78bec16dc8ca737f) --- doc/misc/flymake.texi | 2 +- lisp/progmodes/ruby-mode.el | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index 6104c38636c..4b1b3286576 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi @@ -854,7 +854,7 @@ Binding,,, elisp, The Emacs Lisp Reference Manual}) to be active. ;; (cl-loop while (search-forward-regexp - "^\\(?:.*.rb\\|-\\):\\([0-9]+\\): \\(.*\\)$" + "^\\(?:.*\\.rb\\|-\\):\\([0-9]+\\): \\(.*\\)$" nil t) for msg = (match-string 2) for (beg . end) = (flymake-diag-region diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index e9e1af0f245..61042831b3b 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el @@ -2516,7 +2516,7 @@ A slash character after any of these should begin a regexp.")) (goto-char (point-min)) (cl-loop while (search-forward-regexp - "^\\(?:.*.rb\\|-\\):\\([0-9]+\\): \\(.*\\)$" + "^\\(?:.*\\.rb\\|-\\):\\([0-9]+\\): \\(.*\\)$" nil t) for msg = (match-string 2) for (beg . end) = (flymake-diag-region @@ -2622,7 +2622,7 @@ the gem \"rubocop\". When t, it is used unconditionally." (goto-char (point-min)) (cl-loop while (search-forward-regexp - "^\\(?:.*.rb\\|-\\):\\([0-9]+\\):\\([0-9]+\\): \\(.*\\)$" + "^\\(?:.*\\.rb\\|-\\):\\([0-9]+\\):\\([0-9]+\\): \\(.*\\)$" nil t) for msg = (match-string 3) for (beg . end) = (flymake-diag-region -- 2.39.5