Changeset View
Changeset View
Standalone View
Standalone View
src/lint/linter/ArcanistCSharpLinter.php
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | final class ArcanistCSharpLinter extends ArcanistLinter { | ||||
} | } | ||||
public function setCustomSeverityMap(array $map) { | public function setCustomSeverityMap(array $map) { | ||||
foreach ($map as $code => $severity) { | foreach ($map as $code => $severity) { | ||||
if (substr($code, 0, 2) === 'SA' && $severity == 'disabled') { | if (substr($code, 0, 2) === 'SA' && $severity == 'disabled') { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
"In order to keep StyleCop integration with IDEs and other tools ". | "In order to keep StyleCop integration with IDEs and other tools ". | ||||
"consistent with Arcanist results, you aren't permitted to ". | "consistent with lint results, you aren't permitted to ". | ||||
"disable StyleCop rules within '%s'. Instead configure the ". | "disable StyleCop rules within '%s'. Instead configure the ". | ||||
"severity using the StyleCop settings dialog (usually accessible ". | "severity using the StyleCop settings dialog (usually accessible ". | ||||
"from within your IDE). StyleCop settings for your project will ". | "from within your IDE). StyleCop settings for your project will ". | ||||
"be used when linting for Arcanist.", | "be used when linting.", | ||||
'.arclint')); | '.arclint')); | ||||
} | } | ||||
} | } | ||||
return parent::setCustomSeverityMap($map); | return parent::setCustomSeverityMap($map); | ||||
} | } | ||||
/** | /** | ||||
* Determines what executables and lint paths to use. Between platforms | * Determines what executables and lint paths to use. Between platforms | ||||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | if ($ver < self::SUPPORTED_VERSION) { | ||||
pht( | pht( | ||||
'You are running an old version of %s. Please '. | 'You are running an old version of %s. Please '. | ||||
'upgrade to version %s.', | 'upgrade to version %s.', | ||||
'cslint', | 'cslint', | ||||
self::SUPPORTED_VERSION)); | self::SUPPORTED_VERSION)); | ||||
} else if ($ver > self::SUPPORTED_VERSION) { | } else if ($ver > self::SUPPORTED_VERSION) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
'Arcanist does not support this version of %s (it is newer). '. | 'This version of %s is not supported (it is too new). '. | ||||
'You can try upgrading Arcanist with `%s`.', | 'You can try upgrading with `%s`.', | ||||
'cslint', | 'cslint', | ||||
'arc upgrade')); | 'arc upgrade')); | ||||
} | } | ||||
$this->loaded = true; | $this->loaded = true; | ||||
} | } | ||||
public function lintPath($path) {} | public function lintPath($path) {} | ||||
▲ Show 20 Lines • Show All 117 Lines • Show Last 20 Lines |