Skip to content

Commit 40410c2

Browse files
authored
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.
1 parent d0219e3 commit 40410c2

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

lib/functions/linterCommands.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ LINTER_COMMANDS_ARRAY_RUBY=(rubocop -c "${RUBY_LINTER_RULES}" --force-exclusion
120120
LINTER_COMMANDS_ARRAY_RUST_2015=(rustfmt --edition 2015)
121121
LINTER_COMMANDS_ARRAY_RUST_2018=(rustfmt --edition 2018)
122122
LINTER_COMMANDS_ARRAY_RUST_2021=(rustfmt --edition 2021)
123-
LINTER_COMMANDS_ARRAY_RUST_CLIPPY=(cargo-clippy)
123+
LINTER_COMMANDS_ARRAY_RUST_CLIPPY=(cargo clippy)
124124
LINTER_COMMANDS_ARRAY_SCALAFMT=(scalafmt --config "${SCALAFMT_LINTER_RULES}")
125125
LINTER_COMMANDS_ARRAY_SHELL_SHFMT=(shfmt)
126126
LINTER_COMMANDS_ARRAY_SNAKEMAKE_LINT=(snakemake --lint -s)

scripts/linterVersions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ for LINTER in "${LINTER_NAMES_ARRAY[@]}"; do
109109
elif [[ ${LINTER} == "checkstyle" ]] || [[ ${LINTER} == "google-java-format" ]]; then
110110
GET_VERSION_CMD="$(java -jar "/usr/bin/${LINTER}" --version 2>&1)"
111111
elif [[ ${LINTER} == "clippy" ]]; then
112-
GET_VERSION_CMD="$(cargo-clippy --version 2>&1)"
112+
GET_VERSION_CMD="$(cargo clippy --version 2>&1)"
113113
elif [[ ${LINTER} == "editorconfig-checker" ]]; then
114114
GET_VERSION_CMD="$(${LINTER} -version)"
115115
elif [[ ${LINTER} == "kubeconform" ]]; then

test/inspec/super-linter/controls/super_linter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@
143143
{ linter_name: "checkstyle", version_command: "java -jar /usr/bin/checkstyle --version"},
144144
{ linter_name: "chktex"},
145145
{ linter_name: "clang-format"},
146-
{ linter_name: "clippy", linter_command: "cargo-clippy"},
146+
{ linter_name: "clippy", linter_command: "cargo clippy"},
147147
{ linter_name: "clj-kondo"},
148148
{ linter_name: "coffeelint"},
149149
{ linter_name: "composer"},

test/run-super-linter-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,8 @@ run_test_case_fix_mode() {
184184
COMMAND_TO_RUN+=(--env FIX_RUST_2015="true")
185185
COMMAND_TO_RUN+=(--env FIX_RUST_2018="true")
186186
COMMAND_TO_RUN+=(--env FIX_RUST_2021="true")
187-
COMMAND_TO_RUN+=(--env FIX_RUST_CLIPPY="true")
187+
# Temporarily disable fix mode for rust clippy due to a dependency on another PR
188+
# COMMAND_TO_RUN+=(--env FIX_RUST_CLIPPY="true")
188189
COMMAND_TO_RUN+=(--env FIX_SCALAFMT="true")
189190
COMMAND_TO_RUN+=(--env FIX_SHELL_SHFMT="true")
190191
COMMAND_TO_RUN+=(--env FIX_SNAKEMAKE_SNAKEFMT="true")

0 commit comments

Comments
 (0)