Skip to content

pre-commit

Configuration

Introduction

pre-commit is a Python framework for running “hooks” during various points in the git commit workflow.

pre-commit hooks do things like enforce commit message formatting and check and automatically clean up file formatting.

Integrating these checks with the git commit workflow ensures every commit follows team conventions and reduces the chance for simple syntax errors and other hidden bugs.

Features

Conventional Commits

Compiler follows the Conventional Commits specification for writing commit messages.

compilerla/conventional-pre-commit is a pre-commit hook that enforces this convention for every commit.

Markdownlint

markdownlint is a static analysis tool (linter) for Markdown documents.

The related markdownlint-cli tool can be used as a pre-commit hook.

Pre-Commit Hooks

pre-commit-hooks is a collection of useful hooks maintained by the pre-commit team.