Flag Sweeper
Automates the cleanup of feature flags in various programming languages by replacing flag calls with their configured final values.
Acerca de
Feature flags are essential for modern software development but often lead to significant technical debt through 'dead flags' that clutter codebases, increase complexity, and introduce bugs. Flag Sweeper offers a solution as a Model Context Protocol (MCP) server that leverages Polyglot Piranha. It automatically identifies and transforms feature flag calls in your code into their final, stable values, as defined in a `flags.json` configuration. This process effectively cleans the codebase, allowing compilers and optimizers to perform dead code elimination, thereby improving maintainability, readability, and performance. The tool aims to integrate with live feature flag systems for fully automated, safe flag removal.
Características Principales
- Automated feature flag cleanup using Polyglot Piranha
- Configurable flag states and detection patterns via `flags.json`
- Support for multiple programming languages (Go, Java, Python, JavaScript/TypeScript, C#)
- Transforms feature flag calls into static values for dead code elimination
- Functions as an MCP server for integration with development environments
- 1 GitHub stars
Casos de Uso
- Reducing technical debt associated with stale or deprecated feature flags
- Automating code refactoring to improve maintainability and readability
- Enhancing application performance by eliminating runtime flag evaluations