chore: Add clippy lints (#529)

Lints are added (deny) at crate level.

In each offending file, the failing lints are explicitly allowed.
Each file will be fixed in subsequent PRs.

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
This commit is contained in:
Anand Krishnamoorthi
2025-12-23 15:59:34 -06:00
committed by GitHub
parent 604591a0f7
commit 249dcd0b43
121 changed files with 703 additions and 23 deletions
+5
View File
@@ -1,3 +1,8 @@
#![allow(
clippy::missing_const_for_fn,
clippy::as_conversions,
clippy::unused_trait_names
)]
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
+10
View File
@@ -1,5 +1,15 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![allow(
clippy::unwrap_used,
clippy::arithmetic_side_effects,
clippy::indexing_slicing,
clippy::option_if_let_else,
clippy::missing_const_for_fn,
clippy::as_conversions,
clippy::unused_trait_names,
clippy::pattern_type_mismatch
)]
use alloc::format;
use alloc::string::{String, ToString};
+1
View File
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![allow(clippy::unused_trait_names)]
use super::Program;
use alloc::string::{String, ToString};
+5
View File
@@ -1,5 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![allow(
clippy::arithmetic_side_effects,
clippy::unused_trait_names,
clippy::pattern_type_mismatch
)]
use alloc::format;
use alloc::string::{String, ToString};
+6
View File
@@ -1,5 +1,11 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![allow(
clippy::indexing_slicing,
clippy::arithmetic_side_effects,
clippy::as_conversions,
clippy::unused_trait_names
)]
use alloc::format;
use alloc::string::{String, ToString};
+2
View File
@@ -1,6 +1,8 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![allow(clippy::as_conversions, clippy::unused_trait_names)]
use alloc::format;
use alloc::string::{String, ToString};
use alloc::vec::Vec;
+1
View File
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![allow(clippy::redundant_pub_crate)]
pub(crate) mod binary;
mod json;
+5
View File
@@ -1,5 +1,10 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![allow(
clippy::redundant_pub_crate,
clippy::unused_trait_names,
clippy::pattern_type_mismatch
)]
use alloc::collections::{BTreeMap, BTreeSet};
use alloc::format;
+6 -1
View File
@@ -1,6 +1,11 @@
#![allow(clippy::missing_const_for_fn)]
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
#![allow(
clippy::indexing_slicing,
clippy::arithmetic_side_effects,
clippy::as_conversions
)]
use alloc::string::String;
use alloc::vec::Vec;
use serde::{Deserialize, Serialize};