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.
This commit is contained in:
Steve Whittaker 2017-05-28 08:42:07 -05:00
parent 800066963c
commit ec27053a29
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,5 @@
# Next # 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) # v0.29.26 (2017-05-28)

View File

@ -51,7 +51,7 @@ module.exports = class Rubocop extends Beautifier
@run(rubocopPath, [ @run(rubocopPath, [
"--auto-correct" "--auto-correct"
"--config", configFile "--config", configFile
tempFile = @tempFile("temp", text) tempFile = @tempFile("temp", text, '.rb')
], {ignoreReturnCode: true}) ], {ignoreReturnCode: true})
.then(=> .then(=>
@readFile(tempFile) @readFile(tempFile)
@ -60,7 +60,7 @@ module.exports = class Rubocop extends Beautifier
@run("rubocop", [ @run("rubocop", [
"--auto-correct" "--auto-correct"
"--config", configFile "--config", configFile
tempFile = @tempFile("temp", text) tempFile = @tempFile("temp", text, '.rb')
], {ignoreReturnCode: true}) ], {ignoreReturnCode: true})
.then(=> .then(=>
@readFile(tempFile) @readFile(tempFile)