From 0153ee0d80ce94e64bb1b5ca01df54bdbaf893c9 Mon Sep 17 00:00:00 2001 From: Vineeth Kashyap Date: Tue, 12 Nov 2024 20:02:37 -0500 Subject: [PATCH] [Linter] Reduce perceived false positives and have links to linter doc in warnings (#15241) --- .../move-compiler-v2/src/external_checks.rs | 34 ++++---- ...nnecessary_numerical_extreme_comparison.rs | 6 +- .../blocks_in_conditions_warn.exp | 9 +++ .../model_ast_lints/multi_attributes_01.exp | 2 + .../model_ast_lints/needless_bool_warn.exp | 5 ++ .../needless_deref_ref_warn.exp | 17 ++++ .../needless_ref_deref_warn.exp | 2 + .../needless_ref_in_field_access_warn.exp | 26 +++++++ .../simpler_numeric_expression_warn.exp | 19 +++++ ...nnecessary_boolean_identity_comparison.exp | 22 ++++-- ...ary_numerical_extreme_comparisons_warn.exp | 77 ++++--------------- .../tests/model_ast_lints/while_true_warn.exp | 2 + ...id_copy_on_identity_comparison_warn_01.exp | 4 + .../needless_mutable_reference_warn.exp | 17 ++++ 14 files changed, 155 insertions(+), 87 deletions(-) diff --git a/third_party/move/move-compiler-v2/src/external_checks.rs b/third_party/move/move-compiler-v2/src/external_checks.rs index ab53caf1beb6a..88230276af730 100644 --- a/third_party/move/move-compiler-v2/src/external_checks.rs +++ b/third_party/move/move-compiler-v2/src/external_checks.rs @@ -12,6 +12,9 @@ use move_model::{ use move_stackless_bytecode::function_target::FunctionTarget; use std::{collections::BTreeSet, fmt, sync::Arc}; +/// Base URL for the linter documentation. +const LINTER_URL_BASE: &str = "https://aptos.dev/en/build/smart-contracts/linter"; + /// Implement this trait to provide a collection of external checks. pub trait ExternalChecks { /// Get all the expression checkers. @@ -60,13 +63,7 @@ pub trait ExpChecker { /// Report the `msg` highlighting the `loc`. fn report(&self, env: &GlobalEnv, loc: &Loc, msg: &str) { - env.lint_diag_with_notes(loc, msg, vec![ - format!( - "To suppress this warning, annotate the function/module with the attribute `#[{}({})]`.", - LintAttribute::SKIP, - self.get_name() - ), - ]); + report(env, loc, msg, self.get_name().as_str()); } } @@ -80,13 +77,7 @@ pub trait StacklessBytecodeChecker { /// Report the `msg` highlighting the `loc`. fn report(&self, env: &GlobalEnv, loc: &Loc, msg: &str) { - env.lint_diag_with_notes(loc, msg, vec![ - format!( - "To suppress this warning, annotate the function/module with the attribute `#[{}({})]`.", - LintAttribute::SKIP, - self.get_name() - ), - ]); + report(env, loc, msg, self.get_name().as_str()); } } @@ -103,3 +94,18 @@ pub fn known_checker_names(external_checkers: &Vec>) -> } names } + +/// Report the `msg` highlighting the `loc` for the `checker_name`. +fn report(env: &GlobalEnv, loc: &Loc, msg: &str, checker_name: &str) { + env.lint_diag_with_notes(loc, msg, vec![ + format!( + "To suppress this warning, annotate the function/module with the attribute `#[{}({})]`.", + LintAttribute::SKIP, + checker_name + ), + format!( + "For more information, see {}#{}.", + LINTER_URL_BASE, checker_name + ), + ]); +} diff --git a/third_party/move/tools/move-linter/src/model_ast_lints/unnecessary_numerical_extreme_comparison.rs b/third_party/move/tools/move-linter/src/model_ast_lints/unnecessary_numerical_extreme_comparison.rs index ade5931ed9ad8..2539d515b7718 100644 --- a/third_party/move/tools/move-linter/src/model_ast_lints/unnecessary_numerical_extreme_comparison.rs +++ b/third_party/move/tools/move-linter/src/model_ast_lints/unnecessary_numerical_extreme_comparison.rs @@ -43,7 +43,11 @@ impl ExpChecker for UnnecessaryNumericalExtremeComparison { // get the type of the left-hand side. let ty = env.get_node_type(lhs.node_id()); if let Some(result) = Self::check_comparisons_with_extremes(lhs, cmp, rhs, &ty) { - self.report(env, &env.get_node_loc(*id), &result.to_string()); + // TODO: we could report `UseEqInstead` and `UseNeqInstead` as well, but in a strict or pedantic + // mode. For now, we skip reporting them as suggestions to reduce perceived false positives. + if let ComparisonResult::AlwaysTrue | ComparisonResult::AlwaysFalse = result { + self.report(env, &env.get_node_loc(*id), &result.to_string()); + } } } } diff --git a/third_party/move/tools/move-linter/tests/model_ast_lints/blocks_in_conditions_warn.exp b/third_party/move/tools/move-linter/tests/model_ast_lints/blocks_in_conditions_warn.exp index cab5d1e0210bc..88ce5efda480a 100644 --- a/third_party/move/tools/move-linter/tests/model_ast_lints/blocks_in_conditions_warn.exp +++ b/third_party/move/tools/move-linter/tests/model_ast_lints/blocks_in_conditions_warn.exp @@ -7,6 +7,7 @@ warning: [lint] Having blocks in conditions make code harder to read. Consider r │ ^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(blocks_in_conditions)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#blocks_in_conditions. warning: [lint] Having blocks in conditions make code harder to read. Consider rewriting this code. ┌─ tests/model_ast_lints/blocks_in_conditions_warn.move:26:13 @@ -15,6 +16,7 @@ warning: [lint] Having blocks in conditions make code harder to read. Consider r │ ^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(blocks_in_conditions)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#blocks_in_conditions. warning: [lint] Having blocks in conditions make code harder to read. Consider rewriting this code. ┌─ tests/model_ast_lints/blocks_in_conditions_warn.move:32:16 @@ -23,6 +25,7 @@ warning: [lint] Having blocks in conditions make code harder to read. Consider r │ ^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(blocks_in_conditions)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#blocks_in_conditions. warning: [lint] Having blocks in conditions make code harder to read. Consider rewriting this code. ┌─ tests/model_ast_lints/blocks_in_conditions_warn.move:39:13 @@ -31,6 +34,7 @@ warning: [lint] Having blocks in conditions make code harder to read. Consider r │ ^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(blocks_in_conditions)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#blocks_in_conditions. warning: [lint] Having blocks in conditions make code harder to read. Consider rewriting this code. ┌─ tests/model_ast_lints/blocks_in_conditions_warn.move:40:17 @@ -39,6 +43,7 @@ warning: [lint] Having blocks in conditions make code harder to read. Consider r │ ^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(blocks_in_conditions)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#blocks_in_conditions. warning: [lint] Having blocks in conditions make code harder to read. Consider rewriting this code. ┌─ tests/model_ast_lints/blocks_in_conditions_warn.move:44:17 @@ -47,6 +52,7 @@ warning: [lint] Having blocks in conditions make code harder to read. Consider r │ ^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(blocks_in_conditions)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#blocks_in_conditions. warning: [lint] Having blocks in conditions make code harder to read. Consider rewriting this code. ┌─ tests/model_ast_lints/blocks_in_conditions_warn.move:52:13 @@ -55,6 +61,7 @@ warning: [lint] Having blocks in conditions make code harder to read. Consider r │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(blocks_in_conditions)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#blocks_in_conditions. warning: [lint] Having blocks in conditions make code harder to read. Consider rewriting this code. ┌─ tests/model_ast_lints/blocks_in_conditions_warn.move:58:16 @@ -63,6 +70,7 @@ warning: [lint] Having blocks in conditions make code harder to read. Consider r │ ^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(blocks_in_conditions)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#blocks_in_conditions. warning: [lint] Having blocks in conditions make code harder to read. Consider rewriting this code. ┌─ tests/model_ast_lints/blocks_in_conditions_warn.move:64:13 @@ -71,3 +79,4 @@ warning: [lint] Having blocks in conditions make code harder to read. Consider r │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(blocks_in_conditions)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#blocks_in_conditions. diff --git a/third_party/move/tools/move-linter/tests/model_ast_lints/multi_attributes_01.exp b/third_party/move/tools/move-linter/tests/model_ast_lints/multi_attributes_01.exp index 3dce6416b501d..ed27fb8463f6f 100644 --- a/third_party/move/tools/move-linter/tests/model_ast_lints/multi_attributes_01.exp +++ b/third_party/move/tools/move-linter/tests/model_ast_lints/multi_attributes_01.exp @@ -7,6 +7,7 @@ warning: [lint] Having blocks in conditions make code harder to read. Consider r │ ^^^^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(blocks_in_conditions)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#blocks_in_conditions. warning: [lint] Use the more explicit `loop` instead. ┌─ tests/model_ast_lints/multi_attributes_01.move:16:9 @@ -17,3 +18,4 @@ warning: [lint] Use the more explicit `loop` instead. │ ╰─────────^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(while_true)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#while_true. diff --git a/third_party/move/tools/move-linter/tests/model_ast_lints/needless_bool_warn.exp b/third_party/move/tools/move-linter/tests/model_ast_lints/needless_bool_warn.exp index 0602129401434..5312b4761b735 100644 --- a/third_party/move/tools/move-linter/tests/model_ast_lints/needless_bool_warn.exp +++ b/third_party/move/tools/move-linter/tests/model_ast_lints/needless_bool_warn.exp @@ -7,6 +7,7 @@ warning: [lint] This if-else can be replaced with just the condition │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_bool)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_bool. warning: [lint] This if-else can be replaced with just the negation of the condition ┌─ tests/model_ast_lints/needless_bool_warn.move:11:9 @@ -19,6 +20,7 @@ warning: [lint] This if-else can be replaced with just the negation of the condi │ ╰─────────^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_bool)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_bool. warning: [lint] This if-else can be replaced with just returning the condition ┌─ tests/model_ast_lints/needless_bool_warn.move:19:9 @@ -31,6 +33,7 @@ warning: [lint] This if-else can be replaced with just returning the condition │ ╰─────────^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_bool)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_bool. warning: [lint] This if-else can be replaced with just returning the negation of the condition ┌─ tests/model_ast_lints/needless_bool_warn.move:28:13 @@ -43,6 +46,7 @@ warning: [lint] This if-else can be replaced with just returning the negation of │ ╰─────────────^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_bool)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_bool. warning: [lint] This if-else has the same bool expression in both branches, consider rewriting the code to remove this redundancy ┌─ tests/model_ast_lints/needless_bool_warn.move:38:9 @@ -51,3 +55,4 @@ warning: [lint] This if-else has the same bool expression in both branches, cons │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_bool)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_bool. diff --git a/third_party/move/tools/move-linter/tests/model_ast_lints/needless_deref_ref_warn.exp b/third_party/move/tools/move-linter/tests/model_ast_lints/needless_deref_ref_warn.exp index 3b0453a641aac..ab9443b66e71c 100644 --- a/third_party/move/tools/move-linter/tests/model_ast_lints/needless_deref_ref_warn.exp +++ b/third_party/move/tools/move-linter/tests/model_ast_lints/needless_deref_ref_warn.exp @@ -7,6 +7,7 @@ warning: [lint] Needless pair of `*` and `&mut` operators: consider removing the │ ^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&` operators: consider removing them ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:27:9 @@ -15,6 +16,7 @@ warning: [lint] Needless pair of `*` and `&` operators: consider removing them │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&mut` operators: consider removing them ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:35:9 @@ -23,6 +25,7 @@ warning: [lint] Needless pair of `*` and `&mut` operators: consider removing the │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&mut` operators: consider removing them ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:60:9 @@ -31,6 +34,7 @@ warning: [lint] Needless pair of `*` and `&mut` operators: consider removing the │ ^^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&mut` operators: consider removing them ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:68:9 @@ -39,6 +43,7 @@ warning: [lint] Needless pair of `*` and `&mut` operators: consider removing the │ ^^^^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&mut` operators: consider removing them ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:82:9 @@ -47,6 +52,7 @@ warning: [lint] Needless pair of `*` and `&mut` operators: consider removing the │ ^^^^^^^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&` operators: consider removing them ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:99:9 @@ -55,6 +61,7 @@ warning: [lint] Needless pair of `*` and `&` operators: consider removing them │ ^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&mut` operators: consider removing them ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:109:9 @@ -63,6 +70,7 @@ warning: [lint] Needless pair of `*` and `&mut` operators: consider removing the │ ^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&mut` operators: consider removing them ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:114:9 @@ -71,6 +79,7 @@ warning: [lint] Needless pair of `*` and `&mut` operators: consider removing the │ ^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&` operators: consider removing them ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:119:9 @@ -79,6 +88,7 @@ warning: [lint] Needless pair of `*` and `&` operators: consider removing them │ ^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&` operators: consider removing them ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:129:9 @@ -87,6 +97,7 @@ warning: [lint] Needless pair of `*` and `&` operators: consider removing them │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&mut` operators: consider removing them ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:139:9 @@ -95,6 +106,7 @@ warning: [lint] Needless pair of `*` and `&mut` operators: consider removing the │ ^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&mut` operators: consider removing them ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:144:9 @@ -103,6 +115,7 @@ warning: [lint] Needless pair of `*` and `&mut` operators: consider removing the │ ^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&mut` operators: consider removing them ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:148:9 @@ -111,6 +124,7 @@ warning: [lint] Needless pair of `*` and `&mut` operators: consider removing the │ ^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&mut` operators: consider removing them ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:153:9 @@ -119,6 +133,7 @@ warning: [lint] Needless pair of `*` and `&mut` operators: consider removing the │ ^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&` operators: consider removing them ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:170:26 @@ -127,6 +142,7 @@ warning: [lint] Needless pair of `*` and `&` operators: consider removing them │ ^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/model_ast_lints/needless_deref_ref_warn.move:35:15 @@ -135,3 +151,4 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. diff --git a/third_party/move/tools/move-linter/tests/model_ast_lints/needless_ref_deref_warn.exp b/third_party/move/tools/move-linter/tests/model_ast_lints/needless_ref_deref_warn.exp index 6563ad1ac54f6..7d2e8d4968048 100644 --- a/third_party/move/tools/move-linter/tests/model_ast_lints/needless_ref_deref_warn.exp +++ b/third_party/move/tools/move-linter/tests/model_ast_lints/needless_ref_deref_warn.exp @@ -7,6 +7,7 @@ warning: [lint] Needless pair of `&` and `*` operators: consider removing them │ ^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_deref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_deref. warning: [lint] Needless pair of `&` and `*` operators: consider removing them ┌─ tests/model_ast_lints/needless_ref_deref_warn.move:35:9 @@ -15,3 +16,4 @@ warning: [lint] Needless pair of `&` and `*` operators: consider removing them │ ^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_deref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_deref. diff --git a/third_party/move/tools/move-linter/tests/model_ast_lints/needless_ref_in_field_access_warn.exp b/third_party/move/tools/move-linter/tests/model_ast_lints/needless_ref_in_field_access_warn.exp index 041b124ecd9c6..326c3a73a2045 100644 --- a/third_party/move/tools/move-linter/tests/model_ast_lints/needless_ref_in_field_access_warn.exp +++ b/third_party/move/tools/move-linter/tests/model_ast_lints/needless_ref_in_field_access_warn.exp @@ -7,6 +7,7 @@ warning: [lint] Needless `&` taken for field access: consider removing `&` and d │ ^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&` taken for field access: consider removing `&` and directly accessing the field `y` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:27:11 @@ -15,6 +16,7 @@ warning: [lint] Needless `&` taken for field access: consider removing `&` and d │ ^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&` taken for field access: consider removing `&` and directly accessing the field `a` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:27:9 @@ -23,6 +25,7 @@ warning: [lint] Needless `&` taken for field access: consider removing `&` and d │ ^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&` taken for field access: consider removing `&` and directly accessing the field `y` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:27:26 @@ -31,6 +34,7 @@ warning: [lint] Needless `&` taken for field access: consider removing `&` and d │ ^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&` taken for field access: consider removing `&` and directly accessing the field `a` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:27:23 @@ -39,6 +43,7 @@ warning: [lint] Needless `&` taken for field access: consider removing `&` and d │ ^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&` taken for field access: consider removing `&` and directly accessing the field `y` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:35:9 @@ -47,6 +52,7 @@ warning: [lint] Needless `&` taken for field access: consider removing `&` and d │ ^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&` taken for field access: consider removing `&` and directly accessing the field `a` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:35:20 @@ -55,6 +61,7 @@ warning: [lint] Needless `&` taken for field access: consider removing `&` and d │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&` taken for field access: consider removing `&` and directly accessing the field `y` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:35:33 @@ -63,6 +70,7 @@ warning: [lint] Needless `&` taken for field access: consider removing `&` and d │ ^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&` taken for field access: consider removing `&` and directly accessing the field `a` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:35:31 @@ -71,6 +79,7 @@ warning: [lint] Needless `&` taken for field access: consider removing `&` and d │ ^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&` taken for field access: consider removing `&` and directly accessing the field `a` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:35:45 @@ -79,6 +88,7 @@ warning: [lint] Needless `&` taken for field access: consider removing `&` and d │ ^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&` taken for field access: consider removing `&` and directly accessing the field `y` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:43:9 @@ -87,6 +97,7 @@ warning: [lint] Needless `&` taken for field access: consider removing `&` and d │ ^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` and directly accessing the field `y` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:51:9 @@ -95,6 +106,7 @@ warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` │ ^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` and directly accessing the field `y` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:51:37 @@ -103,6 +115,7 @@ warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` │ ^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` and directly accessing the field `a` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:51:31 @@ -111,6 +124,7 @@ warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` │ ^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` and directly accessing the field `x` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:59:9 @@ -119,6 +133,7 @@ warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` │ ^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` and directly accessing the field `y` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:67:15 @@ -127,6 +142,7 @@ warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` │ ^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` and directly accessing the field `a` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:67:9 @@ -135,6 +151,7 @@ warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` │ ^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` and directly accessing the field `a` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:68:9 @@ -143,6 +160,7 @@ warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` │ ^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` and directly accessing the field `a` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:77:9 @@ -151,6 +169,7 @@ warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` │ ^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&` taken for field access: consider removing `&` and directly accessing the field `0` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:90:9 @@ -159,6 +178,7 @@ warning: [lint] Needless `&` taken for field access: consider removing `&` and d │ ^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` and directly accessing the field `0` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:90:18 @@ -167,6 +187,7 @@ warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` │ ^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` and directly accessing the field `0` ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:98:9 @@ -175,6 +196,7 @@ warning: [lint] Needless `&mut` taken for field access: consider removing `&mut` │ ^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_ref_in_field_access)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_ref_in_field_access. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:51:9 @@ -183,6 +205,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:51:37 @@ -191,6 +214,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:90:18 @@ -199,6 +223,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/model_ast_lints/needless_ref_in_field_access_warn.move:125:18 @@ -207,3 +232,4 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. diff --git a/third_party/move/tools/move-linter/tests/model_ast_lints/simpler_numeric_expression_warn.exp b/third_party/move/tools/move-linter/tests/model_ast_lints/simpler_numeric_expression_warn.exp index c198c6c019996..f04fb79336495 100644 --- a/third_party/move/tools/move-linter/tests/model_ast_lints/simpler_numeric_expression_warn.exp +++ b/third_party/move/tools/move-linter/tests/model_ast_lints/simpler_numeric_expression_warn.exp @@ -7,6 +7,7 @@ warning: [lint] This expression can be simplified to just `0` │ ^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This expression can be simplified to just `0` ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:7:9 @@ -15,6 +16,7 @@ warning: [lint] This expression can be simplified to just `0` │ ^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This expression can be simplified to just `0` ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:7:9 @@ -23,6 +25,7 @@ warning: [lint] This expression can be simplified to just `0` │ ^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This expression can be simplified to just `0` ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:11:10 @@ -31,6 +34,7 @@ warning: [lint] This expression can be simplified to just `0` │ ^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This expression can be simplified to just `0` ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:11:9 @@ -39,6 +43,7 @@ warning: [lint] This expression can be simplified to just `0` │ ^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This binary operation can be simplified to just the left-hand side ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:11:9 @@ -47,6 +52,7 @@ warning: [lint] This binary operation can be simplified to just the left-hand si │ ^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This binary operation can be simplified to just the left-hand side ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:15:9 @@ -55,6 +61,7 @@ warning: [lint] This binary operation can be simplified to just the left-hand si │ ^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This binary operation can be simplified to just the left-hand side ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:15:9 @@ -63,6 +70,7 @@ warning: [lint] This binary operation can be simplified to just the left-hand si │ ^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This binary operation can be simplified to just the left-hand side ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:15:23 @@ -71,6 +79,7 @@ warning: [lint] This binary operation can be simplified to just the left-hand si │ ^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This binary operation can be simplified to just the left-hand side ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:15:34 @@ -79,6 +88,7 @@ warning: [lint] This binary operation can be simplified to just the left-hand si │ ^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This binary operation can be simplified to just the left-hand side ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:15:9 @@ -87,6 +97,7 @@ warning: [lint] This binary operation can be simplified to just the left-hand si │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This binary operation can be simplified to just the left-hand side ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:19:9 @@ -95,6 +106,7 @@ warning: [lint] This binary operation can be simplified to just the left-hand si │ ^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This binary operation can be simplified to just the left-hand side ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:19:9 @@ -103,6 +115,7 @@ warning: [lint] This binary operation can be simplified to just the left-hand si │ ^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This binary operation can be simplified to just the right-hand side ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:23:13 @@ -111,6 +124,7 @@ warning: [lint] This binary operation can be simplified to just the right-hand s │ ^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This binary operation can be simplified to just the right-hand side ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:23:9 @@ -119,6 +133,7 @@ warning: [lint] This binary operation can be simplified to just the right-hand s │ ^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This binary operation can be simplified to just the right-hand side ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:23:23 @@ -127,6 +142,7 @@ warning: [lint] This binary operation can be simplified to just the right-hand s │ ^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This binary operation can be simplified to just the right-hand side ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:27:9 @@ -135,6 +151,7 @@ warning: [lint] This binary operation can be simplified to just the right-hand s │ ^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This binary operation can be simplified to just the left-hand side ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:31:14 @@ -143,6 +160,7 @@ warning: [lint] This binary operation can be simplified to just the left-hand si │ ^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. warning: [lint] This expression can be simplified to just `0` ┌─ tests/model_ast_lints/simpler_numeric_expression_warn.move:31:9 @@ -151,3 +169,4 @@ warning: [lint] This expression can be simplified to just `0` │ ^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(simpler_numeric_expression)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#simpler_numeric_expression. diff --git a/third_party/move/tools/move-linter/tests/model_ast_lints/unnecessary_boolean_identity_comparison.exp b/third_party/move/tools/move-linter/tests/model_ast_lints/unnecessary_boolean_identity_comparison.exp index ca50156fb99a1..00c465edb5be7 100644 --- a/third_party/move/tools/move-linter/tests/model_ast_lints/unnecessary_boolean_identity_comparison.exp +++ b/third_party/move/tools/move-linter/tests/model_ast_lints/unnecessary_boolean_identity_comparison.exp @@ -7,6 +7,7 @@ warning: [lint] Directly use the boolean expression, instead of comparing it wit │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_boolean_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_boolean_identity_comparison. warning: [lint] Directly use the negation of the boolean expression, instead of comparing it with `false`. ┌─ tests/model_ast_lints/unnecessary_boolean_identity_comparison.move:14:13 @@ -15,6 +16,7 @@ warning: [lint] Directly use the negation of the boolean expression, instead of │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_boolean_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_boolean_identity_comparison. warning: [lint] Directly use the negation of the boolean expression, instead of comparing it with `true`. ┌─ tests/model_ast_lints/unnecessary_boolean_identity_comparison.move:15:13 @@ -23,6 +25,7 @@ warning: [lint] Directly use the negation of the boolean expression, instead of │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_boolean_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_boolean_identity_comparison. warning: [lint] Directly use the boolean expression, instead of comparing it with `false`. ┌─ tests/model_ast_lints/unnecessary_boolean_identity_comparison.move:16:13 @@ -31,6 +34,7 @@ warning: [lint] Directly use the boolean expression, instead of comparing it wit │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_boolean_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_boolean_identity_comparison. warning: [lint] Directly use the boolean expression, instead of comparing it with `true`. ┌─ tests/model_ast_lints/unnecessary_boolean_identity_comparison.move:17:21 @@ -39,6 +43,7 @@ warning: [lint] Directly use the boolean expression, instead of comparing it wit │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_boolean_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_boolean_identity_comparison. warning: [lint] Directly use the negation of the boolean expression, instead of comparing it with `false`. ┌─ tests/model_ast_lints/unnecessary_boolean_identity_comparison.move:18:22 @@ -47,6 +52,7 @@ warning: [lint] Directly use the negation of the boolean expression, instead of │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_boolean_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_boolean_identity_comparison. warning: [lint] Directly use the negation of the boolean expression, instead of comparing it with `true`. ┌─ tests/model_ast_lints/unnecessary_boolean_identity_comparison.move:19:21 @@ -55,6 +61,7 @@ warning: [lint] Directly use the negation of the boolean expression, instead of │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_boolean_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_boolean_identity_comparison. warning: [lint] Directly use the boolean expression, instead of comparing it with `false`. ┌─ tests/model_ast_lints/unnecessary_boolean_identity_comparison.move:20:22 @@ -63,14 +70,7 @@ warning: [lint] Directly use the boolean expression, instead of comparing it wit │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_boolean_identity_comparison)]`. - -warning: [lint] Comparison can be clarified to use `!=` instead - ┌─ tests/model_ast_lints/unnecessary_boolean_identity_comparison.move:21:13 - │ -21 │ if ((x + 1 > 0) == false) { bar() }; - │ ^^^^^^^^^^^ - │ - = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_boolean_identity_comparison. warning: [lint] Directly use the negation of the boolean expression, instead of comparing it with `false`. ┌─ tests/model_ast_lints/unnecessary_boolean_identity_comparison.move:21:13 @@ -79,6 +79,7 @@ warning: [lint] Directly use the negation of the boolean expression, instead of │ ^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_boolean_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_boolean_identity_comparison. warning: [lint] Directly use the boolean expression, instead of comparing it with `true`. ┌─ tests/model_ast_lints/unnecessary_boolean_identity_comparison.move:22:18 @@ -87,6 +88,7 @@ warning: [lint] Directly use the boolean expression, instead of comparing it wit │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_boolean_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_boolean_identity_comparison. warning: [lint] Directly use the boolean expression, instead of comparing it with `true`. ┌─ tests/model_ast_lints/unnecessary_boolean_identity_comparison.move:23:25 @@ -95,6 +97,7 @@ warning: [lint] Directly use the boolean expression, instead of comparing it wit │ ^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_boolean_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_boolean_identity_comparison. warning: [lint] Directly use the boolean expression, instead of comparing it with `true`. ┌─ tests/model_ast_lints/unnecessary_boolean_identity_comparison.move:24:14 @@ -103,6 +106,7 @@ warning: [lint] Directly use the boolean expression, instead of comparing it wit │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_boolean_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_boolean_identity_comparison. warning: [lint] Directly use the boolean expression, instead of comparing it with `true`. ┌─ tests/model_ast_lints/unnecessary_boolean_identity_comparison.move:25:18 @@ -111,6 +115,7 @@ warning: [lint] Directly use the boolean expression, instead of comparing it wit │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_boolean_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_boolean_identity_comparison. warning: [lint] Directly use the boolean expression, instead of comparing it with `true`. ┌─ tests/model_ast_lints/unnecessary_boolean_identity_comparison.move:29:13 @@ -119,3 +124,4 @@ warning: [lint] Directly use the boolean expression, instead of comparing it wit │ ^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_boolean_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_boolean_identity_comparison. diff --git a/third_party/move/tools/move-linter/tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.exp b/third_party/move/tools/move-linter/tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.exp index 6c25788cfb485..ed3ed7ddb0e46 100644 --- a/third_party/move/tools/move-linter/tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.exp +++ b/third_party/move/tools/move-linter/tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.exp @@ -7,6 +7,7 @@ warning: [lint] Comparison is always false, consider rewriting the code to remov │ ^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_numerical_extreme_comparison. warning: [lint] Comparison is always false, consider rewriting the code to remove the redundant comparison ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:13:13 @@ -15,6 +16,7 @@ warning: [lint] Comparison is always false, consider rewriting the code to remov │ ^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_numerical_extreme_comparison. warning: [lint] Directly use the boolean expression, instead of comparing it with `true`. ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:13:13 @@ -23,6 +25,7 @@ warning: [lint] Directly use the boolean expression, instead of comparing it wit │ ^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_boolean_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_boolean_identity_comparison. warning: [lint] Comparison is always false, consider rewriting the code to remove the redundant comparison ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:17:13 @@ -31,6 +34,7 @@ warning: [lint] Comparison is always false, consider rewriting the code to remov │ ^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_numerical_extreme_comparison. warning: [lint] Comparison is always false, consider rewriting the code to remove the redundant comparison ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:17:22 @@ -39,38 +43,7 @@ warning: [lint] Comparison is always false, consider rewriting the code to remov │ ^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. - -warning: [lint] Comparison can be simplified to use `==` instead - ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:18:13 - │ -18 │ if (foo(x) <= 0) { bar() }; - │ ^^^^^^^^^^^ - │ - = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. - -warning: [lint] Comparison can be simplified to use `==` instead - ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:19:13 - │ -19 │ if (0 >= foo(x)) { bar() }; - │ ^^^^^^^^^^^ - │ - = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. - -warning: [lint] Comparison can be clarified to use `!=` instead - ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:20:13 - │ -20 │ if (foo(x) > 0) { bar() }; - │ ^^^^^^^^^^ - │ - = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. - -warning: [lint] Comparison can be clarified to use `!=` instead - ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:21:13 - │ -21 │ if (0 < foo(x)) { bar() }; - │ ^^^^^^^^^^ - │ - = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_numerical_extreme_comparison. warning: [lint] Comparison is always true, consider rewriting the code to remove the redundant comparison ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:22:13 @@ -79,6 +52,7 @@ warning: [lint] Comparison is always true, consider rewriting the code to remove │ ^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_numerical_extreme_comparison. warning: [lint] Comparison is always true, consider rewriting the code to remove the redundant comparison ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:23:13 @@ -87,6 +61,7 @@ warning: [lint] Comparison is always true, consider rewriting the code to remove │ ^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_numerical_extreme_comparison. warning: [lint] Comparison is always false, consider rewriting the code to remove the redundant comparison ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:36:13 @@ -95,14 +70,7 @@ warning: [lint] Comparison is always false, consider rewriting the code to remov │ ^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. - -warning: [lint] Comparison can be simplified to use `==` instead - ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:37:13 - │ -37 │ if (b >= U16_MAX) { bar() }; - │ ^^^^^^^^^^^^ - │ - = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_numerical_extreme_comparison. warning: [lint] Comparison is always false, consider rewriting the code to remove the redundant comparison ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:38:13 @@ -111,22 +79,7 @@ warning: [lint] Comparison is always false, consider rewriting the code to remov │ ^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. - -warning: [lint] Comparison can be simplified to use `==` instead - ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:39:13 - │ -39 │ if (U64_MAX <= d) { bar() }; - │ ^^^^^^^^^^^^ - │ - = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. - -warning: [lint] Comparison can be clarified to use `!=` instead - ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:40:13 - │ -40 │ if (e < U128_MAX) { bar() }; - │ ^^^^^^^^^^^^ - │ - = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_numerical_extreme_comparison. warning: [lint] Comparison is always true, consider rewriting the code to remove the redundant comparison ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:41:13 @@ -135,6 +88,7 @@ warning: [lint] Comparison is always true, consider rewriting the code to remove │ ^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_numerical_extreme_comparison. warning: [lint] Comparison is always true, consider rewriting the code to remove the redundant comparison ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:42:13 @@ -143,14 +97,7 @@ warning: [lint] Comparison is always true, consider rewriting the code to remove │ ^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. - -warning: [lint] Comparison can be clarified to use `!=` instead - ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:43:13 - │ -43 │ if (U128_MAX > e) { bar() }; - │ ^^^^^^^^^^^^ - │ - = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_numerical_extreme_comparison. warning: [lint] Comparison is always true, consider rewriting the code to remove the redundant comparison ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:45:20 @@ -159,6 +106,7 @@ warning: [lint] Comparison is always true, consider rewriting the code to remove │ ^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_numerical_extreme_comparison. warning: [lint] Comparison is always false, consider rewriting the code to remove the redundant comparison ┌─ tests/model_ast_lints/unnecessary_numerical_extreme_comparisons_warn.move:54:19 @@ -167,3 +115,4 @@ warning: [lint] Comparison is always false, consider rewriting the code to remov │ ^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(unnecessary_numerical_extreme_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#unnecessary_numerical_extreme_comparison. diff --git a/third_party/move/tools/move-linter/tests/model_ast_lints/while_true_warn.exp b/third_party/move/tools/move-linter/tests/model_ast_lints/while_true_warn.exp index 8d913df6f58cf..87f144185d463 100644 --- a/third_party/move/tools/move-linter/tests/model_ast_lints/while_true_warn.exp +++ b/third_party/move/tools/move-linter/tests/model_ast_lints/while_true_warn.exp @@ -9,6 +9,7 @@ warning: [lint] Use the more explicit `loop` instead. │ ╰─────────^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(while_true)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#while_true. warning: [lint] Use the more explicit `loop` instead. ┌─ tests/model_ast_lints/while_true_warn.move:11:9 @@ -19,3 +20,4 @@ warning: [lint] Use the more explicit `loop` instead. │ ╰─────────^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(while_true)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#while_true. diff --git a/third_party/move/tools/move-linter/tests/stackless_bytecode_lints/avoid_copy_on_identity_comparison_warn_01.exp b/third_party/move/tools/move-linter/tests/stackless_bytecode_lints/avoid_copy_on_identity_comparison_warn_01.exp index b3a2a0f030dd6..7236c67717863 100644 --- a/third_party/move/tools/move-linter/tests/stackless_bytecode_lints/avoid_copy_on_identity_comparison_warn_01.exp +++ b/third_party/move/tools/move-linter/tests/stackless_bytecode_lints/avoid_copy_on_identity_comparison_warn_01.exp @@ -7,6 +7,7 @@ warning: [lint] Compare using references of these values instead (i.e., place `& │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(avoid_copy_on_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#avoid_copy_on_identity_comparison. warning: [lint] Compare using references of these values instead (i.e., place `&` on both the operands), to avoid unnecessary copies. ┌─ tests/stackless_bytecode_lints/avoid_copy_on_identity_comparison_warn_01.move:32:13 @@ -15,6 +16,7 @@ warning: [lint] Compare using references of these values instead (i.e., place `& │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(avoid_copy_on_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#avoid_copy_on_identity_comparison. warning: [lint] Compare using references of these values instead (i.e., place `&` on both the operands), to avoid unnecessary copies. ┌─ tests/stackless_bytecode_lints/avoid_copy_on_identity_comparison_warn_01.move:38:13 @@ -23,6 +25,7 @@ warning: [lint] Compare using references of these values instead (i.e., place `& │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(avoid_copy_on_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#avoid_copy_on_identity_comparison. warning: [lint] Compare using references of these values instead (i.e., place `&` on both the operands), to avoid unnecessary copies. ┌─ tests/stackless_bytecode_lints/avoid_copy_on_identity_comparison_warn_01.move:46:17 @@ -31,3 +34,4 @@ warning: [lint] Compare using references of these values instead (i.e., place `& │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(avoid_copy_on_identity_comparison)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#avoid_copy_on_identity_comparison. diff --git a/third_party/move/tools/move-linter/tests/stackless_bytecode_lints/needless_mutable_reference_warn.exp b/third_party/move/tools/move-linter/tests/stackless_bytecode_lints/needless_mutable_reference_warn.exp index d748cc4d53589..4606044319b28 100644 --- a/third_party/move/tools/move-linter/tests/stackless_bytecode_lints/needless_mutable_reference_warn.exp +++ b/third_party/move/tools/move-linter/tests/stackless_bytecode_lints/needless_mutable_reference_warn.exp @@ -7,6 +7,7 @@ warning: [lint] Needless pair of `*` and `&mut` operators: consider removing the │ ^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&mut` operators: consider removing them ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:204:9 @@ -15,6 +16,7 @@ warning: [lint] Needless pair of `*` and `&mut` operators: consider removing the │ ^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless pair of `*` and `&mut` operators: consider removing them ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:212:9 @@ -23,6 +25,7 @@ warning: [lint] Needless pair of `*` and `&mut` operators: consider removing the │ ^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_deref_ref)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_deref_ref. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:14:17 @@ -31,6 +34,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:24:17 @@ -39,6 +43,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:41:20 @@ -47,6 +52,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:109:17 @@ -55,6 +61,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:114:17 @@ -63,6 +70,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:119:21 @@ -71,6 +79,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:120:19 @@ -79,6 +88,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^^^^^^^^^^^^^^^^^^^^^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:153:22 @@ -87,6 +97,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:155:22 @@ -95,6 +106,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:160:21 @@ -103,6 +115,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:160:32 @@ -111,6 +124,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:173:28 @@ -119,6 +133,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: Unused assignment to `x`. Consider removing or prefixing with an underscore: `_x` ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:175:9 @@ -133,6 +148,7 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference. warning: [lint] Needless mutable reference or borrow: consider using immutable reference or borrow instead ┌─ tests/stackless_bytecode_lints/needless_mutable_reference_warn.move:252:17 @@ -141,3 +157,4 @@ warning: [lint] Needless mutable reference or borrow: consider using immutable r │ ^^^^^^ │ = To suppress this warning, annotate the function/module with the attribute `#[lint::skip(needless_mutable_reference)]`. + = For more information, see https://aptos.dev/en/build/smart-contracts/linter#needless_mutable_reference.