cppcheck: replace bool 0/1 assignments with false/true#2409
Merged
Conversation
Contributor
Author
|
I still have this local change in my local panda repo diff --git a/pyproject.toml b/pyproject.toml
index f3fcc9bd..cdc082e0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -14,7 +14,7 @@ classifiers = [
dependencies = [
"libusb1",
"libusb-package",
- "opendbc @ git+https://github.com/commaai/opendbc.git@master#egg=opendbc",
+ "opendbc @ git+https://github.com/varshneydevansh/opendbc.git@new_zero_one#egg=opendbc",
# runtime dependency on comma four
#"spidev; platform_system == 'Linux'", |
This was referenced Jun 10, 2026
Contributor
Author
|
I should have also told about the "coverage table" earlier Devanshs-MacBook-Pro \panda ➜ ( new_zero_one) 3.326s 1:58 AM
⚡devanshvarshney ❯❯ tests/misra/test_misra.sh
MISRA coverage table doesn't match. Update and commit:
Devanshs-MacBook-Pro \panda ➜ ( new_zero_one) 574ms 2:21 AM
⚡devanshvarshney ❯❯ git status
On branch new_zero_one
Your branch is up to date with 'origin/new_zero_one'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git restore <file>..." to discard changes in working directory)
modified: pyproject.toml
modified: tests/misra/coverage_table
no changes added to commit (use "git add" and/or "git commit -a")
But then I moved to only validate the bool replacement check which |
Contributor
|
Thanks for the PR! |
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.
Completes the panda-side cleanup for:
This uses cppcheck
2.21.0, which includes the upstreambool-literal handling changes:
Changes:
bool ret = 0;withbool ret = false;ret = 1;withret = true;This branch temporarily points to the dependency branches
needed for CI:
Validation:
I used
SKIP_TABLES_DIFF=1to skip those table/checkerdiffs to actually run the analysis.
What cppcheck report through panda before the opendbc fix:
After the fix: