Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .githooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
# SPDX-License-Identifier: MIT OR Apache-2.0

set -e

# just test
cargo --locked nextest run --all-features --workspace
cargo test --doc --all-features --workspace

# just lint
taplo format --check
taplo lint
cargo fmt --all --check
cargo clippy --workspace --examples --tests --benches --all-features --all-targets --locked
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ body:
id: terms
attributes:
label: Code of Conduct
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/alpenlabs/bitcoind-async-client/blob/main/CONTRIBUTING.md#code-of-conduct)
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/alpenlabs/rust-template/blob/main/CONTRIBUTING.md#code-of-conduct) # CHANGEME
options:
- label: I agree to follow the Code of Conduct
required: true
7 changes: 7 additions & 0 deletions .justfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ lints: toml-check-fmt toml-lint check-fmt clippy
# Rust all tests
test: unit-test doctest

# Run all code-quality checks
precommit: test lints

# Publish crate to crates.io
publish:
cargo publish --token $CARGO_REGISTRY_TOKEN
Expand All @@ -51,3 +54,7 @@ audit:
# Check GitHub Actions security analysis with `zizmor`
check-github-actions-security:
zizmor .

# Performs one-time repo setup
setup:
git config core.hooksPath .githooks
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,5 @@ you can run the basic CI checks in your local environment:
modern test runner for Rust.
- [`cargo-audit`](https://docs.rs/cargo-audit/latest/cargo_audit/):
tool to check `Cargo.lock` files for security vulnerabilities.

Please do `git config core.hooksPath .githooks` to automatically run these tools on each commit.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ hardened with [`zizmor`](https://docs.zizmor.sh).
and it will be automatically triggered by CI on every new tag release.
You just need to add a crates.io token to the `CARGO_REGISTRY_TOKEN` repository secret variable.

This template has a lot of `CHANGEME` placeholders that you should replace with your own values.
Please do a repository-wide search and replace all occurrences of `CHANGEME` with your own values.
This template has a lot of `CHANGEME` placeholders that you should replace with your own values, as well as URLs pointing to the `rust-template` project.
Please do a repository-wide search and replace all occurrences of `CHANGEME` and `rust-template` with your own values.

## Settings and Branch Protection Rules

Expand Down
Loading