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:
r4bbit
2026-05-22 09:46:53 +02:00
parent 49d7f91ee5
commit 6fd87766c2
7 changed files with 126 additions and 64 deletions
+32 -16
View File
@@ -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"