Skip to content

Commit

Permalink
tools: Enable cargo fmt in pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
XuShaohua committed Mar 15, 2024
1 parent 3c56043 commit acc7f2d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tools/pre-commit
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/bin/bash
# Copyright (c) 2022 Xu Shaohua <[email protected]>. All rights reserved.
# Copyright (c) 2024 Xu Shaohua <[email protected]>. All rights reserved.
# Use of this source is governed by General Public License that can be found
# in the LICENSE file.

# Make sure each commit is linted
# Install this script to `.git/hooks/pre-commit`

cargo clippy
set -xe

cargo clippy --all-targets --all-features --fix --allow-dirty --allow-staged

cargo fmt --all

0 comments on commit acc7f2d

Please sign in to comment.