Additional lints

This commit is contained in:
2025-04-04 23:31:28 -06:00
parent 984ad106ab
commit a6d429ae41
4 changed files with 36 additions and 2 deletions
+16 -2
View File
@@ -7,8 +7,22 @@ edition.workspace = true
license-file.workspace = true
rust-version.workspace = true
[lints]
workspace = true
[lints.rust]
arithmetic_overflow = "forbid"
unsafe_code = "forbid"
[lints.clippy]
arithmetic_side_effects = "forbid"
as_conversions = "forbid"
checked_conversions = "forbid"
default_union_representation = "forbid"
expect_used = "forbid"
indexing_slicing = "forbid"
integer_division = "forbid"
integer_division_remainder_used = "forbid"
transmute_undefined_repr = "forbid"
unchecked_duration_subtraction = "forbid"
unwrap_used = "deny"
[build-dependencies]
architect = { workspace = true }
+4
View File
@@ -3,11 +3,15 @@ fn main() {
architect::output::raw::warning(&format!("{k}={v}"));
}
#[allow(clippy::unwrap_used)]
let manifest_path = architect::input::raw::cargo_manifest_path_os().unwrap();
architect::output::raw::warning(&format!("Manifest Path: {manifest_path:?}"));
#[allow(clippy::unwrap_used)]
let arch = architect::input::raw::cargo_cfg_target_arch_os().unwrap();
#[allow(clippy::unwrap_used)]
let os = architect::input::raw::cargo_cfg_target_os_os().unwrap();
#[allow(clippy::unwrap_used)]
let endian = architect::input::raw::cargo_cfg_target_endian_os().unwrap();
architect::output::raw::warning(&format!("Target: {arch:?} {os:?} ({endian:?})"));
}
+1
View File
@@ -0,0 +1 @@