From ec27053a29cf55104242cfb4bca6e5896cb0414a Mon Sep 17 00:00:00 2001 From: Steve Whittaker Date: Sun, 28 May 2017 08:42:07 -0500 Subject: [PATCH] Add `.rb` to the temp files passed to rubocop Fixes #1652 and #1653. Rubocop is excluding files passed to it even if they are passed as command line parameters. --- CHANGELOG.md | 1 + src/beautifiers/rubocop.coffee | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4731ff6..80e5843 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ # Next +- Fix [#1652](https://github.com/Glavin001/atom-beautify/issues/1652) and [#1653](https://github.com/Glavin001/atom-beautify/issues/1653). Add `.rb` to temp files passed in to the `rubocop` executable so they are not excluded. - ... # v0.29.26 (2017-05-28) diff --git a/src/beautifiers/rubocop.coffee b/src/beautifiers/rubocop.coffee index 8a4d366..deafffa 100644 --- a/src/beautifiers/rubocop.coffee +++ b/src/beautifiers/rubocop.coffee @@ -51,7 +51,7 @@ module.exports = class Rubocop extends Beautifier @run(rubocopPath, [ "--auto-correct" "--config", configFile - tempFile = @tempFile("temp", text) + tempFile = @tempFile("temp", text, '.rb') ], {ignoreReturnCode: true}) .then(=> @readFile(tempFile) @@ -60,7 +60,7 @@ module.exports = class Rubocop extends Beautifier @run("rubocop", [ "--auto-correct" "--config", configFile - tempFile = @tempFile("temp", text) + tempFile = @tempFile("temp", text, '.rb') ], {ignoreReturnCode: true}) .then(=> @readFile(tempFile)