Skip to content

feat: store relative paths in file reports#3

Merged
jordikroon merged 2 commits into
mainfrom
feature/relative-reporting
Apr 23, 2026
Merged

feat: store relative paths in file reports#3
jordikroon merged 2 commits into
mainfrom
feature/relative-reporting

Conversation

@jordikroon
Copy link
Copy Markdown
Member

Add support for storing relative file paths in violation reports instead of absolute paths.

Add support for storing relative file paths in violation reports instead of absolute paths. This improves readability and portability of reports.

Changes:
- Add makeRelative() method to SniffRunner to convert absolute paths to relative paths based on current working directory
- Update XmlFileProcessor.processFile() signature to accept optional reportPath parameter
- Pass relative path through the processing pipeline to be used in FileReport
- Add test coverage for relative path storage in file reports
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

PHPUnit 13.1.7 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.5.5 with Xdebug 3.5.1
Configuration: /home/runner/work/docbook-cs/docbook-cs/phpunit.xml.dist

...............................................................  63 / 231 ( 27%)
............................................................... 126 / 231 ( 54%)
............................................................... 189 / 231 ( 81%)
..........................................                      231 / 231 (100%)

Time: 00:00.798, Memory: 22.00 MB

OK (231 tests, 401 assertions)

Generating code coverage report in Clover XML format ... done [00:00.006]

Generating code coverage report in HTML format ... done [00:00.117]


Code Coverage Report Summary:
  Classes: 100.00% (24/24)
  Methods: 100.00% (124/124)
  Lines:   100.00% (818/818)

@jordikroon jordikroon merged commit 8a31a88 into main Apr 23, 2026
3 checks passed
@jordikroon jordikroon deleted the feature/relative-reporting branch April 23, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant