TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How to build a pep8 like static analysis tool for Django?

7 pointsby shabdaabout 13 years ago
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__`.)<p>Questions:<p>1. Is it worth doing this? (Are there enough common things which an be tested for?)<p>2. Is there a good starting point? (Eg some app I can contribute to instead of starting my own.)<p>3. How do I proceed? (Eg. is using ast module a good idea for this?)

2 comments

dwightgunningabout 13 years ago
I'm an interested party (building an app in Django) but have next to zero knowledge on the topic.<p>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.
JoachimSchipperabout 13 years ago
Is there a reason you're not trying to build on pyflakes/pep8.py? They already do at least <i>some</i> parsing...<p>Otherwise, this does sound useful to Django users.