]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Use the `ArcanistConfigurationDrivenLintEngine` as a linting engine.
authorJoshua Spence <josh@joshuaspence.com>
Mon, 12 May 2014 02:33:40 +0000 (19:33 -0700)
committerepriestley <git@epriestley.com>
Mon, 12 May 2014 02:33:40 +0000 (19:33 -0700)
Summary: Ref T2039. The `.arclint` file is reasonably complete now and we should start using it if possible, since we are trying to recommend it to others.

Test Plan: `arc lint`.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T2039

Differential Revision: https://secure.phabricator.com/D9057

.arcconfig
.arclint [new file with mode: 0644]
src/lint/linter/ArcanistPhutilXHPASTLinter.php
src/lint/linter/ArcanistXHPASTLinter.php

index fac4c79cb30711221fb9a1db8da73bc9b9342756..a6623f447582fba99d098e0dcd65b50da0886637 100644 (file)
@@ -1,7 +1,6 @@
 {
   "project.name" : "arcanist",
   "phabricator.uri" : "https://secure.phabricator.com/",
-  "lint.engine" : "PhutilLintEngine",
   "unit.engine" : "PhutilUnitTestEngine",
   "load" : [
     "src/"
diff --git a/.arclint b/.arclint
new file mode 100644 (file)
index 0000000..12bc550
--- /dev/null
+++ b/.arclint
@@ -0,0 +1,41 @@
+{
+  "exclude": [
+    "(^externals/)",
+    "(\\.lint-test$)"
+  ],
+  "linters": {
+    "filename": {
+      "type": "filename"
+    },
+    "generated": {
+      "type": "generated"
+    },
+    "merge-conflict": {
+      "type": "merge-conflict"
+    },
+    "nolint": {
+      "type": "nolint"
+    },
+    "phutil-xhpast": {
+      "type": "phutil-xhpast",
+      "include": "(\\.php$)"
+    },
+    "text": {
+      "type": "text"
+    },
+    "spelling": {
+      "type": "spelling"
+    },
+    "xhpast": {
+      "type": "xhpast",
+      "include": "(\\.php$)",
+      "severity": {
+        "16": "advice",
+        "29": "warning",
+        "31": "error",
+        "34": "error",
+        "35": "error"
+      }
+    }
+  }
+}
index b5a59d5971412ce7acaa4b8d73751d3f695ffe09..e58a1b9cbaeb097137a42062bbf8c45fc2951a13 100644 (file)
@@ -46,6 +46,10 @@ final class ArcanistPhutilXHPASTLinter extends ArcanistBaseXHPASTLinter {
     return 'PHLXHP';
   }
 
+  public function getLinterConfigurationName() {
+    return 'phutil-xhpast';
+  }
+
   public function getCacheVersion() {
     $version = '2';
     $path = xhpast_get_binary_path();
index dc28841252c5ff30ed66e0aac2556814a2a84813..e74cb71daa05ad6ed683e87e88427194283f0cd4 100644 (file)
@@ -91,6 +91,10 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
     return 'XHP';
   }
 
+  public function getLinterConfigurationName() {
+    return 'xhpast';
+  }
+
   public function getLintSeverityMap() {
     $disabled = ArcanistLintSeverity::SEVERITY_DISABLED;
     $advice   = ArcanistLintSeverity::SEVERITY_ADVICE;