Move rust-analyzer err tests and fuzz failures to exclude dirs

This commit is contained in:
David Tolnay 2022-09-18 14:06:56 -07:00
parent e3af9d6e6e
commit 8fddb0c508
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82

View File

@ -24,127 +24,6 @@ static EXCLUDE_FILES: &[&str] = &[
"src/test/ui/dyn-star/method.rs",
"src/test/ui/dyn-star/syntax.rs",
"src/test/ui/generics/issue-94432-garbage-ice.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_exponent.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/empty_int.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/lifetime_starts_with_a_number.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_at_eof.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_block_comment_with_content.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_at_eof.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_at_eof.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ascii_escape.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_ferris.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_double_quote.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_slash_n.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_space.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_string_with_unicode_escape.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ascii_escape.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_ferris.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_n.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_slash_single_quote.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_space.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_byte_with_unicode_escape.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_at_eof.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ascii_escape.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_ferris.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_n.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_slash_single_quote.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_space.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_char_with_unicode_escape.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_entirely.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_nested_block_comment_partially.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_at_eof.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ascii_escape.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_ferris.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_slash_n.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_space.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_byte_string_with_unicode_escape.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_at_eof.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ascii_escape.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_ferris.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_slash_n.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_space.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_raw_string_with_unicode_escape.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_at_eof.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ascii_escape.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_ferris.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_double_quote.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_slash_n.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_space.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unclosed_string_with_unicode_escape.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_at_eof.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_byte_string_with_ascii.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_at_eof.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/err/unstarted_raw_string_with_ascii.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/byte_strings.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/chars.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/hello.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/ident.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/keywords.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/lifetimes.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/numbers.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_ident.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/raw_strings.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/single_line_comments.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/strings.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/symbols.rs",
"src/tools/rust-analyzer/crates/parser/test_data/lexer/ok/whitespace.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0000_struct_field_missing_comma.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0001_item_recovery_in_file.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0002_duplicate_shebang.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0003_C++_semicolon.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0004_use_path_bad_segment.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0005_attribute_recover.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0006_named_field_recovery.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0007_stray_curly_in_file.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0008_item_block_recovery.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0009_broken_struct_type_parameter.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0010_unsafe_lambda_block.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0011_extern_struct.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0013_invalid_type.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0014_where_no_bounds.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0015_curly_in_params.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0016_missing_semi.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0017_incomplete_binexpr.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0018_incomplete_fn.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0019_let_recover.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0020_fn_recover.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0021_incomplete_param.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0022_bad_exprs.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0023_mismatched_paren.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0025_nope.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0026_imp_recovery.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0027_incomplere_where_for.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0029_field_completion.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0032_match_arms_inner_attrs.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0033_match_arms_outer_attrs.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0034_bad_box_pattern.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0035_use_recover.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0036_partial_use.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0039_lambda_recovery.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0042_weird_blocks.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0043_unexpected_for_type.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0044_item_modifiers.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0047_repated_extern_modifier.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/err/0048_double_fish.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0001_array_type_missing_semi.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0002_misplaced_label_err.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0003_pointer_type_no_mutability.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0006_unsafe_block_in_mod.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0007_async_without_semicolon.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0008_pub_expr.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0013_anonymous_static.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0014_record_literal_before_ellipsis_recovery.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0014_record_literal_missing_ellipsis_recovery.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0014_struct_field_recover.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0015_empty_segment.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err/0015_missing_fn_param_type.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0012_type_item_where_clause.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0040_crate_keyword_vis.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/0102_record_pat_field_list.rs",
@ -161,20 +40,9 @@ static EXCLUDE_FILES: &[&str] = &[
"src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0055_dot_dot_dot.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0063_variadic_fun.rs",
"src/tools/rust-analyzer/crates/parser/test_data/parser/ok/0068_item_modifiers.rs",
"src/tools/rust-analyzer/crates/syntax/test_data/parser/fuzz-failures/0000.rs",
"src/tools/rust-analyzer/crates/syntax/test_data/parser/fuzz-failures/0001.rs",
"src/tools/rust-analyzer/crates/syntax/test_data/parser/fuzz-failures/0002.rs",
"src/tools/rust-analyzer/crates/syntax/test_data/parser/fuzz-failures/0003.rs",
"src/tools/rust-analyzer/crates/syntax/test_data/parser/fuzz-failures/0004.rs",
"src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0031_block_inner_attrs.rs",
"src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0045_ambiguous_trait_object.rs",
"src/tools/rust-analyzer/crates/syntax/test_data/parser/validation/0046_mutable_const_item.rs",
"src/tools/rust-analyzer/crates/syntax/test_data/reparse/fuzz-failures/0000.rs",
"src/tools/rust-analyzer/crates/syntax/test_data/reparse/fuzz-failures/0001.rs",
"src/tools/rust-analyzer/crates/syntax/test_data/reparse/fuzz-failures/0002.rs",
"src/tools/rust-analyzer/crates/syntax/test_data/reparse/fuzz-failures/0003.rs",
"src/tools/rust-analyzer/crates/syntax/test_data/reparse/fuzz-failures/0004.rs",
"src/tools/rust-analyzer/crates/syntax/test_data/reparse/fuzz-failures/0005.rs",
"src/tools/rustfmt/tests/source/closure.rs",
"src/tools/rustfmt/tests/target/closure.rs",
@ -245,7 +113,18 @@ static EXCLUDE_FILES: &[&str] = &[
];
#[rustfmt::skip]
static EXCLUDE_DIRS: &[&str] = &[];
static EXCLUDE_DIRS: &[&str] = &[
// Inputs that intentionally do not parse
"src/tools/rust-analyzer/crates/parser/test_data/parser/err",
"src/tools/rust-analyzer/crates/parser/test_data/parser/inline/err",
// Inputs that lex but do not necessarily parse
"src/tools/rust-analyzer/crates/parser/test_data/lexer",
// Inputs that used to crash rust-analyzer, but aren't necessarily supposed to parse
"src/tools/rust-analyzer/crates/syntax/test_data/parser/fuzz-failures",
"src/tools/rust-analyzer/crates/syntax/test_data/reparse/fuzz-failures",
];
pub fn base_dir_filter(entry: &DirEntry) -> bool {
let path = entry.path();