From b720caf086c6900b9dde87f0f57bc25964f7e4a6 Mon Sep 17 00:00:00 2001 From: White-Oak Date: Sat, 12 Nov 2016 22:17:10 +0300 Subject: [PATCH] Added beta and stable versions to proper JSON support mode Fixes #77 --- lib/linter-rust.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/linter-rust.coffee b/lib/linter-rust.coffee index 3d3d35e..f043e88 100644 --- a/lib/linter-rust.coffee +++ b/lib/linter-rust.coffee @@ -9,7 +9,7 @@ XRegExp = require 'xregexp' errorModes = require './mode' class LinterRust - patternRustcVersion: XRegExp('rustc (?1.\\d+.\\d+)(?:(?:-(?nightly)|(?:[^\\s]+))? \ + patternRustcVersion: XRegExp('rustc (?1.\\d+.\\d+)(?:(?:-(?:(?nightly)|(?beta.*?))|(?:[^\s]+))? \ \\((?:[^\\s]+) (?\\d{4}-\\d{2}-\\d{2})\\))?') cargoDependencyDir: "target/debug/deps" @@ -162,7 +162,8 @@ class LinterRust canUseIntermediateJSON = nightlyWithJSON or stableWithJSON switch commandMode when 'cargo' - canUseProperCargoJSON = match.nightly and match.date >= '2016-10-10' + canUseProperCargoJSON = (match.nightly and match.date >= '2016-10-10') or + (match.beta or not match.nightly and semver.gte(match.version, '1.13.0')) if canUseProperCargoJSON errorModes.JSON_CARGO # this mode is used only through August till October, 2016