mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Only run unused code analysis where necessary
This commit is contained in:
parent
d43bb3923b
commit
48fba8a6b9
@ -81,7 +81,9 @@ abstract class FileManipulationTest extends \Psalm\Tests\TestCase
|
||||
);
|
||||
$this->project_analyzer->getCodebase()->allow_backwards_incompatible_changes = $allow_backwards_incompatible_changes;
|
||||
|
||||
$this->project_analyzer->getCodebase()->reportUnusedCode();
|
||||
if (strpos(static::class, 'Unused') || strpos(static::class, 'Unnecessary')) {
|
||||
$this->project_analyzer->getCodebase()->reportUnusedCode();
|
||||
}
|
||||
|
||||
$this->analyzeFile($file_path, $context);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user