-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathshared-lints.toml
More file actions
32 lines (30 loc) · 1.4 KB
/
shared-lints.toml
File metadata and controls
32 lines (30 loc) · 1.4 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
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2026 The Contributors to Eclipse OpenSOVD (see CONTRIBUTORS)
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0
# enable pedantic
pedantic = { level = "warn", priority = -1 }
## exclude some too pedantic lints for now
similar_names = "allow"
## lints related to runtime panic behavior
# enforce only checked access to slices to avoid runtime panics
indexing_slicing = "deny"
# disallow any unwraps in the production code
# (unwrap in test code is explicitly allowed)
unwrap_used = "deny"
# enforce that arithmetic operations that can produce side effects always use
# either checked or explicit versions of the operations. eg. `.checked_add(...)`
# or `.saturating_sub(...)` to avoid unexpected runtime behavior or panics.
arithmetic_side_effects = "deny"
## lints related to readability of code
# enforce that references are cloned via eg. `Arc::clone` instead of `.clone()`
# making it explit that a reference is cloned here and not the underlying data.
clone_on_ref_ptr = "warn"
# enforce that the type suffix of a literal is always appended directly
# eg. 12u8 instead of 12_u8
separated_literal_suffix = "deny"