{"repo":"OldJii/dead-code-pruner","free":true,"listed":false,"github":"https://github.com/OldJii/dead-code-pruner","clone":"git clone https://github.com/OldJii/dead-code-pruner.git","description":"Conservative multi-language dead-code elimination with tree-sitter: feature flag cleanup, constant folding, branch cleanup, method pruning, and dynamic-entry protection.","language":"Python","stars":109,"topics":["android","code-cleanup","constant-folding","dead-code","developer-tools","java","kotlin","refactoring","static-analysis","boolean-simplification"],"license":"MIT","category":"dev-tools","readme_excerpt":"dead-code-pruner dead-code-pruner is a conservative source-level dead-code cleanup tool powered by tree-sitter. Give it a set of expressions that are permanently true or false . It propagates those facts through the source tree, simplifies the resulting control flow, and removes declarations and files that become provably unused. The tool currently understands Java, Kotlin, Go, Swift, and Dart. It is designed for Android, JVM services, Go services, iOS, and Flutter repositories, including multi-module projects. What It Can Clean Starting from configured constants, the tool can produce source changes such as: - Replace retired feature flags and compile-time conditions with boolean literals. - Simplify boolean expressions, negations, equality checks, short-circuit expressions, ternaries, and language-specific conditional expressions. - Remove dead if branches and code that becomes unreachable after return , throw , break , or continue . - Propagate immutable local booleans and remove their declarations after all uses disappear. - Inline zero-argument methods that always return true or false , then continue cleaning the newly exposed branches. - Remove empty methods, unused constant-return helpers, and their safe call sites. - Remove unused immutable fields when project-wide references and project-boundary rules prove that deletion is safe. - Remove unreferenced empty classes and source files left with no declarations. - Repeat cascading cleanup until no further source changes c","default_branch":null,"files":null,"tree":[],"storefront":"/r/OldJii","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/OldJii/dead-code-pruner/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}