diff --git a/apps/oxlint/test/fixtures/basic/output.snap.md b/apps/oxlint/test/fixtures/basic/output.snap.md index 12db6317d78ce..677bc53bade00 100644 --- a/apps/oxlint/test/fixtures/basic/output.snap.md +++ b/apps/oxlint/test/fixtures/basic/output.snap.md @@ -17,7 +17,7 @@ help: Remove the debugger statement Found 1 warning and 1 error. -Finished in Xms on 1 file with 90 rules using X threads. +Finished in Xms on 1 file with 91 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/basic_many_files/output.snap.md b/apps/oxlint/test/fixtures/basic_many_files/output.snap.md index bab4776956e42..3f68a0a0ffea4 100644 --- a/apps/oxlint/test/fixtures/basic_many_files/output.snap.md +++ b/apps/oxlint/test/fixtures/basic_many_files/output.snap.md @@ -264,7 +264,7 @@ help: Remove the debugger statement Found 20 warnings and 20 errors. -Finished in Xms on 20 files with 55 rules using X threads. +Finished in Xms on 20 files with 56 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/basic_multiple_rules/output.snap.md b/apps/oxlint/test/fixtures/basic_multiple_rules/output.snap.md index 5adc8d6df832a..6851cd212de84 100644 --- a/apps/oxlint/test/fixtures/basic_multiple_rules/output.snap.md +++ b/apps/oxlint/test/fixtures/basic_multiple_rules/output.snap.md @@ -33,7 +33,7 @@ `---- Found 1 warning and 3 errors. -Finished in Xms on 1 file with 1 rules using X threads. +Finished in Xms on 1 file with 4 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/basic_no_errors/output.snap.md b/apps/oxlint/test/fixtures/basic_no_errors/output.snap.md index ec092643ded0b..86b27cafa9d04 100644 --- a/apps/oxlint/test/fixtures/basic_no_errors/output.snap.md +++ b/apps/oxlint/test/fixtures/basic_no_errors/output.snap.md @@ -4,7 +4,7 @@ # stdout ``` Found 0 warnings and 0 errors. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/basic_warn_severity/output.snap.md b/apps/oxlint/test/fixtures/basic_warn_severity/output.snap.md index 1fba872021391..d4d83a132e196 100644 --- a/apps/oxlint/test/fixtures/basic_warn_severity/output.snap.md +++ b/apps/oxlint/test/fixtures/basic_warn_severity/output.snap.md @@ -17,7 +17,7 @@ help: Remove the debugger statement Found 2 warnings and 0 errors. -Finished in Xms on 1 file with 1 rules using X threads. +Finished in Xms on 1 file with 2 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/cfg/output.snap.md b/apps/oxlint/test/fixtures/cfg/output.snap.md index b59b1cb757b9a..eb6f91e28a45f 100644 --- a/apps/oxlint/test/fixtures/cfg/output.snap.md +++ b/apps/oxlint/test/fixtures/cfg/output.snap.md @@ -21,7 +21,7 @@ `---- Found 0 warnings and 1 error. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/comments/output.snap.md b/apps/oxlint/test/fixtures/comments/output.snap.md index 145ebaa232dfe..800b224cec38e 100644 --- a/apps/oxlint/test/fixtures/comments/output.snap.md +++ b/apps/oxlint/test/fixtures/comments/output.snap.md @@ -456,7 +456,7 @@ `---- Found 0 warnings and 32 errors. -Finished in Xms on 3 files with 0 rules using X threads. +Finished in Xms on 3 files with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/context_properties/output.snap.md b/apps/oxlint/test/fixtures/context_properties/output.snap.md index 68817b4e70c2c..42d1a36e869b1 100644 --- a/apps/oxlint/test/fixtures/context_properties/output.snap.md +++ b/apps/oxlint/test/fixtures/context_properties/output.snap.md @@ -46,7 +46,7 @@ `---- Found 0 warnings and 4 errors. -Finished in Xms on 2 files with 0 rules using X threads. +Finished in Xms on 2 files with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/context_wrapping/output.snap.md b/apps/oxlint/test/fixtures/context_wrapping/output.snap.md index 3122dca62a7af..7ff68cf435885 100644 --- a/apps/oxlint/test/fixtures/context_wrapping/output.snap.md +++ b/apps/oxlint/test/fixtures/context_wrapping/output.snap.md @@ -64,7 +64,7 @@ `---- Found 0 warnings and 10 errors. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 2 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/createOnce/output.snap.md b/apps/oxlint/test/fixtures/createOnce/output.snap.md index fd1df03a0c9db..8a85de7635491 100644 --- a/apps/oxlint/test/fixtures/createOnce/output.snap.md +++ b/apps/oxlint/test/fixtures/createOnce/output.snap.md @@ -352,7 +352,7 @@ `---- Found 0 warnings and 58 errors. -Finished in Xms on 2 files with 0 rules using X threads. +Finished in Xms on 2 files with 6 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/definePlugin/output.snap.md b/apps/oxlint/test/fixtures/definePlugin/output.snap.md index be30f96439707..69075c212eb49 100644 --- a/apps/oxlint/test/fixtures/definePlugin/output.snap.md +++ b/apps/oxlint/test/fixtures/definePlugin/output.snap.md @@ -259,7 +259,7 @@ `---- Found 0 warnings and 35 errors. -Finished in Xms on 2 files with 0 rules using X threads. +Finished in Xms on 2 files with 7 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/definePlugin_and_defineRule/output.snap.md b/apps/oxlint/test/fixtures/definePlugin_and_defineRule/output.snap.md index 5158b5f455706..2aedaaf2543e2 100644 --- a/apps/oxlint/test/fixtures/definePlugin_and_defineRule/output.snap.md +++ b/apps/oxlint/test/fixtures/definePlugin_and_defineRule/output.snap.md @@ -259,7 +259,7 @@ `---- Found 0 warnings and 35 errors. -Finished in Xms on 2 files with 0 rules using X threads. +Finished in Xms on 2 files with 7 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/defineRule/output.snap.md b/apps/oxlint/test/fixtures/defineRule/output.snap.md index 39bb6ec53757d..8512e8383f399 100644 --- a/apps/oxlint/test/fixtures/defineRule/output.snap.md +++ b/apps/oxlint/test/fixtures/defineRule/output.snap.md @@ -259,7 +259,7 @@ `---- Found 0 warnings and 35 errors. -Finished in Xms on 2 files with 0 rules using X threads. +Finished in Xms on 2 files with 7 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/diagnostic_loc/output.snap.md b/apps/oxlint/test/fixtures/diagnostic_loc/output.snap.md index ac2fd6edff571..b49d7ab17ae8c 100644 --- a/apps/oxlint/test/fixtures/diagnostic_loc/output.snap.md +++ b/apps/oxlint/test/fixtures/diagnostic_loc/output.snap.md @@ -33,7 +33,7 @@ `---- Found 0 warnings and 4 errors. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/disable_directives/output.snap.md b/apps/oxlint/test/fixtures/disable_directives/output.snap.md index 81f8cd21b3b2c..00470882e75b6 100644 --- a/apps/oxlint/test/fixtures/disable_directives/output.snap.md +++ b/apps/oxlint/test/fixtures/disable_directives/output.snap.md @@ -43,7 +43,7 @@ `---- Found 0 warnings and 5 errors. -Finished in Xms on 1 file with 1 rules using X threads. +Finished in Xms on 1 file with 2 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/estree/output.snap.md b/apps/oxlint/test/fixtures/estree/output.snap.md index 2dc480f7dc61a..c5f98954903a2 100644 --- a/apps/oxlint/test/fixtures/estree/output.snap.md +++ b/apps/oxlint/test/fixtures/estree/output.snap.md @@ -146,7 +146,7 @@ `---- Found 0 warnings and 9 errors. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/fixes/fix.snap.md b/apps/oxlint/test/fixtures/fixes/fix.snap.md index d6cadbcae4748..8f9e0eb20311b 100644 --- a/apps/oxlint/test/fixtures/fixes/fix.snap.md +++ b/apps/oxlint/test/fixtures/fixes/fix.snap.md @@ -4,7 +4,7 @@ # stdout ``` Found 0 warnings and 0 errors. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/fixes/output.snap.md b/apps/oxlint/test/fixtures/fixes/output.snap.md index e7f2206115d49..d0f41f4bcdb91 100644 --- a/apps/oxlint/test/fixtures/fixes/output.snap.md +++ b/apps/oxlint/test/fixtures/fixes/output.snap.md @@ -98,7 +98,7 @@ `---- Found 0 warnings and 12 errors. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/getNodeByRangeIndex/output.snap.md b/apps/oxlint/test/fixtures/getNodeByRangeIndex/output.snap.md index 1ec7d3487434b..127c59fd079f2 100644 --- a/apps/oxlint/test/fixtures/getNodeByRangeIndex/output.snap.md +++ b/apps/oxlint/test/fixtures/getNodeByRangeIndex/output.snap.md @@ -356,7 +356,7 @@ `---- Found 0 warnings and 45 errors. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/globals/output.snap.md b/apps/oxlint/test/fixtures/globals/output.snap.md index 8a8877389c949..54a7a5e884b37 100644 --- a/apps/oxlint/test/fixtures/globals/output.snap.md +++ b/apps/oxlint/test/fixtures/globals/output.snap.md @@ -66,7 +66,7 @@ `---- Found 0 warnings and 3 errors. -Finished in Xms on 3 files with 0 rules using X threads. +Finished in Xms on 3 files with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/isSpaceBetween/output.snap.md b/apps/oxlint/test/fixtures/isSpaceBetween/output.snap.md index fb91a507c26cd..b5cc66a0cdde2 100644 --- a/apps/oxlint/test/fixtures/isSpaceBetween/output.snap.md +++ b/apps/oxlint/test/fixtures/isSpaceBetween/output.snap.md @@ -213,7 +213,7 @@ `---- Found 0 warnings and 13 errors. -Finished in Xms on 2 files with 0 rules using X threads. +Finished in Xms on 2 files with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/languageOptions/output.snap.md b/apps/oxlint/test/fixtures/languageOptions/output.snap.md index bfefc824ef6f7..4abc4cf6b799d 100644 --- a/apps/oxlint/test/fixtures/languageOptions/output.snap.md +++ b/apps/oxlint/test/fixtures/languageOptions/output.snap.md @@ -814,7 +814,7 @@ `---- Found 0 warnings and 4 errors. -Finished in Xms on 3 files with 0 rules using X threads. +Finished in Xms on 3 files with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/lint_after_hook_error/output.snap.md b/apps/oxlint/test/fixtures/lint_after_hook_error/output.snap.md index f90fb54f3a8ea..1aff475142741 100644 --- a/apps/oxlint/test/fixtures/lint_after_hook_error/output.snap.md +++ b/apps/oxlint/test/fixtures/lint_after_hook_error/output.snap.md @@ -9,7 +9,7 @@ | at after (/plugin.ts:13:19) Found 0 warnings and 1 error. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/lint_before_hook_error/output.snap.md b/apps/oxlint/test/fixtures/lint_before_hook_error/output.snap.md index 9964a79366d82..276f6439ce679 100644 --- a/apps/oxlint/test/fixtures/lint_before_hook_error/output.snap.md +++ b/apps/oxlint/test/fixtures/lint_before_hook_error/output.snap.md @@ -9,7 +9,7 @@ | at before (/plugin.ts:12:19) Found 0 warnings and 1 error. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/lint_create_error/output.snap.md b/apps/oxlint/test/fixtures/lint_create_error/output.snap.md index 85266c9a9063e..c9d88be64bd16 100644 --- a/apps/oxlint/test/fixtures/lint_create_error/output.snap.md +++ b/apps/oxlint/test/fixtures/lint_create_error/output.snap.md @@ -9,7 +9,7 @@ | at Object.create (/plugin.ts:10:15) Found 0 warnings and 1 error. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/lint_fix_error/output.snap.md b/apps/oxlint/test/fixtures/lint_fix_error/output.snap.md index c7d5f52dc55f0..090cf86f7071e 100644 --- a/apps/oxlint/test/fixtures/lint_fix_error/output.snap.md +++ b/apps/oxlint/test/fixtures/lint_fix_error/output.snap.md @@ -10,7 +10,7 @@ | at Identifier (/plugin.ts:12:21) Found 0 warnings and 1 error. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/lint_visit_cfg_error/output.snap.md b/apps/oxlint/test/fixtures/lint_visit_cfg_error/output.snap.md index c12eb5c46e87c..85367cee1d399 100644 --- a/apps/oxlint/test/fixtures/lint_visit_cfg_error/output.snap.md +++ b/apps/oxlint/test/fixtures/lint_visit_cfg_error/output.snap.md @@ -21,7 +21,7 @@ `---- Found 0 warnings and 3 errors. -Finished in Xms on 2 files with 0 rules using X threads. +Finished in Xms on 2 files with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/lint_visit_error/output.snap.md b/apps/oxlint/test/fixtures/lint_visit_error/output.snap.md index 7280bc856aa58..54990a058b92b 100644 --- a/apps/oxlint/test/fixtures/lint_visit_error/output.snap.md +++ b/apps/oxlint/test/fixtures/lint_visit_error/output.snap.md @@ -15,7 +15,7 @@ `---- Found 0 warnings and 2 errors. -Finished in Xms on 2 files with 0 rules using X threads. +Finished in Xms on 2 files with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/load_paths/output.snap.md b/apps/oxlint/test/fixtures/load_paths/output.snap.md index 7f5c7145d23c2..d7f2dce368933 100644 --- a/apps/oxlint/test/fixtures/load_paths/output.snap.md +++ b/apps/oxlint/test/fixtures/load_paths/output.snap.md @@ -107,7 +107,7 @@ `---- Found 1 warning and 16 errors. -Finished in Xms on 1 file with 1 rules using X threads. +Finished in Xms on 1 file with 17 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/message_id_error/output.snap.md b/apps/oxlint/test/fixtures/message_id_error/output.snap.md index 1072299442d6e..f24a1ec1219f4 100644 --- a/apps/oxlint/test/fixtures/message_id_error/output.snap.md +++ b/apps/oxlint/test/fixtures/message_id_error/output.snap.md @@ -9,7 +9,7 @@ | at DebuggerStatement (/plugin.ts:18:21) Found 0 warnings and 1 error. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/message_id_interpolation/output.snap.md b/apps/oxlint/test/fixtures/message_id_interpolation/output.snap.md index 78c3b75c38cad..e22517aa19b70 100644 --- a/apps/oxlint/test/fixtures/message_id_interpolation/output.snap.md +++ b/apps/oxlint/test/fixtures/message_id_interpolation/output.snap.md @@ -58,7 +58,7 @@ `---- Found 0 warnings and 7 errors. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/message_id_plugin/output.snap.md b/apps/oxlint/test/fixtures/message_id_plugin/output.snap.md index 9a659d5005fee..85f6c9fe62dc4 100644 --- a/apps/oxlint/test/fixtures/message_id_plugin/output.snap.md +++ b/apps/oxlint/test/fixtures/message_id_plugin/output.snap.md @@ -18,7 +18,7 @@ `---- Found 0 warnings and 2 errors. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/message_interpolation/output.snap.md b/apps/oxlint/test/fixtures/message_interpolation/output.snap.md index 78c3b75c38cad..e22517aa19b70 100644 --- a/apps/oxlint/test/fixtures/message_interpolation/output.snap.md +++ b/apps/oxlint/test/fixtures/message_interpolation/output.snap.md @@ -58,7 +58,7 @@ `---- Found 0 warnings and 7 errors. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/nested_config_duplicate/output.snap.md b/apps/oxlint/test/fixtures/nested_config_duplicate/output.snap.md index 27cc81fd0abcb..630056851bbaa 100644 --- a/apps/oxlint/test/fixtures/nested_config_duplicate/output.snap.md +++ b/apps/oxlint/test/fixtures/nested_config_duplicate/output.snap.md @@ -10,7 +10,7 @@ `---- Found 0 warnings and 1 error. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/options/output.snap.md b/apps/oxlint/test/fixtures/options/output.snap.md index 20f4ddc217bdb..d60338840e3f5 100644 --- a/apps/oxlint/test/fixtures/options/output.snap.md +++ b/apps/oxlint/test/fixtures/options/output.snap.md @@ -268,7 +268,7 @@ `---- Found 0 warnings and 16 errors. -Finished in Xms on 2 files with 0 rules using X threads. +Finished in Xms on 2 files with 8 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/parent/output.snap.md b/apps/oxlint/test/fixtures/parent/output.snap.md index ba8b3297e8f5b..901032f9a256d 100644 --- a/apps/oxlint/test/fixtures/parent/output.snap.md +++ b/apps/oxlint/test/fixtures/parent/output.snap.md @@ -100,7 +100,7 @@ `---- Found 0 warnings and 12 errors. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/parser_services/output.snap.md b/apps/oxlint/test/fixtures/parser_services/output.snap.md index d0887152b8fc2..eb38fed99ab6c 100644 --- a/apps/oxlint/test/fixtures/parser_services/output.snap.md +++ b/apps/oxlint/test/fixtures/parser_services/output.snap.md @@ -11,7 +11,7 @@ `---- Found 0 warnings and 1 error. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/plugin_name/output.snap.md b/apps/oxlint/test/fixtures/plugin_name/output.snap.md index b5b05f4c108cb..eb243b1200362 100644 --- a/apps/oxlint/test/fixtures/plugin_name/output.snap.md +++ b/apps/oxlint/test/fixtures/plugin_name/output.snap.md @@ -89,7 +89,7 @@ help: Add `@param` tag with name. Found 0 warnings and 12 errors. -Finished in Xms on 1 file with 1 rules using X threads. +Finished in Xms on 1 file with 12 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/scope_manager/output.snap.md b/apps/oxlint/test/fixtures/scope_manager/output.snap.md index a5a6d3a3127e0..046a9d1d5b35b 100644 --- a/apps/oxlint/test/fixtures/scope_manager/output.snap.md +++ b/apps/oxlint/test/fixtures/scope_manager/output.snap.md @@ -87,7 +87,7 @@ `---- Found 0 warnings and 6 errors. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/selector/output.snap.md b/apps/oxlint/test/fixtures/selector/output.snap.md index fef0799d756e7..e29d8ca06ba5d 100644 --- a/apps/oxlint/test/fixtures/selector/output.snap.md +++ b/apps/oxlint/test/fixtures/selector/output.snap.md @@ -193,7 +193,7 @@ `---- Found 0 warnings and 1 error. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/sourceCode/output.snap.md b/apps/oxlint/test/fixtures/sourceCode/output.snap.md index 53cb199781d5b..55f8b6f26867f 100644 --- a/apps/oxlint/test/fixtures/sourceCode/output.snap.md +++ b/apps/oxlint/test/fixtures/sourceCode/output.snap.md @@ -261,7 +261,7 @@ `---- Found 0 warnings and 16 errors. -Finished in Xms on 2 files with 0 rules using X threads. +Finished in Xms on 2 files with 2 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/sourceCode_late_access/output.snap.md b/apps/oxlint/test/fixtures/sourceCode_late_access/output.snap.md index 2bc315b8554e8..acf563bc8d7fe 100644 --- a/apps/oxlint/test/fixtures/sourceCode_late_access/output.snap.md +++ b/apps/oxlint/test/fixtures/sourceCode_late_access/output.snap.md @@ -138,7 +138,7 @@ `---- Found 0 warnings and 16 errors. -Finished in Xms on 2 files with 0 rules using X threads. +Finished in Xms on 2 files with 2 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/sourceCode_scope_methods/output.snap.md b/apps/oxlint/test/fixtures/sourceCode_scope_methods/output.snap.md index 93da9659551a6..68a8ceb933b15 100644 --- a/apps/oxlint/test/fixtures/sourceCode_scope_methods/output.snap.md +++ b/apps/oxlint/test/fixtures/sourceCode_scope_methods/output.snap.md @@ -292,7 +292,7 @@ `---- Found 0 warnings and 33 errors. -Finished in Xms on 2 files with 0 rules using X threads. +Finished in Xms on 2 files with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/sourceCode_token_methods/output.snap.md b/apps/oxlint/test/fixtures/sourceCode_token_methods/output.snap.md index e45427118a97c..8f9da40dd4358 100644 --- a/apps/oxlint/test/fixtures/sourceCode_token_methods/output.snap.md +++ b/apps/oxlint/test/fixtures/sourceCode_token_methods/output.snap.md @@ -422,7 +422,7 @@ `---- Found 0 warnings and 23 errors. -Finished in Xms on 2 files with 0 rules using X threads. +Finished in Xms on 2 files with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/tokens/output.snap.md b/apps/oxlint/test/fixtures/tokens/output.snap.md index 7b350304a19be..4c33eb5885070 100644 --- a/apps/oxlint/test/fixtures/tokens/output.snap.md +++ b/apps/oxlint/test/fixtures/tokens/output.snap.md @@ -162,7 +162,7 @@ `---- Found 0 warnings and 16 errors. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/unicode_comments/output.snap.md b/apps/oxlint/test/fixtures/unicode_comments/output.snap.md index 9a0220fe621b9..963e9f9510eb1 100644 --- a/apps/oxlint/test/fixtures/unicode_comments/output.snap.md +++ b/apps/oxlint/test/fixtures/unicode_comments/output.snap.md @@ -129,7 +129,7 @@ `---- Found 0 warnings and 11 errors. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/apps/oxlint/test/fixtures/utf16_offsets/output.snap.md b/apps/oxlint/test/fixtures/utf16_offsets/output.snap.md index 46b837df61bc8..15a881cb50aa8 100644 --- a/apps/oxlint/test/fixtures/utf16_offsets/output.snap.md +++ b/apps/oxlint/test/fixtures/utf16_offsets/output.snap.md @@ -50,7 +50,7 @@ `---- Found 0 warnings and 4 errors. -Finished in Xms on 1 file with 0 rules using X threads. +Finished in Xms on 1 file with 1 rules using X threads. ``` # stderr diff --git a/crates/oxc_linter/src/config/config_store.rs b/crates/oxc_linter/src/config/config_store.rs index 97a430d5d2c10..ca2add85bc078 100644 --- a/crates/oxc_linter/src/config/config_store.rs +++ b/crates/oxc_linter/src/config/config_store.rs @@ -295,18 +295,21 @@ impl ConfigStore { } } - /// Returns the number of rules, optionally filtering out tsgolint rules if type_aware_enabled is false. + /// Returns the total number of rules, inclusive of JS Plugin rules, optionally filtering out tsgolint rules if type_aware_enabled is false. pub fn number_of_rules(&self, type_aware_enabled: bool) -> Option { - // This includes the base config for now, so 1 is fine :) Reference: https://github.com/oxc-project/oxc/issues/16356 + // If there are nested configs the number of rules may vary per-file, so return `None`. + // Note: this is `> 1` due to https://github.com/oxc-project/oxc/issues/16356 if self.nested_configs.len() > 1 { return None; } - let count = if type_aware_enabled { + + let builtin_count = if type_aware_enabled { self.base.base.rules.len() } else { self.base.base.rules.iter().filter(|(rule, _)| !rule.is_tsgolint_rule()).count() }; - Some(count) + + Some(builtin_count + self.base.base.external_rules.len()) } pub fn rules(&self) -> &Arc<[(RuleEnum, AllowWarnDeny)]> { @@ -1063,6 +1066,25 @@ mod test { assert_eq!(store_with_nested_configs.number_of_rules(true), None); } + #[test] + fn test_number_of_rules_includes_external_rules() { + let base_config = LintConfig::default(); + let base_rules = vec![(RuleEnum::EslintCurly(EslintCurly::default()), AllowWarnDeny::Deny)]; + let base = Config::new( + base_rules, + vec![(ExternalRuleId::from_usize(1), ExternalOptionsId::NONE, AllowWarnDeny::Warn)], + OxlintCategories::default(), + base_config, + ResolvedOxlintOverrides::new(vec![]), + ); + + let store = ConfigStore::new(base, FxHashMap::default(), ExternalPluginStore::default()); + + // builtin (1) + external (1) = 2 + assert_eq!(store.number_of_rules(false), Some(2)); + assert_eq!(store.number_of_rules(true), Some(2)); + } + #[test] fn test_external_rule_options_override_precedence() { // Prepare external plugin store with a custom plugin and rule