Skip to main content

Validate the format of a commit message to Wikimedia Gerrit standards

Project description

commit-message-validator is a tool that validates git commit messages to the Wikimedia commit message guidelines.

Please see <> for more details.


Use locally as a Pre-commit plugin

commit-message-validator can be used as a plugin for the pre-commit git hooks system. Add the following to your .pre-commit-config.yaml:

-  repo:
   rev: # Fill in a tag / sha here (like v2.0.0)
   -  id: commit-message-validator

Then install the pre-commit hook:

pre-commit install --hook-type commit-msg

Use with’s CI/CD

A GitLab CI/CD template is provided in this repo for linting of commit messages in a merge request. Add the following to your .gitlab-ci.yml:

  - project: repos/ci-tools/commit-message-validator
    file: /templates/lint-merge-request.yml


See CONTRIBUTING.rst for guidelines on contributing to commit-message-validator.

Bug reports

Please reports bugs and feature requests at


Licensed under the GPL-2.0-or-later license. See COPYING for the full license.

Download files

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

Source Distribution

commit_message_validator-2.0.0.tar.gz (26.2 kB view hashes)

Uploaded source

Built Distribution

Supported by

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