commaai / panda

code powering the comma.ai panda
MIT License
1.52k stars 766 forks source link

Misra safety Check #1792

Closed bongbui321 closed 8 months ago

bongbui321 commented 8 months ago

For first part of #1770, add misra testing for safety files, enable misra-c2012-10.4

adeebshihadeh commented 8 months ago

Is this still a draft? If not, I'm not sure what it's supposed to do. The test already checks the safety files. Let me know if you need clarification on the issue.

bongbui321 commented 8 months ago

Yeah, so right now one of the test in ./test_mutation.py is failing - it doesn't show on GHA(not sure why), but right now I'm going to enable misrac-10.4 so that that test would pass and then the first part (board/safety/* files) will be done

bongbui321 commented 8 months ago

@adeebshihadeh Okay it is ready for review now, enable misrac 10.4 and all the tests ./test_mutation.py pass now

adeebshihadeh commented 8 months ago

@bongbui321 looks like there's a few different things going on in this PR that should be their own PR

I also formalized the bounty and wrote more instructions on enabling the rest of the MISRA rules: https://github.com/commaai/panda/issues/1794. Total bounty for all the rules is 28*$50 = $1.4k. There's probably a bunch of low hanging fruit in there, along with some tricky ones.