From 7c69428a990ba496be5c3f9c72b2b4f1a2f5fcfc Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Sat, 6 Jun 2015 13:58:16 -0300 Subject: [PATCH] See #311. Show installation instructions when beautifiers are missing - autopep8 - perltidy - ruby-beautify - sqlformat - uncrustify --- src/beautifiers/autopep8.coffee | 4 +++- src/beautifiers/perltidy.coffee | 4 +++- src/beautifiers/ruby-beautify.coffee | 4 +++- src/beautifiers/sqlformat.coffee | 4 +++- src/beautifiers/uncrustify/index.coffee | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/beautifiers/autopep8.coffee b/src/beautifiers/autopep8.coffee index 1849a47..352def3 100644 --- a/src/beautifiers/autopep8.coffee +++ b/src/beautifiers/autopep8.coffee @@ -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" + }) diff --git a/src/beautifiers/perltidy.coffee b/src/beautifiers/perltidy.coffee index f7aab80..50fe6e0 100644 --- a/src/beautifiers/perltidy.coffee +++ b/src/beautifiers/perltidy.coffee @@ -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/" + }) diff --git a/src/beautifiers/ruby-beautify.coffee b/src/beautifiers/ruby-beautify.coffee index 5b5d394..b38b0f0 100644 --- a/src/beautifiers/ruby-beautify.coffee +++ b/src/beautifiers/ruby-beautify.coffee @@ -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" + }) diff --git a/src/beautifiers/sqlformat.coffee b/src/beautifiers/sqlformat.coffee index 31d4df4..9ff1b77 100644 --- a/src/beautifiers/sqlformat.coffee +++ b/src/beautifiers/sqlformat.coffee @@ -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" + }) diff --git a/src/beautifiers/uncrustify/index.coffee b/src/beautifiers/uncrustify/index.coffee index 918e2f5..c4e45a5 100644 --- a/src/beautifiers/uncrustify/index.coffee +++ b/src/beautifiers/uncrustify/index.coffee @@ -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) )