Skip to content

v0.6.2

Choose a tag to compare

@github-actions github-actions released this 14 Oct 00:02
· 24 commits to main since this release
v0.6.2
1a6238f

Fixes Z006 False Positives on 0.16 Type-Constructor Builtins

Z006 flagged every PascalCase alias built with a 0.16 type-constructor builtin
(@Int, @Pointer, @Struct, @Enum, @Union, @Tuple, @Fn,
@FieldType, @EnumLiteral). The builtin recognition list predated 0.16:
@Type was removed and replaced by these fine-grained constructors, and the
list was never updated for its replacements. Against the 0.16 standard
library, this release removes 24 Z006 false positives (5970 → 5946 reports)
and adds none.

Fixes

  • Z006 (missing type-constructor builtins): the type-returning builtin
    list recognized 7 of 14 builtins. It existed in three stale copies — the
    Linter type-expression check, the resolver builtin-call handling, and the
    resolver builtin type-ref check. All three now read one shared list:
    TypeResolver.isTypeReturningBuiltin.
  • Resolver (multi-argument builtin calls): only 0-2 argument builtin
    calls reached the resolver builtin handling. Constructors like @Struct
    take 4-5 arguments, so they resolved as unknown in module-graph mode.
  • Z006 (@typeInfo misclassified): the resolver treated @typeInfo as
    returning a type. It returns a std.builtin.Type value, so PascalCase
    bindings like const Info = @typeInfo(x); were silently allowed. They are
    flagged now.

Installation

mise use github:rockorager/ziglint