stable
Clone or download
Implements request #39692 Psalm should not ignore new unit tests No functional change. Why? Psalm used to ignore every file in the core (tests/unit/common) and agiledashboard, cardwall, docman, git, mediawiki, testmanagement and tracker plugins unit test folders. Now, all new unit tests or builders / stubs will be validated. Existing errors in stubs and builders have been added to the baseline so that we don't add more errors. A hand-curated list of unit tests files are ignored. This will let us slowly comb through the list, correct errors and un-ignore each file. Using this ignore list strategy will allow all new files to be validated, but avoid bloating too much the baseline with known problematic test files. We can add them to the baseline on a future patch too and drop the ignore list. Using an explicit ignore list will also make us either correct unit test files that are renamed or baseline them. Some directories in core are still ignored, I figured this change was already big enough. This also raises @psalm-trace errors. @psalm-trace is useful to check what Psalm finds as the type of a variable, but we should not leave them in the codebase (just like we don't leave console logs or var_dumps debug statements). Change-Id: I0267035e42d474f0f9785fe89014bdd8fe7b8545
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/svn/include/Events/SystemEvent_SVN_IMPORT_CORE_REPOSITORY.php | +1 | −5 | Go to diff View file |
M | tests/psalm/psalm.xml | +1328 | −20 | Go to diff View file |
M | tests/psalm/tuleap-baseline.xml | +742 | −1 | Go to diff View file |
M | tests/unit/common/HelpDropdown/HelpDropdownPresenterBuilderTest.php | +0 | −3 | Go to diff View file |