Crates.io | change-scribe |
lib.rs | change-scribe |
version | 0.1.0 |
source | src |
created_at | 2024-08-29 17:49:22.819943 |
updated_at | 2024-08-29 17:49:22.819943 |
description | A tool that validates that commit messages follow the conventional commit format, and lints them according to a configuration file. |
homepage | |
repository | https://github.com/nils-degroot/change-scribe |
max_upload_size | |
id | 1356501 |
size | 79,854 |
change-scribe
is a tool that validates that commit messages follow the
conventional commit format, and lints them according to a configuration file.
Installation is done via cargo
:
cargo install change-scribe
To build change-scribe from source, clone the repository and run:
cargo build --release
The binary will be located at target/release/change-scribe
.
To use change-scribe
:
change-scribe "fix: resolved that bug"
This validates the message according to the default configuration. The commit message could also be passed via stdin:
echo "fix: resolved that bug" | change-scribe -
To apply a custom config, use the --config
flag:
change-scribe --config path/to/config.toml "fix: resolved that bug"
By default, change-scribe
reads configuration from either
change-scribe.toml
or .change-scribe.toml
in the current directory.
type.enum
Ensures that the commit type is on of the entered values. *
is a wildcard
that matches any type.
Default:
type.enum = ["*"]
type.min-length
Ensures that the commit type is at least the entered length.
Default:
type.min-length = 0
type.max-length
Ensures that the commit type is at most the entered length.
Default:
type.max-length = 18446744073709551615
scope.enum
Ensures that the commit scope is on of the entered values. *
is a wildcard
that matches any scope.
Default:
scope.enum = ["*"]
scope.required
Ensures that a commit has a scope.
Default:
scope.required = false