3 ms·
How to build a pep8 like static analysis tool for Django?
There are tools like pyflakes and pep8.py, which tell you if the code you have written meets certain standards. I want to build a similar tool which does static analysis on Django and tells things when they dont meet standards. (Eg models should have a `__unicode__`.)
Questions:
1. Is it worth doing this? (Are there enough common things which an be tested for?)
2. Is there a good starting point? (Eg some app I can contribute to instead of starting my own.)
3. How do I proceed? (Eg. is using ast module a good idea for this?)
- dwightgunning 14y agoI'm an interested party (building an app in Django) but have next to zero knowledge on the topic. 1. Sounds like a good idea to me, assuming it doesn't already exist. 2. Do any of the existing tools have a plug-in/extension framework. Surely there's a lot of mechanical code to leverage. 3. Probably look at what the other projects use... convention will help gain support others who already have experience with similar analysis packages.
- JoachimSchipper 14y agoIs there a reason you're not trying to build on pyflakes/pep8.py? They already do at least some parsing... Otherwise, this does sound useful to Django users.