diff --git a/Cargo.lock b/Cargo.lock index 6ee93129be2..7296ea69e5b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1910,6 +1910,7 @@ dependencies = [ "rome_js_parser", "rome_js_semantic", "rome_js_syntax", + "rome_json_formatter", "rome_json_parser", "rome_json_syntax", "rome_parser", diff --git a/crates/rome_cli/src/execute.rs b/crates/rome_cli/src/execute.rs index 828b9cc119b..fa2b43a402d 100644 --- a/crates/rome_cli/src/execute.rs +++ b/crates/rome_cli/src/execute.rs @@ -95,15 +95,15 @@ impl Execution { } } - pub(crate) fn is_ci(&self) -> bool { + pub(crate) const fn is_ci(&self) -> bool { matches!(self.traversal_mode, TraversalMode::CI { .. }) } - pub(crate) fn is_check(&self) -> bool { + pub(crate) const fn is_check(&self) -> bool { matches!(self.traversal_mode, TraversalMode::Check { .. }) } - pub(crate) fn is_format(&self) -> bool { + pub(crate) const fn is_format(&self) -> bool { matches!(self.traversal_mode, TraversalMode::Format { .. }) } diff --git a/crates/rome_cli/tests/snapshots/main_commands_format/does_not_format_ignored_directories.snap b/crates/rome_cli/tests/snapshots/main_commands_format/does_not_format_ignored_directories.snap index 9af9ae1a517..55e4d41eb6e 100644 --- a/crates/rome_cli/tests/snapshots/main_commands_format/does_not_format_ignored_directories.snap +++ b/crates/rome_cli/tests/snapshots/main_commands_format/does_not_format_ignored_directories.snap @@ -29,7 +29,7 @@ statement(); # Emitted Messages ```block -Formatted 1 file(s) in