refactor: Fix new and old codechecker script issues - #322
Open
nettle wants to merge 1 commit into
Open
Conversation
nettle
marked this pull request as draft
August 27, 2026 22:30
nettle
force-pushed
the
pybinary-fix
branch
2 times, most recently
from
August 28, 2026 22:07
ac6599e to
da767c5
Compare
nettle
commented
Sep 1, 2026
nettle
left a comment
Collaborator
Author
There was a problem hiding this comment.
Hi @furtib, @Szelethus,
I have added a few comments to highlight the most important bugfixes
| allow_files = True, | ||
| executable = True, | ||
| cfg = "target", | ||
| cfg = "exec", |
Collaborator
Author
There was a problem hiding this comment.
NOTE: this is important - should be double-checked
Comment on lines
-240
to
-246
| # Create test script | ||
| codechecker_test_script = ctx.actions.declare_file(ctx.label.name + "/codechecker_test_script") | ||
| ctx.actions.symlink( | ||
| output = codechecker_test_script, | ||
| target_file = ctx.executable._codechecker_script, | ||
| ) | ||
|
|
Collaborator
Author
There was a problem hiding this comment.
NOTE: this is mostly refactoring but potentially a bugfix
| os.makedirs(path) | ||
| def build_env(config): | ||
| """Return environment""" | ||
| env = os.environ.copy() |
Collaborator
Author
There was a problem hiding this comment.
NOTE: this is a bugfix
| # Note: This is a workaround, CodeChecker requires the PATH to be set | ||
| if "PATH" not in env: | ||
| env["PATH"] = "/bin" | ||
| if "CC_ANALYZERS_FROM_PATH" not in env: |
Collaborator
Author
There was a problem hiding this comment.
NOTE: this is a bugfix
nettle
commented
Sep 1, 2026
| arguments.add("--config=" + config_file.path) | ||
| arguments.add("--output=" + codechecker_files.path) | ||
| arguments.add("--log=" + ctx.outputs.codechecker_log.path) | ||
| arguments.add_all(codechecker_env, format_each = "--env=%s") |
Collaborator
Author
There was a problem hiding this comment.
NOTE: this is a bugfix (minor)
nettle
marked this pull request as ready for review
September 1, 2026 20:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why:
Change #199 caused a few bugs in downstream projects.
Migration to py_binary should be fixed and refactored.
Besides codechecker.bzl and codechecker_script.py also
contained old bugs.
What: