Add CodeSonar example directory

This commit is contained in:
Mark Hermeling 2024-05-23 15:58:20 +00:00
parent 27c4feff66
commit 940dad1d0c
4 changed files with 319 additions and 0 deletions

View file

@ -0,0 +1,108 @@
# "deviation": "Rule 3.1",
# "reason": "We post HTTP links in code comments which contain // inside comments blocks."
WARNING_FILTER += discard class="/* in Comment" language=c
WARNING_FILTER += discard class="// in Comment" language=c
# "deviation": "Rule 14.4",
# "reason": "do while( 0 ) pattern is used in macros to prevent extra semi-colon."
WARNING_FILTER += discard class="Condition Is Not Boolean" language=c
# "deviation": "Directive 4.4",
# "reason": "Code snippet is used in comment to help explanation."
WARNING_FILTER += discard class="Commented-out Code" language=c
# "deviation": "Directive 4.5",
# "reason": "discard names that MISRA considers ambiguous."
WARNING_FILTER += discard class="Typographically Ambiguous Identifiers" language=c
# "deviation": "Directive 4.6",
# "reason": "discard port to use primitive type with typedefs."
WARNING_FILTER += discard class="Basic Numerical Type Used" language=c
# "deviation": "Directive 4.9",
# "reason": "FreeRTOS-Kernel is optimised to work on small micro-controllers. To achieve that, function-like macros are used."
WARNING_FILTER += discard class="Function-Like Macro" language=c
# "deviation": "Rule 2.3",
# "reason": "FreeRTOS defines types which is used in application."
WARNING_FILTER += discard class="Unused Type" language=c
# "deviation": "Rule 2.4",
# "reason": "discard to define unused tag."
WARNING_FILTER += discard class="Unused Tag" language=c
# "deviation": "Rule 2.5",
# "reason": "discard to define unused macro."
WARNING_FILTER += discard class="Unused Macro" language=c
# "deviation": "Rule 5.9",
# "reason": "discard to define identifier with the same name in structure and global variable."
WARNING_FILTER += discard class="Library Function Override" language=c
WARNING_FILTER += discard class="Non-unique Identifiers: Internal Name" language=c
# "deviation": "Rule 8.7",
# "reason": "API functions are not used by the library outside of the files they are defined; however, they must be externally visible in order to be used by an application."
WARNING_FILTER += discard class="Scope Could Be File Static" language=c
WARNING_FILTER += discard class="Scope Could Be Local Static" language=c
WARNING_FILTER += discard class="Declaration of Flexible Array Member" language=c
# "deviation": "Rule 8.9",
# "reason": "Allow to object to be defined in wider scope for debug purpose."
WARNING_FILTER += discard class="Scope Could Be Local Static" language=c
# "deviation": "Rule 8.13",
# "reason": "Allow to not to use const-qualified type for callback function."
WARNING_FILTER += discard class="Pointed-to Type Could Be const" language=c
# "deviation": "Rule 11.4",
# "reason": "Allow to convert between a pointer to object and an interger type for stack alignment."
WARNING_FILTER += discard class="Conversion: Pointer/Integer" language=c
# "deviation": "Rule 15.4",
# "reason": "Allow to use multiple break statements in a loop."
WARNING_FILTER += discard class="Multiple Abnormal Loop Exits" language=c
# "deviation": "Rule 15.5",
# "reason": "Allow to use multiple points of exit."
WARNING_FILTER += discard class="Misplaced Return Statement" language=c
WARNING_FILTER += discard class="Multiple Return Statements" language=c
# "deviation": "Rule 17.8",
# "reason": "Allow to update the parameters of a function."
WARNING_FILTER += discard class="Modified Parameter" language=c
# "deviation": "Rule 18.4",
# "reason": "Allow to use pointer arithmetic."
WARNING_FILTER += discard class="Pointer Arithmetic" language=c
# "deviation": "Rule 19.2",
# "reason": "Allow to use union."
WARNING_FILTER += discard class="Bit-field in Union" language=c
WARNING_FILTER += discard class="Union Type" language=c
# "deviation": "Rule 20.5",
# "reason": "Allow to use #undef for MPU wrappers."
WARNING_FILTER += discard class="Macro Undefinition of Reserved Name" language=c
WARNING_FILTER += discard class="Use of #undef" language=c
#Difference from the Coverity set
#"deviation": "Rule 1.1",
#"reason": "-Wall and -Werror throws errors for unused functions and a lot more"
WARNING_FILTER += discard class="Not All Warnings Are Enabled"
WARNING_FILTER += discard class="Warnings Not Treated As Errors"
#"deviation" : "Rule 20.1"
#"reason" : "Some code before inclusion of board specific files"
WARNING_FILTER += discard class="Code Before #include"
#"deviation": "Rule 20.2",
#"reason": "Some include paths come from different directories"
WARNING_FILTER += discard class="Dangerous Include File Name"
# we want to use _Noreturn to satisfy 17.11
WARNING_FILTER += discard class="Use of Noreturn"