LinuxCommandLibrary

pio-check

Check PlatformIO project configuration and environments

TLDR

Perform a basic analysis check on the current project

$ pio check
copy

Perform a basic analysis check on a specific project
$ pio check [[-d|--project-dir]] [project_dir]
copy

Perform an analysis check for a specific environment
$ pio check [[-e|--environment]] [environment]
copy

Perform an analysis check and only report a specified defect severity type
$ pio check --severity [low|medium|high]
copy

Perform an analysis check and show detailed information when processing environments
$ pio check [[-v|--verbose]]
copy

SYNOPSIS

pio check [OPTIONS]

PARAMETERS

--help
    Show help message and exit.

--no-color
    Disable colorized output.

--verbose
    Enable verbose output.

DESCRIPTION

pio-check is a command-line utility provided by PlatformIO, an open-source ecosystem for IoT development. It's designed to diagnose common problems within the PlatformIO environment and help identify potential issues that might hinder project building, uploading, or overall functionality.

This tool performs various system checks, including verifying Python installation, checking for necessary dependencies (e.g., build tools), confirming network connectivity to PlatformIO resources, and inspecting the PlatformIO Core version. It aims to provide informative output, including error messages and suggested solutions, allowing users to quickly resolve configuration problems. In essence, pio-check helps ensure that your development environment is properly set up for successful PlatformIO-based projects.

The output is often color-coded to highlight warnings and errors, making it easier to identify and address the most pressing issues. This command is especially helpful when encountering unexpected errors during the build or upload process, as it can reveal underlying system-level problems that are not immediately apparent from the IDE or command-line output.

CAVEATS

The effectiveness of `pio-check` depends on the completeness of its built-in checks and may not catch all possible configuration issues. It primarily focuses on issues directly related to the PlatformIO environment and dependencies. Network access is required for some checks, particularly those related to version verification and remote resource access.

TROUBLESHOOTING

If pio-check identifies issues, carefully review the error messages and suggested solutions. Common problems include missing Python packages, outdated PlatformIO Core, firewall issues blocking access to PlatformIO servers, or incorrect environment variables. After addressing any identified problems, rerun pio-check to confirm that the issues have been resolved.

SEE ALSO

pio(1), pio upgrade(1)

Copied to clipboard