fix: use cargo clippy instead of cargo-clippy (#5988)

The cargo-clippy command has been depreacted since Cargo
v1.78.0. This is needed to unblock the implementation of fix mode.
This commit is contained in:
Marco Ferrari 2024-08-11 23:18:33 +02:00 committed by GitHub
parent d0219e326d
commit 40410c2d60
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 4 deletions

View file

@ -120,7 +120,7 @@ LINTER_COMMANDS_ARRAY_RUBY=(rubocop -c "${RUBY_LINTER_RULES}" --force-exclusion
LINTER_COMMANDS_ARRAY_RUST_2015=(rustfmt --edition 2015)
LINTER_COMMANDS_ARRAY_RUST_2018=(rustfmt --edition 2018)
LINTER_COMMANDS_ARRAY_RUST_2021=(rustfmt --edition 2021)
LINTER_COMMANDS_ARRAY_RUST_CLIPPY=(cargo-clippy)
LINTER_COMMANDS_ARRAY_RUST_CLIPPY=(cargo clippy)
LINTER_COMMANDS_ARRAY_SCALAFMT=(scalafmt --config "${SCALAFMT_LINTER_RULES}")
LINTER_COMMANDS_ARRAY_SHELL_SHFMT=(shfmt)
LINTER_COMMANDS_ARRAY_SNAKEMAKE_LINT=(snakemake --lint -s)

View file

@ -109,7 +109,7 @@ for LINTER in "${LINTER_NAMES_ARRAY[@]}"; do
elif [[ ${LINTER} == "checkstyle" ]] || [[ ${LINTER} == "google-java-format" ]]; then
GET_VERSION_CMD="$(java -jar "/usr/bin/${LINTER}" --version 2>&1)"
elif [[ ${LINTER} == "clippy" ]]; then
GET_VERSION_CMD="$(cargo-clippy --version 2>&1)"
GET_VERSION_CMD="$(cargo clippy --version 2>&1)"
elif [[ ${LINTER} == "editorconfig-checker" ]]; then
GET_VERSION_CMD="$(${LINTER} -version)"
elif [[ ${LINTER} == "kubeconform" ]]; then

View file

@ -143,7 +143,7 @@ control "super-linter-installed-commands" do
{ linter_name: "checkstyle", version_command: "java -jar /usr/bin/checkstyle --version"},
{ linter_name: "chktex"},
{ linter_name: "clang-format"},
{ linter_name: "clippy", linter_command: "cargo-clippy"},
{ linter_name: "clippy", linter_command: "cargo clippy"},
{ linter_name: "clj-kondo"},
{ linter_name: "coffeelint"},
{ linter_name: "composer"},

View file

@ -184,7 +184,8 @@ run_test_case_fix_mode() {
COMMAND_TO_RUN+=(--env FIX_RUST_2015="true")
COMMAND_TO_RUN+=(--env FIX_RUST_2018="true")
COMMAND_TO_RUN+=(--env FIX_RUST_2021="true")
COMMAND_TO_RUN+=(--env FIX_RUST_CLIPPY="true")
# Temporarily disable fix mode for rust clippy due to a dependency on another PR
# COMMAND_TO_RUN+=(--env FIX_RUST_CLIPPY="true")
COMMAND_TO_RUN+=(--env FIX_SCALAFMT="true")
COMMAND_TO_RUN+=(--env FIX_SHELL_SHFMT="true")
COMMAND_TO_RUN+=(--env FIX_SNAKEMAKE_SNAKEFMT="true")