DEV Community

FROWNINGdev
FROWNINGdev

Posted on

I built a Django linter that never imports Django


Some background on why static: the drift check was the feature that convinced me. Django's own makemigrations --check is the right answer, but it needs every dependency installed and settings that import cleanly, so on a cold CI runner or a broken venv it simply can't run. Replaying migration files into a field set and diffing against models.py turned out to be enough to catch the dangerous direction (declared but never migrated) without any of that.

It's also fast: the model graphs of Zulip, Saleor, Wagtail, django CMS and Mezzanine parse together in about 20 ms on a laptop.

Top comments (0)