Skip to content

Commit

Permalink
Add commitlint config and hook
Browse files Browse the repository at this point in the history
  • Loading branch information
uklotzde committed Apr 29, 2022
1 parent 75a48c6 commit d3609f1
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 58 deletions.
37 changes: 37 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"rules": {
"header-min-length": [
2,
"always",
8
],
"header-max-length": [
2,
"always",
72
],
"header-case": [
2,
"always",
"sentence-case"
],
"header-full-stop": [
2,
"never",
"."
],
"body-leading-blank": [
2,
"always"
],
"body-max-line-length": [
2,
"always",
72
],
"footer-leading-blank": [
2,
"always"
]
}
}
110 changes: 52 additions & 58 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,59 +1,53 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: forbid-new-submodules
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.4.0
hooks:
- id: markdownlint-cli2
exclude: ^LICENSE\.md$
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.4
hooks:
- id: shellcheck
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
args: [
--ignore-words=.codespellignore,
]
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
args: [
--all,
--,
]
- id: cargo-check
args: [
--locked,
--workspace,
--all-features,
--all-targets,
]
- id: clippy
args: [
--locked,
--workspace,
--all-features,
--all-targets,
--,
-D,
warnings,
]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-toml
- id: check-xml
- id: check-yaml
- id: destroyed-symlinks
- id: detect-private-key
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: forbid-new-submodules
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v8.0.0
hooks:
- id: commitlint
stages: [commit-msg]
- repo: https://github.com/DavidAnson/markdownlint-cli2
rev: v0.4.0
hooks:
- id: markdownlint-cli2
exclude: ^LICENSE\.md$
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.4
hooks:
- id: shellcheck
- repo: https://github.com/codespell-project/codespell
rev: v2.1.0
hooks:
- id: codespell
args: [--ignore-words=.codespellignore]
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
args: [--all, --]
- id: clippy
args:
[
--locked,
--workspace,
--all-features,
--all-targets,
--,
-D,
warnings,
]

0 comments on commit d3609f1

Please # to comment.