--- id: cppclean version: "0.13" license: Apache license license_treatment: permissive maintenance: abandoned --- # cppclean — Find problems in C++ source that slow development of large code bases. License: permissive · Maintenance: abandoned · Downloads: 106.4K/mo ## What it is and what it does cppclean is a static analysis tool for C++ that identifies problems in source code that can slow development cycles in large projects. It parses C++ headers and source files into an abstract syntax tree and detects issues like unused functions, methods, data members, and types; unnecessary forward declarations; undeclared definitions; and redundant #include directives. The tool reports inconsistent case in includes and can suggest removing headers that are not directly referenced. The parser is designed to handle real-world C++ code reasonably well, achieving about 99% success on Google's header files. Function bodies are tokenized rather than fully parsed into an AST. The tool runs from the command line and accepts multiple include paths to analyze. However, it has been unmaintained since 2019 and may not support modern C++ syntax or recent Python versions. Use it for: - Reduce compilation time in large C++ projects by identifying and removing unnecessary #include directives in header files. - Detect unused functions, methods, and data members that can be safely removed from a codebase. - Find classes with virtual methods but no virtual destructors, a common source of memory leaks in C++. - Identify global and static data that may cause threading issues in multi-threaded applications. - Locate undeclared function definitions and unnecessary forward declarations during code review. - Audit header files for inconsistent case in #include statements (e.g., foo.h vs Foo.h). ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. cppclean analyzes C++ source code to identify unused code, unnecessary includes, and structural problems that slow compilation in large codebases. No. The package is abandoned (last release 2019-07-30, no commits since 2022-07-26) and has high install friction. While it may still work for basic C++ analysis, the lack of maintenance means it will not support modern C++ standards or recent Python versions. For active C++ projects, consider maintained alternatives. ## Install pip install cppclean uv add cppclean poetry add cppclean ## Installing cppclean Before you install: High install friction: the package is distributed as a source tarball and has been abandoned since 2019. Last release was 2019-07-30, with no commits since 2022-07-26. License in practice: Licensed under Apache license (permissive), which allows commercial and private use with minimal restrictions, making it safe from a licensing standpoint for most projects. Quickstart: pip install --upgrade cppclean cppclean --include-path=directory1 --include-path=directory2 Requires a working C++ codebase to analyze; the tool parses C++ headers and source but does not compile or execute code. Verify before relying: - Whether the parser remains compatible with modern C++ standards given the last release was 2019-07-30. - Whether the tool works reliably with Python 3.10+ despite unspecified Python version support. - Current state of the planned features (unnecessary includes in source files, transitive includes, unused members). - Whether the tool still functions correctly with current Python interpreters after years without maintenance. ## Package facts - License: Apache license (permissive) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 106.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags C++ unused code detection, unnecessary include finder, C++ code analysis tool, compilation optimization C++, C++ static analysis, header file cleanup, C++ code quality checker, c++-analysis, static-analysis, build-optimization [View on SkillFed](https://skillfed.io/packages/cppclean) · [View on PyPI](https://pypi.org/project/cppclean/)