Update rubocopfmt.el to comply with rubocopfmt 0.1.0.beta7

This commit is contained in:
2017-01-20 13:39:59 +00:00
parent 2b885ce6a2
commit 6d122556f6

10
vendor/rubocopfmt.el vendored
View File

@@ -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)