1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2025,2026 ndaal Gesellschaft für Sicherheit in der Informationstechnik mbH & Co KG, Cologne
# clippy.toml — ndaal linting configuration
# Files and directories excluded from linting are handled via Cargo attributes or workspace‑wide permits.
# Reference: https://doc.rust-lang.org/clippy/configuration.html [web:19][web:27]
# ---------------------------------------------------------------------------
# Minimum Supported Rust Version — keep in sync with Cargo.toml
# ---------------------------------------------------------------------------
= "1.93.0" # Controls deprecated / unstable lints for your target MSRV. [web:22][web:27]
# ---------------------------------------------------------------------------
# Complexity thresholds (lower = stricter)
# ---------------------------------------------------------------------------
= 10 # default 25 — simpler functions [web:19][web:22]
= 5 # default 7 — fewer args per function [web:22][web:25]
= 80 # default 100 — smaller functions [web:22][web:25]
= 200 # default 250 — stricter type trees [web:22][web:25]
# ---------------------------------------------------------------------------
# Allowed / blocked identifier patterns
# ---------------------------------------------------------------------------
= false # Enforce consistent inlining in format strings. [web:22][web:25]
= true # .expect() allowed in #[cfg(test)]. [web:22][web:25]
= true # .unwrap() allowed in #[cfg(test)]. [web:22][web:25]
# ---------------------------------------------------------------------------
# Documentation
# ---------------------------------------------------------------------------
= true # Require doc comments on all public (and `pub(crate)`) items. [web:19][web:20]
# ---------------------------------------------------------------------------
# Naming conventions
# ---------------------------------------------------------------------------
= true # Warn when `for x in &vec` could be `for x in vec` or explicit `&vec`. [web:19][web:23]
# ---------------------------------------------------------------------------
# Security / correctness
# ---------------------------------------------------------------------------
= true # Lint private items too, not just public API. [web:22][web:25]
# Optional: tighten common correctness lints
# Uncomment if you want to be stricter on panics and unsafe usage.
# allow-debug-in-tests = false # Forbid `dbg!` in tests; prefer unit tests without debugging remnants.
# allow-panic-in-tests = false # Forbid `panic!` in tests; prefer explicit `assert_*` or `Result` handling.
# allow-unsafe-code = false # Forbid `unsafe` in the whole crate; allow only under explicit `#[allow(unsafe_code)]`.