mirror of
https://github.com/microsoft/regorus.git
synced 2026-08-05 02:16:11 +00:00
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:
committed by
GitHub
parent
604591a0f7
commit
249dcd0b43
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#![allow(clippy::use_debug, clippy::pattern_type_mismatch)]
|
||||
|
||||
use crate::*;
|
||||
|
||||
type String = Rc<str>;
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#![allow(
|
||||
clippy::expect_used,
|
||||
clippy::missing_const_for_fn,
|
||||
clippy::option_if_let_else
|
||||
)] // meta schema loader expects static resources
|
||||
#![allow(dead_code)]
|
||||
use crate::*;
|
||||
use lazy_static::lazy_static;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#![allow(clippy::unwrap_used, clippy::assertions_on_result_states)] // meta-schema tests unwrap errors to assert failures
|
||||
|
||||
use super::*;
|
||||
use serde_json::json;
|
||||
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#![allow(
|
||||
clippy::panic,
|
||||
clippy::unwrap_used,
|
||||
clippy::expect_used,
|
||||
clippy::pattern_type_mismatch
|
||||
)] // azure schema tests panic/unwrap to assert structures
|
||||
|
||||
use super::super::*;
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -1,6 +1,18 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#![allow(
|
||||
clippy::panic,
|
||||
clippy::unwrap_used,
|
||||
clippy::expect_used,
|
||||
clippy::indexing_slicing,
|
||||
clippy::shadow_unrelated,
|
||||
clippy::semicolon_if_nothing_returned,
|
||||
clippy::pattern_type_mismatch,
|
||||
clippy::assertions_on_result_states,
|
||||
clippy::as_conversions
|
||||
)] // schema suite tests panic/unwrap to assert specific error shapes
|
||||
|
||||
use super::super::*;
|
||||
use crate::{format, vec};
|
||||
use serde_json::json;
|
||||
|
||||
@@ -1,6 +1,13 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#![allow(
|
||||
clippy::unwrap_used,
|
||||
clippy::panic,
|
||||
clippy::pattern_type_mismatch,
|
||||
clippy::assertions_on_result_states
|
||||
)] // test cases assert failures via unwrap/expect panic paths and pattern matching
|
||||
|
||||
use crate::{
|
||||
schema::{error::ValidationError, validate::SchemaValidator, Schema},
|
||||
*,
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#![allow(
|
||||
clippy::unwrap_used,
|
||||
clippy::expect_used,
|
||||
clippy::panic,
|
||||
clippy::shadow_unrelated,
|
||||
clippy::pattern_type_mismatch,
|
||||
clippy::assertions_on_result_states,
|
||||
clippy::as_conversions
|
||||
)] // test cases use unwrap/expect and panic to assert error flows
|
||||
|
||||
use crate::{
|
||||
schema::{error::ValidationError, validate::SchemaValidator, Schema},
|
||||
*,
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT License.
|
||||
|
||||
#![allow(missing_debug_implementations)] // validator is zero-sized marker
|
||||
#![allow(dead_code)]
|
||||
#![allow(clippy::pattern_type_mismatch, clippy::needless_continue)]
|
||||
|
||||
use crate::{
|
||||
schema::{error::ValidationError, Schema, Type},
|
||||
|
||||
Reference in New Issue
Block a user