Conversation
Collaborator
thientc
commented
Mar 19, 2026
- Introduced constants for disabled checkers and analyzer checkers in sysmsg.py to streamline configuration.
- Introduced constants for disabled checkers and analyzer checkers in sysmsg.py to streamline configuration.
Closed
Contributor
There was a problem hiding this comment.
Pull request overview
This PR centralizes scan-build checker configuration into shared constants and refactors the build/analyze flow to reuse common subprocess and environment-building helpers across Builder and ConsumerBuilder.
Changes:
- Added constants for disabled checkers and Futag analyzer checker names in
sysmsg.py. - Refactored
preprocessor.pyto share logic via_BaseBuilderand new helper functions (_run_command,_make_build_env,_load_json_files, etc.). - Updated
.gitignoreto ignore Claude-related files.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/python/futag-package/src/futag/sysmsg.py |
Introduces constants for scan-build checker enable/disable configuration. |
src/python/futag-package/src/futag/preprocessor.py |
Refactors builder logic to reduce duplication and standardize command execution / env setup. |
.gitignore |
Ignores CLAUDE.md and .claude/settings.json. |
Comments suppressed due to low confidence (1)
src/python/futag-package/src/futag/preprocessor.py:585
global_hash = [x for x in function_list]creates an intermediate list of dict keys, but the only use is membership testing (if hash in global_hash). This is both slower and more memory-heavy than testing directly against the dict (if func_hash in function_list). Consider removingglobal_hashand using dict membership.
# get global hash of all functions
global_hash = [x for x in function_list]
# iterate function hash for adding to global hash list
for hash in contexts:
if hash in global_hash:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Comment on lines
+44
to
+58
| def _scan_build_checker_args(scan_build_path, checker_name=None, analyzer_configs=None): | ||
| """Build the common scan-build checker argument list.""" | ||
| args = [scan_build_path.as_posix()] | ||
| for c in DISABLED_CHECKERS: | ||
| args.extend(["-disable-checker", c]) | ||
| if checker_name: | ||
| args.extend(["-enable-checker", checker_name]) | ||
| for config in (analyzer_configs or []): | ||
| args.extend(["-analyzer-config", config]) | ||
| return args | ||
|
|
||
|
|
||
| def _run_command(cmd, env=None, msg_prefix="", fail_msg="", succeed_msg="", | ||
| exit_on_fail=True, capture=True): | ||
| """Run a subprocess command with standardized error handling.""" |
Collaborator
Author
There was a problem hiding this comment.
@copilot apply changes based on this feedback
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
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.