]> git.eshelyaron.com Git - emacs.git/commitdiff
Use rubocop --lint when no .rubocop.yml
authorDmitry Gutov <dgutov@yandex.ru>
Tue, 25 Dec 2018 15:08:58 +0000 (17:08 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Tue, 25 Dec 2018 15:16:22 +0000 (17:16 +0200)
* lisp/progmodes/ruby-mode.el (ruby-flymake-rubocop): When no
config file found, only run lint cops (bug#31760).

lisp/progmodes/ruby-mode.el

index d60899cf182386035b614e986637926f1d9cfa09..2a50374765c90212abd2472c15b9956e6f14a1b4 100644 (file)
@@ -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)))))