From 15d8d4f77640a01c3185b5f0b234aa556b2a4dd8 Mon Sep 17 00:00:00 2001 From: Alex Pozhylenkov Date: Fri, 5 Jul 2024 09:03:04 +0300 Subject: [PATCH] extend Cargo.toml validation (#276) --- earthly/rust/scripts/std_checks.py | 10 +++++- .../rust/stdcfgs/cargo_manifest/project.toml | 36 +++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 earthly/rust/stdcfgs/cargo_manifest/project.toml diff --git a/earthly/rust/scripts/std_checks.py b/earthly/rust/scripts/std_checks.py index 91bca30ed..962b09526 100755 --- a/earthly/rust/scripts/std_checks.py +++ b/earthly/rust/scripts/std_checks.py @@ -52,11 +52,19 @@ def main(): strict=False, log=False, ) - if not res1.ok() and not res2.ok(): + res3 = vendor_files_check.toml_diff_check( + "/stdcfgs/cargo_manifest/project.toml", + cargo_toml_path, + strict=False, + log=False, + ) + if not res1.ok() and not res2.ok() and not res3.ok(): res1.print(verbose_errors=True) res2.print(verbose_errors=True) + res3.print(verbose_errors=True) results.add(res1) results.add(res2) + results.add(res3) results.add( vendor_files_check.toml_diff_check( diff --git a/earthly/rust/stdcfgs/cargo_manifest/project.toml b/earthly/rust/stdcfgs/cargo_manifest/project.toml new file mode 100644 index 000000000..bcab152d1 --- /dev/null +++ b/earthly/rust/stdcfgs/cargo_manifest/project.toml @@ -0,0 +1,36 @@ +[package] +edition = "2021" + +[lints.rust] +warnings = "deny" +missing_docs = "deny" +let_underscore_drop = "deny" +non_ascii_idents = "deny" +single_use_lifetimes = "deny" +trivial_casts = "deny" +trivial_numeric_casts = "deny" + +[lints.rustdoc] +broken_intra_doc_links = "deny" +invalid_codeblock_attributes = "deny" +invalid_html_tags = "deny" +invalid_rust_codeblocks = "deny" +bare_urls = "deny" +unescaped_backticks = "deny" + +[lints.clippy] +pedantic = "deny" +unwrap_used = "deny" +expect_used = "deny" +exit = "deny" +get_unwrap = "deny" +index_refutable_slice = "deny" +indexing_slicing = "deny" +match_on_vec_items = "deny" +match_wild_err_arm = "deny" +missing_panics_doc = "deny" +panic = "deny" +string_slice = "deny" +unchecked_duration_subtraction = "deny" +unreachable = "deny" +missing_docs_in_private_items = "deny" \ No newline at end of file