emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master a361cc8: Use rubocop --lint when no .rubocop.yml


From: Dmitry Gutov
Subject: [Emacs-diffs] master a361cc8: Use rubocop --lint when no .rubocop.yml
Date: Tue, 25 Dec 2018 10:16:43 -0500 (EST)

branch: master
commit a361cc88a15e9c39f17145f9acd1ea4a8ca70461
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Use rubocop --lint when no .rubocop.yml
    
    * lisp/progmodes/ruby-mode.el (ruby-flymake-rubocop): When no
    config file found, only run lint cops (bug#31760).
---
 lisp/progmodes/ruby-mode.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index d60899c..2a50374 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -2324,7 +2324,8 @@ Only takes effect if RuboCop is installed."
     (when buffer-file-name
       (setq config-dir (locate-dominating-file buffer-file-name
                                                ruby-rubocop-config))
-      (when config-dir
+      (if (not config-dir)
+          (setq command (append command '("--lint")))
         (setq command (append command (list "--config"
                                             (expand-file-name 
ruby-rubocop-config
                                                               config-dir)))))



reply via email to

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