Skip to content

Commit

Permalink
remove clippy, get rustfmt working
Browse files Browse the repository at this point in the history
  • Loading branch information
TDHolmes authored and sajattack committed Oct 31, 2020
1 parent 7629eb3 commit 0a4c7d5
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 28 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/clippy.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: nightly
components: rustfmt
override: true
- run: rustfmt --check --edition 2018 ./boards/* ./hal/* ./pac/*
- run: ./rustfmt.sh
25 changes: 25 additions & 0 deletions rustfmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
RET=0

# first, all boards & their examples
DIRECTORIES=$(find ./boards -type f -iname Cargo.toml)
echo $DIRECTORIES
for DIR in $DIRECTORIES
do
pushd $(dirname $DIR)
rustfmt --edition 2018 --check ./src/lib.rs ./examples/*.rs
RET=$(($RET + $?))
popd
done

# now the PAC & main HAL
DIRECTORIES=$(find ./hal ./pac -type f -iname Cargo.toml)
echo $DIRECTORIES
for DIR in $DIRECTORIES
do
pushd $(dirname $DIR)
rustfmt --edition 2018 --check ./src/lib.rs
RET=$(($RET + $?))
popd
done

exit $RET

0 comments on commit 0a4c7d5

Please sign in to comment.