From 978efccf46e1f658b8b2785299253b817a6f8177 Mon Sep 17 00:00:00 2001 From: Morgante Pell Date: Wed, 5 Feb 2025 00:48:12 -0600 Subject: [PATCH] see https://github.com/biomejs/biome/issues/5032 --- crates/cli/src/commands/format.rs | 1 + crates/cli_bin/fixtures/go/imports.grit | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 crates/cli_bin/fixtures/go/imports.grit diff --git a/crates/cli/src/commands/format.rs b/crates/cli/src/commands/format.rs index b3835ca10..7a93a0ffd 100644 --- a/crates/cli/src/commands/format.rs +++ b/crates/cli/src/commands/format.rs @@ -312,6 +312,7 @@ mod tests { #[tokio::test] async fn test_format_go_imports() -> Result<()> { // This somehow has a massive memory leak but only in --release mode + // See https://github.com/biomejs/biome/issues/5032 let fixtures_path = PathBuf::from(env!("CARGO_MANIFEST_DIR")) .parent() diff --git a/crates/cli_bin/fixtures/go/imports.grit b/crates/cli_bin/fixtures/go/imports.grit new file mode 100644 index 000000000..922b19509 --- /dev/null +++ b/crates/cli_bin/fixtures/go/imports.grit @@ -0,0 +1,18 @@ +language go + +// All core stdlib functions can be done here +private pattern before_each_file_stdlib() { + before_each_file_prep_imports() +} + +private pattern after_each_file_stdlib() { + after_each_file_handle_imports() +} + +pattern before_each_file() { + before_each_file_stdlib() +} + +pattern after_each_file() { + after_each_file_stdlib() +}