Skip to content

Static Checking Tools

There are a number of static checking tools build into ADORe intended to increase code quality. This article will outline the use of these tools within ADORe.

Cppcheck

Cppcheck is a static analysis tool for C++. More information on Cppcheck can be found at the following link https://cppcheck.sourceforge.io/

Basic Usage

Navigate to a supporting module and run the provided make target:

cd libadore
make cppcheck

You can run cppcheck for all supporting components by navigating to the root of the adore repository and running the provided make target:

cd adore
make cppcheck

Log Report

When you run cppcheck a log report will be generated with the following name: _cppcheck_report.log If you run make lint from the root of the adore repository all lint reports can be found in the .log directory in the root of the repository.

Cpplint

Cpplint is a command-line tool to check C/C++ files for style issues following Google's C++ style guide. More information on cpplint can be found at https://github.com/cpplint/cpplint

Basic Usage

Navigate to a supporting module and run the provided make target:

cd libadore
make lint

You can run cpplint for all supporting components by navigating to the root of the adore repository and running the provided make target:

cd adore
make lint

Log Report

When you run cpplint a log report will be generated with the following name: _lint_report.log If you run make lint from the root of the adore repository all lint reports can be found in the .log directory.

Lizard

Lizard is a code complexity static analysis tool. More information on lizard can be found at https://github.com/terryyin/lizard

Basic Usage

Navigate to a supporting module and run the provided make target:

cd libadore
make lizard

You can run lizard for all supporting components by navigating to the root of the adore repository and running the provided make target:

cd adore
make lizard

Log Report

When you run lizard a log report will be generated with the following name: _lizard_report.xml If you run make lint from the root of the adore repository all lint reports can be found in the .log directory.

lizard provides two log files namely, _lizard_report.xml and a human readable _lizard_report.log

Final note

Some but not all modules within adore provide static checking capabilities.