Skip to content

Python Binding

The python binding for the cpp-linter-rs rust project (built using pyo3 and maturin).

Install

Install with pip:

pip install cpp-linter

Pre-releases are uploaded to test-pypi:

pip install -i https://test.pypi.org/simple/ cpp-linter

Usage

For usage in a CI workflow, see the cpp-linter/cpp-linter-action repository.

For the description of supported Command Line Interface options, see the CLI documentation.

Development

Build the binding with maturin:

maturin dev --manifest-path py-binding/Cargo.toml

Then invoke the executable script as a normal CLI app:

cpp-linter -help

Folder structure

Name Description
cpp_linter The pure python sources that wrap the rust binding. Typing information is located here.
src The location for all rust sources related to binding the cpp-linter library.
Cargo.toml Metadata about the binding's rust package (which is not intended to be published to crates.io).
pyproject.toml Metadata about the python package.
requirements-dev.txt The dependencies used in development (not needed for runtime/production).

Hidden files and folders are not described in the table above. If they are not ignored by a gitignore specification, then they should be considered important for maintenance or distribution.