Merge pull request #1767 from imp/rustfmt-nightly
Add support for Rustfmt nightly
This commit is contained in:
commit
788d002402
|
@ -1,5 +1,6 @@
|
||||||
# Next
|
# Next
|
||||||
- Fixes #1638. update type-formatter and Fixes indent size not supported
|
- Fixes #1638. update type-formatter and Fixes indent size not supported
|
||||||
|
- Add support for rustfmt-nightly
|
||||||
|
|
||||||
# v0.30.4 (2017-07-14)
|
# v0.30.4 (2017-07-14)
|
||||||
- Fixes #1732. Improve deprecation message for old options for new Executables
|
- Fixes #1732. Improve deprecation message for old options for new Executables
|
||||||
|
|
|
@ -107,7 +107,7 @@ Some of the supported beautifiers are developed for Node.js and are automaticall
|
||||||
| 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. |
|
||||||
| Ruby Beautify | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/erniebrodeur/ruby-beautify and follow the instructions. |
|
| Ruby Beautify | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/erniebrodeur/ruby-beautify and follow the instructions. |
|
||||||
| rustfmt | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/nrc/rustfmt and follow the instructions. |
|
| rustfmt | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/rust-lang-nursery/rustfmt and follow the instructions. |
|
||||||
| SassConvert | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [SassConvert (`sass-convert`)](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) with `docker pull unibeautify/sass-convert`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [SassConvert (`sass-convert`)](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) by following http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax<br/> |
|
| SassConvert | :warning: 1 executable | :white_check_mark: :100:% of executables | :whale: With [Docker](https://www.docker.com/):<br/>1. Install [SassConvert (`sass-convert`)](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) with `docker pull unibeautify/sass-convert`<br/><br/>:bookmark_tabs: Manually:<br/>1. Install [SassConvert (`sass-convert`)](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) by following http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax<br/> |
|
||||||
| sqlformat | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/andialbrecht/sqlparse and follow the instructions. |
|
| sqlformat | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/andialbrecht/sqlparse and follow the instructions. |
|
||||||
| stylish-haskell | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/jaspervdj/stylish-haskell and follow the instructions. |
|
| stylish-haskell | :warning: Manual installation | :construction: Not an executable | :page_facing_up: Go to https://github.com/jaspervdj/stylish-haskell and follow the instructions. |
|
||||||
|
@ -171,7 +171,7 @@ See [all supported options in the documentation at `docs/options.md`](docs/opti
|
||||||
| R | `R` |`.r`, `.R` | **[`formatR`](https://github.com/yihui/formatR)** |
|
| R | `R` |`.r`, `.R` | **[`formatR`](https://github.com/yihui/formatR)** |
|
||||||
| Riot.js | `Riot.js`, `HTML (Riot Tag)` |`.tag` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| Riot.js | `Riot.js`, `HTML (Riot Tag)` |`.tag` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
| Ruby | `Ruby`, `Ruby on Rails` |`.rb` | **[`Rubocop`](https://github.com/bbatsov/rubocop)**, [`Ruby Beautify`](https://github.com/erniebrodeur/ruby-beautify) |
|
| Ruby | `Ruby`, `Ruby on Rails` |`.rb` | **[`Rubocop`](https://github.com/bbatsov/rubocop)**, [`Ruby Beautify`](https://github.com/erniebrodeur/ruby-beautify) |
|
||||||
| Rust | `Rust` |`.rs`, `.rlib` | **[`rustfmt`](https://github.com/nrc/rustfmt)** |
|
| Rust | `Rust` |`.rs`, `.rlib` | **[`rustfmt`](https://github.com/rust-lang-nursery/rustfmt)** |
|
||||||
| Sass | `Sass` |`.sass` | **[`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax)** |
|
| Sass | `Sass` |`.sass` | **[`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax)** |
|
||||||
| SCSS | `SCSS` |`.scss` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`CSScomb`](https://github.com/csscomb/csscomb.js), [`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) |
|
| SCSS | `SCSS` |`.scss` | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)**, [`CSScomb`](https://github.com/csscomb/csscomb.js), [`SassConvert`](http://sass-lang.com/documentation/file.SASS_REFERENCE.html#syntax) |
|
||||||
| Spacebars | `Spacebars` | | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
| Spacebars | `Spacebars` | | **[`Pretty Diff`](https://github.com/prettydiff/prettydiff)** |
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
=
|
=
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<pre><code class='coffeescript'>"https://github.com/nrc/rustfmt"</code></pre>
|
<pre><code class='coffeescript'>"https://github.com/rust-lang-nursery/rustfmt"</code></pre>
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
<dt id='options-variable'>
|
<dt id='options-variable'>
|
||||||
|
@ -201,4 +201,4 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -379,7 +379,7 @@ Thank you.</p><h2 id="language-support">Language Support</h2><p>See <a href="htt
|
||||||
<td>Rust</td>
|
<td>Rust</td>
|
||||||
<td><code>Rust</code></td>
|
<td><code>Rust</code></td>
|
||||||
<td><code>.rs</code>, <code>.rlib</code></td>
|
<td><code>.rs</code>, <code>.rlib</code></td>
|
||||||
<td><a href="https://github.com/nrc/rustfmt"><code>rustfmt</code></a> (Default)</td>
|
<td><a href="https://github.com/rust-lang-nursery/rustfmt"><code>rustfmt</code></a> (Default)</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Sass</td>
|
<td>Sass</td>
|
||||||
|
@ -623,4 +623,4 @@ and submit a <a href="https://help.github.com/articles/using-pull-requests/">Pul
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
###
|
###
|
||||||
Requires https://github.com/nrc/rustfmt
|
Requires https://github.com/rust-lang-nursery/rustfmt
|
||||||
###
|
###
|
||||||
|
|
||||||
"use strict"
|
"use strict"
|
||||||
|
@ -10,7 +10,7 @@ versionCheckState = false
|
||||||
|
|
||||||
module.exports = class Rustfmt extends Beautifier
|
module.exports = class Rustfmt extends Beautifier
|
||||||
name: "rustfmt"
|
name: "rustfmt"
|
||||||
link: "https://github.com/nrc/rustfmt"
|
link: "https://github.com/rust-lang-nursery/rustfmt"
|
||||||
isPreInstalled: false
|
isPreInstalled: false
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
|
@ -21,7 +21,7 @@ module.exports = class Rustfmt extends Beautifier
|
||||||
cwd = context.filePath and path.dirname context.filePath
|
cwd = context.filePath and path.dirname context.filePath
|
||||||
program = options.rustfmt_path or "rustfmt"
|
program = options.rustfmt_path or "rustfmt"
|
||||||
help = {
|
help = {
|
||||||
link: "https://github.com/nrc/rustfmt"
|
link: "https://github.com/rust-lang-nursery/rustfmt"
|
||||||
program: "rustfmt"
|
program: "rustfmt"
|
||||||
pathOption: "Rust - Rustfmt Path"
|
pathOption: "Rust - Rustfmt Path"
|
||||||
}
|
}
|
||||||
|
@ -34,7 +34,7 @@ module.exports = class Rustfmt extends Beautifier
|
||||||
else
|
else
|
||||||
@run(program, ["--version"], help: help)
|
@run(program, ["--version"], help: help)
|
||||||
.then((stdout) ->
|
.then((stdout) ->
|
||||||
if /^0\.(?:[0-4]\.[0-9])/.test(stdout.trim())
|
if /^0\.(?:[0-4]\.[0-9])(?!-nightly)/.test(stdout.trim())
|
||||||
versionCheckState = false
|
versionCheckState = false
|
||||||
throw new Error("rustfmt version 0.5.0 or newer required")
|
throw new Error("rustfmt version 0.5.0 or newer required")
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue