From a8931d6a245f594540c2a4e1e34e4a8457532360 Mon Sep 17 00:00:00 2001
From: Emanuele Stoppa
Date: Wed, 22 Oct 2025 09:35:50 +0100
Subject: [PATCH 1/5] chore: remove errors logs
---
.changeset/gentle-ears-itch.md | 5 +++++
crates/biome_fs/src/fs.rs | 38 ++++++++++++----------------------
package.json | 2 +-
3 files changed, 19 insertions(+), 26 deletions(-)
create mode 100644 .changeset/gentle-ears-itch.md
diff --git a/.changeset/gentle-ears-itch.md b/.changeset/gentle-ears-itch.md
new file mode 100644
index 000000000000..48ef8a3694b2
--- /dev/null
+++ b/.changeset/gentle-ears-itch.md
@@ -0,0 +1,5 @@
+---
+"@biomejs/biome": patch
+---
+
+Fixed [#7788](https://github.com/biomejs/biome/issues/7788). Removes some error logging that were emitted when loading possible configuration files.
diff --git a/crates/biome_fs/src/fs.rs b/crates/biome_fs/src/fs.rs
index 3fcec31c5d87..15a649d8b238 100644
--- a/crates/biome_fs/src/fs.rs
+++ b/crates/biome_fs/src/fs.rs
@@ -11,7 +11,7 @@ use std::panic::RefUnwindSafe;
use std::path::Path;
use std::sync::Arc;
use std::{fmt, io};
-use tracing::{error, info};
+use tracing::info;
mod memory;
mod os;
@@ -191,32 +191,20 @@ pub trait FileSystem: Send + Sync + RefUnwindSafe {
let mut content = String::new();
match file.read_to_string(&mut content) {
Ok(_) => Ok(content),
- Err(err) => {
- error!(
- "Biome couldn't read the file {:?}, reason:\n{:?}",
- file_path, err
- );
- Err(FileSystemDiagnostic {
- path: file_path.to_string(),
- severity: Severity::Error,
- error_kind: FsErrorKind::CantReadFile,
- source: Some(Error::from(IoError::from(err))),
- })
- }
+ Err(err) => Err(FileSystemDiagnostic {
+ path: file_path.to_string(),
+ severity: Severity::Error,
+ error_kind: FsErrorKind::CantReadFile,
+ source: Some(Error::from(IoError::from(err))),
+ }),
}
}
- Err(err) => {
- error!(
- "Biome couldn't open the file {:?}, reason:\n{:?}",
- file_path, err
- );
- Err(FileSystemDiagnostic {
- path: file_path.to_string(),
- severity: Severity::Error,
- error_kind: FsErrorKind::CantReadFile,
- source: Some(Error::from(IoError::from(err))),
- })
- }
+ Err(err) => Err(FileSystemDiagnostic {
+ path: file_path.to_string(),
+ severity: Severity::Error,
+ error_kind: FsErrorKind::CantReadFile,
+ source: Some(Error::from(IoError::from(err))),
+ }),
}
}
diff --git a/package.json b/package.json
index 0fda63ed4420..b970290f72af 100644
--- a/package.json
+++ b/package.json
@@ -14,7 +14,7 @@
"license": "MIT OR Apache-2.0",
"packageManager": "[email protected]",
"engines": {
- "pnpm": "10.18.0"
+ "pnpm": "10.19.0"
},
"type": "module",
"devDependencies": {
From 2b0f4de1f2049b6baf2daae8a9fb24b0d8f92a19 Mon Sep 17 00:00:00 2001
From: Emanuele Stoppa
Date: Wed, 22 Oct 2025 16:55:41 +0100
Subject: [PATCH 2/5] feedback
---
crates/biome_fs/src/fs.rs | 30 +++++++++++++++++++-----------
1 file changed, 19 insertions(+), 11 deletions(-)
diff --git a/crates/biome_fs/src/fs.rs b/crates/biome_fs/src/fs.rs
index 15a649d8b238..9c22aeef2c19 100644
--- a/crates/biome_fs/src/fs.rs
+++ b/crates/biome_fs/src/fs.rs
@@ -148,21 +148,29 @@ pub trait FileSystem: Send + Sync + RefUnwindSafe {
// Iterate all possible file names
for file_name in search_files {
let file_path = current_search_dir.join(file_name);
- if let Ok(content) = self.read_file_from_path(&file_path) {
- if !predicate(&file_path, &content) {
- break;
+ match self.read_file_from_path(&file_path) {
+ Ok(content) => {
+ if !predicate(&file_path, &content) {
+ break;
+ }
+ if is_searching_in_parent_dir {
+ info!(
+ "Biome auto discovered the file at the following path that isn't in the working directory:\n{:?}",
+ current_search_dir
+ );
+ }
+ return Some(AutoSearchResult {
+ content,
+ file_path,
+ directory_path: current_search_dir,
+ });
}
- if is_searching_in_parent_dir {
+ Err(err) => {
info!(
- "Biome auto discovered the file at the following path that isn't in the working directory:\n{:?}",
- current_search_dir
+ "Couldn't find the configuration file at {}.",
+ file_path.as_str()
);
}
- return Some(AutoSearchResult {
- content,
- file_path,
- directory_path: current_search_dir,
- });
}
}
From 556d92e27501190598d64bb9e0009e44771708fe Mon Sep 17 00:00:00 2001
From: Emanuele Stoppa
Date: Wed, 22 Oct 2025 17:06:12 +0100
Subject: [PATCH 3/5] linting
---
crates/biome_fs/src/fs.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crates/biome_fs/src/fs.rs b/crates/biome_fs/src/fs.rs
index 9c22aeef2c19..3fcb00d43df1 100644
--- a/crates/biome_fs/src/fs.rs
+++ b/crates/biome_fs/src/fs.rs
@@ -165,7 +165,7 @@ pub trait FileSystem: Send + Sync + RefUnwindSafe {
directory_path: current_search_dir,
});
}
- Err(err) => {
+ Err(_) => {
info!(
"Couldn't find the configuration file at {}.",
file_path.as_str()
From 93c989ad395ad0205fdb93ffcbdfe5c1e874564a Mon Sep 17 00:00:00 2001
From: Emanuele Stoppa
Date: Wed, 22 Oct 2025 17:18:31 +0100
Subject: [PATCH 4/5] address feedback bot
---
crates/biome_fs/src/fs.rs | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/crates/biome_fs/src/fs.rs b/crates/biome_fs/src/fs.rs
index 3fcb00d43df1..c86a97bcb4b5 100644
--- a/crates/biome_fs/src/fs.rs
+++ b/crates/biome_fs/src/fs.rs
@@ -143,15 +143,19 @@ pub trait FileSystem: Send + Sync + RefUnwindSafe {
) -> Option {
let mut current_search_dir = search_dir.to_path_buf();
let mut is_searching_in_parent_dir = false;
-
+ let mut search_files = search_files.iter().peekable();
loop {
// Iterate all possible file names
- for file_name in search_files {
+ while let Some(file_name) = search_files.next() {
let file_path = current_search_dir.join(file_name);
match self.read_file_from_path(&file_path) {
Ok(content) => {
if !predicate(&file_path, &content) {
- break;
+ if search_files.peek().is_none() {
+ break;
+ } else {
+ continue;
+ }
}
if is_searching_in_parent_dir {
info!(
From 53d55a0cef7d9433980f7c6662ac38400c0d2e1e Mon Sep 17 00:00:00 2001
From: Emanuele Stoppa
Date: Wed, 22 Oct 2025 17:24:46 +0100
Subject: [PATCH 5/5] rollback
---
crates/biome_fs/src/fs.rs | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/crates/biome_fs/src/fs.rs b/crates/biome_fs/src/fs.rs
index c86a97bcb4b5..ed9a479e6fc6 100644
--- a/crates/biome_fs/src/fs.rs
+++ b/crates/biome_fs/src/fs.rs
@@ -143,19 +143,14 @@ pub trait FileSystem: Send + Sync + RefUnwindSafe {
) -> Option {
let mut current_search_dir = search_dir.to_path_buf();
let mut is_searching_in_parent_dir = false;
- let mut search_files = search_files.iter().peekable();
loop {
// Iterate all possible file names
- while let Some(file_name) = search_files.next() {
+ for file_name in search_files {
let file_path = current_search_dir.join(file_name);
match self.read_file_from_path(&file_path) {
Ok(content) => {
if !predicate(&file_path, &content) {
- if search_files.peek().is_none() {
- break;
- } else {
- continue;
- }
+ break;
}
if is_searching_in_parent_dir {
info!(