Skip to content

Commit

Permalink
Fixed format.
Browse files Browse the repository at this point in the history
  • Loading branch information
Helios-vmg committed Jun 10, 2024
1 parent 0800ded commit 2da3a1c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 38 deletions.
22 changes: 4 additions & 18 deletions detectors/iterators-over-indexing/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,10 @@ use rustc_lint::{LateContext, LateLintPass};
use rustc_span::Span;
use scout_audit_clippy_utils::diagnostics::span_lint_and_help;
use utils::{
expr_to_method_call,
resolution_to_local,
expr_to_path,
expr_to_drop_temps,
expr_to_call,
expr_to_match,
path_to_resolved,
path_to_lang_item,
expr_to_struct,
is_range,
expr_to_lit,
lit_to_int,
expr_to_loop,
stmt_to_expr,
type_to_adt,
pattern_to_struct,
pattern_to_binding,
get_node_type,
expr_to_call, expr_to_drop_temps, expr_to_lit, expr_to_loop, expr_to_match,
expr_to_method_call, expr_to_path, expr_to_struct, get_node_type, is_range, lit_to_int,
path_to_lang_item, path_to_resolved, pattern_to_binding, pattern_to_struct,
resolution_to_local, stmt_to_expr, type_to_adt,
};

const LINT_MESSAGE: &str =
Expand Down
11 changes: 2 additions & 9 deletions detectors/vec-could-be-mapping/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,8 @@ use rustc_middle::ty::GenericArgKind;
use rustc_span::{def_id::LocalDefId, Span};
use scout_audit_clippy_utils::diagnostics::span_lint_and_help;
use utils::{
expr_to_path,
path_to_resolved,
resolution_to_local,
expr_to_method_call,
get_type_string,
type_to_adt,
get_node_type,
definition_to_string,
stmt_to_local,
definition_to_string, expr_to_method_call, expr_to_path, get_node_type, get_type_string,
path_to_resolved, resolution_to_local, stmt_to_local, type_to_adt,
};

const LINT_MESSAGE: &str =
Expand Down
14 changes: 3 additions & 11 deletions detectors/zero-address/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,15 @@ use rustc_hir::def_id::LocalDefId;
use rustc_hir::{
def::Res,
intravisit::{walk_expr, FnKind, Visitor},
BinOpKind, Body, Expr, ExprKind, FnDecl, HirId, Param, PatKind,
QPath,
BinOpKind, Body, Expr, ExprKind, FnDecl, HirId, Param, PatKind, QPath,
};
use rustc_lint::{LateContext, LateLintPass};
use rustc_middle::middle::privacy::Level;
use rustc_span::Span;
use scout_audit_clippy_utils::diagnostics::span_lint_and_help;
use utils::{
expr_to_call,
expr_to_path,
path_to_type_relative,
type_to_path,
path_to_resolved,
expr_to_address_of,
resolution_to_local,
get_node_type,
expr_to_lit,
expr_to_address_of, expr_to_call, expr_to_lit, expr_to_path, get_node_type, path_to_resolved,
path_to_type_relative, resolution_to_local, type_to_path,
};

const LINT_MESSAGE: &str = "Not checking for a zero-address could lead to an insecure contract";
Expand Down

0 comments on commit 2da3a1c

Please sign in to comment.