3.1.5. Waf Tool Cppcheck

The tool is located in tools/waf-tools.

3.1.5.1. Tool Documentation

Implements a waf tool to configure Cppcheck

For information on Cppcheck see http://cppcheck.sourceforge.net/.

f_cppcheck.add_cppcheck_task(self)

Task creator for cppcheck

f_cppcheck.configure(conf)

configuration step of the Cppcheck waf tool

  • Find cppcheck

  • Search for the MISRA-C rules text

class f_cppcheck.cppcheck(*args: Any, **kwargs: Any)

Bases: waflib.Task.

Call cppcheck

always_run = True

Cppcheck handles the need for a re-run, so always run this task

Type

str

color = 'GREEN'

color in which the command line is displayed in the terminal

Type

str

run_str = ('${CPPCHECK} --project=${CPPCHECK_MAIN_PROJECT_FILE} --cppcheck-build-dir=. --exitcode-suppressions=${CPPCHECK_RULE_SUPPRESSION_FILE} -f --std=c99 --enable=warning,style,performance,portability,information,unusedFunction --addon=${CPPCHECK_ADDON_CNF_MISRA} --error-exitcode=${CPPCHECK_EXITCODE_FAIL} --suppressions-list=${CPPCHECK_RULE_SUPPRESSION_FILE}',)

string to be interpolated to create the command line to run cppcheck.

Type

str

f_cppcheck.options(opt)

Defines options that can be passed to cppcheck tool