From a361cc88a15e9c39f17145f9acd1ea4a8ca70461 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Tue, 25 Dec 2018 17:08:58 +0200 Subject: [PATCH] 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 d60899cf182..2a50374765c 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))))) -- 2.39.5