Repository navigation
Expand file tree
/
Copy pathclippy.toml
More file actions
48 lines (41 loc) · 3.66 KB
/
Copy pathclippy.toml
File metadata and controls
48 lines (41 loc) · 3.66 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
41
42
43
44
45
46
47
48
# Configuration for the clippy half of the lint wall.
# Settings only. A key with no live lint behind it does not belong here.
msrv = "1.98.0"
# A function past a hundred lines has stopped being one operation.
too-many-lines-threshold = 100
# Past four levels of nesting the repair is a type that knows its state, not a deeper block.
excessive-nesting-threshold = 4
# A bool field is an unnamed two-state machine; states are named enums here.
max-struct-bools = 0
max-fn-params-bools = 0
# Version 0.0.0, never published: there is no exported API to shield from stricter suggestions, so pedantic runs at full strength on public items too.
avoid-breaking-exported-api = false
# Product names in prose are words, not code paths needing backticks.
doc-valid-idents = ["ThreadPak", "Macroonz", ".."]
# The machine is a function of its declared input: no ambient clock, no
# nondeterministic iteration order, no environment reads.
disallowed-types = [
{ path = "std::time::SystemTime", reason = "no ambient clock: output is a function of declared input" },
{ path = "std::time::Instant", reason = "no ambient clock: output is a function of declared input" },
{ path = "std::collections::HashMap", reason = "unseeded hash iteration is nondeterministic: use BTreeMap" },
{ path = "std::collections::HashSet", reason = "unseeded hash iteration is nondeterministic: use BTreeSet" },
]
disallowed-methods = [
{ path = "f32::algebraic_add", reason = "algebraic floating point is approximate; exact values, identities, decisions, evidence, and reference routes may not use it" },
{ path = "f32::algebraic_sub", reason = "algebraic floating point is approximate; exact values, identities, decisions, evidence, and reference routes may not use it" },
{ path = "f32::algebraic_mul", reason = "algebraic floating point is approximate; exact values, identities, decisions, evidence, and reference routes may not use it" },
{ path = "f32::algebraic_div", reason = "algebraic floating point is approximate; exact values, identities, decisions, evidence, and reference routes may not use it" },
{ path = "f32::algebraic_rem", reason = "algebraic floating point is approximate; exact values, identities, decisions, evidence, and reference routes may not use it" },
{ path = "f64::algebraic_add", reason = "algebraic floating point is approximate; exact values, identities, decisions, evidence, and reference routes may not use it" },
{ path = "f64::algebraic_sub", reason = "algebraic floating point is approximate; exact values, identities, decisions, evidence, and reference routes may not use it" },
{ path = "f64::algebraic_mul", reason = "algebraic floating point is approximate; exact values, identities, decisions, evidence, and reference routes may not use it" },
{ path = "f64::algebraic_div", reason = "algebraic floating point is approximate; exact values, identities, decisions, evidence, and reference routes may not use it" },
{ path = "f64::algebraic_rem", reason = "algebraic floating point is approximate; exact values, identities, decisions, evidence, and reference routes may not use it" },
{ path = "std::env::var", reason = "the environment is not a declared port" },
{ path = "std::env::var_os", reason = "the environment is not a declared port" },
{ path = "std::env::vars", reason = "the environment is not a declared port" },
{ path = "std::env::vars_os", reason = "the environment is not a declared port" },
{ path = "std::env::args", reason = "arguments are not a declared port" },
{ path = "std::env::args_os", reason = "arguments are not a declared port" },
{ path = "std::env::current_dir", reason = "host location is not a declared port" },
]