Repository navigation
v0.7.1
Fixes Z011 Coverage in Type Positions and Stdlib Aliases
Z011 reported deprecated calls reached by the recursive AST walk, but that walk
stops at function signatures, container fields, and type wrappers. A
std.meta.Int() call in a return type or struct field passed without a
warning, while the same call in a function body was reported.
Fixes
- Z011 (type positions): the rule now sweeps the node table for call
nodes, so every call is checked exactly once regardless of position. This
covers function return types, parameter types, struct fields, optional,
pointer, and array wrappers, return expressions, switch prongs, and
array/struct initializers. - Z011 (stdlib aliases):
const copy = std.mem.copyBackwards; copy(...)is reported. Local aliases between functions were already
followed; aliases whose target lives in the stdlib were not. - Z011 (Zig 0.16
std.meta):std.meta.Int(use@Int) and
std.meta.Tuple(use@Tuple) are the two deprecated constructors in the
0.16 standard library. Both are now detected in every position.
The wider sweep found 21 calls to the deprecated std.mem.indexOf,
indexOfScalar, and indexOfPos aliases in ziglint itself, hidden under
orelse and or expressions. They now use find, findScalar, and
findPos.
Installation
mise use github:rockorager/ziglint@v0.7.1