mirror of
https://github.com/devmobasa/wayscriber.git
synced 2026-11-01 07:36:42 +01:00
Put identifiers and Wayland protocol names in doc comments in backticks
(`wl_output`, `zwp_tablet_v2`). Product names that docs write plainly
(GLib, HarfBuzz, HiDPI, JetBrains, MSBuild, StatusNotifierItem, VSync)
go in `doc-valid-idents` in clippy.toml, next to Clippy's default list.
Mechanical, with the lint enabled in Cargo.toml:
cargo clippy --fix --workspace --all-targets --all-features
cargo clippy --fix --workspace --all-targets --no-default-features
cargo fmt --all
Two comments that the fix could not mark up cleanly were reworded by
hand: the surface module summary and the zoom-chip invariant.
21 lines
1.2 KiB
TOML
21 lines
1.2 KiB
TOML
# Keep functions within the agreed cognitive-complexity budget. Clippy emits a
|
|
# warning above this value, and CI promotes warnings to errors.
|
|
cognitive-complexity-threshold = 20
|
|
|
|
# Tests may panic for assertions, so `unwrap_used` applies to production code.
|
|
allow-unwrap-in-tests = true
|
|
|
|
# Never reach inside a poisoned lock, and do not rely on catching panics.
|
|
disallowed-methods = [
|
|
{ path = "std::panic::catch_unwind", reason = "panics are bugs; recover only as defense in depth with a reviewed `#[expect]`" },
|
|
{ path = "std::sync::PoisonError::get_mut", reason = "a poisoned lock may hold broken invariants" },
|
|
{ path = "std::sync::PoisonError::get_ref", reason = "a poisoned lock may hold broken invariants" },
|
|
{ path = "std::sync::PoisonError::into_inner", reason = "a poisoned lock may hold broken invariants" },
|
|
{ path = "std::sync::Mutex::clear_poison", reason = "a poisoned lock may hold broken invariants" },
|
|
{ path = "std::sync::RwLock::clear_poison", reason = "a poisoned lock may hold broken invariants" },
|
|
]
|
|
|
|
# Product and library names that docs may write without backticks. The `..`
|
|
# keeps Clippy's default list.
|
|
doc-valid-idents = ["GLib", "HarfBuzz", "HiDPI", "JetBrains", "MSBuild", "StatusNotifierItem", "VSync", ".."]
|