[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rubocop 0b4e5ce 61/64: Add an option to execute rubocop in
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rubocop 0b4e5ce 61/64: Add an option to execute rubocop in a chroot |
Date: |
Wed, 11 Aug 2021 10:08:05 -0400 (EDT) |
branch: elpa/rubocop
commit 0b4e5ce56304892d6d57dd0792803471dd8e1224
Author: Nacho Barrientos <nacho.barrientos@cern.ch>
Commit: Bozhidar Batsov <bozhidar.batsov@gmail.com>
Add an option to execute rubocop in a chroot
---
README.md | 8 +++++++-
rubocop.el | 6 ++++++
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 2eaf0d9..623f934 100644
--- a/README.md
+++ b/README.md
@@ -87,7 +87,13 @@ You can change the shell command used by
`rubocop-autocorrect-*` commands via `r
You can change the shell command used by `rubocop-format-*` commands via
`rubocop-format-command`.
-## Alternatives
+You can run rubocop inside a chroot via schroot by setting:
+
+``` emacs-lisp
+(setq rubocop-run-in-chroot t)
+```
+
+## alternatives
[Flycheck](https://www.flycheck.org) and Flymake (Emacs built-in) provide more
sophisticated integration with various lint tools, including RuboCop.
diff --git a/rubocop.el b/rubocop.el
index f8c56ec..932f5f4 100644
--- a/rubocop.el
+++ b/rubocop.el
@@ -85,6 +85,11 @@ It's basically auto-correction limited to layout cops."
:group 'rubocop
:type 'boolean)
+(defcustom rubocop-run-in-chroot nil
+ "Runs rubocop inside a chroot via schroot setting the cwd to the project's
root."
+ :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)
@@ -128,6 +133,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-run-in-chroot (format "schroot -d %s -- "
(rubocop-project-root)))
(if (and (not rubocop-prefer-system-executable) (rubocop-bundled-p))
"bundle exec " "")
command
(rubocop-build-requires)
- [nongnu] elpa/rubocop 676cabe 36/64: Expand the project root path, (continued)
- [nongnu] elpa/rubocop 676cabe 36/64: Expand the project root path, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop a809fa7 42/64: [Fix #24] Always run RuboCop from the project's root when within a, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 03bf155 52/64: Run auto-correct automatically on save (#29), ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 38d982a 56/64: Add a note about alternative packages, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop d44737a 43/64: Fix a reference to RuboCop, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 980bedb 49/64: Release 0.5, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 8e9ec29 06/64: Update for RuboCop 0.9 (fixes #1), ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop dcde702 29/64: Improve the README a bit, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 0ab1329 50/64: Update the README, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 8b2c1f5 57/64: Remove mention of Prelude, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 0b4e5ce 61/64: Add an option to execute rubocop in a chroot,
ELPA Syncer <=
- [nongnu] elpa/rubocop 9b23b05 22/64: Make rubocop-emacs TRAMP-aware, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 40a1d5a 19/64: Merge pull request #6 from bhfailor/master, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 32f8b08 51/64: Use nonbundled rubocop if rubocop-prefer-system-executable is set, ELPA Syncer, 2021/08/11