change-scribe

Crates.iochange-scribe
lib.rschange-scribe
version0.1.0
sourcesrc
created_at2024-08-29 17:49:22.819943
updated_at2024-08-29 17:49:22.819943
descriptionA tool that validates that commit messages follow the conventional commit format, and lints them according to a configuration file.
homepage
repositoryhttps://github.com/nils-degroot/change-scribe
max_upload_size
id1356501
size79,854
(nils-degroot)

documentation

README

change-scribe

change-scribe is a tool that validates that commit messages follow the conventional commit format, and lints them according to a configuration file.

Installation

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.

Usage

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.

Linting rules

Type

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

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
Commit count: 0

cargo fmt