]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Recognize "@nolint" and "@generated" in C++ files in PhutilLintEngine
authorepriestley <git@epriestley.com>
Mon, 13 Jun 2011 17:46:41 +0000 (10:46 -0700)
committerepriestley <git@epriestley.com>
Wed, 15 Jun 2011 03:44:40 +0000 (20:44 -0700)
Summary:
We have some "@generated" files of these types now, hit them with the text
linters

Test Plan:
Ran 'arc lint' on D444

Reviewed By: aran
Reviewers: aran
CC: aran
Differential Revision: 451

src/lint/engine/phutil/PhutilLintEngine.php

index cc1d25a415ec82bf0669abc3393043e1048b96d3..bc312c35a5e2337d0812551dcc134f6e946cbc03 100644 (file)
@@ -60,7 +60,7 @@ class PhutilLintEngine extends ArcanistLintEngine {
     $linters[] = $text_linter;
     foreach ($paths as $path) {
       $is_text = false;
-      if (preg_match('/\.(php|css|js)$/', $path)) {
+      if (preg_match('/\.(php|css|js|hpp|cpp|l|y)$/', $path)) {
         $is_text = true;
       }
       if ($is_text) {