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" suspicious = "deny"
# Individual Lints # Individual Lints
absolute_paths = "deny"
assertions_on_result_states = "deny" assertions_on_result_states = "deny"
if_not_else = "deny" if_not_else = "deny"
manual_string_new = "deny" manual_string_new = "deny"

View File

@@ -8,6 +8,9 @@
//! Implements platform specific functionality. //! Implements platform specific functionality.
//! Supported platforms: x86_64, aarch64, riscv64. //! 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::collections::BTreeMap;
use std::str::FromStr; use std::str::FromStr;
use std::sync::Arc; use std::sync::Arc;

View File

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

View File

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

View File

@@ -2,6 +2,9 @@
// //
// SPDX-License-Identifier: Apache-2.0 // 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 std::error::Error;
use log::error; use log::error;

View File

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

View File

@@ -4,6 +4,8 @@
// //
#![cfg(any(devcli_testenv, clippy))] #![cfg(any(devcli_testenv, clippy))]
#![allow(clippy::undocumented_unsafe_blocks)] #![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 // When enabling the `mshv` feature, we skip quite some tests and
// hence have known dead-code. This annotation silences dead-code // hence have known dead-code. This annotation silences dead-code
// related warnings for our quality workflow to pass. // related warnings for our quality workflow to pass.

View File

@@ -4,6 +4,8 @@
// //
#![cfg(any(devcli_testenv, clippy))] #![cfg(any(devcli_testenv, clippy))]
#![allow(clippy::undocumented_unsafe_blocks)] #![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 // When enabling the `mshv` feature, we skip quite some tests and
// hence have known dead-code. This annotation silences dead-code // hence have known dead-code. This annotation silences dead-code
// related warnings for our quality workflow to pass. // related warnings for our quality workflow to pass.

View File

@@ -7,6 +7,9 @@
//! Emulates virtual and hardware devices. //! 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; pub mod acpi;
#[cfg(target_arch = "riscv64")] #[cfg(target_arch = "riscv64")]
pub mod aia; pub mod aia;

View File

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

View File

@@ -3,6 +3,9 @@
// SPDX-License-Identifier: Apache-2.0 // 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 // Custom harness to run performance tests
mod micro_bench_block; mod micro_bench_block;
mod performance_tests; mod performance_tests;

View File

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

View File

@@ -4,6 +4,8 @@
// //
#![allow(clippy::undocumented_unsafe_blocks)] #![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::collections::HashMap;
use std::ffi::OsStr; use std::ffi::OsStr;

View File

@@ -3,6 +3,9 @@
// SPDX-License-Identifier: Apache-2.0 // 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 emulator;
pub mod socket; pub mod socket;

View File

@@ -10,6 +10,9 @@
//! Implements virtio devices, queues, and transport mechanisms. //! 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::io;
use std::sync::atomic::{AtomicU8, Ordering}; use std::sync::atomic::{AtomicU8, Ordering};

View File

@@ -3,6 +3,9 @@
// SPDX-License-Identifier: Apache-2.0 AND BSD-3-Clause // 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::collections::BTreeMap;
use std::{io, result}; use std::{io, result};

View File

@@ -3,6 +3,9 @@
// SPDX-License-Identifier: Apache-2.0 // 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::collections::HashMap;
use std::fs::File; use std::fs::File;
use std::io::{Read, Write, stdout}; use std::io::{Read, Write, stdout};