Skip to content

feat: Demo/WIP Add codechecker_store - #331

Draft
furtib wants to merge 3 commits into
Ericsson:mainfrom
furtib:codechecker-store
Draft

furtib wants to merge 3 commits into
Ericsson:mainfrom
furtib:codechecker-store

Conversation

@furtib

@furtib furtib commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Why:
We want to be able to run codechecker store easily.

What:

  • Created a bazel run rule codechecker_store.
    This rule:
    • Can accept a URL and name as arguments (can be extended for credentials, etc.).
    • Can depend on multiple targets (copies/symlinks their results into a single directory to store).

Addresses:
#90

Additional notes:
You can try this by running one of the following:

bazel run //test/unit/parse:store_mono -- --url http://localhost:8001 --name test_mono
bazel run //test/unit/parse:store_per_file -- --url http://localhost:8001 --name test_per_file
bazel run //test/unit/parse:store_mixed -- --url http://localhost:8001 --name test_mixed

The store script runs inside the Bazel runfiles directory. (My understanding is that it's very similar to the sandbox but it cannot write to it.) If we exposed the source files also, they would also be inside this runfiles directory, removing the need to remove things like _virtual_includes from the plist files paths. Basically, it should be much easier to resolve the paths in the plist files to a source file here.

@furtib furtib self-assigned this Sep 9, 2026
@furtib furtib added the enhancement New feature or request label Sep 9, 2026
@furtib furtib changed the title Demo: Add codechecker_store Demo/WIP: Add codechecker_store Sep 9, 2026
@furtib furtib changed the title Demo/WIP: Add codechecker_store feat: Demo/WIP Add codechecker_store Sep 9, 2026
Comment thread docs/store.md
Comment on lines +25 to +45
```python
codechecker_test(
name = "codechecker",
targets = [
"your_target",
],
)

codechecker_store(
name = "store",
targets = [
":codechecker",
],
)
```

Then run it, passing the server URL and a run name:

```bash
bazel run //:store -- --url=http://localhost:8001/Default --name=my_run
```

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @furtib,
This is very interesting approach! Thanks for this prototype!
But I have many practical questions, for instance:

  • What if :codechecker test fails?
  • How to handle credentials?

Let's discuss!

@furtib furtib Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi!
Thanks for taking a look so fast!

  • The :codechecker test actually fails in this case!
  • Credentials: I have little experience in this part, so please help me out with how you might use it, but I have tested this solution by running CodeChecker cmd login before it, and it worked.
  • On another note: other command-line arguments.
    I have changed it so we capture everything after -- and pass it to CodeChecker. This should work for most arguments. One notable exception is the config file one; I think I should integrate this into the rule, otherwise users must use absolute paths for this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do note that since bazel run is interactive, we could also prompt the user.

@furtib

furtib commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #332.

@furtib furtib closed this Sep 16, 2026
@furtib

furtib commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

whoops, didn't meant to close this one.

@furtib furtib reopened this Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants