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.0.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.0-py3-none-any.whl (2.6 MB view details)

Uploaded Python 3

File details

Details for the file commitfmt_darwin-0.1.0.tar.gz.

File metadata

  • Download URL: commitfmt_darwin-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 df89c06423848c59c539a061ec41cd4d8eb2c0e9131b966fa324c2c8c1e0d85c
MD5 e859a940a48b6bd4581b4dac8b86ad41
BLAKE2b-256 a701ec33d47d4b5bd3a714b3752cef13f1a352d7b6207ffdec38bcb0b3927714

See more details on using hashes here.

File details

Details for the file commitfmt_darwin-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for commitfmt_darwin-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6123dd5089c977b184953f8121ca4b85b578b63c3c770a442aae7b4e6078e32
MD5 8b160446e658a2f1682dd0f034e2401b
BLAKE2b-256 442c043329536ecdf23edd87428cd7bbf253873d8c3881e37ee3b26b57d140ad

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