@@ -5,14 +5,23 @@ set -o nounset
55
66# Run some extra checks (for now its mostly clippy).
77
8+ # Notes about clippy:
9+ # 1. Ledger's guideline enforcer also runs it. But at the moment of writing this it doesn't check
10+ # tests, see https://github.com/LedgerHQ/ledger-app-workflows/blob/master/scripts/check_all.sh.
11+ # Besides, we want to enable some additional checks, similar to what we do in Mintlayer Core,
12+ # so we do a separate clippy run here.
13+ # 2. The guideline enforcer runs it for all existing device models, but in this additional run this
14+ # is redundant, so we use one arbitrarily chosen model.
15+ # 3. Unlike in Mintlayer Core, we can't disable certain annoying and mostly useless checks (such as
16+ # let-and-return), because the guideline enforcer will run them anyway.
17+
818SCRIPT_DIR=$( cd " $( dirname " $0 " ) " && pwd)
919
1020cd " $SCRIPT_DIR "
1121
1222echo " Running cargo fmt"
1323cargo fmt --check -- --config newline_style=Unix
1424
15- # It doesn't matter which one we use, but we need to specify one.
1625CLIPPY_TARGET_ARG=--target=apex_p
1726
1827echo " Running clippy (any code)"
@@ -23,10 +32,7 @@ cargo clippy "$CLIPPY_TARGET_ARG" --all-features --workspace --bins --lib --test
2332 -D clippy::map_unwrap_or \
2433 -D clippy::unnested_or_patterns \
2534 -D clippy::mut_mut \
26- -D clippy::todo \
27- -A clippy::let-and-return \
28- -A clippy::unnecessary-lazy-evaluations \
29- -A clippy::boxed-local
35+ -D clippy::todo
3036
3137echo " Running clippy (production code)"
3238# TODO: consider also enabling `unwrap_used` and `items_after_statements`.
0 commit comments