1
0
mirror of https://github.com/uutils/coreutils synced 2024-07-08 19:56:10 +00:00

CI: set MSRV and "--target" for clippy

* add "clippy.toml" in order to set MSRV for clippy linting
    this works only if clippy is invoked with "+nightly"
* add "--target" to clippy in order to also lint tests
This commit is contained in:
Jan Scheer 2021-05-29 14:21:32 +02:00
parent a2947f6897
commit 52ea9c4a48
2 changed files with 2 additions and 1 deletions

View File

@ -94,7 +94,7 @@ jobs:
run: |
# `clippy` testing
# * convert any warnings to GHA UI annotations; ref: <https://help.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-a-warning-message>
S=$(cargo clippy ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} -- -D warnings 2>&1) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s" "$S" | sed -E -n -e '/^error:/{' -e "N; s/^error:[[:space:]]+(.*)\\n[[:space:]]+-->[[:space:]]+(.*):([0-9]+):([0-9]+).*$/::warning file=\2,line=\3,col=\4::WARNING: \`cargo clippy\`: \1/p;" -e '}' ; }
S=$(cargo +nightly clippy --target=${{ matrix.job.target }} ${{ matrix.job.cargo-options }} ${{ steps.vars.outputs.CARGO_FEATURES_OPTION }} -- -D warnings 2>&1) && printf "%s\n" "$S" || { printf "%s\n" "$S" ; printf "%s" "$S" | sed -E -n -e '/^error:/{' -e "N; s/^error:[[:space:]]+(.*)\\n[[:space:]]+-->[[:space:]]+(.*):([0-9]+):([0-9]+).*$/::warning file=\2,line=\3,col=\4::WARNING: \`cargo clippy\`: \1/p;" -e '}' ; }
min_version:
name: MinRustV # Minimum supported rust version

1
clippy.toml Normal file
View File

@ -0,0 +1 @@
msrv = "1.43.1"