Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
chore(codegen): improve generation-new-lintrule (#4749)
Browse files Browse the repository at this point in the history
  • Loading branch information
Conaclos authored Aug 2, 2023
1 parent a7dc713 commit 64dd18e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xtask/codegen/src/generate_new_lintrule.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,14 @@ impl Rule for {rule_name_upper_camel} {{
fn run(ctx: &RuleContext<Self>) -> Self::Signals {{
let binding = ctx.query();
let model = ctx.model();
binding.all_references(model).collect()
}}
fn diagnostic(_: &RuleContext<Self>, reference: &Self::State) -> Option<RuleDiagnostic> {{
Some(
RuleDiagnostic::new(
rule_category!(),
reference.syntax().text_trimmed_range(),
reference.range(),
markup! {{
"Variable is read here."
}},
Expand Down

0 comments on commit 64dd18e

Please sign in to comment.