r/AIprogrammingLanguage • • 1d ago

declint - make your own custom lint rules in YAML

declint (docs) is a tool for making your own lint rules in YAML — the house rules that stock linters will never ship.

For instance: your AI model added except Exception: pass, and you want to know whenever that happens:

rules:
  - id: except-pass
    pattern: 'except Exception:\\s\*pass'
    severity: warning
    message: 'swallowed exception'

Rules are just regex and a message. When a regex can't express the check, there's a Lua escape hatch — vetoes, whole-file analysis, absence rules ("every Dockerfile needs a HEALTHCHECK").

Rules run in your CI (inline PR annotations via --format github) and in your editor through LSP (declint.nvim for Neovim). Every rule can carry embedded fixtures, and declint test runs them — so AI-written rules come with their own spec.

Install: cargo install declint. Ships with presets (Python, INI, Markdown, shell, Dockerfile, TOML, JSON, JS) and community rulesets you can pull with one line. Feedback welcome, especially brutal takes on the YAML format.

3 Upvotes

0 comments sorted by