Skip to content

Commit

Permalink
chore: Use a pre-push hook to run fmt and clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
stmh committed Oct 22, 2024
1 parent e38ff24 commit 4efc6e1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
7 changes: 7 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 12 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,16 @@ path-clean = "1.0.1"
bcrypt = "0.15.1"
maplit = "1.0.2"

[dev-dependencies.cargo-husky]
version = "1"
default-features = false # Disable features which are enabled by default
features = [
"prepush-hook",
"run-cargo-test",
"run-cargo-clippy",
"run-cargo-fmt",
]

[workspace.metadata.release]
sign-tag = true
pre-release-hook = [
Expand All @@ -90,10 +100,10 @@ pre-release-replacements = [
[workspace.metadata.cross.target.aarch64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get --assume-yes install libssl-dev:$CROSS_DEB_ARCH"
"apt-get update && apt-get --assume-yes install libssl-dev:$CROSS_DEB_ARCH",
]
[workspace.metadata.cross.target.x86_64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get --assume-yes install libssl-dev:$CROSS_DEB_ARCH"
"apt-get update && apt-get --assume-yes install libssl-dev:$CROSS_DEB_ARCH",
]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,10 @@ and then start the server with
cargo run --bin scotty or your preferred way to run a rust binary
```

### Pre-push git hook via [cargo-husky](https://github.com/rhysd/cargo-husky)

This project uses a pre-push git-hook installed by cargo husky. It shoud be installed automatically.

### Updating the changelog

We are using [git-cliff](https://git-cliff.org) to enforce a changelog. Please update the changelog with
Expand Down

0 comments on commit 4efc6e1

Please sign in to comment.