opinionated linting to keep your agent in check
// readme
ziglint
A linter for Zig source code.
Usage
ziglint [options] [paths...]
When run without arguments, ziglint looks for a .ziglint.zon config file and uses the paths specified there, or defaults to the current directory.
Directories are scanned recursively for .zig files.
Options
--zig-lib-path <path>- Override the path to the Zig standard library (auto-detected fromzig envif not specified)--only <rule>- Lint only the specified rule (e.g.,Z001). Can be repeated.--ignore <rule>- Ignore a rule (e.g.,Z001). Can be repeated.-h, --help- Show help message
Rules
| Code | Description |
|---|---|
| Z001 | Function names should be camelCase |
| Z002 | Avoid initialized variables that look like named discards |
| Z003 | Parse error with parser explanation |
| Z004 | Prefer type annotations with anonymous struct initializers |
| Z005 | Type function names should be PascalCase |
| Z006 | Variable names should be snake_case |
| Z007 | Duplicate import |
| Z009 | Files with top-level fields should be PascalCase |
| Z010 | Redundant type specifier; prefer .value over explicit type |
| Z011 | Deprecated method call |
| … |