Skip to content

Commit 6785668

Browse files
committed
docs: add contributing section and commit hooks
1 parent bc0a563 commit 6785668

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

.githooks/pre-commit

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
set -e
3+
4+
cargo fmt --all
5+
git add -u '*.rs'
6+
npx prettier --write '**/*.md'
7+
git add -u '*.md'

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"proseWrap": "always",
3+
"printWidth": 80
4+
}

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,20 @@ age-plugin-argon2 --list -i key.txt
8989

9090
Licensed under [MIT](LICENSE-MIT) or [Apache 2.0](LICENSE-APACHE), at your
9191
option.
92+
93+
## Contributing
94+
95+
Unless you explicitly state otherwise, any contribution intentionally submitted
96+
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
97+
dual licensed as above, without any additional terms or conditions.
98+
99+
### Pre-commit hooks
100+
101+
Consider installing the commit hooks before your first commit:
102+
103+
```sh
104+
git config core.hooksPath .githooks
105+
```
106+
107+
The pre-commit hook runs `cargo fmt` and `prettier` on Markdown files. You'll
108+
need [Node.js](https://nodejs.org) available for the latter.

0 commit comments

Comments
 (0)