A lot of linters
AI agents have become extra team members these days. Besides humans, AI agents are on the team, whether to help, discuss, code or perform tasks autonomously.
But how do you make sure the code it produces meets the standards the project team wants? Of course, there are tests, static analysers and code reviews. But as the title suggests, I want to cover another category: linters. They are easy to add to your existing pipelines and cheap to run.
A linter takes one or more files and checks for syntax errors, invalid schemas or deprecated structures.
Most tools I use have some sort of linter. For example: Terraform (tflint) and Composer (composer validate). But are there more? Yes, there are.
I've added as many linters to my dotfiles as I could find: github.com/martijngastkemper/dotfiles/blob/main/.github/workflows/linting.yml. Suggestions are, of course, welcome.
Text continues below the imageText continues below the image
I'm not going to describe them all, but here are some personal highlights:
- Markdown is covered by both
editorconfig-checkerandmarkdownlint. I disabled themax_line_lengthrule in EditorConfig Checker, because markdownlint can do that. markdownlint has a neat feature: it checks line length while respecting URLs. A Markdown line containing a URL can be very long. Breaking at a fixed length doesn't improve readability and could cause issues with rendering. skills-lintis a token budget linter for agent skills. Very handy to warn developers when a skill starts taking too many tokens.markdown-link-checkeris exactly what you expect it to be. I want to emphasize its importance because more and more AI-generated documentation is added to repositories. You don't want it to contain broken links. This helps prevent documentation degradation.
What I like about linters is their independence from AI models. When a model changes, the linter stays the same. But when a language or tool changes, the linter changes too. That makes them stable insurance for any pipeline.
Further reading: Tips to make your codebase future developer friendly