An opinionated linter for the Zig programming language.
Warning
This project is still very much under construction.
- ZLint has its own semantic analyzer, heavily inspired by the Oxc project, that is completely separate from the Zig compiler. This means that ZLint still checks and understands code that may otherwise be ignored by Zig due to dead code elimination.
- Pretty, detailed, and easy-to-understand error messages.
All lints and what they do can be found here.
Create a zlint.json
file in the same directory as build.zig
. This disables
all default rules, only enabling the ones you choose.
{
"rules": {
"no-undefined": "error",
"homeless-try": "warn"
}
}
If you have any rule ideas, please add them to the rule ideas board.
Interested in contributing code? Check out the contributing guide.