r/ChatGPTCoding • u/ChiaraStellata • 20h ago
Resources And Tips Custom linters are powerful
Ask your agent to review your bug database and/or commit history and construct custom linters that statically detect common classes of bugs you've fixed in the past. Include some way of suppressing false positives then drive number of lint errors down to zero, adding regression tests along the way to prove the issues are real. Then refine your linters to be more precise and drive suppressions down as well, leaving only the most complex semantic suppressions. Run this in CI on both new changes and upstream rebases. Rely on robust linters built on sophisticated AST analysis rather than just fragile regexes, and as they start to share common underlying analyses, build them into a centralized pipeline that reuses intermediate analyses and intermediate representations to save runtime and LOC, much like a compiler. This is the path toward incremental formal mathematical verification of your codebase. (You can also condense down agent instructions that become statically enforced!)
I just did this on my codebase for the first time this holiday weekend and found literally hundreds of real issues in a legacy codebase. It's shocking.