From 071bfadcf094036b6a955311c2325ac7652ec33e Mon Sep 17 00:00:00 2001 From: Marco Ferrari Date: Tue, 7 Dec 2021 22:55:54 +0100 Subject: [PATCH] Add RUST_2021 test and fix RUST_2021 file list (#2215) * Add RUST_2021 test * Add files to ARRAY_RUST_2021 --- .automation/test/rust_2021/rust_bad_1.rs | 7 +++++++ .automation/test/rust_2021/rust_good_1.rs | 8 ++++++++ lib/functions/buildFileList.sh | 1 + 3 files changed, 16 insertions(+) create mode 100644 .automation/test/rust_2021/rust_bad_1.rs create mode 100644 .automation/test/rust_2021/rust_good_1.rs diff --git a/.automation/test/rust_2021/rust_bad_1.rs b/.automation/test/rust_2021/rust_bad_1.rs new file mode 100644 index 00000000..9a3e93bd --- /dev/null +++ b/.automation/test/rust_2021/rust_bad_1.rs @@ -0,0 +1,7 @@ +// rustfmt-struct_field_align_threshold: 50 +fn func() { + Ok(ServerInformation { name: unwrap_message_string(items.get(0)), + vendor: unwrap_message_string(items.get(1)), + version: unwrap_message_string(items.get(2)), + spec_version: unwrap_message_string(items.get(3)), }); +} diff --git a/.automation/test/rust_2021/rust_good_1.rs b/.automation/test/rust_2021/rust_good_1.rs new file mode 100644 index 00000000..e1d5d6a9 --- /dev/null +++ b/.automation/test/rust_2021/rust_good_1.rs @@ -0,0 +1,8 @@ +fn func() { + Ok(ServerInformation { + name: unwrap_message_string(items.get(0)), + vendor: unwrap_message_string(items.get(1)), + version: unwrap_message_string(items.get(2)), + spec_version: unwrap_message_string(items.get(3)), + }); +} diff --git a/lib/functions/buildFileList.sh b/lib/functions/buildFileList.sh index c558bafd..de709758 100755 --- a/lib/functions/buildFileList.sh +++ b/lib/functions/buildFileList.sh @@ -677,6 +677,7 @@ function BuildFileList() { ################################ FILE_ARRAY_RUST_2015+=("${FILE}") FILE_ARRAY_RUST_2018+=("${FILE}") + FILE_ARRAY_RUST_2021+=("${FILE}") ####################### # Get the RUST crates #