]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Modernize `ArcanistMergeConflictLinter`.
authorJoshua Spence <josh@joshuaspence.com>
Sat, 10 May 2014 08:55:47 +0000 (01:55 -0700)
committerepriestley <git@epriestley.com>
Sat, 10 May 2014 08:55:47 +0000 (01:55 -0700)
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

src/lint/linter/ArcanistMergeConflictLinter.php

index 93c4d61b1cf0ecb5675b64a64833aaa8fa834424..1b4d8d685224cfbc56c28f85baeb2866e71696e3 100644 (file)
@@ -8,6 +8,14 @@
 final class ArcanistMergeConflictLinter extends ArcanistLinter {
   const LINT_MERGECONFLICT = 1;
 
+  public function getLinterName() {
+    return 'MERGECONFLICT';
+  }
+
+  public function getLinterConfigurationName() {
+    return 'merge-conflict';
+  }
+
   public function willLintPaths(array $paths) {
     return;
   }
@@ -23,24 +31,20 @@ final class ArcanistMergeConflictLinter extends ArcanistLinter {
           $lineno + 1,
           0,
           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() {
     return array(
-      self::LINT_MERGECONFLICT => ArcanistLintSeverity::SEVERITY_ERROR
+      self::LINT_MERGECONFLICT => ArcanistLintSeverity::SEVERITY_ERROR,
     );
   }
 
   public function getLintNameMap() {
     return array(
-      self::LINT_MERGECONFLICT => "Unresolved merge conflict"
+      self::LINT_MERGECONFLICT => 'Unresolved merge conflict',
     );
   }
 }