@@ -31,7 +31,9 @@ use biome_diagnostics::{Diagnostic, PrintDiagnostic, Severity};
3131use biome_fs:: { BiomePath , FileSystem } ;
3232use biome_grit_patterns:: GritTargetLanguage ;
3333use biome_resolver:: FsWithResolverProxy ;
34- use biome_service:: configuration:: { LoadedConfiguration , load_configuration, load_editorconfig} ;
34+ use biome_service:: configuration:: {
35+ LoadedConfiguration , ProjectScanComputer , load_configuration, load_editorconfig,
36+ } ;
3537use biome_service:: documentation:: Doc ;
3638use biome_service:: projects:: ProjectKey ;
3739use biome_service:: workspace:: {
@@ -921,27 +923,20 @@ pub(crate) trait CommandRunner: Sized {
921923 let paths = self . get_files_to_process ( fs, & configuration) ?;
922924 let paths = validated_paths_for_execution ( paths, & execution, & working_dir) ?;
923925
924- let params = if let TraversalMode :: Lint { only, skip, .. } = execution. traversal_mode ( ) {
925- OpenProjectParams {
926- path : BiomePath :: new ( project_dir) ,
927- open_uninitialized : true ,
928- only_rules : Some ( only. clone ( ) ) ,
929- skip_rules : Some ( skip. clone ( ) ) ,
930- }
931- } else {
932- OpenProjectParams {
933- path : BiomePath :: new ( project_dir) ,
934- open_uninitialized : true ,
935- only_rules : None ,
936- skip_rules : None ,
937- }
938- } ;
939-
940926 // Open the project
941- let open_project_result = workspace. open_project ( params) ?;
927+ let open_project_result = workspace. open_project ( OpenProjectParams {
928+ path : BiomePath :: new ( project_dir) ,
929+ open_uninitialized : true ,
930+ } ) ?;
942931
932+ let scan_kind_computer =
933+ if let TraversalMode :: Lint { only, skip, .. } = execution. traversal_mode ( ) {
934+ ProjectScanComputer :: new ( & configuration) . with_rule_selectors ( skip, only)
935+ } else {
936+ ProjectScanComputer :: new ( & configuration)
937+ } ;
943938 let scan_kind = derive_best_scan_kind (
944- open_project_result . scan_kind ,
939+ scan_kind_computer . compute ( ) ,
945940 & execution,
946941 & root_configuration_dir,
947942 & working_dir,
0 commit comments