mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-08-26 06:31:19 +00:00
chore: adjust linting rules and introduce Makefile
This relaxes some of the rules introduced in the previous commit. To simplify testing, building and formatting locally and on CI, we also introduce a dedicated makefile
This commit is contained in:
@@ -7,30 +7,46 @@ edition = "2021"
|
||||
|
||||
[lints.rust]
|
||||
rust_2018_idioms = { level = "deny", priority = -1 }
|
||||
unsafe_code = "forbid"
|
||||
# deny (not forbid) so a targeted per-item #[allow] remains possible if ever needed
|
||||
unsafe_code = "deny"
|
||||
|
||||
[lints.clippy]
|
||||
all = { level = "deny", priority = -1 }
|
||||
allow_attributes = "warn"
|
||||
allow_attributes_without_reason = "deny"
|
||||
arithmetic_side_effects = "deny"
|
||||
as_conversions = "deny"
|
||||
cast_possible_truncation = "deny"
|
||||
cast_possible_wrap = "deny"
|
||||
cast_precision_loss = "warn"
|
||||
cast_sign_loss = "deny"
|
||||
# Deny only the groups where a new lint should always be a hard error.
|
||||
# style/pedantic lints default to warn so toolchain upgrades don't break the
|
||||
# build unexpectedly — they can be evaluated and addressed at our own pace.
|
||||
correctness = { level = "deny", priority = -1 }
|
||||
suspicious = { level = "deny", priority = -1 }
|
||||
perf = { level = "deny", priority = -1 }
|
||||
style = { level = "warn", priority = -1 }
|
||||
|
||||
# Generated-code / placeholder blockers.
|
||||
dbg_macro = "deny"
|
||||
indexing_slicing = "deny"
|
||||
integer_division = "warn"
|
||||
large_enum_variant = "deny"
|
||||
match_wildcard_for_single_variants = "warn"
|
||||
module_name_repetitions = "allow"
|
||||
similar_names = "allow"
|
||||
todo = "deny"
|
||||
unimplemented = "deny"
|
||||
unwrap_used = "deny"
|
||||
|
||||
# Lint suppression hygiene.
|
||||
allow_attributes = "warn"
|
||||
allow_attributes_without_reason = "deny"
|
||||
|
||||
# Determinism, panic-safety, and arithmetic correctness.
|
||||
arithmetic_side_effects = "deny"
|
||||
indexing_slicing = "deny"
|
||||
|
||||
# Cast discipline.
|
||||
as_conversions = "deny"
|
||||
cast_possible_truncation = "deny"
|
||||
cast_possible_wrap = "deny"
|
||||
cast_sign_loss = "deny"
|
||||
|
||||
# API and enum evolution.
|
||||
large_enum_variant = "deny"
|
||||
wildcard_enum_match_arm = "deny"
|
||||
|
||||
# Too noisy for this codebase unless enforced selectively.
|
||||
module_name_repetitions = "allow"
|
||||
similar_names = "allow"
|
||||
|
||||
[[bin]]
|
||||
name = "token"
|
||||
path = "src/bin/token.rs"
|
||||
|
||||
Reference in New Issue
Block a user