3.1.7. Cppcheck

The tool is located in tools/waf-tools.

3.1.7.1. Tool Documentation

Implements a waf tool to configure Cppcheck

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

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

Bases: waflib.Task.

Compiles the cppcheck template for the provided setup

run()

Replaces the configuration variables

f_cppcheck.configure(conf)

configuration step of the Cppcheck waf tool

  • Find cppcheck

  • Search for the MISRA-C rules text

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

Bases: waflib.Task.

Configures the misra addon

run()

Actual configuration step

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

Bases: waflib.Task.

Copies the suppression file to the build directory

run()

Copies the file

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

Bases: waflib.Task.

The actual cppcheck task

run()

Runs cppcheck with the provided configuration.

f_cppcheck.options(opt)

Defines options that can be passed to cppcheck tool