mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
Update rubocopfmt.el to comply with rubocopfmt 0.1.0.beta7
This commit is contained in:
10
vendor/rubocopfmt.el
vendored
10
vendor/rubocopfmt.el
vendored
@@ -31,17 +31,13 @@
|
||||
(let ((patchbuf (get-buffer-create "*Rubocopfmt patch*"))
|
||||
(coding-system-for-read 'utf-8)
|
||||
(coding-system-for-write 'utf-8)
|
||||
(rubocopfmt-args (list
|
||||
"-D" "rcs" "-F" (file-truename buffer-file-name))))
|
||||
(rubocopfmt-args
|
||||
(list "--diff-format" "rcs"
|
||||
"--src-dir" (file-name-directory (file-truename buffer-file-name)))))
|
||||
|
||||
(unwind-protect
|
||||
(save-restriction
|
||||
(widen)
|
||||
;; Trailing whitespace on empty lines can cause incorrect correction
|
||||
;; behavior by Rubocop, so we clean up whitespace before handing
|
||||
;; things off to rubocopfmt.
|
||||
(whitespace-cleanup)
|
||||
|
||||
(with-current-buffer patchbuf (erase-buffer))
|
||||
(message "Calling rubocopfmt: %s %s"
|
||||
rubocopfmt-command rubocopfmt-args)
|
||||
|
||||
Reference in New Issue
Block a user