Fix macos clippy issues

This commit is contained in:
Kirill Bulatov
2022-04-22 22:12:25 +03:00
committed by Kirill Bulatov
parent d060a97c54
commit fec050ce97
3 changed files with 23 additions and 10 deletions

View File

@@ -9,7 +9,14 @@
# In vscode, this setting is Rust-analyzer>Check On Save:Command
# * `-A unknown_lints` do not warn about unknown lint suppressions
# that people with newer toolchains might use
# * `-D warnings` - fail on any warnings (`cargo` returns non-zero exit status)
cargo clippy --all --all-targets --all-features -- -A unknown_lints -D warnings
# Not every feature is supported in macOS builds, e.g. `profiling`,
# avoid running regular linting script that checks every feature.
if [[ "$OSTYPE" == "darwin"* ]]; then
# no extra features to test currently, add more here when needed
cargo clippy --all --all-targets -- -A unknown_lints -D warnings
else
# * `-A unknown_lints` do not warn about unknown lint suppressions
# that people with newer toolchains might use
# * `-D warnings` - fail on any warnings (`cargo` returns non-zero exit status)
cargo clippy --all --all-targets --all-features -- -A unknown_lints -D warnings
fi