-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CMakeList to optionally build UT/Coverity; Update coverity con…
…figuration (#276) Update Coverity configuration to meet the latest coverity standard. Updated CMakelist to only build Coverity if required instead of building the CMock based unit tests as well. <!--- Title --> Description ----------- <!--- Describe your changes in detail. --> Test Steps ----------- <!-- Describe the steps to reproduce. --> Checklist: ---------- <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] I have tested my changes. No regression in existing tests. - [x] I have modified and/or added unit-tests to cover the code changes in this Pull Request. Related Issue ----------- <!-- If any, please provide issue ID. --> By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. --------- Co-authored-by: Soren Ptak <[email protected]>
- Loading branch information
1 parent
7b68936
commit 9a3edb6
Showing
3 changed files
with
83 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,40 @@ | ||
// MISRA C-2012 Rules | ||
|
||
{ | ||
version : "2.0", | ||
standard : "c2012", | ||
title: "Coverity MISRA Configuration", | ||
deviations : [ | ||
// Disable the following rules. | ||
{ | ||
deviation: "Directive 4.8", | ||
reason: "Allow inclusion of unused types. Header files for a specific port, which are needed by all files, may define types that are not used by a specific file." | ||
}, | ||
"version" : "2.0", | ||
"standard" : "c2012", | ||
"title": "Coverity MISRA Configuration", | ||
"deviations" : [ | ||
{ | ||
deviation: "Directive 4.9", | ||
reason: "Allow inclusion of function like macros. Logging is done using function like macros." | ||
"deviation": "Directive 4.8", | ||
"reason": "Allow inclusion of unused types. Header files for a specific port, which are needed by all files, may define types that are not used by a specific file." | ||
}, | ||
{ | ||
deviation: "Rule 2.3", | ||
reason: "Allow unused types. Library headers may define types intended for the application's use, but not used within the library files." | ||
"deviation": "Directive 4.9", | ||
"reason": "Allow inclusion of function like macros. Logging is done using function like macros." | ||
}, | ||
{ | ||
deviation: "Rule 2.4", | ||
reason: "Allow unused tags. Some compilers warn if types are not tagged." | ||
"deviation": "Rule 2.3", | ||
"reason": "Allow unused types. Library headers may define types intended for the application's use, but not used within the library files." | ||
}, | ||
{ | ||
deviation: "Rule 2.5", | ||
reason: "Allow unused macros. Library headers may define macros intended for the application's use, but not used by a specific file." | ||
"deviation": "Rule 2.4", | ||
"reason": "Allow unused tags. Some compilers warn if types are not tagged." | ||
}, | ||
{ | ||
deviation: "Rule 3.1", | ||
reason: "Allow nested comments. Documentation blocks contain comments for example code." | ||
"deviation": "Rule 2.5", | ||
"reason": "Allow unused macros. Library headers may define macros intended for the application's use, but not used by a specific file." | ||
}, | ||
{ | ||
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." | ||
"deviation": "Rule 3.1", | ||
"reason": "Allow nested comments. Documentation blocks contain comments for example code." | ||
}, | ||
{ | ||
deviation: "Rule 11.5", | ||
reason: "Allow casts from `void *`. The payload buffers are stored as `void *` and are cast to various types for use in functions." | ||
"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." | ||
}, | ||
{ | ||
"deviation": "Rule 11.5", | ||
"reason": "Allow casts from `void *`. The payload buffers are stored as `void *` and are cast to various types for use in functions." | ||
} | ||
] | ||
} | ||
|