@@ -6,6 +6,11 @@ authors = ["Techcable <git@techcable.net>"]
66license = " Apache-2.0 OR MIT"
77edition = " 2024"
88repository = " https://github.com/DuckLogic/qbe-parser.rs"
9+ keywords = [" qbe" , " ir" , " parser" ]
10+ categories = [
11+ " parser-implementations" ,
12+ " compilers" ,
13+ ]
914
1015[dependencies ]
1116equivalent = " 1"
@@ -25,3 +30,45 @@ chumsky = "0.11"
2530[dev-dependencies ]
2631indoc = " 2"
2732similar-asserts = " 1"
33+
34+ [lints .clippy ]
35+ # # groups ##
36+ cargo = { priority = -1 , level = " warn" }
37+ pedantic = { level = " warn" , priority = -1 }
38+
39+ # restrictions
40+ redundant_test_prefix = " warn" # name test_foo is redundant with #[test] attr
41+
42+ # safety
43+ undocumented_unsafe_blocks = " deny"
44+ multiple_unsafe_ops_per_block = " deny"
45+
46+ # # aggressively lint casts ##
47+ # in an ideal world, overflowing casts would panic
48+ # linting them (with deny) is the second best option
49+ cast-possible-truncation = " deny"
50+ cast-possible-wrap = " deny"
51+ cast-precision-loss = " deny"
52+ cast-sign-loss = " deny"
53+ char-lit-as-u8 = " deny"
54+ cast-ptr-alignment = " deny"
55+ fn-to-numeric-cast = " deny"
56+ fn-to-numeric-cast-any = " deny"
57+ fn-to-numeric-cast-with-truncation = " deny"
58+ cast-lossless = " allow" # lossless casts are fine, lints will catch if types change
59+ ptr_as_ptr = " allow" # pointer casts are fine as long as they don't violate another rule
60+
61+ #
62+ # excessively pedantic (even for clippy::pedantic)
63+ #
64+ too-many-lines = " allow"
65+ # We don't put #[must_use] on len
66+ must-use-candidate = " allow"
67+ return-self-not-must-use = " allow"
68+ items-after-statements = " allow"
69+ redundant-else = " allow"
70+ if-not-else = " allow"
71+ missing-errors-doc = " allow"
72+ wildcard-imports = " allow"
73+ single-match-else = " allow"
74+ trivially-copy-pass-by-ref = " allow"
0 commit comments