Rules / TAU-X004

No exceptions to this rule here

decided by Tauten kernel deny core deny edge deny
Applies to tests: yes Exceptions: never

Why

Some rules admit no exceptions: stub macros anywhere, and any profile lint in a kernel crate, whose code must stay extractable and provable.

Fix

Remove the #[expect]/#[allow] and fix the code it excused.

Seen in fixtures

rej-group-allow/src/lib.rs core

//! An exception for a whole lint group covers rules that admit none. /// One.#[expect(clippy::all, reason = "generated code")]#[must_use]pub const fn one() -> u8 {    return 1;}

$ cargo tauten check

error[TAU-X004]: exception for `clippy::all` (a lint group that may cover 22 profile rules) is not permitted in core crates  --> rej-group-allow/src/lib.rs:4:1 (core crate `rej-group-allow`)  = rule: No exceptions to this rule here (decided by Tauten)  = fix: Remove the `#[expect]`/`#[allow]` and fix the code it excused.
Fixture rej-group-allow (core) expects TAU-X004. Output captured at 0200db3.

rej-kernel-exception/src/lib.rs kernel

#![no_std]//! Kernel with a lint exception. /// First byte.#[expect(clippy::indexing_slicing, reason = "trust me")]#[must_use]pub fn first(v: &[u8]) -> u8 {    v[0]}

$ cargo tauten check

error[TAU-X004]: exception for `clippy::indexing_slicing` (TAU-P003) is not permitted in kernel crates  --> rej-kernel-exception/src/lib.rs:5:1 (kernel crate `rej-kernel-exception`)  = rule: No exceptions to this rule here (decided by Tauten)  = fix: Remove the `#[expect]`/`#[allow]` and fix the code it excused.
Fixture rej-kernel-exception (kernel) expects TAU-X004. Output captured at 0200db3.

rej-stub-excused/src/lib.rs edge

//! A stub excused with a reason: still rejected. /// Compute a fee.#[expect(clippy::todo, reason = "will do later")]#[must_use]pub fn fee(_amount: u64) -> u64 {    todo!()}

$ cargo tauten check

error[TAU-X004]: exception for `clippy::todo` (TAU-S001) is not permitted in edge crates  --> rej-stub-excused/src/lib.rs:4:1 (edge crate `rej-stub-excused`)  = rule: No exceptions to this rule here (decided by Tauten)  = fix: Remove the `#[expect]`/`#[allow]` and fix the code it excused.
Fixture rej-stub-excused (edge) expects TAU-X004. Output captured at 0200db3.

rej-test-exception/src/lib.rs core

//! A clean library whose integration test excuses a stub. /// Two.#[must_use]pub const fn two() -> u8 {    2}

$ cargo tauten check

error[TAU-X004]: exception for `clippy::todo` (TAU-S001) is not permitted in core crates  --> rej-test-exception/tests/two.rs:4:1 (core crate `rej-test-exception`)  = rule: No exceptions to this rule here (decided by Tauten)  = fix: Remove the `#[expect]`/`#[allow]` and fix the code it excused.
Fixture rej-test-exception (core) expects TAU-X004. Output captured at 0200db3.

In the terminal

cargo tauten explain TAU-X004

$ cargo tauten explain TAU-X004

TAU-X004: No exceptions to this rule here Why: Some rules admit no exceptions: stub macros anywhere, and any profile lint in a kernel crate, whose code must stay extractable and provable. Fix: Remove the `#[expect]`/`#[allow]` and fix the code it excused. Decided by: TautenDecides: No exception of a rule that admits none (any rule, in kernel crates), and no conditional (`cfg_attr`) exception in kernel crates.Sees: source; complete: yesDoes not see: Attributes and items produced by macros. Read in `src/`, `tests/`, `benches/`, `examples/` and the build script, including inside `cfg_attr`; a lint group counts as every profile rule it may contain (an over-approximation).Applies to tests: yesExceptions allowed: with #[expect(.., reason)]  kernel deny  core deny  edge deny