Skip to content

Commit

Permalink
refactor: format with cargo format
Browse files Browse the repository at this point in the history
  • Loading branch information
ekusiadadus committed Sep 7, 2023
1 parent cadb422 commit 3c8ac3b
Show file tree
Hide file tree
Showing 53 changed files with 124 additions and 56 deletions.
2 changes: 1 addition & 1 deletion crates/biome_lsp/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use crate::extension_settings::ExtensionSettings;
use crate::extension_settings::CONFIGURATION_SECTION;
use crate::utils;
use anyhow::Result;
use biome_analyze::RuleCategories;
use futures::stream::futures_unordered::FuturesUnordered;
use futures::StreamExt;
use biome_analyze::RuleCategories;
use rome_console::markup;
use rome_fs::{FileSystem, OsFileSystem, RomePath};
use rome_service::workspace::{
Expand Down
2 changes: 1 addition & 1 deletion crates/biome_test_utils/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use json_comments::StripComments;
use biome_analyze::{AnalyzerAction, AnalyzerOptions};
use json_comments::StripComments;
use rome_console::fmt::{Formatter, Termcolor};
use rome_console::markup;
use rome_diagnostics::termcolor::Buffer;
Expand Down
2 changes: 1 addition & 1 deletion crates/rome_cli/src/execute/migrate.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use crate::execute::diagnostics::{ContentDiffAdvice, MigrateDiffDiagnostic};
use crate::{CliDiagnostic, CliSession};
use biome_migrate::{migrate_configuration, ControlFlow};
use rome_console::{markup, ConsoleExt};
use rome_diagnostics::{category, PrintDiagnostic};
use rome_fs::{FileSystemExt, OpenOptions};
use rome_json_parser::JsonParserOptions;
use rome_json_syntax::JsonRoot;
use biome_migrate::{migrate_configuration, ControlFlow};
use rome_rowan::AstNode;
use rome_service::workspace::FixAction;
use std::borrow::Cow;
Expand Down
4 changes: 3 additions & 1 deletion crates/rome_js_analyze/src/analyzers/a11y/no_access_key.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::JsRuleAction;
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_syntax::{jsx_ext::AnyJsxElement, JsxAttribute, JsxAttributeList};
Expand Down
4 changes: 3 additions & 1 deletion crates/rome_js_analyze/src/analyzers/a11y/no_auto_focus.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::JsRuleAction;
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_syntax::{jsx_ext::AnyJsxElement, JsxAttribute};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_syntax::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_syntax::{JsRegexLiteralExpression, JsSyntaxKind, JsSyntaxToken, TextRange, TextSize};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_syntax::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::JsRuleAction;
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::JsRuleAction;
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::JsRuleAction;
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_syntax::{JsContinueStatement, JsLabeledStatement, JsSyntaxKind, JsSyntaxNode};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{cmp::Ordering, collections::VecDeque, num::NonZeroU32, vec::IntoIter};

use roaring::bitmap::RoaringBitmap;
use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic};
use roaring::bitmap::RoaringBitmap;
use rome_control_flow::{
builder::BlockId, ExceptionHandler, ExceptionHandlerKind, Instruction, InstructionKind,
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use bpaf::Bpaf;
use biome_analyze::{
context::RuleContext, declare_rule, AddVisitor, Phases, QueryMatch, Queryable, Rule,
RuleDiagnostic, ServiceBag, Visitor, VisitorContext,
};
use bpaf::Bpaf;
use rome_console::markup;
use rome_deserialize::{
json::{has_only_known_keys, VisitJsonNode},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::JsRuleAction;
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_syntax::{AnyJsModuleItem, JsExport, JsModuleItemList, JsSyntaxToken};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::JsRuleAction;
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_syntax::{AnyJsStatement, JsBlockStatement, JsElseClause, JsIfStatement};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::JsRuleAction;
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::JsRuleAction;
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_syntax::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::JsRuleAction;
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
4 changes: 3 additions & 1 deletion crates/rome_js_analyze/src/analyzers/style/use_template.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
4 changes: 3 additions & 1 deletion crates/rome_js_analyze/src/analyzers/style/use_while.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_syntax::JsDebuggerStatement;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::JsRuleAction;
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_syntax::{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::JsRuleAction;
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic};
use biome_analyze::{
context::RuleContext, declare_rule, ActionCategory, Ast, Rule, RuleDiagnostic,
};
use rome_console::markup;
use rome_diagnostics::Applicability;
use rome_js_factory::make;
Expand Down
2 changes: 1 addition & 1 deletion crates/rome_js_analyze/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ use crate::semantic_analyzers::nursery::use_naming_convention::{
use crate::semantic_analyzers::style::no_restricted_globals::{
restricted_globals_options, RestrictedGlobalsOptions,
};
use bpaf::Bpaf;
use biome_analyze::options::RuleOptions;
use biome_analyze::RuleKey;
use bpaf::Bpaf;
use rome_deserialize::json::VisitJsonNode;
use rome_deserialize::{DeserializationDiagnostic, VisitNode};
use rome_json_syntax::{AnyJsonValue, JsonLanguage, JsonMemberName, JsonObjectValue};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::react::hooks::*;
use crate::semantic_services::Semantic;
use bpaf::Bpaf;
use biome_analyze::{context::RuleContext, declare_rule, Rule, RuleDiagnostic};
use bpaf::Bpaf;
use rome_console::markup;
use rome_deserialize::json::{has_only_known_keys, VisitJsonNode};
use rome_deserialize::{DeserializationDiagnostic, VisitNode};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use crate::{
utils::rename::{AnyJsRenamableDeclaration, RenameSymbolExtensions},
JsRuleAction,
};
use bpaf::Bpaf;
use biome_analyze::{context::RuleContext, declare_rule, ActionCategory, Rule, RuleDiagnostic};
use bpaf::Bpaf;
use rome_console::markup;
use rome_deserialize::{
json::{has_only_known_keys, with_only_known_variants, VisitJsonNode},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::semantic_services::SemanticServices;
use bpaf::Bpaf;
use biome_analyze::context::RuleContext;
use biome_analyze::{declare_rule, Rule, RuleDiagnostic};
use bpaf::Bpaf;
use rome_console::markup;
use rome_deserialize::json::{has_only_known_keys, VisitJsonNode};
use rome_deserialize::{DeserializationDiagnostic, VisitNode};
Expand Down
2 changes: 1 addition & 1 deletion crates/rome_js_analyze/tests/spec_tests.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use biome_analyze::{AnalysisFilter, AnalyzerAction, ControlFlow, Never, RuleFilter};
use biome_test_utils::{
assert_errors_are_absent, code_fix_to_string, create_analyzer_options, diagnostic_to_string,
has_bogus_nodes_or_empty_slots, parse_test_path, register_leak_checker, scripts_from_json,
write_analyzer_snapshot, CheckActionType,
};
use biome_analyze::{AnalysisFilter, AnalyzerAction, ControlFlow, Never, RuleFilter};
use rome_diagnostics::advice::CodeSuggestionAdvice;
use rome_diagnostics::{DiagnosticExt, Severity};
use rome_js_parser::{parse, JsParserOptions};
Expand Down
2 changes: 1 addition & 1 deletion crates/rome_js_transform/tests/spec_tests.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use biome_analyze::{AnalysisFilter, AnalyzerTransformation, ControlFlow, Never, RuleFilter};
use biome_test_utils::{
assert_errors_are_absent, create_analyzer_options, diagnostic_to_string,
has_bogus_nodes_or_empty_slots, register_leak_checker, scripts_from_json,
write_transformation_snapshot,
};
use biome_analyze::{AnalysisFilter, AnalyzerTransformation, ControlFlow, Never, RuleFilter};
use rome_js_formatter::context::JsFormatOptions;
use rome_js_formatter::format_node;
use rome_js_parser::{parse, JsParserOptions};
Expand Down
Loading

0 comments on commit 3c8ac3b

Please sign in to comment.