-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathclippy.toml
More file actions
40 lines (33 loc) · 1.68 KB
/
clippy.toml
File metadata and controls
40 lines (33 loc) · 1.68 KB
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
# Clippy configuration for trusted-server
# See: https://doc.rust-lang.org/clippy/configuration.html
# =============================================================================
# Complexity Thresholds
# =============================================================================
# Cognitive complexity threshold for functions (default: 25)
# Set to 30 to accommodate existing complex HTML/RSC processing functions
# like `create_html_processor` and `rewrite_rsc_scripts_combined`.
# Consider refactoring functions that exceed this threshold.
cognitive-complexity-threshold = 30
# Maximum number of lines in a function (default: 100)
# Set to 200 to allow larger handler functions that process HTTP requests
# with multiple validation steps. Prefer extracting helpers when possible.
too-many-lines-threshold = 200
# =============================================================================
# Test Allowances
# =============================================================================
# Allow expect() in tests for clearer failure messages than unwrap()
allow-expect-in-tests = true
# Allow unwrap() in tests where panicking on failure is acceptable
allow-unwrap-in-tests = true
# =============================================================================
# Future Considerations
# =============================================================================
#
# As the codebase matures, consider tightening these thresholds:
# - cognitive-complexity-threshold = 25 (default)
# - too-many-lines-threshold = 100 (default)
#
# Additional lints to consider enabling in Cargo.toml:
# - needless_pass_by_value = "warn"
# - redundant_closure_for_method_calls = "warn"
# - missing_const_for_fn = "warn"