Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
review
  • Loading branch information
2010YOUY01 committed Dec 31, 2025
commit ae7fc7007e405e9ed034a45f5fb117053e7b5a66
14 changes: 7 additions & 7 deletions ci/scripts/rust_clippy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ if [[ "$MODE" == "write" && $ALLOW_DIRTY -eq 0 ]]; then
require_clean_work_tree "$SCRIPT_NAME" || exit 1
fi

CLIPPY_CMD=(cargo clippy)
if [[ "$MODE" == "write" ]]; then
ALLOW_DIRTY_ARGS=()
CLIPPY_CMD+=(--fix)
if [[ $ALLOW_DIRTY -eq 1 ]]; then
ALLOW_DIRTY_ARGS+=(--allow-dirty --allow-staged)
CLIPPY_CMD+=(--allow-dirty --allow-staged)
fi
echo "[${SCRIPT_NAME}] \`cargo clippy --fix --all-targets --workspace --features ${CLIPPY_FEATURES} -- -D warnings\`"
cargo clippy --fix "${ALLOW_DIRTY_ARGS[@]}" "${CLIPPY_ARGS[@]}" "${CLIPPY_LINT_ARGS[@]}"
else
echo "[${SCRIPT_NAME}] \`cargo clippy --all-targets --workspace --features ${CLIPPY_FEATURES} -- -D warnings\`"
cargo clippy "${CLIPPY_ARGS[@]}" "${CLIPPY_LINT_ARGS[@]}"
fi
CLIPPY_CMD+=("${CLIPPY_ARGS[@]}" "${CLIPPY_LINT_ARGS[@]}")

echo "[${SCRIPT_NAME}] \`${CLIPPY_CMD[*]}\`"
"${CLIPPY_CMD[@]}"
2 changes: 1 addition & 1 deletion ci/scripts/rust_fmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ if [[ "$MODE" == "write" ]]; then
else
echo "[${SCRIPT_NAME}] \`cargo fmt --all -- --check\`"
cargo fmt --all -- --check
fi
fi
4 changes: 2 additions & 2 deletions dev/rust_lint.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
Expand Down Expand Up @@ -85,7 +85,7 @@ done

SCRIPT_NAME="$(basename "${BASH_SOURCE[0]}")"

ensure_tool "taplo" "cargo install taplo-cli"
ensure_tool "taplo" "cargo install taplo-cli --locked"
ensure_tool "hawkeye" "cargo install hawkeye --locked"
ensure_tool "typos" "cargo install typos-cli --locked"

Expand Down