Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions src/hyperlight_common/clippy.toml

This file was deleted.

5 changes: 0 additions & 5 deletions src/hyperlight_common/src/clippy.toml

This file was deleted.

10 changes: 0 additions & 10 deletions src/hyperlight_common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,6 @@ limitations under the License.
#![cfg_attr(not(any(test, debug_assertions)), warn(clippy::panic))]
#![cfg_attr(not(any(test, debug_assertions)), warn(clippy::expect_used))]
#![cfg_attr(not(any(test, debug_assertions)), warn(clippy::unwrap_used))]
// clippy.toml disallows assert!/assert_eq!/assert_ne! via disallowed-macros.
// That lint is active by default, so we suppress it globally here, then
// selectively re-enable it for release host builds (feature = "std").
// Guest targets (no std) are allowed asserts — panics are contained in the
// micro-VM and cannot crash the host. Tests and debug builds are also allowed.
#![allow(clippy::disallowed_macros)]
#![cfg_attr(
not(any(test, debug_assertions, not(feature = "std"))),
warn(clippy::disallowed_macros)
)]
// We use Arbitrary during fuzzing, which requires std
#![cfg_attr(not(feature = "fuzzing"), no_std)]

Expand Down
1 change: 0 additions & 1 deletion src/hyperlight_common/src/version_note.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ impl<const NAME_SZ: usize, const DESC_SZ: usize> ElfNote<NAME_SZ, DESC_SZ> {
///
/// Panics at compile time if `NAME_SZ` or `DESC_SZ` don't match
/// `padded_name_size(name.len() + 1)` or `padded_desc_size(desc.len() + 1)`.
#[allow(clippy::disallowed_macros)] // These asserts are evaluated at compile time only (const fn).
pub const fn new(name: &str, desc: &str, n_type: u32) -> Self {
// NAME_SZ and DESC_SZ must match the padded sizes.
assert!(
Expand Down
5 changes: 0 additions & 5 deletions src/hyperlight_host/benches/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

#![expect(
clippy::disallowed_macros,
reason = "This is a benchmark file, so using disallowed macros is fine here."
)]

use std::sync::{Arc, Barrier, Mutex};
use std::thread;
use std::time::{Duration, Instant};
Expand Down
5 changes: 0 additions & 5 deletions src/hyperlight_host/clippy.toml

This file was deleted.

2 changes: 0 additions & 2 deletions src/hyperlight_host/examples/crashdump/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ limitations under the License.
//!
//! Core dump files are named `hl_core_<timestamp>.elf`.

#![allow(clippy::disallowed_macros)]

#[cfg(all(crashdump, target_os = "linux"))]
use std::io::Write;

Expand Down
1 change: 0 additions & 1 deletion src/hyperlight_host/examples/guest-debugging/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#![allow(clippy::disallowed_macros)]
use std::thread;

use hyperlight_host::sandbox::SandboxConfiguration;
Expand Down
1 change: 0 additions & 1 deletion src/hyperlight_host/examples/hello-world/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#![allow(clippy::disallowed_macros)]
use std::thread;

use hyperlight_host::{MultiUseSandbox, UninitializedSandbox};
Expand Down
1 change: 0 additions & 1 deletion src/hyperlight_host/examples/logging/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#![allow(clippy::disallowed_macros)]
extern crate hyperlight_host;

use std::sync::{Arc, Barrier};
Expand Down
1 change: 0 additions & 1 deletion src/hyperlight_host/examples/map-file-cow-test/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ limitations under the License.
// Run:
// cargo run --release --example map-file-cow-test

#![allow(clippy::disallowed_macros)]
use std::path::Path;

use hyperlight_host::sandbox::SandboxConfiguration;
Expand Down
1 change: 0 additions & 1 deletion src/hyperlight_host/examples/metrics/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#![allow(clippy::disallowed_macros)]
extern crate hyperlight_host;
use std::sync::{Arc, Barrier};
use std::thread::{JoinHandle, spawn};
Expand Down
1 change: 0 additions & 1 deletion src/hyperlight_host/examples/tracing-chrome/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#![allow(clippy::disallowed_macros)]
use hyperlight_host::sandbox::uninitialized::UninitializedSandbox;
use hyperlight_host::{GuestBinary, Result};
use hyperlight_testing::simple_guest_as_string;
Expand Down
2 changes: 0 additions & 2 deletions src/hyperlight_host/examples/tracing-otlp/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#![allow(clippy::disallowed_macros)]
//use opentelemetry_sdk::resource::ResourceBuilder;
use opentelemetry_sdk::trace::SdkTracerProvider;
use tracing::{Level, span};
use tracing_opentelemetry::OpenTelemetryLayer;
Expand Down
1 change: 0 additions & 1 deletion src/hyperlight_host/examples/tracing/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#![allow(clippy::disallowed_macros)]
use tracing::{Level, span};
extern crate hyperlight_host;
use std::sync::{Arc, Barrier};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,6 @@ impl From<&CommonSpecialRegisters> for kvm_sregs {
pub(crate) struct Align16<T>(pub(crate) T);

#[cfg(target_os = "windows")]
#[allow(clippy::disallowed_macros)] // compile time
const _: () = {
assert!(
std::mem::size_of::<Align16<WHV_REGISTER_VALUE>>()
Expand Down
1 change: 0 additions & 1 deletion src/hyperlight_host/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ limitations under the License.
#![cfg_attr(not(any(test, debug_assertions)), warn(clippy::panic))]
#![cfg_attr(not(any(test, debug_assertions)), warn(clippy::expect_used))]
#![cfg_attr(not(any(test, debug_assertions)), warn(clippy::unwrap_used))]
#![cfg_attr(any(test, debug_assertions), allow(clippy::disallowed_macros))]

#[cfg(feature = "build-metadata")]
use std::sync::Once;
Expand Down
1 change: 0 additions & 1 deletion src/hyperlight_host/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#![allow(clippy::disallowed_macros)]
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, Barrier};
use std::thread;
Expand Down
1 change: 0 additions & 1 deletion src/hyperlight_host/tests/sandbox_host_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#![allow(clippy::disallowed_macros)]
use core::f64;
use std::sync::mpsc::channel;
use std::sync::{Arc, Mutex};
Expand Down
1 change: 0 additions & 1 deletion src/hyperlight_host/tests/wit_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#![allow(clippy::disallowed_macros)]

use std::sync::{Arc, Mutex};

Expand Down
Loading