Skip to content

Commit 9e88a8d

Browse files
committed
πŸ”§ chore(pre-commit): add pre-commit hook to enforce code style using cargo fmt before committing
πŸ› fix(afloat): remove unnecessary commented out code in pallet module
1 parent a716dd9 commit 9e88a8d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

β€Ž.githooks/pre-commitβ€Ž

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
diff=$(cargo fmt -- --check)
4+
result=$?
5+
6+
if [[ ${result} -ne 0 ]] ; then
7+
cat <<\EOF
8+
There are some code style issues, run `cargo fmt` first.
9+
EOF
10+
exit 1
11+
fi
12+
13+
exit 0

β€Žpallets/afloat/src/lib.rsβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ pub mod pallet {
217217
},
218218
}
219219

220-
// Ok(())
221220
}
222221

223222
#[pallet::call_index(1)]

0 commit comments

Comments
Β (0)