tools/checkpatch: Should check the spell and encoding for rust file too
@@ -62,13 +62,10 @@ check_file() {
if [ "$(is_rust_file $@)" == "1" ]; then
if ! command -v rustfmt &> /dev/null; then
fail=1
- else
- if ! rustfmt --edition 2021 --check $@ 2>&1; then
+ elif ! rustfmt --edition 2021 --check $@ 2>&1; then
fail=1
fi
- fi
- else
- if ! $TOOLDIR/nxstyle $@ 2>&1; then
+ elif ! $TOOLDIR/nxstyle $@ 2>&1; then
fail=1
fi
@@ -86,7 +83,6 @@ check_file() {
fail=1
fi
fi
- fi
}
check_ranges() {
