Skip to content

Instantly share code, notes, and snippets.

@ulgens
Last active June 18, 2026 08:58
Show Gist options
  • Select an option

  • Save ulgens/895a5cb7caf9432e7c22c814d3885ca2 to your computer and use it in GitHub Desktop.

Select an option

Save ulgens/895a5cb7caf9432e7c22c814d3885ca2 to your computer and use it in GitHub Desktop.
A simple but solid lint CI

The Problem

  • Fast, reliable and reproducible lint setup

The Common Approach

  • Black / flake8 / ruff called directly or within pre-commit
  • Not enforced on development machines
  • Duplicate setup on CI
    • Not all tools are wrapped
    • The config options / versions don't match Then;
  • Developers push code without applying linter fixes
  • CI fails unexpectedly
  • The project doesn't have a code standard
    • Mental cost of doing things increase significantly
    • New contributors are afraid to touch the code

Tools

Worst Offenders

Django

Langchain

Good Examples

djangoproject.com

cpython

Helpful templates

The Good, The Bad, and The Drama

Github vs others

prek vs pre-commit

A case againist pre-commit.ci

That also teaches people a bit of a team work and how important it is that even if it is a bit "less efficient" for them to fulfill all the expectation of the project/community they are contriibuting to, this makes the whole community better. That's another "educational aspect" of it - you should go extra mile as individual contributor to adhere to the community expectations, and I think failing check that makes you rebase and fix your PR has a good educational role here, much better than fire-and-forget and let someone else (be it CI or maintainer) to fix things for you.

How to manage updates?

IDE Integration

What about tox?

...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment