Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve baseline basepath calculation #903

Merged

Conversation

frankdekker
Copy link
Contributor

@frankdekker frankdekker commented Jul 17, 2021

Type: Bugfix
Issue: fix #901
Breaking change: no

Previously the full filepath of the baselined files was calculated based on the location of the baseline xml file. This results in an issue when the baseline file was moved to a subfolder within the project.

Changes:

  • No longer transform the filepaths within the baseline to a fullpath, but keep them relative.
  • Changed the baseline matching if the violation file ends with the filename in the baseline.
  • When generating the phpmd.baseline.xml, the basepath will be calculated based on the current working directory.
  • Removed some Paths function that were no longer necessary.
  • Updated coverage for the changes.
  • Updated the documentation to reflect the change with the working directory.

Offtopic: \PHPMD\Renderer\SARIFRendererTest seems to fail on windows.

@tvbeek tvbeek added this to the 2.11.0 milestone Jul 20, 2021
@kylekatarnls kylekatarnls merged commit 1190179 into phpmd:master Jul 20, 2021
@kylekatarnls kylekatarnls modified the milestones: 2.11.0, 2.10.2 Jul 20, 2021
@frankdekker frankdekker deleted the Improve_baseline_basepath_calculation branch June 1, 2023 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Baseline violations from baseline file saved in a subfolder are NOT ignored in the PHPMD report
3 participants