Merge pull request #2003 from ColinHebert/patch-1
Use docker image to run puppet-lint
This commit is contained in:
commit
0a570d58d3
|
@ -117,7 +117,7 @@ Some of the supported beautifiers are developed for Node.js and are automaticall
|
|||
| PHPCBF | :warning: 2 executables | :warning: Only 1 of 2 executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [PHPCBF (`phpcbf`)](https://github.com/squizlabs/PHP_CodeSniffer) with `docker pull unibeautify/phpcbf`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [PHP (`php`)](http://php.net/) by following http://php.net/manual/en/install.php<br/>2. Install [PHPCBF (`phpcbf`)](https://github.com/squizlabs/PHP_CodeSniffer) by following https://github.com/squizlabs/PHP_CodeSniffer#installation<br/> |
|
||||
| Pretty Diff | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
||||
| Pug Beautify | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
||||
| puppet-lint | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to http://puppet-lint.com/ and follow the instructions. |
|
||||
| puppet-lint | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [puppet-lint (`puppet-lint`)](http://puppet-lint.com/) with `docker pull unibeautify/puppet-lint`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [puppet-lint (`puppet-lint`)](http://puppet-lint.com/) by following http://puppet-lint.com/<br/> |
|
||||
| pybeautifier | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/guyskk/pybeautifier and follow the instructions. |
|
||||
| Remark | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
||||
| Rubocop | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/bbatsov/rubocop and follow the instructions. |
|
||||
|
|
|
@ -334,6 +334,23 @@ Options for PHPCBF executable.
|
|||
2. Go into *Packages* and search for "*Atom Beautify*" package.
|
||||
3. Find the option "*PHPCBF*" and change it to your desired configuration.
|
||||
|
||||
##### [puppet-lint](#puppet-lint)
|
||||
|
||||
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||
|
||||
**Type**: `object`
|
||||
|
||||
**Description**:
|
||||
|
||||
Options for puppet-lint executable.
|
||||
|
||||
**How to Configure**
|
||||
|
||||
1. You can open the [Settings View](https://github.com/atom/settings-view) by navigating to
|
||||
*Edit > Preferences (Linux)*, *Atom > Preferences (OS X)*, or *File > Preferences (Windows)*.
|
||||
2. Go into *Packages* and search for "*Atom Beautify*" package.
|
||||
3. Find the option "*puppet-lint*" and change it to your desired configuration.
|
||||
|
||||
##### [Rscript](#rscript)
|
||||
|
||||
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
||||
|
|
|
@ -8,21 +8,28 @@ module.exports = class PuppetFix extends Beautifier
|
|||
# this is what displays as your Default Beautifier in Language Config
|
||||
name: "puppet-lint"
|
||||
link: "http://puppet-lint.com/"
|
||||
isPreInstalled: false
|
||||
|
||||
options: {
|
||||
Puppet: true
|
||||
}
|
||||
|
||||
cli: (options) ->
|
||||
if not options.puppet_path?
|
||||
return new Error("'puppet-lint' path is not set!" +
|
||||
" Please set this in the Atom Beautify package settings.")
|
||||
else
|
||||
return options.puppet_path
|
||||
executables: [
|
||||
{
|
||||
name: "puppet-lint"
|
||||
cmd: "puppet-lint"
|
||||
homepage: "http://puppet-lint.com/"
|
||||
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) ->
|
||||
@run("puppet-lint", [
|
||||
@exe("puppet-lint").run([
|
||||
'--fix'
|
||||
tempFile = @tempFile("input", text)
|
||||
], {
|
||||
|
|
|
@ -9368,6 +9368,22 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"puppet-lint": {
|
||||
"key": "puppet-lint",
|
||||
"title": "puppet-lint",
|
||||
"type": "object",
|
||||
"collapsed": true,
|
||||
"description": "Options for puppet-lint executable.",
|
||||
"properties": {
|
||||
"path": {
|
||||
"key": "path",
|
||||
"title": "Binary/Script Path",
|
||||
"type": "string",
|
||||
"default": "",
|
||||
"description": "Absolute path to the \"puppet-lint\" executable's binary/script."
|
||||
}
|
||||
}
|
||||
},
|
||||
"sass-convert": {
|
||||
"key": "sass-convert",
|
||||
"title": "SassConvert",
|
||||
|
|
Loading…
Reference in New Issue