platformio check

Helper command for PIO Check.

Usage

platformio check [OPTIONS]
pio check [OPTIONS]

Description

Perform static analysis check on PlatformIO based project. By default Cppcheck analysis tool is used.

More details about PlatformIO PIO Check.

Options

-e, --environment

Process specified environments.

--filter

Normally a program has many source files. By default only src_dir and include_dir are checked. You can specify which source files should be included/excluded from check process. The paths in filter should be relative to the root of a project.

Multiple --filter options are allowed.

Example: platformio check --filter "-<*> +<src/> +<tests/>"

--flags

Specify additional flags that need to be passed to the analysis tool. If multiple tools set in check_tool option, the flags are passed to all of them. Individual flags for each tool can be added using a special suffix with the tool name.

Flag Meaning
--addon=<addon> Execute addon. i.e. cert.
-D<ID> Define preprocessor symbol.

Multiple --flags options are allowed.

Example: platformio check --flags "-DDEBUG cppcheck: --std=c++11  --platform=avr8"

--severity

Specify the Defect severity types which will be reported by the Check tools.

Multiple --severity options are allowed.

-d, --project-dir

Specify the path to project directory. By default, --project-dir is equal to the current working directory (CWD).

-c, --project-conf

Process project with a custom “platformio.ini” (Project Configuration File).

--json-output

Return the output in JSON format.

-s, --silent

Suppress progress reporting and show only defects with high severity. See Defect severity.

-v, --verbose

Show detailed information when processing environments.

This option can also be set globally using force_verbose setting or by environment variable PLATFORMIO_SETTING_FORCE_VERBOSE.

Examples

For the examples please follow to PIO Check page.