Skip to content

Commit 249dcd0

Browse files
authored
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>
1 parent 604591a commit 249dcd0

File tree

121 files changed

+703
-23
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+703
-23
lines changed

.github/actions/toolchains/rust/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ inputs:
44
toolchain:
55
description: 'Rust toolchain version'
66
required: false
7-
default: '1.89.0'
7+
default: '1.92.0'
88
components:
99
description: 'Additional components to install'
1010
required: false

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
**Regorus** is
44

55
- *Rego*-*Rus(t)* - A fast, light-weight [Rego](https://www.openpolicyagent.org/docs/latest/policy-language/)
6-
interpreter written in Rust.
6+
interpreter written in Rust.
77
- *Rigorous* - A rigorous enforcer of well-defined Rego semantics.
88

99
Regorus is also

src/ast.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#![allow(clippy::missing_const_for_fn, clippy::pattern_type_mismatch)]
12
// Copyright (c) Microsoft Corporation.
23
// Licensed under the MIT License.
34

src/builtins/aggregates.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
#![allow(clippy::pattern_type_mismatch)]
5+
46
use crate::ast::{Expr, Ref};
57
use crate::builtins;
68
use crate::builtins::utils::{ensure_args_count, ensure_numeric};

src/builtins/arrays.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
3+
#![allow(clippy::as_conversions)]
34

45
use crate::ast::{Expr, Ref};
56
use crate::builtins;

src/builtins/comparison.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
#![allow(clippy::pattern_type_mismatch)]
5+
46
use crate::ast::BoolOp;
57
use crate::value::Value;
68

src/builtins/conversions.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
#![allow(clippy::unseparated_literal_suffix, clippy::pattern_type_mismatch)]
5+
46
use crate::ast::{Expr, Ref};
57
use crate::builtins;
68
use crate::builtins::utils::ensure_args_count;

src/builtins/encoding.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
3+
#![allow(clippy::unused_trait_names, clippy::pattern_type_mismatch)]
34

45
use crate::ast::{Expr, Ref};
56
use crate::builtins;

src/builtins/glob.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
#![allow(clippy::pattern_type_mismatch)]
5+
46
use crate::ast::{Expr, Ref};
57
use crate::builtins;
68
use crate::builtins::utils::{ensure_args_count, ensure_string, ensure_string_collection};

src/builtins/graph.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// Copyright (c) Microsoft Corporation.
22
// Licensed under the MIT License.
33

4+
#![allow(clippy::pattern_type_mismatch)]
5+
46
use crate::ast::{Expr, Ref};
57
use crate::builtins;
68
use crate::builtins::utils::{ensure_args_count, ensure_object};

0 commit comments

Comments
 (0)