From 013ecd6fe65d27e671d34ef76af276fec354824b Mon Sep 17 00:00:00 2001 From: Glavin Wiechert Date: Fri, 25 Sep 2015 18:24:39 -0300 Subject: [PATCH] Fix linting code problems --- src/beautifiers/autopep8.coffee | 2 +- src/beautifiers/perltidy.coffee | 2 +- src/beautifiers/php-cs-fixer.coffee | 16 ++++++++-------- src/beautifiers/puppet-fix.coffee | 6 +++--- src/beautifiers/ruby-beautify.coffee | 2 +- src/beautifiers/rustfmt.coffee | 6 +++--- src/beautifiers/sqlformat.coffee | 2 +- src/beautifiers/uncrustify/cfg.coffee | 4 +--- src/beautifiers/uncrustify/index.coffee | 2 +- 9 files changed, 20 insertions(+), 22 deletions(-) diff --git a/src/beautifiers/autopep8.coffee b/src/beautifiers/autopep8.coffee index 384ef8f..e924755 100644 --- a/src/beautifiers/autopep8.coffee +++ b/src/beautifiers/autopep8.coffee @@ -21,5 +21,5 @@ module.exports = class Autopep8 extends Beautifier ["--indent-size","#{options.indent_size}"] if options.indent_size? ["--ignore","#{options.ignore.join(',')}"] if options.ignore? ], help: { - link: "https://github.com/hhatto/autopep8" + link: "https://github.com/hhatto/autopep8" }) diff --git a/src/beautifiers/perltidy.coffee b/src/beautifiers/perltidy.coffee index 8ec1557..c2fb897 100644 --- a/src/beautifiers/perltidy.coffee +++ b/src/beautifiers/perltidy.coffee @@ -26,5 +26,5 @@ module.exports = class PerlTidy extends Beautifier "--profile=#{options.perltidy_profile}" if options.perltidy_profile?.length @tempFile("input", text) ], help: { - link: "http://perltidy.sourceforge.net/" + link: "http://perltidy.sourceforge.net/" }) diff --git a/src/beautifiers/php-cs-fixer.coffee b/src/beautifiers/php-cs-fixer.coffee index f03e8d4..3161337 100644 --- a/src/beautifiers/php-cs-fixer.coffee +++ b/src/beautifiers/php-cs-fixer.coffee @@ -39,10 +39,10 @@ module.exports = class PHPCSFixer extends Beautifier "--fixers=#{options.fixers}" if options.fixers tempFile = @tempFile("temp", text) ], { - ignoreReturnCode: true - help: { - link: "http://php.net/manual/en/install.php" - } + ignoreReturnCode: true + help: { + link: "http://php.net/manual/en/install.php" + } }) .then(=> @readFile(tempFile) @@ -66,10 +66,10 @@ module.exports = class PHPCSFixer extends Beautifier "--fixers=#{options.fixers}" if options.fixers tempFile = @tempFile("temp", text) ], { - ignoreReturnCode: true - help: { - link: "https://github.com/FriendsOfPHP/PHP-CS-Fixer" - } + ignoreReturnCode: true + help: { + link: "https://github.com/FriendsOfPHP/PHP-CS-Fixer" + } }) .then(=> @readFile(tempFile) diff --git a/src/beautifiers/puppet-fix.coffee b/src/beautifiers/puppet-fix.coffee index 7b6d1ce..bb7ab58 100644 --- a/src/beautifiers/puppet-fix.coffee +++ b/src/beautifiers/puppet-fix.coffee @@ -24,9 +24,9 @@ module.exports = class PuppetFix extends Beautifier '--fix' tempFile = @tempFile("input", text) ], { - ignoreReturnCode: true - help: { - link: "http://puppet-lint.com/" + ignoreReturnCode: true + help: { + link: "http://puppet-lint.com/" } }) .then(=> diff --git a/src/beautifiers/ruby-beautify.coffee b/src/beautifiers/ruby-beautify.coffee index 6f80556..daecb62 100644 --- a/src/beautifiers/ruby-beautify.coffee +++ b/src/beautifiers/ruby-beautify.coffee @@ -20,5 +20,5 @@ module.exports = class RubyBeautify extends Beautifier "--indent_count", options.indent_size @tempFile("input", text) ], help: { - link: "https://github.com/erniebrodeur/ruby-beautify" + link: "https://github.com/erniebrodeur/ruby-beautify" }) diff --git a/src/beautifiers/rustfmt.coffee b/src/beautifiers/rustfmt.coffee index a393e69..6478605 100644 --- a/src/beautifiers/rustfmt.coffee +++ b/src/beautifiers/rustfmt.coffee @@ -18,9 +18,9 @@ module.exports = class Rustfmt extends Beautifier @run(program, [ tmpFile = @tempFile("tmp", text) ], help: { - link: "https://github.com/nrc/rustfmt" - program: "rustfmt" - pathOption: "Rust - Rustfmt Path" + link: "https://github.com/nrc/rustfmt" + program: "rustfmt" + pathOption: "Rust - Rustfmt Path" }) .then(=> @readFile(tmpFile) diff --git a/src/beautifiers/sqlformat.coffee b/src/beautifiers/sqlformat.coffee index 3b643a3..892b223 100644 --- a/src/beautifiers/sqlformat.coffee +++ b/src/beautifiers/sqlformat.coffee @@ -20,5 +20,5 @@ module.exports = class Sqlformat extends Beautifier "--keywords=#{options.keywords}" if options.keywords? "--identifiers=#{options.identifiers}" if options.identifiers? ], help: { - link: "https://github.com/andialbrecht/sqlparse" + link: "https://github.com/andialbrecht/sqlparse" }) diff --git a/src/beautifiers/uncrustify/cfg.coffee b/src/beautifiers/uncrustify/cfg.coffee index 57219aa..aa1c72a 100644 --- a/src/beautifiers/uncrustify/cfg.coffee +++ b/src/beautifiers/uncrustify/cfg.coffee @@ -21,9 +21,7 @@ module.exports = (options, cb) -> # jshint ignore: start ic = options.indent_char if options.indent_with_tabs is 0 or options.indent_with_tabs is 1 or options.indent_with_tabs is 2 - - - # Ignore indent_char option + null # Ignore indent_char option else if ic is " " options.indent_with_tabs = 0 # Spaces only else if ic is "\t" diff --git a/src/beautifiers/uncrustify/index.coffee b/src/beautifiers/uncrustify/index.coffee index 6af72f7..56f2c4d 100644 --- a/src/beautifiers/uncrustify/index.coffee +++ b/src/beautifiers/uncrustify/index.coffee @@ -79,7 +79,7 @@ module.exports = class Uncrustify extends Beautifier "-l" lang ], help: { - link: "http://sourceforge.net/projects/uncrustify/" + link: "http://sourceforge.net/projects/uncrustify/" }) .then(=> @readFile(outputFile)