From ec27053a29cf55104242cfb4bca6e5896cb0414a Mon Sep 17 00:00:00 2001 From: Steve Whittaker Date: Sun, 28 May 2017 08:42:07 -0500 Subject: [PATCH 1/2] 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) From 8b8595ee9cdbdc786e1f0055201eccf652b12034 Mon Sep 17 00:00:00 2001 From: Jason Scragz Date: Mon, 29 May 2017 16:16:37 -0700 Subject: [PATCH 2/2] apply #1649 fix to other platforms besides win fixes #1684 fixes #1487 --- src/beautifiers/phpcbf.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/beautifiers/phpcbf.coffee b/src/beautifiers/phpcbf.coffee index ad347b8..f59179d 100644 --- a/src/beautifiers/phpcbf.coffee +++ b/src/beautifiers/phpcbf.coffee @@ -78,7 +78,7 @@ module.exports = class PHPCBF extends Beautifier @run("phpcbf", [ "--no-patch" unless options.phpcbf_version is 3 "--standard=#{options.standard}" if options.standard - tempFile = @tempFile("temp", text) + tempFile = @tempFile("temp", text, ".php") ], { ignoreReturnCode: true help: {