build: Deny clippy::absolute_paths

Removal of absolute paths is currently in progress. To avoid regressing
those changes add a clippy deny at the workspace level and at the crate
level override with #[expect(clippy::absolute_paths)]

See: #7670

Signed-off-by: Rob Bradford <rbradford@meta.com>
This commit is contained in:
Rob Bradford
2026-06-17 11:16:02 +01:00
parent 257a00547a
commit 2bc968ba1d
17 changed files with 44 additions and 0 deletions

View File

@@ -116,6 +116,7 @@ style = "deny"
suspicious = "deny"
# Individual Lints
absolute_paths = "deny"
assertions_on_result_states = "deny"
if_not_else = "deny"
manual_string_new = "deny"

View File

@@ -8,6 +8,9 @@
//! Implements platform specific functionality.
//! Supported platforms: x86_64, aarch64, riscv64.
// TODO: Trim qualified paths in this crate, then drop this expectation.
#![expect(clippy::absolute_paths)]
use std::collections::BTreeMap;
use std::str::FromStr;
use std::sync::Arc;

View File

@@ -256,6 +256,8 @@ pub(crate) fn uuid_from_guid(buf: &[u8]) -> Uuid {
}
#[cfg(test)]
// TODO: Trim qualified paths in these tests, then drop this expectation.
#[expect(clippy::absolute_paths)]
mod tests {
use std::process::Command;

View File

@@ -3,6 +3,9 @@
// SPDX-License-Identifier: Apache-2.0
//
// TODO: Trim qualified paths in this crate, then drop this expectation.
#![expect(clippy::absolute_paths)]
#[cfg(test)]
#[path = "../test_util.rs"]
mod test_util;

View File

@@ -2,6 +2,9 @@
//
// SPDX-License-Identifier: Apache-2.0
// TODO: Trim qualified paths in this crate, then drop this expectation.
#![expect(clippy::absolute_paths)]
use std::error::Error;
use log::error;

View File

@@ -3,6 +3,9 @@
// SPDX-License-Identifier: Apache-2.0
//
// TODO: Trim qualified paths in this crate, then drop this expectation.
#![expect(clippy::absolute_paths)]
mod logger;
#[cfg(test)]
mod test_util;

View File

@@ -4,6 +4,8 @@
//
#![cfg(any(devcli_testenv, clippy))]
#![allow(clippy::undocumented_unsafe_blocks)]
// TODO: Trim qualified paths in this crate, then drop this expectation.
#![expect(clippy::absolute_paths)]
// When enabling the `mshv` feature, we skip quite some tests and
// hence have known dead-code. This annotation silences dead-code
// related warnings for our quality workflow to pass.

View File

@@ -4,6 +4,8 @@
//
#![cfg(any(devcli_testenv, clippy))]
#![allow(clippy::undocumented_unsafe_blocks)]
// TODO: Trim qualified paths in this crate, then drop this expectation.
#![expect(clippy::absolute_paths)]
// When enabling the `mshv` feature, we skip quite some tests and
// hence have known dead-code. This annotation silences dead-code
// related warnings for our quality workflow to pass.

View File

@@ -7,6 +7,9 @@
//! Emulates virtual and hardware devices.
// TODO: Trim qualified paths in this crate, then drop this expectation.
#![cfg_attr(target_arch = "x86_64", expect(clippy::absolute_paths))]
pub mod acpi;
#[cfg(target_arch = "riscv64")]
pub mod aia;

View File

@@ -21,6 +21,9 @@
//! - riscv64 (experimental)
//!
// TODO: Trim qualified paths in this crate, then drop this expectation.
#![expect(clippy::absolute_paths)]
/// Architecture specific definitions
#[macro_use]
pub mod arch;

View File

@@ -3,6 +3,9 @@
// SPDX-License-Identifier: Apache-2.0
//
// TODO: Trim qualified paths in this crate, then drop this expectation.
#![expect(clippy::absolute_paths)]
// Custom harness to run performance tests
mod micro_bench_block;
mod performance_tests;

View File

@@ -116,6 +116,8 @@ impl Write for SerialBuffer {
}
#[cfg(test)]
// TODO: Trim qualified paths in these tests, then drop this expectation.
#[expect(clippy::absolute_paths)]
mod tests {
use std::io::Write;
use std::sync::atomic::{AtomicBool, Ordering};

View File

@@ -4,6 +4,8 @@
//
#![allow(clippy::undocumented_unsafe_blocks)]
// TODO: Trim qualified paths in this crate, then drop this expectation.
#![expect(clippy::absolute_paths)]
use std::collections::HashMap;
use std::ffi::OsStr;

View File

@@ -3,6 +3,9 @@
// SPDX-License-Identifier: Apache-2.0
//
// TODO: Trim qualified paths in this crate, then drop this expectation.
#![expect(clippy::absolute_paths)]
pub mod emulator;
pub mod socket;

View File

@@ -10,6 +10,9 @@
//! Implements virtio devices, queues, and transport mechanisms.
// TODO: Trim qualified paths in this crate, then drop this expectation.
#![expect(clippy::absolute_paths)]
use std::io;
use std::sync::atomic::{AtomicU8, Ordering};

View File

@@ -3,6 +3,9 @@
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause
//
// TODO: Trim qualified paths in this crate, then drop this expectation.
#![expect(clippy::absolute_paths)]
use std::collections::BTreeMap;
use std::{io, result};

View File

@@ -3,6 +3,9 @@
// SPDX-License-Identifier: Apache-2.0
//
// TODO: Trim qualified paths in this crate, then drop this expectation.
#![expect(clippy::absolute_paths)]
use std::collections::HashMap;
use std::fs::File;
use std::io::{Read, Write, stdout};