You've already forked architect
Additional lints
This commit is contained in:
+15
@@ -9,12 +9,27 @@ license-file = "LICENSE.md"
|
|||||||
rust-version = "1.85.0"
|
rust-version = "1.85.0"
|
||||||
|
|
||||||
[workspace.lints.rust]
|
[workspace.lints.rust]
|
||||||
|
arithmetic_overflow = "forbid"
|
||||||
unsafe_code = "forbid"
|
unsafe_code = "forbid"
|
||||||
|
|
||||||
|
[workspace.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 = "forbid"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
lto = "fat"
|
lto = "fat"
|
||||||
opt-level = 3
|
opt-level = 3
|
||||||
|
overflow-checks = true
|
||||||
strip = "debuginfo"
|
strip = "debuginfo"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
|
|||||||
+16
-2
@@ -7,8 +7,22 @@ edition.workspace = true
|
|||||||
license-file.workspace = true
|
license-file.workspace = true
|
||||||
rust-version.workspace = true
|
rust-version.workspace = true
|
||||||
|
|
||||||
[lints]
|
[lints.rust]
|
||||||
workspace = true
|
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]
|
[build-dependencies]
|
||||||
architect = { workspace = true }
|
architect = { workspace = true }
|
||||||
|
|||||||
@@ -3,11 +3,15 @@ fn main() {
|
|||||||
architect::output::raw::warning(&format!("{k}={v}"));
|
architect::output::raw::warning(&format!("{k}={v}"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::unwrap_used)]
|
||||||
let manifest_path = architect::input::raw::cargo_manifest_path_os().unwrap();
|
let manifest_path = architect::input::raw::cargo_manifest_path_os().unwrap();
|
||||||
architect::output::raw::warning(&format!("Manifest Path: {manifest_path:?}"));
|
architect::output::raw::warning(&format!("Manifest Path: {manifest_path:?}"));
|
||||||
|
|
||||||
|
#[allow(clippy::unwrap_used)]
|
||||||
let arch = architect::input::raw::cargo_cfg_target_arch_os().unwrap();
|
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();
|
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();
|
let endian = architect::input::raw::cargo_cfg_target_endian_os().unwrap();
|
||||||
architect::output::raw::warning(&format!("Target: {arch:?} {os:?} ({endian:?})"));
|
architect::output::raw::warning(&format!("Target: {arch:?} {os:?} ({endian:?})"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user