From 0106518adb709dbd6c667fe58c7ce5b9ebce41cc Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sat, 14 Jan 2017 10:29:13 +0000 Subject: [PATCH] Fix small issue with rubocopfmt.el --- vendor/rubocopfmt.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vendor/rubocopfmt.el b/vendor/rubocopfmt.el index 5fe4806..fe99723 100644 --- a/vendor/rubocopfmt.el +++ b/vendor/rubocopfmt.el @@ -37,6 +37,11 @@ (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)