The java sdk supports automated code cleanup using the Flag Cleanup drone plugin. See here for detailed docs on usage of the plugin.
- View the example file and observe the if else block using our feature flag
STALE_FLAG - Run the flag cleanup plugin from this directory. This can be done by running the following docker container
docker run -v ${PWD}:/java-sdk -e PLUGIN_DEBUG=true -e PLUGIN_PATH_TO_CODEBASE="/java-sdk" -e PLUGIN_PATH_TO_CONFIGURATIONS="/java-sdk/config" -e PLUGIN_LANGUAGE="java" -e PLUGIN_SUBSTITUTIONS="stale_flag_name=STALE_FLAG,treated=true,treated_complement=false" harness/flag_cleanup:latest
- Observe that the
if elseblock forSTALE_FLAGhas been removed from the code and the flag is now treated as globally true.
For more rules.toml examples see the test cases here
