From 59f48f790175bcb618e1a8a6fd8c34a69b7d1ccd Mon Sep 17 00:00:00 2001 From: adonohue Date: Fri, 14 Jan 2011 13:26:01 -0800 Subject: [PATCH] Disable phutil filename check. To be implemented as a more pervasive check. Differential Revision: 201587 Reviewed By: epriestley --- scripts/phutil_analyzer.php | 15 --------------- .../phutilmodule/ArcanistPhutilModuleLinter.php | 3 --- 2 files changed, 18 deletions(-) diff --git a/scripts/phutil_analyzer.php b/scripts/phutil_analyzer.php index a31b8d37..3e89ff3d 100755 --- a/scripts/phutil_analyzer.php +++ b/scripts/phutil_analyzer.php @@ -233,21 +233,6 @@ foreach (Futures($futures) as $file => $future) { "file."); break; } - } else if (count($classes) == 1) { - foreach ($classes as $class) { - $class_name = $class->getChildByIndex(1); - $class_string = $class_name->getConcreteString(); - if ($file != $class_string.'.php') { - $rename = $class_string.'.php'; - $requirements->addLint( - $class_name, - $class_string, - ArcanistPhutilModuleLinter::LINT_ANALYZER_CLASS_FILENAME, - "The name of this file differs from the name of the class it ". - "declares. Rename the file to '{$rename}'."); - } - break; - } } $uses_of_new = $root->selectDescendantsOfType('n_NEW'); diff --git a/src/lint/linter/phutilmodule/ArcanistPhutilModuleLinter.php b/src/lint/linter/phutilmodule/ArcanistPhutilModuleLinter.php index 8c3318d9..26f2e9ef 100644 --- a/src/lint/linter/phutilmodule/ArcanistPhutilModuleLinter.php +++ b/src/lint/linter/phutilmodule/ArcanistPhutilModuleLinter.php @@ -32,7 +32,6 @@ class ArcanistPhutilModuleLinter extends ArcanistLinter { const LINT_ANALYZER_DYNAMIC = 101; const LINT_ANALYZER_NO_INIT = 102; const LINT_ANALYZER_MULTIPLE_CLASSES = 103; - const LINT_ANALYZER_CLASS_FILENAME = 104; public function getLintNameMap() { return array( @@ -50,8 +49,6 @@ class ArcanistPhutilModuleLinter extends ArcanistLinter { self::LINT_ANALYZER_NO_INIT => 'Analyzer: No __init__.php File', self::LINT_ANALYZER_MULTIPLE_CLASSES => 'Analyzer: File Declares Multiple Classes', - self::LINT_ANALYZER_CLASS_FILENAME - => 'Analyzer: Filename Does Not Match Class Declaration', ); }