parent
77f58bbfc7
commit
b7a34b6178
|
@ -3,10 +3,15 @@ Requires https://github.com/andialbrecht/sqlparse
|
||||||
###
|
###
|
||||||
getCmd = (inputPath, outputPath, options) ->
|
getCmd = (inputPath, outputPath, options) ->
|
||||||
path = options.sqlformat_path
|
path = options.sqlformat_path
|
||||||
optionsStr = " --indent_width={0} --keywords={1} --identifiers={2} --reindent"
|
|
||||||
optionsStr = optionsStr.replace("{0}", options.indent_size)
|
optionsStr = "--reindent"
|
||||||
.replace("{1}", options.keywords)
|
if options.indent_size?
|
||||||
.replace("{2}", options.identifiers)
|
optionsStr += " --indent_width=#{options.indent_size}"
|
||||||
|
if options.keywords?
|
||||||
|
optionsStr += " --keywords=#{options.keywords}"
|
||||||
|
if options.identifiers
|
||||||
|
optionsStr += " --identifiers=#{options.identifiers}"
|
||||||
|
|
||||||
if path
|
if path
|
||||||
# Use absolute path
|
# Use absolute path
|
||||||
"python \"" + path + "\" \"" + inputPath + "\" " + optionsStr
|
"python \"" + path + "\" \"" + inputPath + "\" " + optionsStr
|
||||||
|
|
Loading…
Reference in New Issue