mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
@@ -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"
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
|
||||
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user