Fix linting code problems
This commit is contained in:
parent
72db1efa83
commit
013ecd6fe6
|
@ -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"
|
||||
})
|
||||
|
|
|
@ -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/"
|
||||
})
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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(=>
|
||||
|
|
|
@ -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"
|
||||
})
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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"
|
||||
})
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue