{"id":13732367,"url":"https://github.com/myint/cppclean","last_synced_at":"2025-05-15T18:11:18.142Z","repository":{"id":8732289,"uuid":"10406568","full_name":"myint/cppclean","owner":"myint","description":"Finds problems in C++ source that slow development of large code bases","archived":false,"fork":false,"pushed_at":"2022-07-26T14:09:22.000Z","size":826,"stargazers_count":708,"open_issues_count":60,"forks_count":59,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-05-09T17:19:40.762Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/cppclean","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myint.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-31T14:31:46.000Z","updated_at":"2025-05-07T05:58:49.000Z","dependencies_parsed_at":"2022-07-26T17:32:26.321Z","dependency_job_id":null,"html_url":"https://github.com/myint/cppclean","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myint%2Fcppclean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myint%2Fcppclean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myint%2Fcppclean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myint%2Fcppclean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myint","download_url":"https://codeload.github.com/myint/cppclean/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254394724,"owners_count":22063984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T02:01:54.481Z","updated_at":"2025-05-15T18:11:18.122Z","avatar_url":"https://github.com/myint.png","language":"Python","readme":"========\ncppclean\n========\n\n.. image:: https://travis-ci.org/myint/cppclean.svg?branch=master\n   :target: https://travis-ci.org/myint/cppclean\n   :alt: Build status\n\n\nGoal\n====\n\ncppclean attempts to find problems in C++ source that slow development\nin large code bases, for example various forms of unused code.\nUnused code can be unused functions, methods, data members, types, etc\nto unnecessary #include directives. Unnecessary #includes can cause\nconsiderable extra compiles increasing the edit-compile-run cycle.\n\nThis is a fork of the original cppclean project. The original project home\npage, which no longer contains code, is at https://code.google.com/p/cppclean/.\n\n\nFeatures\n========\n\ncppclean finds the following:\n\n- Classes with virtual methods, no virtual destructor, and no bases\n- Global/static data that are potential problems when using threads\n- Functions that are declared but not defined\n- Unnecessary forward class declarations\n- Unnecessary function declarations\n- Undeclared function definitions\n- Unnecessary #includes in header files\n    - No direct reference to anything in the header\n    - Header is unnecessary if classes were forward declared instead\n- Inconsistent case in #includes (``foo.h`` versus ``Foo.h``)\n- (planned) Unnecessary #includes in source files\n- (planned) Source files that reference headers not directly #included,\n  ie, files that rely on a transitive #include from another header\n- (planned) Unused members (private, protected, \u0026 public) methods and data\n- (planned) ``using namespace std`` in header files\n- (planned) Methods that are declared but not defined\n\nAST is Abstract Syntax Tree, a representation of parsed source code\n(https://en.wikipedia.org/wiki/Abstract_syntax_tree).\n\n\nInstallation\n============\n\n::\n\n    $ pip install --upgrade cppclean\n\n\nRun\n===\n\n::\n\n    $ cppclean \u003cpath\u003e\n\n\nMultiple include paths can be specified::\n\n    $ cppclean --include-path=directory1 --include-path=directory2 \u003cpath\u003e\n\n\nCurrent status\n==============\n\nThe parser works pretty well for header files, parsing about 99% of Google's\nheader files. Anything which inspects structure of C++ source files should\nwork reasonably well. Function bodies are not transformed to an AST,\nbut left as tokens.\n\n\nNon-goals\n=========\n\n- Parsing all valid C++ source\n- Handling invalid C++ source gracefully\n- Compiling to machine code (or anything beyond an AST)\n\n\nLinks\n=====\n\n* Coveralls_\n\n.. _`Coveralls`: https://coveralls.io/r/myint/cppclean\n","funding_links":[],"categories":["Tools"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyint%2Fcppclean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyint%2Fcppclean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyint%2Fcppclean/lists"}