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
# Clippy configuration for moesniper
# Enterprise-grade linting tuned for a security-focused CLI tool.
#
# Policy:
# CI runs: cargo clippy --all-targets -- -D warnings
# This file + [lints.clippy] in Cargo.toml enforce standards beyond defaults.
# --- Toolchain ---
= "1.87"
# --- API Safety ---
# Prevent Clippy from suggesting changes that break public API surface.
= true
# --- Complexity ---
# Result<String, String> is a common pattern in this project (not truly complex).
# type-complexity is allowed in Cargo.toml [lints.clippy], so this threshold is
# a safety net if that allow is ever removed.
= 250
# Cognitive complexity cap per function. Default is 25; 30 gives slight headroom
# for the error-handling nesting patterns in cmd_splice and cmd_manifest.
= 30
# --- Function Design ---
# Max parameters per function. Default is 7; pin it to prevent drift.
= 7
# Max lines in a function body before Clippy flags it. Default is 100.
= 100
# Max arguments per function call before Clippy flags it. Default is 7.
= 7
# --- Variable Naming ---
# Max single-char binding names in a scope before Clippy flags it. Default is 5.
= 5
# --- Include Guard ---
# Max file size (bytes) for include! macros. Default is 1MB.
= 1000000
# --- Strict mode (opt-in) ---
# Run with: cargo clippy -- -W clippy::pedantic
# Pedantic lints are NOT enabled by default — they're opt-in for pre-publish audits.