ci: help to clippy script

This commit is contained in:
2024-02-06 19:15:15 +01:00
parent 7cf7d4fe7d
commit 7fe7284214
3 changed files with 39 additions and 13 deletions
@@ -1,8 +0,0 @@
[package]
name = "basic"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
@@ -1,3 +0,0 @@
fn main() {
println!("Hello, world!");
}
+39 -2
View File
@@ -1,4 +1,41 @@
features=$(grep '^\[features\]' $1 -A99999999 | grep '^\[' -m 2 -B99999999 | grep -v '^\[' | cut -d '=' -f 1 | grep -v 'default')
#!/bin/sh
while [ "$#" -gt 0 ]; do
case $1 in
-h|-?|--help|help)
HELP=1
;;
-*)
echo "Error: Unsupported flag $1" >&2
return 1
;;
*) # No more options
break
;;
esac
shift
done
if [ "$HELP" ]; then
printf "\
usage %s <path/to/Cargoctoml>\n
-?|-h|--help\tthis message
" "$(basename "$0")"
exit
fi
CARGO_PATH="$1"
if [ ! "$CARGO_PATH" ]; then
printf "please provide path to Cargo.toml\n"
exit
fi
if [ -d "$CARGO_PATH" ]; then
CARGO_PATH="${CARGO_PATH}/Cargo.toml"
fi
features=$(grep '^\[features\]' "$CARGO_PATH" -A99999999 | grep '^\[' -m 2 -B99999999 | grep -v '^\[' | cut -d '=' -f 1 | grep -v 'default')
generate_combinations() {
@@ -32,4 +69,4 @@ for ((i = 1; i <= $(wc -w <<< "$features"); ++i)); do
exit 1
fi
done
done
done