commaai / panda

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

Enabling misra-c2012-2.5 #1900

Open MarinkoMagla opened 5 months ago

MarinkoMagla commented 5 months ago

For https://github.com/commaai/panda/issues/1794

dzid26 commented 3 months ago

I don't think it was rerun after the merge. After fixing LED colors compilation error there are still few violations.

** PANDA F4 CODE **
Checking /home/dzid_/openpilot/panda/board/main.c ...
Checking /home/dzid_/openpilot/panda/board/main.c: __GNUC__=9;PANDA=1;STM32F4=1;STM32F413xx=1...
/home/dzid_/openpilot/panda/board/boards/white.h:8:0: style: misra violation (use --rule-texts=<file> to get proper output) [misra-c2012-2.5]
#define CAN_MODE_GMLAN_CAN3 2U
^
/home/dzid_/openpilot/panda/board/boards/white.h:11:0: style: misra violation (use --rule-texts=<file> to get proper output) [misra-c2012-2.5]
#define CAN_MODE_GMLAN_CAN2 1U
^
/home/dzid_/openpilot/panda/board/faults.h:12:0: style: misra violation (use --rule-texts=<file> to get proper output) [misra-c2012-2.5]
#define FAULT_INTERRUPT_RATE_GMLAN          (1UL << 6)   // deprecated
^
/home/dzid_/openpilot/panda/board/faults.h:18:0: style: misra violation (use --rule-texts=<file> to get proper output) [misra-c2012-2.5]
#define FAULT_INTERRUPT_RATE_EXTI           (1UL << 22)
^
nofile:0:0: information: Active checkers: 280/837 (use --checkers-report=<filename> to see details) [checkersReport]