1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 23:02:41 +01:00

Modernize ArcanistMergeConflictLinter.

Summary: The only real change here is adding a `getLinterConfigurationName` method so that this linter can be used with an `.arclint` file. Everything else is just some minor tidying.

Test Plan: N/A

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9039
This commit is contained in:
Joshua Spence 2014-05-10 01:55:47 -07:00 committed by epriestley
parent 2dba2f8528
commit edd85a0e9d

View file

@ -8,6 +8,14 @@
final class ArcanistMergeConflictLinter extends ArcanistLinter { final class ArcanistMergeConflictLinter extends ArcanistLinter {
const LINT_MERGECONFLICT = 1; const LINT_MERGECONFLICT = 1;
public function getLinterName() {
return 'MERGECONFLICT';
}
public function getLinterConfigurationName() {
return 'merge-conflict';
}
public function willLintPaths(array $paths) { public function willLintPaths(array $paths) {
return; return;
} }
@ -23,24 +31,20 @@ final class ArcanistMergeConflictLinter extends ArcanistLinter {
$lineno + 1, $lineno + 1,
0, 0,
self::LINT_MERGECONFLICT, self::LINT_MERGECONFLICT,
"This syntax indicates there is an unresolved merge conflict."); 'This syntax indicates there is an unresolved merge conflict.');
} }
} }
} }
public function getLinterName() {
return "MERGECONFLICT";
}
public function getLintSeverityMap() { public function getLintSeverityMap() {
return array( return array(
self::LINT_MERGECONFLICT => ArcanistLintSeverity::SEVERITY_ERROR self::LINT_MERGECONFLICT => ArcanistLintSeverity::SEVERITY_ERROR,
); );
} }
public function getLintNameMap() { public function getLintNameMap() {
return array( return array(
self::LINT_MERGECONFLICT => "Unresolved merge conflict" self::LINT_MERGECONFLICT => 'Unresolved merge conflict',
); );
} }
} }