--- id: cmakelint version: "1.4.3" license: Apache 2.0 license_treatment: permissive maintenance: dormant --- # cmakelint — Static code checker for CMake files License: permissive · Maintenance: dormant · Downloads: 83.0K/mo ## What it is and what it does cmakelint is a static code checker for CMake files that enforces style and quality rules. It parses CMakeLists.txt and related CMake scripts, then reports violations across multiple categories: syntax errors, whitespace issues (indentation, tabs, line endings, extra whitespace), readability problems (mixed case, logic clarity), package consistency, and filename conventions. The tool is configured via command-line filters or a .cmakelintrc configuration file, and supports inline directives within CMake files to override rules on a per-file basis. It integrates into development workflows as a standalone command-line tool or as a pre-commit hook. With no runtime dependencies and a pure-Python wheel distribution, installation is straightforward. The package has been stable since its early releases and remains in production use, though active development has slowed. Use it for: - Enforce consistent CMake style across a project before committing code. - Integrate CMake linting into CI/CD pipelines to catch style violations early. - Set up pre-commit hooks to automatically check CMakeLists.txt files on each commit. - Audit existing CMake codebases for whitespace and naming convention violations. - Configure project-specific CMake rules via .cmakelintrc to match team standards. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. cmakelint parses CMake files and reports style violations across syntax, whitespace, readability, and naming conventions. Yes, if you maintain CMake projects and want automated style checking. The tool is lightweight, dependency-free, and permissively licensed. The dormant maintenance status is a minor concern for new features, but the stable codebase and lack of known vulnerabilities make it safe for ongoing use in established workflows. ## Install pip install cmakelint uv add cmakelint poetry add cmakelint ## Installing cmakelint Before you install: Low install friction with no runtime dependencies. Maintenance is dormant—last release was in May 2024—but the repository remains active and the package is marked Production/Stable. License in practice: Licensed under Apache 2.0 (permissive), allowing use in commercial and private projects with minimal restrictions. Quickstart: pip install cmakelint cmakelint CMakeLists.txt # With filters: cmakelint --filter=-whitespace/indent CMakeLists.txt Verify before relying: - Whether Python version constraints exist despite requires_python being unspecified. - Current status of pre-commit integration mentioned in the description. ## Package facts - License: Apache 2.0 (permissive) - Python support: unspecified - Install friction: low - Maintenance: dormant - Downloads: 83.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cmake linter, cmake style checker, cmake code quality, cmake static analysis, cmake lint tool, cmake format checker, cmake, linting, build-tools [View on SkillFed](https://skillfed.io/packages/cmakelint) · [View on PyPI](https://pypi.org/project/cmakelint/)