Skip to content
This repository was archived by the owner on Aug 7, 2023. It is now read-only.

Added beta and stable versions to proper JSON support mode #93

Merged
merged 1 commit into from
Nov 12, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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