GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [core] SarifRenderer does not respect relativizeRoots · Issue #5760 · pmd/pmd

[core] SarifRenderer does not respect relativizeRoots #5760

New issue
Copy link
New issue
Copy link
Closed
#7175
Closed
[core] SarifRenderer does not respect relativizeRoots#5760
#7175
Copy link
Labels
a:bugPMD crashes or fails to analyse a file.
Milestone
7.30.0

Description

@orange-buffalo
orange-buffalo
opened on May 23, 2025
Issue body actions

Affects PMD Version:

7.13.0

Description:

SarifRenderer does not respect relativizeRoots configuration property, or more precisely does not use AbstractRenderer#determineFileName method as other renderers do:

https://github.com/pmd/pmd/blob/pmd_releases/7.13.0/pmd-core/src/main/java/net/sourceforge/pmd/renderers/internal/sarif/SarifLogBuilder.java#L152-L155

Steps to reproduce:

  1. Execute PMD with --relativize-paths-with <dir> and --format sarif.
  2. Observe the generated report, runs[].results[].locations[].physicalLocation.artifactLocation.uri elements.

Expected result: The values are relative to <dir>, e.g. src/main/java/package/Class.java
Actual result: The values are absolute paths, e.g. file:///tmp/project/src/main/java/package/Class.java

Activity

  1. orange-buffalo
    added
    a:bugPMD crashes or fails to analyse a file.
    on May 23, 2025
  2. adangel
    added this to the 7.30.0 milestone on Nov 12, 2026
  3. adangel
    closed this as completedin 8171d2fon Nov 12, 2026
  4. adangel
    added a commit that references this issue on Nov 12, 2026

    [core] Fix pmd#5760: Honor relative paths in SARIF reports (pmd#7175)

    This issue will close once commit 8171d2f is merged into the 'main' branch.
    8171d2f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a:bugPMD crashes or fails to analyse a file.

    Type

    No type

    Projects

    No projects

      Milestone

      • 7.30.0

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.