Fix linting code problems

This commit is contained in:
Glavin Wiechert 2015-09-25 18:24:39 -03:00
parent 72db1efa83
commit 013ecd6fe6
9 changed files with 20 additions and 22 deletions

View File

@ -21,5 +21,5 @@ module.exports = class Autopep8 extends Beautifier
["--indent-size","#{options.indent_size}"] if options.indent_size? ["--indent-size","#{options.indent_size}"] if options.indent_size?
["--ignore","#{options.ignore.join(',')}"] if options.ignore? ["--ignore","#{options.ignore.join(',')}"] if options.ignore?
], help: { ], help: {
link: "https://github.com/hhatto/autopep8" link: "https://github.com/hhatto/autopep8"
}) })

View File

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

View File

@ -39,10 +39,10 @@ module.exports = class PHPCSFixer extends Beautifier
"--fixers=#{options.fixers}" if options.fixers "--fixers=#{options.fixers}" if options.fixers
tempFile = @tempFile("temp", text) tempFile = @tempFile("temp", text)
], { ], {
ignoreReturnCode: true ignoreReturnCode: true
help: { help: {
link: "http://php.net/manual/en/install.php" link: "http://php.net/manual/en/install.php"
} }
}) })
.then(=> .then(=>
@readFile(tempFile) @readFile(tempFile)
@ -66,10 +66,10 @@ module.exports = class PHPCSFixer extends Beautifier
"--fixers=#{options.fixers}" if options.fixers "--fixers=#{options.fixers}" if options.fixers
tempFile = @tempFile("temp", text) tempFile = @tempFile("temp", text)
], { ], {
ignoreReturnCode: true ignoreReturnCode: true
help: { help: {
link: "https://github.com/FriendsOfPHP/PHP-CS-Fixer" link: "https://github.com/FriendsOfPHP/PHP-CS-Fixer"
} }
}) })
.then(=> .then(=>
@readFile(tempFile) @readFile(tempFile)

View File

@ -24,9 +24,9 @@ module.exports = class PuppetFix extends Beautifier
'--fix' '--fix'
tempFile = @tempFile("input", text) tempFile = @tempFile("input", text)
], { ], {
ignoreReturnCode: true ignoreReturnCode: true
help: { help: {
link: "http://puppet-lint.com/" link: "http://puppet-lint.com/"
} }
}) })
.then(=> .then(=>

View File

@ -20,5 +20,5 @@ module.exports = class RubyBeautify extends Beautifier
"--indent_count", options.indent_size "--indent_count", options.indent_size
@tempFile("input", text) @tempFile("input", text)
], help: { ], help: {
link: "https://github.com/erniebrodeur/ruby-beautify" link: "https://github.com/erniebrodeur/ruby-beautify"
}) })

View File

@ -18,9 +18,9 @@ module.exports = class Rustfmt extends Beautifier
@run(program, [ @run(program, [
tmpFile = @tempFile("tmp", text) tmpFile = @tempFile("tmp", text)
], help: { ], help: {
link: "https://github.com/nrc/rustfmt" link: "https://github.com/nrc/rustfmt"
program: "rustfmt" program: "rustfmt"
pathOption: "Rust - Rustfmt Path" pathOption: "Rust - Rustfmt Path"
}) })
.then(=> .then(=>
@readFile(tmpFile) @readFile(tmpFile)

View File

@ -20,5 +20,5 @@ module.exports = class Sqlformat extends Beautifier
"--keywords=#{options.keywords}" if options.keywords? "--keywords=#{options.keywords}" if options.keywords?
"--identifiers=#{options.identifiers}" if options.identifiers? "--identifiers=#{options.identifiers}" if options.identifiers?
], help: { ], help: {
link: "https://github.com/andialbrecht/sqlparse" link: "https://github.com/andialbrecht/sqlparse"
}) })

View File

@ -21,9 +21,7 @@ module.exports = (options, cb) ->
# jshint ignore: start # jshint ignore: start
ic = options.indent_char 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 if options.indent_with_tabs is 0 or options.indent_with_tabs is 1 or options.indent_with_tabs is 2
null # Ignore indent_char option
# Ignore indent_char option
else if ic is " " else if ic is " "
options.indent_with_tabs = 0 # Spaces only options.indent_with_tabs = 0 # Spaces only
else if ic is "\t" else if ic is "\t"

View File

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