-
Notifications
You must be signed in to change notification settings - Fork 787
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable unusedFunction checks #1970
base: master
Are you sure you want to change the base?
Conversation
31ff4a0
to
b9e64f8
Compare
|
ee1eeb3
to
f8d5b49
Compare
@adeebshihadeh is SPI ever used for Panda F4 besides the CI test? I can:
|
Let's add it to the tests. We don't use it yet, but might want to in the future. |
df66b33
to
60c3a42
Compare
I noticed that cppcheck doesn't report system level misra violation when used with |
ebf561a
to
dac2b4d
Compare
- gnu.cfg replaces __typeof__ with typeof() and triggered some misra-c2012-10.4 - fixed by making both function args the same essential type
- combines panda build configurations Increase mutation test timeout
remove Panda specific functions
STMF4 doesn't use uart interrupt DAC and watchdog are not used
memset is needed by the linker
In the meantime, I figured out a way to check different macro configurations together using |
@@ -193,440 +193,7 @@ Yes CheckType::checkSignConversion | |||
Yes CheckType::checkTooBigBitwiseShift | |||
Yes CheckUninitVar::check | |||
Yes CheckUninitVar::valueFlowUninit | |||
No CheckUnusedFunctions::check require:unusedFunction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did all of this get removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diff is a bit weird - the second variant used to start at line 440 and now is removed.
Basically now, instead of checking F4 and H7 separately, they are checked together using cppcheck configuration combination capability (which is enforced with... --force
argument ).
99f0254
to
e7fc9db
Compare
Converting to draft. We need to add Underlying issue is related to how |
commit 8545c68 Author: Radek <[email protected]> Date: Fri Sep 13 15:12:35 2024 -0700 Fix USB errors (commaai#2011) Fix LIBUSB_ERROR_PIPE [-9] when resetting over USB hubs or jungle V2 commit b8a2a86 Author: Maxime Desroches <[email protected]> Date: Tue Sep 10 21:49:03 2024 -0700 fix python setup (commaai#2018) * fix * comment commit fcccbb3 Author: dzid26 <[email protected]> Date: Sat Sep 7 19:57:19 2024 -0700 revert shorter MISRA mutation CI timeout - test_misra.sh only got faster locally commit 2aaab40 Author: Radek <[email protected]> Date: Fri Sep 6 13:30:05 2024 -0700 fix test_mutation.py performace (commaai#2012) stop pytest from executing test_misra.sh in test collections - in each test_mutation.py worker commit 6f0d1ef Author: dzid26 <[email protected]> Date: Thu Sep 5 21:49:30 2024 -0700 stricter misra config check - prevent quiet bail out commit 93776fd Author: Greg Hogan <[email protected]> Date: Tue Sep 3 20:42:12 2024 -0700 CCP: fix upload response size and getting seed (commaai#2009) commit aac60b8 Author: commaci-public <[email protected]> Date: Sun Sep 1 09:51:30 2024 -0700 pre-commit: autoupdate hooks (commaai#2010) Update pre-commit hook versions Co-authored-by: adeebshihadeh <[email protected]> commit 9ec02e7 Author: Adeeb Shihadeh <[email protected]> Date: Sat Aug 31 13:17:55 2024 -0700 socketcan: skip install in CI for now commit 160ea08 Author: Adeeb Shihadeh <[email protected]> Date: Sat Aug 31 13:09:58 2024 -0700 misra: bump to cppcheck 2.15.0 (commaai#2008) * misra: bump to latest cppcheck * update checkers commit a36ca22 Author: MarinkoMagla <[email protected]> Date: Sat Aug 31 22:01:28 2024 +0200 Defining types in return dictionaries (commaai#1923) * Defining types in return dictionaries * Correcting indent * Returning the class instead of dict * Fixing failing linter * Fixing whitespace error commit bd6cec3 Author: Robbe Derks <[email protected]> Date: Fri Aug 30 15:35:50 2024 +0200 cuatro LED (commaai#2005) * Revert "cuatro: disable LED for now" This reverts commit 866bd9c. * re-enable and make sure to use open-drain * use gpio function --------- Co-authored-by: Comma Device <[email protected]> commit 8587ae3 Author: Shane Smiskol <[email protected]> Date: Mon Aug 26 17:56:46 2024 -0700 drivers: log can core reset when switching multiplexing (commaai#1972) fdcan: log lost tx messages when resetting can core for multiplexing commit 0a09122 Author: Andrei Radulescu <[email protected]> Date: Tue Aug 27 03:25:15 2024 +0300 update bash scripts to #!/usr/bin/env bash (commaai#1987) * update bash shebang for better compatibility including macOS * can't have anything after #bash commit 2b94e4f Author: dzid26 <[email protected]> Date: Tue Aug 27 00:15:29 2024 +0000 Enable CAN3 printer (commaai#1991) * panda has 3 can peripherals * enable printing CAN3 commit 866bd9c Author: Adeeb Shihadeh <[email protected]> Date: Fri Aug 23 20:41:53 2024 -0700 cuatro: disable LED for now commit 30d0434 Author: Comma Device <[email protected]> Date: Fri Aug 23 04:57:34 2024 +0000 cuatro: disable SOM reset commit e53c802 Author: Adeeb Shihadeh <[email protected]> Date: Thu Aug 22 21:55:02 2024 -0700 tres: fix SOM reset line blinking (commaai#2003) Co-authored-by: Comma Device <[email protected]> commit 080e53f Author: Robbe Derks <[email protected]> Date: Sun Aug 18 17:43:27 2024 -0700 Cuatro fan (commaai#1999) * cuatro fan debugging * fix * faster fan, faster interrupts * fix comment --------- Co-authored-by: Comma Device <[email protected]> commit cfa8b79 Author: Adeeb Shihadeh <[email protected]> Date: Sun Aug 18 12:01:17 2024 -0700 cleanup dependencies (commaai#2001) * cleanup dependencies * in the real spot * fix jenkins commit c4e75ee Author: Adeeb Shihadeh <[email protected]> Date: Sun Aug 18 11:40:54 2024 -0700 remove cereal dependence (commaai#2000) * remove cereal * rm more shit * add back make * python3 * python3 * fix that * put that back * rename * fix that * can't move it commit e7a04b5 Author: Shane Smiskol <[email protected]> Date: Fri Aug 16 23:01:54 2024 -0700 make uds and isotp general imports (commaai#1998) commit 0234e75 Author: Robbe Derks <[email protected]> Date: Thu Aug 15 21:33:07 2024 -0700 STM32H7: add missing interrupt handlers (commaai#1997) add missing interrupts Co-authored-by: Comma Device <[email protected]> commit 87572e0 Author: geeth345 <[email protected]> Date: Tue Aug 13 18:34:46 2024 +0100 Update README.md to fix dead link (commaai#1996) Changed C++ library link to reflect boardd -> pandad change commit 1cbcc13 Author: Shane Smiskol <[email protected]> Date: Mon Aug 5 14:51:56 2024 -0700 use and configure custom logger (commaai#1994) * prepare to log logs * utils * discoverability * forgot commit 3c1def1 Author: commaci-public <[email protected]> Date: Fri Aug 2 15:51:37 2024 -0700 pre-commit: autoupdate hooks (commaai#1979) Update pre-commit hook versions Co-authored-by: adeebshihadeh <[email protected]> commit 5d81523 Author: Adeeb Shihadeh <[email protected]> Date: Fri Aug 2 13:52:28 2024 -0700 1min is all you need commit b70ba5e Author: Robbe Derks <[email protected]> Date: Fri Aug 2 20:26:16 2024 +0200 Detect H723 in firmware (commaai#1988) * determine H723 based on package type * wrong way round * misra... * enable SYSCFG clock before reading * whitelist certain package types commit ee7b385 Author: Adeeb Shihadeh <[email protected]> Date: Fri Aug 2 11:02:38 2024 -0700 CI: add jenkins-trigger commit daa739e Author: Shane Smiskol <[email protected]> Date: Wed Jul 31 14:30:53 2024 -0700 missed a busTime (commaai#1990) * whoops * addr dat src commit 8c3bb01 Author: Shane Smiskol <[email protected]> Date: Tue Jul 30 21:20:48 2024 -0700 deprecate busTime (commaai#1989) * deprecate busTime * fix test_comms.py * update opendbc * way more than i thought * and here * oops commit f637584 Author: Hoang Bui <[email protected]> Date: Wed Jul 17 23:49:10 2024 -0400 add `set_gas_pressed_prev()` helper (commaai#1986) add set_gas_pressed_prev helper commit 5ee262f Author: Adeeb Shihadeh <[email protected]> Date: Wed Jul 17 11:19:24 2024 -0700 H7 CR3 notes (commaai#1985) commit b4e3d5c Author: Adeeb Shihadeh <[email protected]> Date: Sun Jul 14 15:56:18 2024 -0700 Revert "H7: detect board type with second ID pin group (commaai#1975)" This reverts commit 376408b. commit 481d2be Author: pantew869 <[email protected]> Date: Sat Jul 13 23:34:25 2024 +0300 Use numpy instead of numpy-stubs in pre-commit (commaai#1984) * delete numpy-stubs from additional_dependencies(it's deprecated and causes git issues) * use numpy directly commit 376408b Author: Adeeb Shihadeh <[email protected]> Date: Wed Jun 26 18:20:51 2024 -0700 H7: detect board type with second ID pin group (commaai#1975) * H7: detect board type based on package * detect smps * misra fix * jungle? * pkg isn't reliable, need syscfg enabled --------- Co-authored-by: Comma Device <[email protected]> commit 29f2f30 Author: Adeeb Shihadeh <[email protected]> Date: Wed Jun 26 17:08:35 2024 -0700 jenkins: run jungles first (commaai#1977) * jenkins: run jungles first * inside stage commit ee1d5ce Author: Adeeb Shihadeh <[email protected]> Date: Wed Jun 26 16:59:08 2024 -0700 add assert_fatal function (commaai#1976) * add assert function * fix * flip * rename * assert fatal commit cac94e3 Author: JJ <[email protected]> Date: Tue Jun 25 06:53:31 2024 -0700 Update README.md (commaai#1974) small spelling fix commit 7287ff0 Author: Shane Smiskol <[email protected]> Date: Wed Jun 12 19:21:38 2024 -0700 query_fw_versions: ignore 29 bit addresses option (commaai#1973) fix
e7fc9db
to
b892a9c
Compare
2721b14
to
3493596
Compare
CI: test misra with RELEASE=1 Generates compile db without ALLOW_DEBUG
3493596
to
0c67ceb
Compare
Find
unusedFunctions
for Panda program. Allows to:Links: #1954 #1794 #1878