You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check the generated file, note that its violations contain the absolute file name paths /home/username/src/project/src/ClassName.php
Run the check with the baseline
The check report will contain all the violations that are set to be ignored in the baseline file
The reason is the bug in the logic that reads the baseline file - \PHPMD\Baseline\BaselineSetFactory::fromFile
The absolute file name paths are prepended with a basepath calculated as $basePath = dirname($fileName); resulting in (the part in bold is the basepath) /home/username/src/project/build/phpmd/home/username/src/project/src.ClassName.php
Checks before submitting
Be sure that there isn't already an issue about this. See: Issues list
Be sure that there isn't already a pull request about this. See: Pull requests
I have added every step to reproduce the bug.
If possible I added relevant code examples.
This issue is about 1 bug and nothing more.
The issue has a descriptive title. For example: "JSON rendering failed on Windows for filenames with space".
The text was updated successfully, but these errors were encountered:
githoober
changed the title
The baseline violations are NOT ignored in the PHPMD report
Baseline violations from baseline file saved in a subfolder are NOT ignored in the PHPMD report
Jun 17, 2021
Thanks for the report, was struggling a bit with the basepath implementation. It shouldve been possible to move the phpmd.baseline.xml file. Added PR :)
Current Behavior
The baseline violations are not ignored in the final report
Expected Behavior
The baseline violations are ignored in the final report
Steps To Reproduce:
/home/username/src/project/build/phpmd
/home/username/src/project/build/phpmd
/home/username/src/project/src/ClassName.php
$basePath = dirname($fileName);
resulting in (the part in bold is the basepath)/home/username/src/project/build/phpmd
/home/username/src/project/src.ClassName.php
Checks before submitting
The text was updated successfully, but these errors were encountered: