]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Emit advice for TODO in Phutil linter
authorvrana <jakubv@fb.com>
Wed, 21 Nov 2012 23:30:42 +0000 (15:30 -0800)
committervrana <jakubv@fb.com>
Wed, 21 Nov 2012 23:40:58 +0000 (15:40 -0800)
Summary:
Let's try this.
It may be useful to see this together in Differential overview.

Test Plan: Linted a file with TODO.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Maniphest Tasks: T744

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

src/lint/engine/PhutilLintEngine.php

index 360b6ca284a3f448fa288cdea28413062e6d523a..0c806b79814075e5a9d4800ed4bee6c4166c5b7c 100644 (file)
@@ -56,14 +56,15 @@ class PhutilLintEngine extends ArcanistLintEngine {
   private function getXHPASTSeverityMap() {
     $error = ArcanistLintSeverity::SEVERITY_ERROR;
     $warning = ArcanistLintSeverity::SEVERITY_WARNING;
+    $advice = ArcanistLintSeverity::SEVERITY_ADVICE;
 
     return array(
       ArcanistXHPASTLinter::LINT_PHP_53_FEATURES          => $error,
       ArcanistXHPASTLinter::LINT_PHP_54_FEATURES          => $error,
       ArcanistXHPASTLinter::LINT_PHT_WITH_DYNAMIC_STRING  => $error,
       ArcanistXHPASTLinter::LINT_COMMENT_SPACING          => $error,
-
       ArcanistXHPASTLinter::LINT_RAGGED_CLASSTREE_EDGE    => $warning,
+      ArcanistXHPASTLinter::LINT_TODO_COMMENT             => $advice,
     );
   }
 }