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 handling of relative file paths in report files #2747

Merged
merged 2 commits into from
Sep 24, 2024

Commits on Sep 20, 2024

  1. Improve handling of relative file paths in report files

    - Up to know we were stating in our [Wiki](https://github.com/SonarOpenCommunity/sonar-cxx/wiki/Troubleshooting-Reports): Relative paths in report files are always relative to the project base directory. Start relative paths always with .\ on Windows or ./ on Linux.
    - relative paths starting with '..' were resolved to null in the past. "No file" results in adding an issue on project level (project issue). In such a case we replace null with the filename. This leads at least to an error message an that and the issue is not added to the project because typically no such indexed file exists.
    - The real problem is that tools generate reports with relative paths without defining which base directory is referred to. This problem remains and must be solved via the CI/CD and tool configuration.
    - close SonarOpenCommunity#2741
    guwirth committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    6d6b60c View commit details
    Browse the repository at this point in the history

Commits on Sep 21, 2024

  1. use FilenameUtils.getName because this works on Windows and Linux als…

    …o if report is generated on the one and consumed on the other
    guwirth committed Sep 21, 2024
    Configuration menu
    Copy the full SHA
    7bd54f1 View commit details
    Browse the repository at this point in the history