Skip to main content

aidiff-lint

Linter independiente (sin dependencias de terceros) para diffs de Git generados por agentes de codificacion IA (Kimi, Aider, Copilot, Cursor, etc.).

Detecta patrones de falla recurrentes que no son errores de sintaxis evidentes, pero rompen la compilacion, el renderizado, o introducen basura en la base de codigo:

  • Inyeccion de caracteres CJK en docstrings/comentarios.
  • Cadenas Django ORM alucinadas (Model.field.related_model.objects).
  • Tags de Django templates rotos o desbalanceados (incluyendo cierres eliminados por el propio diff, no solo agregados).
  • Tags HTML estructurales rotos o duplicados.
  • "Smells" de templates Django: URLs de admin hardcodeadas, target="_blank" sin rel="noopener noreferrer", formularios POST sin {% csrf_token %}.
  • Cadenas de atributos sospechosamente profundas a traves de objetos tipo diccionario (alert.metadata.batch.id) que fallan en silencio en templates Django.

Instalacion

pip install -e ".[dev]"

Uso

aidiff-lint                      # unstaged changes
aidiff-lint --staged             # staged changes
aidiff-lint --commit <hash>      # un commit especifico
aidiff-lint --range <a>..<b>     # un rango de commits
aidiff-lint --diff-file path.diff
aidiff-lint --repo /ruta/al/repo

Exit codes

  • 0: sin hallazgos ERROR (puede haber WARNING).
  • 1: al menos un hallazgo ERROR.
  • 2: error de uso/ejecucion.

Tests

pytest tests/ -v

Metadata

Release files for aidiff-lint 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aidiff-lint 0.1.0
File Size Uploaded
aidiff_lint-0.1.0.tar.gz 16.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aidiff-lint 0.1.0
File Interpreter ABI Platform
aidiff_lint-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 28.4 kB

Release files / aidiff_lint-0.1.0.tar.gz

Download URL aidiff_lint-0.1.0.tar.gz
Size 16.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f75dee470716f6fa1161cefcd1ddebb7afa14bc7a1a44cb060ca7c62a5a357f8
BLAKE2b-256 checksum
How to use checksums
ecd04d34af8cc9e7ed5fbe1aac0221b4aa75a35402c4efa090fe0c6dd179ed75
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

Release files / aidiff_lint-0.1.0-py3-none-any.whl

Download URL aidiff_lint-0.1.0-py3-none-any.whl
Size 12.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
caac4648c93b0ecd515dedbe220037b11d88afcc13488f6c8fc6005ae0ed377a
BLAKE2b-256 checksum
How to use checksums
6e8e1f265e9372f0cccc0fceb4940ce051d819883a1e986a47d8b6203fd2be52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page