Skip to main content

Utility for formatting and verifying the commit message.

Project description

commitfmt Quality Assurance

Utility for formatting and verifying the commit message.

It's not a linter. At least not a complete replacement for commitlint, because commitfmt can't prevent you from writing a body or force you to write a description in uppercase (I don't know why you might want to do that), but it will help keep the story high quality.

By design, commitfmt runs on the prepare-commit-msg hook and formats the message according to git standards and conventional commits in particular.

A message like this:

feat ( scope     ,    scope  )  : add new feature.
body description

Will be formatted to:

feat(scope, scope): add new feature

body description

Additionally, you can customize checks, such as limiting the list of available types and scopes. To do this, create a configuration file.

Installation

pnpm

pnpm add --save-dev commitfmt

npm

npm install --save-dev commitfmt

yarn

yarn add --dev commitfmt

pip

pip install commitfmt

Configuration

TOML

Create a commitfmt.toml or (.commitfmt.toml) file in the root of your project.

[lint.body]
full-stop = false

[lint.header]
scope-case = "lower"
scope-enum = ["cc", "config", "git", "linter"]
type-enum = ["build", "chore", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test"]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

commitfmt_darwin-0.1.2rc3.tar.gz (2.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

commitfmt_darwin-0.1.2rc3-py3-none-any.whl (2.6 MB view details)

Uploaded Python 3

File details

Details for the file commitfmt_darwin-0.1.2rc3.tar.gz.

File metadata

  • Download URL: commitfmt_darwin-0.1.2rc3.tar.gz
  • Upload date:
  • Size: 2.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for commitfmt_darwin-0.1.2rc3.tar.gz
Algorithm Hash digest
SHA256 868ba47dc85d57cf531124388311d6ed645f9cd2cf3d75ead9e34598af53d74c
MD5 b3b52c28dcb98a04ef862b64288a9c4a
BLAKE2b-256 c78fdfb1ad58bd2d0a2a4193b9bde04c991979b81486bca76477d9a40255cfd1

See more details on using hashes here.

File details

Details for the file commitfmt_darwin-0.1.2rc3-py3-none-any.whl.

File metadata

File hashes

Hashes for commitfmt_darwin-0.1.2rc3-py3-none-any.whl
Algorithm Hash digest
SHA256 80a10d8cb24e30550e1b15dd6568370088e5beb0dc96bfe38fbdcc10fd2ea9e6
MD5 b1187bbf415ca704818e9d4dede15905
BLAKE2b-256 144af224ebd521127f537fa96dd35d81357960b67661d06bb11be49cf96fb7cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page