See #311. Show installation instructions when beautifiers are missing

- autopep8
- perltidy
- ruby-beautify
- sqlformat
- uncrustify
This commit is contained in:
Glavin Wiechert 2015-06-06 13:58:16 -03:00
parent f4d9f65115
commit 7c69428a99
5 changed files with 15 additions and 5 deletions

View File

@ -20,4 +20,6 @@ module.exports = class autopep8 extends Beautifier
["--max-line-length", "#{options.max_line_length}"] if options.max_line_length?
["--indent-size","#{options.indent_size}"] if options.indent_size?
["--ignore","#{options.ignore.join(',')}"] if options.ignore?
])
], help: {
link: "https://github.com/hhatto/autopep8"
})

View File

@ -25,4 +25,6 @@ module.exports = class PerlTidy extends Beautifier
'--quiet'
"--profile=#{options.perltidy_profile}" if options.perltidy_profile?
@tempFile("input", text)
])
], help: {
link: "http://perltidy.sourceforge.net/"
})

View File

@ -16,4 +16,6 @@ module.exports = class RubyBeautify extends Beautifier
@deprecate("Ruby-Beautify has been deprecated in favour of Rubocop beautifier.")
@run("rbeautify", [
@tempFile("input", text)
])
], help: {
link: "https://github.com/erniebrodeur/ruby-beautify"
})

View File

@ -19,4 +19,6 @@ module.exports = class sqlformat extends Beautifier
"--indent_width=#{options.indent_size}" if options.indent_size?
"--keywords=#{options.keywords}" if options.keywords?
"--identifiers=#{options.identifiers}" if options.identifiers?
])
], help: {
link: "https://github.com/andialbrecht/sqlparse"
})

View File

@ -75,7 +75,9 @@ module.exports = class Uncrustify extends Beautifier
outputFile = @tempFile("output", text)
"-l"
lang
])
], help: {
link: "http://sourceforge.net/projects/uncrustify/"
})
.then(=>
@readFile(outputFile)
)