emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/rubocop 32f8b08 51/64: Use nonbundled rubocop if rubocop-p


From: ELPA Syncer
Subject: [nongnu] elpa/rubocop 32f8b08 51/64: Use nonbundled rubocop if rubocop-prefer-system-executable is set
Date: Wed, 11 Aug 2021 10:08:03 -0400 (EDT)

branch: elpa/rubocop
commit 32f8b082c9983990a82f9524740878a80c28d5cc
Author: Daniel Luna <dcl@chime.com>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>

    Use nonbundled rubocop if rubocop-prefer-system-executable is set
---
 rubocop.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/rubocop.el b/rubocop.el
index 6c83e28..26913f4 100644
--- a/rubocop.el
+++ b/rubocop.el
@@ -68,6 +68,11 @@
   :group 'rubocop
   :type 'string)
 
+(defcustom rubocop-prefer-system-executable nil
+  "Runs rubocop with the system executable even if inside a bundled project."
+  :group 'rubocop
+  :type 'boolean)
+
 (defun rubocop-local-file-name (file-name)
   "Retrieve local filename if FILE-NAME is opened via TRAMP."
   (cond ((tramp-tramp-file-p file-name)
@@ -111,7 +116,7 @@ When NO-ERROR is non-nil returns nil instead of raise an 
error."
   "Build the full command to be run based on COMMAND and PATH.
 The command will be prefixed with `bundle exec` if RuboCop is bundled."
   (concat
-   (if (rubocop-bundled-p) "bundle exec " "")
+   (if (and (not rubocop-prefer-system-executable) (rubocop-bundled-p)) 
"bundle exec " "")
    command
    (rubocop-build-requires)
    " "



reply via email to

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