Skip to content

Commit

Permalink
Added beta and stable versions to proper JSON support mode
Browse files Browse the repository at this point in the history
  • Loading branch information
White-Oak committed Nov 12, 2016
1 parent c40924e commit b720caf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/linter-rust.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ XRegExp = require 'xregexp'
errorModes = require './mode'

class LinterRust
patternRustcVersion: XRegExp('rustc (?<version>1.\\d+.\\d+)(?:(?:-(?<nightly>nightly)|(?:[^\\s]+))? \
patternRustcVersion: XRegExp('rustc (?<version>1.\\d+.\\d+)(?:(?:-(?:(?<nightly>nightly)|(?<beta>beta.*?))|(?:[^\s]+))? \
\\((?:[^\\s]+) (?<date>\\d{4}-\\d{2}-\\d{2})\\))?')
cargoDependencyDir: "target/debug/deps"

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b720caf

Please sign in to comment.