Expand description
A harness for running custom text-based lints over repository files.
ModulesΒ§
- cfg_
target_ πarch - Checks that code uses
guest_archinstead oftarget_archfor guest-architecture-specific conditionals. - copyright π
- Checks that source files have the correct copyright and license header.
- crate_
name_ πnodash - Checks that crate names and their containing folder names do not use dashes (hyphens). Use underscores instead.
- package_
info π - Checks to ensure that the
[package]sections of Cargo.toml files do not containauthorsorversionfields, and that rust-version, edition, and fields are properly workspaced. - repr_
packed π - Checks that
#[repr(packed)]is not used withoutCβ it should be#[repr(C, packed)]. - trailing_
newline π - Checks that text files end with exactly one trailing newline.
- unsafe_
code_ πcomment - Checks that uses of
expect(unsafe_code)orallow(unsafe_code)are preceded by an// UNSAFETY:comment explaining the justification. - unused_
deps π - Check for unused Rust dependencies
- workspaced π
- Checks that every crateβs Cargo.toml is properly workspaced.
StructsΒ§
- LintCtx
- Context passed to each lint, containing configuration options.
- Lintable
- A wrapper around file content for linting.
- Lints
TraitsΒ§
- Lint
- A trait representing a single lint check.
FunctionsΒ§
- lint_
workspace π - Run a fresh set of lints over a single workspace and its member crates..