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).
This commit is contained in:
Dmitry Gutov 2018-12-25 17:08:58 +02:00
parent 9fe788a1fa
commit a361cc88a1

View 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)))))