xref: /linux/.clippy.toml (revision 53597deca0e38c30e6cd4ba2114fa42d2bcd85bb)
1# SPDX-License-Identifier: GPL-2.0
2
3msrv = "1.85.0"
4
5check-private-items = true
6
7disallowed-macros = [
8    # The `clippy::dbg_macro` lint only works with `std::dbg!`, thus we simulate
9    # it here, see: https://github.com/rust-lang/rust-clippy/issues/11303.
10    { path = "kernel::dbg", reason = "the `dbg!` macro is intended as a debugging tool", allow-invalid = true },
11]
12
13[[disallowed-methods]]
14path = "core::ffi::CStr::as_ptr"
15replacement = "kernel::prelude::CStrExt::as_char_ptr"
16reason = "kernel's `char` is always unsigned, use `as_char_ptr` instead"
17
18[[disallowed-methods]]
19path = "core::ffi::CStr::from_ptr"
20replacement = "kernel::prelude::CStrExt::from_char_ptr"
21reason = "kernel's `char` is always unsigned, use `from_char_ptr` instead"
22