Skip to content

Add trim-path-prefix to the CodeChecker analyze [bazel] #5149

Open

Description

@dkrupp

When the CodeChecker analyze command is executed on a remote Bazel agent, the source files are placed in a cached folder with a hash in its name.
To keep the plist files independent of this local folder naming, the path prefix needs to be cut from the PATHs of the source files referred to in the plist files.

Introduce CodeChecker analyze --trim-path-prefix [PATH_PREFIX] argument which should cause [PATH_PREFIX] path to be cut from the beginning of the referred source files in the plist files.

CodeChecker analyze ./compile_commands.json --trim-path-prefix /path/to/your

.plist before transformation:

<key>files</key>
 <array>
  <string>/path/to/your/main.cpp</string>
 </array>
</dict>

would be transformed to this .plist

<key>files</key>
 <array>
  <string>main.cpp</string>
 </array>
</dict>

Bundled with: #5150 and #5148

Activity

  1. added this to the release 6.30.0 milestone on Oct 15, 2026
  2. added
    analyzer 📈
    new feature 👍
    bazel 🧩
    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