Skip to content

Commit d0797af

Browse files
committed
Add scripts
1 parent 2144365 commit d0797af

File tree

3 files changed

+62
-0
lines changed

3 files changed

+62
-0
lines changed

scripts/clippy.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#! /bin/bash
2+
3+
# set -x
4+
set -euo pipefail
5+
6+
if [[ $# -ne 0 ]]; then
7+
echo "$0: expect no arguments" >&2
8+
exit 1
9+
fi
10+
11+
SCRIPTS="$(dirname "$(realpath "$0")")"
12+
WORKSPACE="$(realpath "$SCRIPTS"/..)"
13+
14+
cd "$WORKSPACE"
15+
16+
for X in lints/*; do
17+
pushd "$X"
18+
cargo clippy --workspace --tests -- \
19+
-D warnings \
20+
-W clippy::pedantic
21+
popd
22+
done

scripts/update_dependencies.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#! /bin/bash
2+
3+
# set -x
4+
set -euo pipefail
5+
6+
if [[ $# -ne 0 ]]; then
7+
echo "$0: expect no arguments" >&2
8+
exit 1
9+
fi
10+
11+
SCRIPTS="$(dirname "$(realpath "$0")")"
12+
WORKSPACE="$(realpath "$SCRIPTS"/..)"
13+
14+
cd "$WORKSPACE"
15+
16+
for X in $(find . -name Cargo.lock); do
17+
pushd "$(dirname "$X")"
18+
rm -f Cargo.lock
19+
cargo build --workspace --tests
20+
cargo upgrade --workspace --to-lockfile --offline
21+
popd
22+
done

scripts/upgrade_lints.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#! /bin/bash
2+
3+
# set -x
4+
set -euo pipefail
5+
6+
if [[ $# -ne 0 ]]; then
7+
echo "$0: expect no arguments" >&2
8+
exit 1
9+
fi
10+
11+
SCRIPTS="$(dirname "$(realpath "$0")")"
12+
WORKSPACE="$(realpath "$SCRIPTS"/..)"
13+
14+
cd "$WORKSPACE"
15+
16+
for X in lints/*; do
17+
cargo dylint --upgrade "$X"
18+
done

0 commit comments

Comments
 (0)