Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Jul 17, 2024
1 parent cd3ba6a commit e60abcc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions xtask/rules_check/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
edition = "2021"
name = "rules_check"
publish = false
version = "0.0.0"
description = "Internal script to make sure that the metadata or the rules are correct"
edition = "2021"
name = "rules_check"
publish = false
version = "0.0.0"

[dependencies]
anyhow = { workspace = true }
Expand Down
10 changes: 5 additions & 5 deletions xtask/rules_check/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
use anyhow::{bail, ensure};
use biome_analyze::options::JsxRuntime;
use biome_analyze::{
AnalysisFilter, AnalyzerConfiguration, AnalyzerOptions, GroupCategory, Queryable,
RegistryVisitor, Rule, RuleCategory, RuleFilter, RuleGroup, RuleMetadata, ControlFlow
AnalysisFilter, AnalyzerConfiguration, AnalyzerOptions, ControlFlow, GroupCategory, Queryable,
RegistryVisitor, Rule, RuleCategory, RuleFilter, RuleGroup, RuleMetadata,
};
use biome_console::{markup, Console};
use biome_css_parser::CssParserOptions;
Expand Down Expand Up @@ -177,7 +177,7 @@ fn assert_lint(
},
);
}
has_error =true;
has_error = true;
bail!("Analysis of '{group}/{rule}' on the following code block returned multiple diagnostics.\n\n{code}");
}
} else {
Expand All @@ -191,7 +191,7 @@ fn assert_lint(
},
);
}
has_error =true;
has_error = true;
bail!("Analysis of '{group}/{rule}' on the following code block returned an unexpected diagnostic.\n\n{code}");
}
diagnostic_count += 1;
Expand Down Expand Up @@ -390,7 +390,7 @@ fn assert_lint(
"Analysis of '{group}/{rule}' on the following code block returned no diagnostics.\n\n{code}",
);
}

if has_error {
bail!("A code snippet must emit one single diagnostic, but it seems multiple diagnostics were emitted. Make sure that all the snippets inside the code block 'expect_diagnostic' emit only one diagnostic.")
}
Expand Down

0 comments on commit e60abcc

Please sign in to comment.