diff --git a/classes/sca-cppcheck.bbclass b/classes/sca-cppcheck.bbclass index c2f000248..f861cc558 100755 --- a/classes/sca-cppcheck.bbclass +++ b/classes/sca-cppcheck.bbclass @@ -22,6 +22,8 @@ SCA_CPPCHECK_RUNMODE ?= "fast" SCA_CPPCHECK_MAX_CONFIG ?= "1" ## Config to use SCA_CPPCHECK_LIBRARY ?= "std.cfg" +## Check level - normal or exhaustive +SCA_CPPCHECK_CHECKLEVEL ?= "normal" SCA_RAW_RESULT_FILE[cppcheck] = "xml" @@ -127,6 +129,7 @@ python do_sca_cppcheck() { _args += ["--max-configs={}".format(d.getVar("SCA_CPPCHECK_MAX_CONFIG"))] _args += ["--enable=warning,style,performance,portability,information"] _args += ["-j", d.getVar("BB_NUMBER_THREADS")] + _args += ["--check-level={}".format(d.getVar("SCA_CPPCHECK_CHECKLEVEL"))] _args += ["--inline-suppr"] _args += ["-I", d.getVar("STAGING_INCDIR")] for item in _add_include: diff --git a/docs/conf/module/cppcheck.md b/docs/conf/module/cppcheck.md index a96df1a45..8bb07cb42 100644 --- a/docs/conf/module/cppcheck.md +++ b/docs/conf/module/cppcheck.md @@ -20,6 +20,7 @@ For further explanations on the variables see the manpage of cppcheck | SCA_CPPCHECK_EXTRA_FATAL | Extra error-IDs leading to build termination when found | space-separated-list | "" | SCA_CPPCHECK_CHECK_DEPTH | Depth of analysis - higher value = higher effort | int | "3" | SCA_CPPCHECK_ADD_INCLUDES | Additional paths leading to includes | space-separated-list | "" +| SCA_CPPCHECK_CHECKLEVEL | Check level - normal or exhaustive | space-separated-list | "normal" | SCA_BLOCKLIST_cppcheck | Blacklist filter for this tool | space-separated-list | "linux-*" ## Supports @@ -28,7 +29,7 @@ For further explanations on the variables see the manpage of cppcheck * [x] terminate build on fatal * [x] run on recipe * [ ] run on image -* [ ] available in SDK +* [x] available in SDK * [x] run with SCA-layer default settings (see SCA_AVAILABLE_MODULES) ## Requires