You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The linter gets confused between the builtin undefined keyword and an enum variant named undefined (which is perfectly legal), wanting me to add a safety comment.
To Reproduce
create enum with variant .undefined
use zlint
receive the following warning:
⚠ unsafe-undefined: `undefined` is missing a safety comment
╭─[src/main.zig:4:18]
4 │ const A = enum { undefined, hello };
· ─────────
╰────
help: Add a `SAFETY: <reason>` before this line explaining why this code is safe.
Expected behavior
there should be no safety lint triggered on the enum A.
Screenshots
see To Reproduce
Additional Context
This is unhelpful, as the API spec I'm working with defines enums with the value undefined, so changing it is not really a preferred option. I currently have ~30 warnings of this sort.
The text was updated successfully, but these errors were encountered:
Version
main @ 83d016d (after 0.6.3)
Describe the bug
The linter gets confused between the builtin
undefined
keyword and an enum variant namedundefined
(which is perfectly legal), wanting me to add a safety comment.To Reproduce
enum
with variant.undefined
zlint
Expected behavior
there should be no safety lint triggered on the enum A.
Screenshots
see
To Reproduce
Additional Context
This is unhelpful, as the API spec I'm working with defines enums with the value
undefined
, so changing it is not really a preferred option. I currently have ~30 warnings of this sort.The text was updated successfully, but these errors were encountered: