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/> |
|
| 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! |
|
| Pretty Diff | :white_check_mark: | :ok_hand: Not necessary | :smiley: Nothing! |
|
||||||
| Pug Beautify | :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. |
|
| 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! |
|
| 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. |
|
| 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.
|
2. Go into *Packages* and search for "*Atom Beautify*" package.
|
||||||
3. Find the option "*PHPCBF*" and change it to your desired configuration.
|
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)
|
##### [Rscript](#rscript)
|
||||||
|
|
||||||
**Important**: This option is only configurable from within Atom Beautify's setting panel.
|
**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
|
# 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").run([
|
||||||
'--fix'
|
'--fix'
|
||||||
tempFile = @tempFile("input", text)
|
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": {
|
"sass-convert": {
|
||||||
"key": "sass-convert",
|
"key": "sass-convert",
|
||||||
"title": "SassConvert",
|
"title": "SassConvert",
|
||||||
|
|
Loading…
Reference in New Issue