[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/rubocop f493961 03/64: Check for the presence of the ruboc
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/rubocop f493961 03/64: Check for the presence of the rubocop binary |
Date: |
Wed, 11 Aug 2021 10:07:53 -0400 (EDT) |
branch: elpa/rubocop
commit f493961312bbbf05c6d9319bacf724137a7da3e6
Author: Bozhidar Batsov <bozhidar@tradeo.com>
Commit: Bozhidar Batsov <bozhidar@tradeo.com>
Check for the presence of the rubocop binary
---
rubocop.el | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/rubocop.el b/rubocop.el
index 4472b61..1b0fd3d 100644
--- a/rubocop.el
+++ b/rubocop.el
@@ -65,6 +65,7 @@ The current directory is assumed to be the project's root
otherwise."
(defun rubocop-run-on-project ()
"Run on current project."
(interactive)
+ (rubocop-ensure-installed)
(compilation-start
(concat "rubocop -es " (rubocop-project-root))
'compilation-mode
@@ -73,6 +74,7 @@ The current directory is assumed to be the project's root
otherwise."
(defun rubocop-run-on-current-file ()
"Run on current file."
(interactive)
+ (rubocop-ensure-installed)
(let ((file-name (buffer-file-name (current-buffer))))
(if file-name
(compilation-start
@@ -81,6 +83,11 @@ The current directory is assumed to be the project's root
otherwise."
(lambda (arg) (rubocop-buffer-name file-name)))
(error "Buffer is not visiting a file"))))
+(defun rubocop-ensure-installed ()
+ "Check if RuboCop is installed."
+ (unless (executable-find "rubocop")
+ (error "RuboCop is not installed")))
+
(provide 'rubocop)
;;; rubocop.el ends here
- [nongnu] branch elpa/rubocop created (now f5fd18a), ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop f493961 03/64: Check for the presence of the rubocop binary,
ELPA Syncer <=
- [nongnu] elpa/rubocop 7026b86 04/64: Make rubocop.el usable :-), ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 88d1bbf 09/64: Change commentary so that it doesn't describe projectile, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop c620a0c 11/64: Add auto-correction commands, minor mode and a default keymap, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 192d976 02/64: An extremely basic RuboCop interface, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 1e77d3f 18/64: add missing period, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 7446469 21/64: Merge pull request #11 from rranelli/master, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 2b782ec 23/64: Merge pull request #13 from ojab/master, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 405e0fd 28/64: Bump version to 0.4.0, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop 14ab46a 01/64: first commit, ELPA Syncer, 2021/08/11
- [nongnu] elpa/rubocop fb98804 24/64: Load tramp dependency, ELPA Syncer, 2021/08/11