aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2018-12-25 17:08:58 +0200
committerDmitry Gutov2018-12-25 17:16:22 +0200
commita361cc88a15e9c39f17145f9acd1ea4a8ca70461 (patch)
tree9040d87dd0dacbe6bd4b0cdd644ffbff7de65255
parent9fe788a1fa02c6b717c709773f3cca7bc8b2ebe6 (diff)
downloademacs-a361cc88a15e9c39f17145f9acd1ea4a8ca70461.tar.gz
emacs-a361cc88a15e9c39f17145f9acd1ea4a8ca70461.zip
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).
-rw-r--r--lisp/progmodes/ruby-mode.el3
1 files changed, 2 insertions, 1 deletions
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."
2324 (when buffer-file-name 2324 (when buffer-file-name
2325 (setq config-dir (locate-dominating-file buffer-file-name 2325 (setq config-dir (locate-dominating-file buffer-file-name
2326 ruby-rubocop-config)) 2326 ruby-rubocop-config))
2327 (when config-dir 2327 (if (not config-dir)
2328 (setq command (append command '("--lint")))
2328 (setq command (append command (list "--config" 2329 (setq command (append command (list "--config"
2329 (expand-file-name ruby-rubocop-config 2330 (expand-file-name ruby-rubocop-config
2330 config-dir))))) 2331 config-dir)))))