Skip to content

Commit

Permalink
sort rules
Browse files Browse the repository at this point in the history
  • Loading branch information
bartlomieju committed Nov 30, 2024
1 parent c8a32fd commit f2641c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/tools/lint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ fn collect_lint_files(
#[allow(clippy::print_stdout)]
pub fn print_rules_list(json: bool, maybe_rules_tags: Option<Vec<String>>) {
let rule_provider = LintRuleProvider::new(None, None);
let lint_rules = rule_provider
let mut lint_rules = rule_provider
.resolve_lint_rules(
LintRulesConfig {
tags: maybe_rules_tags.clone(),
Expand All @@ -454,6 +454,7 @@ pub fn print_rules_list(json: bool, maybe_rules_tags: Option<Vec<String>>) {
None,
)
.rules;
lint_rules.sort_by_cached_key(|rule| rule.code().to_string());

if json {
let json_output = serde_json::json!({
Expand Down

0 comments on commit f2641c2

Please sign in to comment.