Fix Uncrustify's Executable version parser, newer Uncrustify is different format
This commit is contained in:
parent
a92a48c6d6
commit
d99b43cb16
|
@ -18,7 +18,14 @@ module.exports = class Uncrustify extends Beautifier
|
||||||
homepage: "http://uncrustify.sourceforge.net/"
|
homepage: "http://uncrustify.sourceforge.net/"
|
||||||
installation: "https://github.com/uncrustify/uncrustify"
|
installation: "https://github.com/uncrustify/uncrustify"
|
||||||
version: {
|
version: {
|
||||||
parse: (text) -> text.match(/uncrustify (\d+\.\d+)/)[1] + ".0"
|
parse: (text) ->
|
||||||
|
try
|
||||||
|
v = text.match(/uncrustify (\d+\.\d+)/)[1]
|
||||||
|
catch error
|
||||||
|
@error(error)
|
||||||
|
v = text.match(/Uncrustify-(\d+\.\d+)/)[1] if not v?
|
||||||
|
if v
|
||||||
|
return v + ".0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -94,9 +101,7 @@ module.exports = class Uncrustify extends Beautifier
|
||||||
outputFile = @tempFile("output", text)
|
outputFile = @tempFile("output", text)
|
||||||
"-l"
|
"-l"
|
||||||
lang
|
lang
|
||||||
], help: {
|
])
|
||||||
link: "http://sourceforge.net/projects/uncrustify/"
|
|
||||||
})
|
|
||||||
.then(=>
|
.then(=>
|
||||||
@readFile(outputFile)
|
@readFile(outputFile)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue