From 3ba6b0ac567c4257291b355e7e792d1107f9cb3c Mon Sep 17 00:00:00 2001 From: Cyril Plisko Date: Sun, 16 Jul 2017 15:55:20 +0300 Subject: [PATCH] Enable rustfmt-nightly to pass the filter rustfmt-nightly was forked from rustfmt 0.9 and its version numbering has been reset to 0.1.0. This commit updates the version check to reject rustfmt only if its 0.[1-4].x version is not follwed by '-nightly' suffix. --- CHANGELOG.md | 1 + src/beautifiers/rustfmt.coffee | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b29763..352c8fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Next - Fixes #1638. update type-formatter and Fixes indent size not supported +- Add support for rustfmt-nightly # v0.30.4 (2017-07-14) - Fixes #1732. Improve deprecation message for old options for new Executables diff --git a/src/beautifiers/rustfmt.coffee b/src/beautifiers/rustfmt.coffee index 960344c..68f54f2 100644 --- a/src/beautifiers/rustfmt.coffee +++ b/src/beautifiers/rustfmt.coffee @@ -34,7 +34,7 @@ module.exports = class Rustfmt extends Beautifier else @run(program, ["--version"], help: help) .then((stdout) -> - if /^0\.(?:[0-4]\.[0-9])/.test(stdout.trim()) + if /^0\.(?:[0-4]\.[0-9])(?!-nightly)/.test(stdout.trim()) versionCheckState = false throw new Error("rustfmt version 0.5.0 or newer required") else