Repository: biomejs/biome (Rust)

Issue:
🐛 VCS Ignore File is not always read correctly
### Environment information

```block
LI:
  Version:                      1.0.0
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           windows

Environment:
  BIOME_LOG_DIR:                unset
  NO_COLOR:                     unset
  TERM:                         unset
  JS_RUNTIME_VERSION:           "v18.16.0"
  JS_RUNTIME_NAME:              "node"
  NODE_PACKAGE_MANAGER:         "pnpm/8.7.1"

Biome Configuration:
  Status:                       Loaded successfully
  Formatter disabled:           false
  Linter disabled:              false
  Organize imports disabled:    false
  VCS disabled:                 false

Workspace:
  Open Documents:               0

Discovering running Biome servers...

Incompatible Biome Server: ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

i Rage discovered this running server using an incompatible version of Biome.

Server:
  Version:                      <=10.0.0
```


### What happened?

Given the following files:
```json
// biome.json
{
	"$schema": "https://biomejs.dev/schemas/1.0.0/schema.json",
	"organizeImports": {
		"enabled": true
	},
	"linter": {
		"enabled": true,
		"rules": {
			"recommended": true
		}
	},
	"vcs": {
		"enabled": true,
		"clientKind": "git",
		"useIgnoreFile": true
	}
}
```
```ts
// ignore-this/file.ts
debugger;
```

`biome ci .` when `.gitignore` contains `ignore-this`:
```sh
biome-ignore-bug on  main [?] via  v18.16.0 
❯ pnpm biome ci .
Checked 1 file(s) in 2ms
```

...when `.gitignore` contains:
- `ignore-this/` (trailing slash)
- `/ignore-this` (leading slash)
```sh
biome-ignore-bug on  main [?] via  v18.16.0 
❯ pnpm biome ci .
.\ignore-this\file.ts:1:1 lint/suspicious/noDebugger  FIXABLE  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  × This is an unexpected use of the debugger statement.

  > 1 │ debugger;
      │ ^^^^^^^^^
    2 │ 

  i Suggested fix: Remove debugger statement

    1 │ debugger;
      │ ---------

.\ignore-this\file.ts lint ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  × The file contains diagnostics that needs to be addressed.


Checked 3 file(s) in 4ms
Found 2 error(s)
ci ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

  × Some errors were emitted while running checks.
```

### Expected result

Since the above cases are all ignored by git, I would expect biome not to error.

### Code of Conduct

- [X] I agree to follow Biome's Code of Conduct



Fix (patch):
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e5e92017868b..d6491076f26e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,7 @@ Read our [guidelines for writing a good changelog entry](https://github.com/biom
 #### Bug fixes
 
 - Biome uses `biome.json` first, then it attempts to use `rome.json`.
+- Fix a case where Biome couldn't compute correctly the ignored files when the VSC integration is enabled.
 
 ### Configuration
 ### Editors
diff --git a/crates/rome_cli/src/commands/daemon.rs b/crates/rome_cli/src/commands/daemon.rs
index c27a15845818..247811ed66f1 100644
--- a/crates/rome_cli/src/commands/daemon.rs
+++ b/crates/rome_cli/src/commands/daemon.rs
@@ -214,7 +214,8 @@ const SELF_FILTER: LevelFilter = if cfg!(debug_assertions) {
 
 impl LoggingFilter {
     fn is_enabled(&self, meta: &Metadata<'_>) -> bool {
-        let filter = if meta.target().starts_with("biome") {
+        // TODO: keep "rome" until all internal crates are moved to "biome_"
+        let filter = if meta.target().starts_with("rome") {
             SELF_FILTER
         } else {
             LevelFilter::INFO
diff --git a/crates/rome_cli/src/service/mod.rs b/crates/rome_cli/src/service/mod.rs
index a0b5b3b6d8ba..71d34ab9fdd1 100644
--- a/crates/rome_cli/src/service/mod.rs
+++ b/crates/rome_cli/src/service/mod.rs
@@ -194,7 +194,7 @@ impl WorkspaceTransport for SocketTransport {
 
         self.pending_requests.insert(request.id, send);
 
-        let is_shutdown = request.method == "rome/shutdown";
+        let is_shutdown = request.method == "biome/shutdown";
 
         let request = JsonRpcRequest {
             jsonrpc: Cow::Borrowed("2.0"),
diff --git a/crates/rome_lsp/src/server.rs b/crates/rome_lsp/src/server.rs
index 07d7fe8eb3ce..916ead484744 100644
--- a/crates/rome_lsp/src/server.rs
+++ b/crates/rome_lsp/src/server.rs
@@ -66,7 +66,7 @@ impl LSPServer {
         requests::syntax_tree::syntax_tree(&self.session, &url).map_err(into_lsp_error)
     }
 
-    #[tracing::instrument(skip(self), name = "rome/rage", level = "debug")]
+    #[tracing::instrument(skip(self), name = "biome/rage", level = "debug")]
     async fn rage(&self, params: RageParams) -> LspResult<RageResult> {
         let mut entries = vec![
             RageEntry::section("Server"),
@@ -118,7 +118,7 @@ impl LSPServer {
         let mut capabilities = CapabilitySet::default();
 
         capabilities.add_capability(
-            "rome_did_change_extension_settings",
+            "biome_did_change_extension_settings",
             "workspace/didChangeConfiguration",
             if self.session.can_register_did_change_configuration() {
                 CapabilityStatus::Enable(None)
@@ -128,17 +128,27 @@ impl LSPServer {
         );
 
         capabilities.add_capability(
-            "rome_did_change_workspace_settings",
+            "biome_did_change_workspace_settings",
             "workspace/didChangeWatchedFiles",
             if let Some(base_path) = self.session.base_path() {
                 CapabilityStatus::Enable(Some(json!(DidChangeWatchedFilesRegistrationOptions {
-                    watchers: vec![FileSystemWatcher {
-                        glob_pattern: GlobPattern::String(format!(
-                            "{}/biome.json",
-                            base_path.display()
-                        )),
-                        kind: Some(WatchKind::all()),
-                    }],
+                    watchers: vec![
+                        FileSystemWatcher {
+                            glob_pattern: GlobPattern::String(format!(
+                                "{}/biome.json",
+                                base_path.display()
+                            )),
+                            kind: Some(WatchKind::all()),
+                        },
+                        // TODO: Biome 2.0 remove it
+                        FileSystemWatcher {
+                            glob_pattern: GlobPattern::String(format!(
+                                "{}/rome.json",
+                                base_path.display()
+                            )),
+                            kind: Some(WatchKind::all()),
+                        }
+                    ],
                 })))
             } else {
                 CapabilityStatus::Disable
@@ -146,7 +156,7 @@ impl LSPServer {
         );
 
         capabilities.add_capability(
-            "rome_formatting",
+            "biome_formatting",
             "textDocument/formatting",
             if self.session.is_linting_and_formatting_disabled() {
                 CapabilityStatus::Disable
@@ -155,7 +165,7 @@ impl LSPServer {
             },
         );
         capabilities.add_capability(
-            "rome_range_formatting",
+            "biome_range_formatting",
             "textDocument/rangeFormatting",
             if self.session.is_linting_and_formatting_disabled() {
                 CapabilityStatus::Disable
@@ -164,7 +174,7 @@ impl LSPServer {
             },
         );
         capabilities.add_capability(
-            "rome_on_type_formatting",
+            "biome_on_type_formatting",
             "textDocument/onTypeFormatting",
             if self.session.is_linting_and_formatting_disabled() {
                 CapabilityStatus::Disable
@@ -183,7 +193,7 @@ impl LSPServer {
         };
 
         capabilities.add_capability(
-            "rome_rename",
+            "biome_rename",
             "textDocument/rename",
             if rename {
                 CapabilityStatus::Enable(None)
@@ -431,9 +441,9 @@ type Sessions = Arc<Mutex<HashMap<SessionKey, SessionHandle>>>;
 macro_rules! workspace_method {
     ( $builder:ident, $method:ident ) => {
         $builder = $builder.custom_method(
-            concat!("rome/", stringify!($method)),
+            concat!("biome/", stringify!($method)),
             |server: &LSPServer, params| {
-                let span = tracing::trace_span!(concat!("rome/", stringify!($method)), params = ?params).or_current();
+                let span = tracing::trace_span!(concat!("biome/", stringify!($method)), params = ?params).or_current();
 
                 let workspace = server.session.workspace.clone();
                 let result = spawn_blocking(move || {
@@ -526,13 +536,13 @@ impl ServerFactory {
         builder = builder.custom_method(SYNTAX_TREE_REQUEST, LSPServer::syntax_tree_request);
 
         // "shutdown" is not part of the Workspace API
-        builder = builder.custom_method("rome/shutdown", |server: &LSPServer, (): ()| {
+        builder = builder.custom_method("biome/shutdown", |server: &LSPServer, (): ()| {
             info!("Sending shutdown signal");
             server.session.broadcast_shutdown();
             ready(Ok(Some(())))
         });
 
-        builder = builder.custom_method("rome/rage", LSPServer::rage);
+        builder = builder.custom_method("biome/rage", LSPServer::rage);
 
         workspace_method!(builder, file_features);
         workspace_method!(builder, is_path_ignored);
diff --git a/crates/rome_service/src/workspace/client.rs b/crates/rome_service/src/workspace/client.rs
index 48347a9b10d2..a37169a1da5c 100644
--- a/crates/rome_service/src/workspace/client.rs
+++ b/crates/rome_service/src/workspace/client.rs
@@ -92,7 +92,7 @@ where
     }
 
     pub fn shutdown(self) -> Result<(), WorkspaceError> {
-        self.request("rome/shutdown", ())
+        self.request("biome/shutdown", ())
     }
 }
 
@@ -104,84 +104,84 @@ where
         &self,
         params: SupportsFeatureParams,
     ) -> Result<FileFeaturesResult, WorkspaceError> {
-        self.request("rome/file_features", params)
+        self.request("biome/file_features", params)
     }
 
     fn is_path_ignored(&self, params: IsPathIgnoredParams) -> Result<bool, WorkspaceError> {
-        self.request("rome/is_path_ignored", params)
+        self.request("biome/is_path_ignored", params)
     }
 
     fn update_settings(&self, params: UpdateSettingsParams) -> Result<(), WorkspaceError> {
-        self.request("rome/update_settings", params)
+        self.request("biome/update_settings", params)
     }
 
     fn open_file(&self, params: OpenFileParams) -> Result<(), WorkspaceError> {
-        self.request("rome/open_file", params)
+        self.request("biome/open_file", params)
     }
 
     fn get_syntax_tree(
         &self,
         params: GetSyntaxTreeParams,
     ) -> Result<GetSyntaxTreeResult, WorkspaceError> {
-        self.request("rome/get_syntax_tree", params)
+        self.request("biome/get_syntax_tree", params)
     }
 
     fn get_control_flow_graph(
         &self,
         params: GetControlFlowGraphParams,
     ) -> Result<String, WorkspaceError> {
-        self.request("rome/get_control_flow_graph", params)
+        self.request("biome/get_control_flow_graph", params)
     }
 
     fn get_formatter_ir(&self, params: GetFormatterIRParams) -> Result<String, WorkspaceError> {
-        self.request("rome/get_formatter_ir", params)
+        self.request("biome/get_formatter_ir", params)
     }
 
     fn get_file_content(&self, params: GetFileContentParams) -> Result<String, WorkspaceError> {
-        self.request("rome/get_file_content", params)
+        self.request("biome/get_file_content", params)
     }
 
     fn change_file(&self, params: ChangeFileParams) -> Result<(), WorkspaceError> {
-        self.request("rome/change_file", params)
+        self.request("biome/change_file", params)
     }
 
     fn close_file(&self, params: CloseFileParams) -> Result<(), WorkspaceError> {
-        self.request("rome/close_file", params)
+        self.request("biome/close_file", params)
     }
 
     fn pull_diagnostics(
         &self,
         params: PullDiagnosticsParams,
     ) -> Result<PullDiagnosticsResult, WorkspaceError> {
-        self.request("rome/pull_diagnostics", params)
+        self.request("biome/pull_diagnostics", params)
     }
 
     fn pull_actions(&self, params: PullActionsParams) -> Result<PullActionsResult, WorkspaceError> {
-        self.request("rome/pull_actions", params)
+        self.request("biome/pull_actions", params)
     }
 
     fn format_file(&self, params: FormatFileParams) -> Result<Printed, WorkspaceError> {
-        self.request("rome/format_file", params)
+        self.request("biome/format_file", params)
     }
 
     fn format_range(&self, params: FormatRangeParams) -> Result<Printed, WorkspaceError> {
-        self.request("rome/format_range", params)
+        self.request("biome/format_range", params)
     }
 
     fn format_on_type(&self, params: FormatOnTypeParams) -> Result<Printed, WorkspaceError> {
-        self.request("rome/format_on_type", params)
+        self.request("biome/format_on_type", params)
     }
 
     fn fix_file(&self, params: FixFileParams) -> Result<FixFileResult, WorkspaceError> {
-        self.request("rome/fix_file", params)
+        self.request("biome/fix_file", params)
     }
 
     fn rename(&self, params: RenameParams) -> Result<RenameResult, WorkspaceError> {
-        self.request("rome/rename", params)
+        self.request("biome/rename", params)
     }
 
     fn rage(&self, params: RageParams) -> Result<RageResult, WorkspaceError> {
-        self.request("rome/rage", params)
+        self.request("biome/rage", params)
     }
 
     fn server_info(&self) -> Option<&ServerInfo> {
@@ -192,6 +192,6 @@ where
         &self,
         params: OrganizeImportsParams,
     ) -> Result<OrganizeImportsResult, WorkspaceError> {
-        self.request("rome/organize_imports", params)
+        self.request("biome/organize_imports", params)
     }
 }
diff --git a/crates/rome_service/src/workspace/server.rs b/crates/rome_service/src/workspace/server.rs
index aaa812154358..4457f0e4c242 100644
--- a/crates/rome_service/src/workspace/server.rs
+++ b/crates/rome_service/src/workspace/server.rs
@@ -236,28 +236,42 @@ impl Workspace for WorkspaceServer {
 
         Ok(match params.feature {
             FeatureName::Format => {
-                settings
+                let section_ignored = settings
                     .as_ref()
                     .formatter
                     .ignored_files
-                    .matches_path(params.rome_path.as_path())
-                    || is_ignored_by_file_config
+                    .matches_path(params.rome_path.as_path());
+                if section_ignored {
+                    section_ignored
+                } else {
+                    is_ignored_by_file_config
+                }
             }
             FeatureName::Lint => {
-                settings
+                let section_ignored = settings
                     .as_ref()
                     .linter
                     .ignored_files
-                    .matches_path(params.rome_path.as_path())
-                    || is_ignored_by_file_config
+                    .matches_path(params.rome_path.as_path());
+
+                if section_ignored {
+                    section_ignored
+                } else {
+                    is_ignored_by_file_config
+                }
             }
             FeatureName::OrganizeImports => {
-                settings
+                let section_ignored = settings
                     .as_ref()
                     .organize_imports
                     .ignored_files
-                    .matches_path(params.rome_path.as_path())
-                    || is_ignored_by_file_config
+                    .matches_path(params.rome_path.as_path());
+
+                if section_ignored {
+                    section_ignored
+                } else {
+                    is_ignored_by_file_config
+                }
             }
         })
     }
diff --git a/packages/@biomejs/backend-jsonrpc/src/workspace.ts b/packages/@biomejs/backend-jsonrpc/src/workspace.ts
index 4beed9180664..b102a68f31f2 100644
--- a/packages/@biomejs/backend-jsonrpc/src/workspace.ts
+++ b/packages/@biomejs/backend-jsonrpc/src/workspace.ts
@@ -1582,55 +1582,55 @@ export interface Workspace {
 export function createWorkspace(transport: Transport): Workspace {
 	return {
 		fileFeatures(params) {
-			return transport.request("rome/file_features", params);
+			return transport.request("biome/file_features", params);
 		},
 		updateSettings(params) {
-			return transport.request("rome/update_settings", params);
+			return transport.request("biome/update_settings", params);
 		},
 		openFile(params) {
-			return transport.request("rome/open_file", params);
+			return transport.request("biome/open_file", params);
 		},
 		changeFile(params) {
-			return transport.request("rome/change_file", params);
+			return transport.request("biome/change_file", params);
 		},
 		closeFile(params) {
-			return transport.request("rome/close_file", params);
+			return transport.request("biome/close_file", params);
 		},
 		getSyntaxTree(params) {
-			return transport.request("rome/get_syntax_tree", params);
+			return transport.request("biome/get_syntax_tree", params);
 		},
 		organizeImports(params) {
-			return transport.request("rome/organize_imports", params);
+			return transport.request("biome/organize_imports", params);
 		},
 		getFileContent(params) {
-			return transport.request("rome/get_file_content", params);
+			return transport.request("biome/get_file_content", params);
 		},
 		getControlFlowGraph(params) {
-			return transport.request("rome/get_control_flow_graph", params);
+			return transport.request("biome/get_control_flow_graph", params);
 		},
 		getFormatterIr(params) {
-			return transport.request("rome/get_formatter_ir", params);
+			return transport.request("biome/get_formatter_ir", params);
 		},
 		pullDiagnostics(params) {
-			return transport.request("rome/pull_diagnostics", params);
+			return transport.request("biome/pull_diagnostics", params);
 		},
 		pullActions(params) {
-			return transport.request("rome/pull_actions", params);
+			return transport.request("biome/pull_actions", params);
 		},
 		formatFile(params) {
-			return transport.request("rome/format_file", params);
+			return transport.request("biome/format_file", params);
 		},
 		formatRange(params) {
-			return transport.request("rome/format_range", params);
+			return transport.request("biome/format_range", params);
 		},
 		formatOnType(params) {
-			return transport.request("rome/format_on_type", params);
+			return transport.request("biome/format_on_type", params);
 		},
 		fixFile(params) {
-			return transport.request("rome/fix_file", params);
+			return transport.request("biome/fix_file", params);
 		},
 		rename(params) {
-			return transport.request("rome/rename", params);
+			return transport.request("biome/rename", params);
 		},
 		destroy() {
 			transport.destroy();
diff --git a/website/src/content/docs/internals/changelog.mdx b/website/src/content/docs/internals/changelog.mdx
index 3ee5418f1c7f..fb2ecfcb73d8 100644
--- a/website/src/content/docs/internals/changelog.mdx
+++ b/website/src/content/docs/internals/changelog.mdx
@@ -27,6 +27,7 @@ Read our [guidelines for writing a good changelog entry](https://github.com/biom
 #### Bug fixes
 
 - Biome uses `biome.json` first, then it attempts to use `rome.json`.
+- Fix a case where Biome couldn't compute correctly the ignored files when the VSC integration is enabled.
 
 ### Configuration
 ### Editors
diff --git a/xtask/codegen/src/generate_bindings.rs b/xtask/codegen/src/generate_bindings.rs
index f2ea4352b730..9259432317b6 100644
--- a/xtask/codegen/src/generate_bindings.rs
+++ b/xtask/codegen/src/generate_bindings.rs
@@ -125,7 +125,7 @@ pub(crate) fn generate_workspace_bindings(mode: Mode) -> Result<()> {
                                             [
                                                 AnyJsCallArgument::AnyJsExpression(
                                                     AnyJsExpression::AnyJsLiteralExpression(
-                                                        AnyJsLiteralExpression::JsStringLiteralExpression(make::js_string_literal_expression(make::js_string_literal(&format!("rome/{}", method.name)))),
+                                                        AnyJsLiteralExpression::JsStringLiteralExpression(make::js_string_literal_expression(make::js_string_literal(&format!("biome/{}", method.name)))),
                                                     ),
                                                 ),
                                                 AnyJsCallArgument::AnyJsExpression(