From c9261d2a008462ba4a48d56e5a7a17c7c5186919 Mon Sep 17 00:00:00 2001 From: Ze-Zheng Wu Date: Wed, 12 Jun 2024 20:18:17 +0800 Subject: [PATCH] fix(cli): improve reporter message (#3186) --- CHANGELOG.md | 15 +++++++++++++++ crates/biome_cli/src/reporter/terminal.rs | 2 +- ...always_disable_trailing_commas_biome_json.snap | 2 +- .../biome_json_is_not_ignored.snap | 2 +- .../ci_biome_json.snap | 2 +- .../linter_biome_json.snap | 2 +- .../extends_config_ok_formatter_no_linter.snap | 2 +- .../extends_config_ok_linter_not_formatter.snap | 2 +- .../extends_resolves_when_using_config_path.snap | 2 +- .../set_config_path_to_directory.snap | 2 +- .../set_config_path_to_file.snap | 2 +- .../should_allow_using_export_statements.snap | 2 +- .../main_cases_diagnostics/diagnostic_level.snap | 2 +- ...ssages_according_to_set_diagnostics_level.snap | 2 +- .../max_diagnostics_no_verbose.snap | 2 +- .../max_diagnostics_verbose.snap | 2 +- .../should_have_biome_override_editorconfig.snap | 2 +- .../astro_global.snap | 2 +- .../does_not_throw_parse_error_for_return.snap | 2 +- ...mat_astro_carriage_return_line_feed_files.snap | 2 +- .../format_astro_files.snap | 2 +- .../format_empty_astro_files_write.snap | 2 +- .../lint_astro_files.snap | 2 +- .../sorts_imports_check.snap | 2 +- .../should_format_files_by_when_opt_in.snap | 2 +- .../should_lint_files_by_when_enabled.snap | 2 +- .../should_not_format_files_by_default.snap | 2 +- .../should_not_lint_files_by_default.snap | 2 +- ...at_svelte_carriage_return_line_feed_files.snap | 2 +- .../format_svelte_ts_context_module_files.snap | 2 +- .../sorts_imports_check.snap | 2 +- .../format_empty_vue_js_files_write.snap | 2 +- .../format_empty_vue_ts_files_write.snap | 2 +- ...ormat_vue_carriage_return_line_feed_files.snap | 2 +- .../format_vue_explicit_js_files.snap | 2 +- .../format_vue_generic_component_files.snap | 2 +- .../format_vue_implicit_js_files.snap | 2 +- .../format_vue_ts_files.snap | 2 +- .../lint_vue_js_files.snap | 2 +- .../lint_vue_ts_files.snap | 2 +- .../sorts_imports_check.snap | 2 +- .../vue_compiler_macros_as_globals.snap | 2 +- .../does_not_change_linting_settings.snap | 2 +- ...commended_when_override_global_recommened.snap | 2 +- ...e_individually_diabled_rules_in_overrides.snap | 2 +- .../not_process_file_from_cli.snap | 2 +- .../not_process_file_from_cli_verbose.snap | 2 +- ...ess_file_linter_disabled_from_cli_verbose.snap | 2 +- ...not_process_ignored_file_from_cli_verbose.snap | 2 +- ...reports_diagnostics_summary_check_command.snap | 2 +- .../reports_diagnostics_summary_ci_command.snap | 2 +- ...eports_diagnostics_summary_format_command.snap | 2 +- .../reports_diagnostics_summary_lint_command.snap | 2 +- ...a_diagnostic_unknown_file_because_ignored.snap | 2 +- .../should_print_a_diagnostic_unknown_file.snap | 2 +- .../snapshots/main_commands_check/all_rules.snap | 2 +- .../main_commands_check/apply_bogus_argument.snap | 2 +- .../snapshots/main_commands_check/apply_noop.snap | 2 +- .../main_commands_check/check_json_files.snap | 2 +- .../config_recommended_group.snap | 2 +- .../deprecated_suppression_comment.snap | 2 +- .../doesnt_error_if_no_files_were_processed.snap | 2 +- ...applies_organize_imports_for_ignored_file.snap | 2 +- .../main_commands_check/downgrade_severity.snap | 2 +- .../main_commands_check/file_too_large.snap | 2 +- .../file_too_large_cli_limit.snap | 2 +- .../file_too_large_config_limit.snap | 2 +- .../snapshots/main_commands_check/fix_noop.snap | 2 +- .../fs_error_dereferenced_symlink.snap | 2 +- ..._error_infinite_symlink_expansion_to_dirs.snap | 2 +- .../main_commands_check/fs_error_read_only.snap | 2 +- .../main_commands_check/fs_error_unknown.snap | 2 +- .../ignore_configured_globals.snap | 2 +- .../ignore_vcs_ignored_file.snap | 2 +- .../ignore_vcs_ignored_file_via_cli.snap | 2 +- .../ignore_vcs_os_independent_parse.snap | 2 +- .../ignores_file_inside_directory.snap | 2 +- .../main_commands_check/ignores_unknown_file.snap | 2 +- .../snapshots/main_commands_check/lint_error.snap | 2 +- .../lint_error_without_file_paths.snap | 2 +- .../main_commands_check/maximum_diagnostics.snap | 2 +- .../no_lint_if_linter_is_disabled.snap | 2 +- .../no_supported_file_found.snap | 2 +- .../main_commands_check/nursery_unstable.snap | 2 +- .../main_commands_check/parse_error.snap | 2 +- .../main_commands_check/print_verbose.snap | 2 +- .../should_apply_correct_file_source.snap | 2 +- .../should_disable_a_rule.snap | 2 +- ...if_unchanged_files_only_with_changed_flag.snap | 2 +- ...r_if_unstaged_files_only_with_staged_flag.snap | 2 +- ...not_disable_recommended_rules_for_a_group.snap | 2 +- .../should_not_enable_all_recommended_rules.snap | 2 +- ...r_diagnostics_for_files_ignored_by_linter.snap | 2 +- .../shows_organize_imports_diff_on_check.snap | 2 +- .../suppression_syntax_error.snap | 2 +- .../top_level_all_down_level_not_all.snap | 2 +- .../top_level_not_all_down_level_all.snap | 2 +- .../main_commands_check/unsupported_file.snap | 2 +- .../unsupported_file_verbose.snap | 2 +- .../main_commands_check/upgrade_severity.snap | 2 +- .../snapshots/main_commands_check/write_noop.snap | 2 +- .../ci_does_not_organize_imports_via_cli.snap | 2 +- .../ci_does_not_run_formatter.snap | 2 +- .../ci_does_not_run_formatter_biome_jsonc.snap | 2 +- .../ci_does_not_run_formatter_via_cli.snap | 2 +- .../main_commands_ci/ci_does_not_run_linter.snap | 2 +- .../ci_does_not_run_linter_via_cli.snap | 2 +- .../ci_formatter_linter_organize_imports.snap | 2 +- .../snapshots/main_commands_ci/ci_lint_error.snap | 2 +- .../tests/snapshots/main_commands_ci/ci_ok.snap | 2 +- .../main_commands_ci/ci_parse_error.snap | 2 +- .../ci_runs_linter_not_formatter_issue_3495.snap | 2 +- ...tly_handles_ignored_and_not_ignored_files.snap | 2 +- .../does_error_with_only_warnings.snap | 2 +- .../does_formatting_error_without_file_paths.snap | 2 +- .../doesnt_error_if_no_files_were_processed.snap | 2 +- .../main_commands_ci/file_too_large.snap | 2 +- .../file_too_large_cli_limit.snap | 2 +- .../file_too_large_config_limit.snap | 2 +- .../main_commands_ci/formatting_error.snap | 2 +- .../main_commands_ci/ignore_vcs_ignored_file.snap | 2 +- .../ignore_vcs_ignored_file_via_cli.snap | 2 +- .../main_commands_ci/ignores_unknown_file.snap | 2 +- .../main_commands_ci/max_diagnostics.snap | 2 +- .../main_commands_ci/max_diagnostics_default.snap | 2 +- .../snapshots/main_commands_ci/print_verbose.snap | 2 +- ...if_unchanged_files_only_with_changed_flag.snap | 2 +- ...figuration_over_config_file_issue_3175_v1.snap | 2 +- ...figuration_over_config_file_issue_3175_v2.snap | 2 +- ...rmat_if_files_are_listed_in_ignore_option.snap | 2 +- .../does_not_format_ignored_files.snap | 2 +- .../doesnt_error_if_no_files_were_processed.snap | 2 +- .../main_commands_format/file_too_large.snap | 2 +- .../file_too_large_cli_limit.snap | 2 +- .../file_too_large_config_limit.snap | 2 +- .../format_empty_svelte_js_files_write.snap | 2 +- .../format_empty_svelte_ts_files_write.snap | 2 +- .../main_commands_format/format_is_disabled.snap | 2 +- .../format_json_when_allow_trailing_commas.snap | 2 +- .../main_commands_format/format_jsonc_files.snap | 2 +- .../format_shows_parse_diagnostics.snap | 2 +- .../format_svelte_explicit_js_files.snap | 2 +- .../format_svelte_implicit_js_files.snap | 2 +- .../format_svelte_ts_files.snap | 2 +- .../format_without_file_paths.snap | 2 +- .../formatter_lint_warning.snap | 2 +- .../main_commands_format/formatter_print.snap | 2 +- .../main_commands_format/fs_error_read_only.snap | 2 +- ...ignore_comments_error_when_allow_comments.snap | 2 +- .../ignores_unknown_file.snap | 2 +- .../main_commands_format/max_diagnostics.snap | 2 +- .../max_diagnostics_default.snap | 2 +- .../no_supported_file_found.snap | 2 +- .../main_commands_format/print_verbose.snap | 2 +- ...if_unchanged_files_only_with_changed_flag.snap | 2 +- ...r_if_unstaged_files_only_with_staged_flag.snap | 2 +- .../treat_known_json_files_as_jsonc_files.snap | 2 +- .../main_commands_lint/apply_bogus_argument.snap | 2 +- .../snapshots/main_commands_lint/apply_noop.snap | 2 +- .../main_commands_lint/check_json_files.snap | 2 +- .../config_recommended_group.snap | 2 +- .../deprecated_suppression_comment.snap | 2 +- .../does_error_with_only_warnings.snap | 2 +- .../doesnt_error_if_no_files_were_processed.snap | 2 +- .../main_commands_lint/downgrade_severity.snap | 2 +- .../downgrade_severity_info.snap | 2 +- .../main_commands_lint/file_too_large.snap | 2 +- .../file_too_large_cli_limit.snap | 2 +- .../file_too_large_config_limit.snap | 2 +- .../snapshots/main_commands_lint/fix_noop.snap | 2 +- .../fs_error_dereferenced_symlink.snap | 2 +- ..._error_infinite_symlink_expansion_to_dirs.snap | 2 +- .../main_commands_lint/fs_error_read_only.snap | 2 +- .../main_commands_lint/fs_error_unknown.snap | 2 +- ...p_level_recommended_false_enable_specific.snap | 2 +- .../ignore_configured_globals.snap | 2 +- .../ignore_file_in_subdir_in_symlinked_dir.snap | 2 +- .../ignore_vcs_ignored_file.snap | 2 +- .../ignore_vcs_ignored_file_via_cli.snap | 2 +- .../ignore_vcs_os_independent_parse.snap | 2 +- .../main_commands_lint/ignores_unknown_file.snap | 2 +- .../include_files_in_subdir.snap | 2 +- .../include_files_in_symlinked_subdir.snap | 2 +- .../snapshots/main_commands_lint/lint_error.snap | 2 +- .../lint_error_without_file_paths.snap | 2 +- .../main_commands_lint/lint_only_group.snap | 2 +- .../lint_only_group_skip_rule.snap | 2 +- .../lint_only_group_with_disabled_rule.snap | 2 +- .../lint_only_multiple_rules.snap | 2 +- .../main_commands_lint/lint_only_rule.snap | 2 +- .../lint_only_rule_and_group.snap | 2 +- ...int_only_rule_ignore_suppression_comments.snap | 2 +- .../lint_only_rule_skip_group.snap | 2 +- .../lint_only_rule_with_config.snap | 2 +- .../lint_only_rule_with_linter_disabled.snap | 2 +- .../lint_only_rule_with_recommended_disabled.snap | 2 +- .../main_commands_lint/lint_only_skip_group.snap | 2 +- .../main_commands_lint/lint_only_skip_rule.snap | 2 +- .../lint_skip_group_with_enabled_rule.snap | 2 +- .../lint_skip_multiple_rules.snap | 2 +- .../main_commands_lint/lint_skip_rule.snap | 2 +- .../lint_skip_rule_and_group.snap | 2 +- .../main_commands_lint/lint_syntax_rules.snap | 2 +- .../main_commands_lint/maximum_diagnostics.snap | 2 +- ...lint_if_files_are_listed_in_ignore_option.snap | 2 +- .../no_lint_if_linter_is_disabled.snap | 2 +- ...lint_if_linter_is_disabled_when_run_apply.snap | 2 +- ...er_is_disabled_when_run_apply_biome_jsonc.snap | 2 +- .../no_lint_when_file_is_ignored.snap | 2 +- .../no_supported_file_found.snap | 2 +- .../no_unused_dependencies.snap | 2 +- .../main_commands_lint/nursery_unstable.snap | 2 +- .../snapshots/main_commands_lint/parse_error.snap | 2 +- .../main_commands_lint/print_verbose.snap | 2 +- .../should_apply_correct_file_source.snap | 2 +- .../main_commands_lint/should_disable_a_rule.snap | 2 +- .../should_disable_a_rule_group.snap | 2 +- ...if_unchanged_files_only_with_changed_flag.snap | 2 +- ...r_if_unstaged_files_only_with_staged_flag.snap | 2 +- ...not_disable_recommended_rules_for_a_group.snap | 2 +- .../should_not_enable_all_recommended_rules.snap | 2 +- ...changed_files_with_no_errors_on_unmatched.snap | 2 +- ..._process_ignored_file_even_if_its_changed.snap | 2 +- ...t_process_ignored_file_even_if_its_staged.snap | 2 +- ...only_process_changed_file_if_its_included.snap | 2 +- ..._only_process_staged_file_if_its_included.snap | 2 +- ...es_changed_files_when_changed_flag_is_set.snap | 2 +- ...sses_staged_files_when_staged_flag_is_set.snap | 2 +- .../should_pass_if_there_are_only_warnings.snap | 2 +- ...g_is_set_and_default_branch_is_configured.snap | 2 +- .../suppression_syntax_error.snap | 2 +- .../top_level_all_false_group_level_all_true.snap | 2 +- .../main_commands_lint/top_level_all_true.snap | 2 +- .../top_level_all_true_group_level_all_false.snap | 2 +- .../top_level_all_true_group_level_empty.snap | 2 +- ...el_recommended_true_group_level_all_false.snap | 2 +- .../main_commands_lint/unsupported_file.snap | 2 +- .../unsupported_file_verbose.snap | 2 +- .../main_commands_lint/upgrade_severity.snap | 2 +- .../main_configuration/correct_root.snap | 2 +- .../main_configuration/override_globals.snap | 2 +- 241 files changed, 255 insertions(+), 240 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c696730e2804..d2221fa4b3b2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,21 @@ our [guidelines for writing a good changelog entry](https://github.com/biomejs/b ### CLI +#### Enhancement + +- Reword the reporter message `No fixes needed` to `No fixes applied`. + + The former message is misleading when there're still errors or warnings in the files that should be taken care of manually. For example: + + ```block + Checked 2 files in