Skip to content

Add --use-path-prefix parameter to CodeChecker store/parse/diff [bazel] #5150

Open

Description

@dkrupp

The .plist files in the report directory may contain source file references with relative path (e.g. when the projecte was analyzed with CodeChecker analyze --trim-path-prefix /my/src/dir)

When CodeChecker store/parse is executed, these relative path by default are resolved relative to the .plist file location.

We should let the user specify the directory explicitly where these source files are located:

CodeChecker store/parse/diff --use-path-prefix /my/src/dir should resolve the relative paths of the source files in the .plist files relative from /my/src/dir/.

If use-path-prefix is not specified, the paths should be resolved from metadata.json by the source_path_prefix record ,if available.

{
  "version": 3,
  "tools": [
    {
      "version": "6.28.0",
      "source_path_prefix":"/my/src/dir"
      "working_directory": "/path/to/project/root",
      "output_path": "/path/to/project/reports",

Please note that store --trim-path-prefix switch should still work after this feature is implemented which causes the prefix to be trimmed when stored at the CodeChecker web server.

Bundled with: #5149 and #5148

Activity

  1. added
    analyzer 📈Related to the analyze commands (analysis driver)
    bazel 🧩Directly or inderectly related to bazel support
    and removed
    analyzer 📈Related to the analyze commands (analysis driver)
    on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bazel 🧩Directly or inderectly related to bazel supportnew feature 👍New feature request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions