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

Generate new lintrule #4749

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading