Use docker image to run puppet-lint
Use unibeautify/puppet-lint that provides puppet-lint in docker.
This commit is contained in:
parent
c2bcd5091f
commit
05669035fc
|
@ -8,21 +8,28 @@ module.exports = class PuppetFix extends Beautifier
|
||||||
# this is what displays as your Default Beautifier in Language Config
|
# this is what displays as your Default Beautifier in Language Config
|
||||||
name: "puppet-lint"
|
name: "puppet-lint"
|
||||||
link: "http://puppet-lint.com/"
|
link: "http://puppet-lint.com/"
|
||||||
isPreInstalled: false
|
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
Puppet: true
|
Puppet: true
|
||||||
}
|
}
|
||||||
|
|
||||||
cli: (options) ->
|
executables: [
|
||||||
if not options.puppet_path?
|
{
|
||||||
return new Error("'puppet-lint' path is not set!" +
|
name: "puppet-lint"
|
||||||
" Please set this in the Atom Beautify package settings.")
|
cmd: "puppet-lint"
|
||||||
else
|
homepage: "http://puppet-lint.com/"
|
||||||
return options.puppet_path
|
installation: "http://puppet-lint.com/"
|
||||||
|
version: {
|
||||||
|
parse: (text) -> text.match(/puppet-lint (\d+\.\d+\.\d+)/)[1]
|
||||||
|
}
|
||||||
|
docker: {
|
||||||
|
image: "unibeautify/puppet-lint"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
beautify: (text, language, options) ->
|
beautify: (text, language, options) ->
|
||||||
@run("puppet-lint", [
|
@exe("puppet-lint", [
|
||||||
'--fix'
|
'--fix'
|
||||||
tempFile = @tempFile("input", text)
|
tempFile = @tempFile("input", text)
|
||||||
], {
|
], {
|
||||||
|
|
Loading…
Reference in New Issue