jazzband / django-waffle

A feature flipper for Django
https://waffle.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.12k stars 258 forks source link

Create command to remove unused data by checking existing code #493

Open cristianowa opened 9 months ago

cristianowa commented 9 months ago

This PR is related to the issue #492 .

The idea behind it is that in some cases the switches/flags/samples can be automatically removed by checking if they are present in the source code.

Parsing the code for that is implemented directly in Python using the standard lib to maximize compatibility.

The default behavior is to ask for a confirmation in each flag, but there is an override.

I've also checked the messages ./run.sh makemessages and there were no new ones, so I didn't updated those files.