From a80df869a92c330fbad9695057720b11a18af901 Mon Sep 17 00:00:00 2001 From: Doan Luu Duc Tai Date: Sat, 31 Oct 2026 13:08:08 -0500 Subject: Forbid Rust lints and enforce strict typed TypeScript linting --- Cargo.toml | 157 ++++++++++++++++++++++++++++++++++++++++++------------------- 1 file changed, 108 insertions(+), 49 deletions(-) (limited to 'Cargo.toml') diff --git a/Cargo.toml b/Cargo.toml index 327372d..a0e247d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,7 @@ exclude = ["var", ".tools", "target", "bin", "dist"] stack-config = { path = "crates/config", version = "0.1.0" } anyhow = "1.0" chrono = { version = "0.4", default-features = false, features = ["now", "std"] } -clap = { version = "4.6", features = ["derive"] } +clap = "4.6" hex = "0.4" flate2 = { version = "1", default-features = false, features = ["rust_backend"] } serde = { version = "1.0", features = ["derive"] } @@ -62,58 +62,117 @@ resolver = "3" workspace = true [workspace.lints.rustdoc] -broken_intra_doc_links = "deny" -private_intra_doc_links = "deny" -missing_crate_level_docs = "deny" +all = { level = "forbid", priority = -1 } +broken_intra_doc_links = "forbid" +private_intra_doc_links = "forbid" +missing_crate_level_docs = "forbid" [workspace.lints.rust] unused = { level = "deny", priority = -1 } nonstandard_style = { level = "deny", priority = -1 } -future_incompatible = { level = "deny", priority = -1 } -rust_2018_idioms = { level = "deny", priority = -1 } -let_underscore = { level = "deny", priority = -1 } -unsafe_code = "deny" -unstable_features = "deny" -missing_docs = "deny" -missing_debug_implementations = "deny" -unreachable_pub = "deny" -trivial_casts = "deny" -trivial_numeric_casts = "deny" -unreachable_patterns = "deny" -warnings = "deny" +future_incompatible = { level = "forbid", priority = -1 } +rust_2018_idioms = { level = "forbid", priority = -1 } +let_underscore = { level = "forbid", priority = -1 } +unsafe_code = "forbid" +unstable_features = "forbid" +missing_docs = "forbid" +missing_debug_implementations = "forbid" +unreachable_pub = "forbid" +trivial_casts = "forbid" +trivial_numeric_casts = "forbid" +unreachable_patterns = "forbid" +warnings = "forbid" unused_qualifications = "deny" +unused_imports = "forbid" +unused_variables = "forbid" +unused_visibilities = "forbid" +unused_assignments = "forbid" +dead_code = "forbid" +unused_mut = "forbid" +unreachable_cfg_select_predicates = "forbid" +unreachable_code = "forbid" +unused_must_use = "forbid" +unused_unsafe = "forbid" +path_statements = "forbid" +unused_macros = "forbid" +unused_macro_rules = "forbid" +unused_allocation = "forbid" +unused_doc_comments = "forbid" +unused_extern_crates = "forbid" +unused_features = "forbid" +unused_labels = "forbid" +unused_parens = "forbid" +unused_braces = "forbid" +redundant_semicolons = "forbid" +map_unit_fn = "forbid" +non_snake_case = "forbid" +ambiguous_negative_literals = "forbid" +ffi_unwind_calls = "forbid" +keyword_idents = { level = "forbid", priority = -1 } +macro_use_extern_crate = "forbid" +meta_variable_misuse = "forbid" +non_ascii_idents = "forbid" +unsafe_op_in_unsafe_fn = "forbid" +unsafe_attr_outside_unsafe = "forbid" +unused_lifetimes = "forbid" +unfulfilled_lint_expectations = "forbid" +unused_import_braces = "forbid" +unnameable_types = "forbid" + [workspace.lints.clippy] -all = { level = "deny", priority = -1 } -correctness = { level = "deny", priority = -1 } -suspicious = { level = "deny", priority = -1 } -cargo = { level = "deny", priority = -1 } -style = { level = "deny", priority = -1 } -complexity = { level = "deny", priority = -1 } -perf = { level = "deny", priority = -1 } -pedantic = { level = "deny", priority = -1 } -nursery = { level = "deny", priority = -1 } -todo = "deny" -print_stdout = "deny" -print_stderr = "deny" -unwrap_used = "deny" -expect_used = "deny" -dbg_macro = "deny" -mem_forget = "deny" -exit = "deny" -integer_division = "deny" -clone_on_ref_ptr = "deny" -indexing_slicing = "deny" -arithmetic_side_effects = "deny" -float_arithmetic = "deny" -as_conversions = "deny" -shadow_reuse = "deny" -shadow_same = "deny" -unseparated_literal_suffix = "deny" -undocumented_unsafe_blocks = "deny" -cast_possible_truncation = "deny" -cast_possible_wrap = "deny" -cast_sign_loss = "deny" -missing_errors_doc = "deny" -multiple_crate_versions = "allow" -redundant_pub_crate = "allow" +all = { level = "forbid", priority = -1 } +correctness = { level = "forbid", priority = -1 } +suspicious = { level = "forbid", priority = -1 } +cargo = { level = "forbid", priority = -1 } +style = { level = "forbid", priority = -1 } +complexity = { level = "forbid", priority = -1 } +perf = { level = "forbid", priority = -1 } +pedantic = { level = "forbid", priority = -1 } +nursery = { level = "forbid", priority = -1 } +todo = "forbid" +print_stdout = "forbid" +print_stderr = "forbid" +unwrap_used = "forbid" +expect_used = "forbid" +dbg_macro = "forbid" +mem_forget = "forbid" +exit = "forbid" +integer_division = "forbid" +clone_on_ref_ptr = "forbid" +indexing_slicing = "forbid" +arithmetic_side_effects = "forbid" +float_arithmetic = "forbid" +as_conversions = "forbid" +shadow_reuse = "forbid" +shadow_same = "forbid" +unseparated_literal_suffix = "forbid" +undocumented_unsafe_blocks = "forbid" +cast_possible_truncation = "forbid" +cast_possible_wrap = "forbid" +cast_sign_loss = "forbid" +missing_errors_doc = "forbid" +multiple_crate_versions = "forbid" +redundant_pub_crate = "forbid" + +allow_attributes = "forbid" +allow_attributes_without_reason = "forbid" +panic = "forbid" +panic_in_result_fn = "forbid" +unimplemented = "forbid" +unreachable = "forbid" +infinite_loop = "forbid" +get_unwrap = "forbid" +unwrap_in_result = "forbid" +lossy_float_literal = "forbid" +fn_to_numeric_cast_any = "forbid" +as_underscore = "forbid" +as_pointer_underscore = "forbid" +host_endian_bytes = "forbid" +mem_replace_option_with_some = "forbid" +rc_mutex = "forbid" +rest_pat_in_fully_bound_structs = "forbid" +string_slice = "forbid" +suspicious_xor_used_as_pow = "forbid" +tests_outside_test_module = "forbid" +large_include_file = "forbid" -- cgit v1.2.3