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?
|
["--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"
|
||||||
})
|
})
|
||||||
|
|
|
@ -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/"
|
||||||
})
|
})
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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(=>
|
||||||
|
|
|
@ -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"
|
||||||
})
|
})
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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"
|
||||||
})
|
})
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue