error bad-allow
Неверный @allow(lint: …): причина обязательна.
What it means#
@allow(lint: <rule>, reason: "...") silences one analyzer rule for the declaration that carries it. Both arguments are required: lint is a rule name (scatter-gather, written as an identifier with hyphens or as a string) and reason a non-empty string literal. Only rules that report warnings can be suppressed; a rule whose diagnostics are errors cannot. (@allow(role: …) on an rpc is the access rule of §13.4 and is a different attribute form.)
Example#
@allow(lint: magic-literal) // <- bad-allow
fn pause() time { sleep(20ms) }error
bad-allow
How to fix#
Give the reason, and name a rule that reports warnings.
@allow(lint: magic-literal, reason: "tuned together with wait()")
fn pause() time { sleep(20ms) }