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?
["--ignore","#{options.ignore.join(',')}"] if options.ignore?
], 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
@tempFile("input", text)
], 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
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)

View File

@ -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(=>

View File

@ -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"
})

View File

@ -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)

View File

@ -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"
})

View File

@ -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"

View File

@ -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)