A fast git commit message linter written in Rust
Project description
Mixed Pickles
A fast git commit message linter written in Rust. Validates commit messages against best practices and provides actionable suggestions.
Installation
Python (Recommended)
pip install mixed-pickles
Or with uv:
uv pip install mixed-pickles
Rust
cargo install mixed-pickles
Or build from source:
git clone https://github.com/rommeld/mixed-pickles.git
cd mixed-pickles
cargo build --release
What It Checks
| Validation | Default Severity | Description |
|---|---|---|
WipCommit |
Error | WIP markers, fixup!, squash! |
ShortCommit |
Warning | Messages below threshold (default: 30 chars) |
NonImperative |
Warning | Non-imperative mood ("Added" vs "Add") |
VagueLanguage |
Warning | Generic phrases ("fix bug", "update code") |
MissingReference |
Info | No issue reference (#123, PROJ-456) |
InvalidFormat |
Info | Not following conventional commits |
Usage
CLI
# Analyze all commits in current repo
mixed-pickles
# Analyze last 10 commits
mixed-pickles --limit 10
# Analyze specific repo
mixed-pickles --path /path/to/repo
# Strict mode (warnings become errors)
mixed-pickles --strict
# Customize severity
mixed-pickles --error short,vague --ignore ref
# Quiet mode (output only on issues)
mixed-pickles --quiet
Python API
import mixed_pickles
# Basic analysis - auto-loads pyproject.toml config
mixed_pickles.analyze_commits()
# Analyze with options
mixed_pickles.analyze_commits(
path=".", # Repository path
limit=10, # Number of commits
quiet=True, # Suppress output unless issues
strict=True # Treat warnings as errors
)
# Disable auto-loading of config file
mixed_pickles.analyze_commits(use_config=False)
# Load config from pyproject.toml or .mixed-pickles.toml
config = mixed_pickles.ValidationConfig.discover()
config = mixed_pickles.ValidationConfig.discover("/path/to/project")
# Load config from specific file
config = mixed_pickles.ValidationConfig.from_file("pyproject.toml")
config = mixed_pickles.ValidationConfig.from_file(".mixed-pickles.toml")
# Manual configuration
config = mixed_pickles.ValidationConfig(
threshold=50, # Minimum message length
require_issue_ref=False, # Disable issue reference check
require_conventional_format=False,
check_vague_language=True,
check_wip=True,
check_imperative=True
)
mixed_pickles.analyze_commits(config=config)
# Adjust severity levels
config = mixed_pickles.ValidationConfig()
config.set_severity(
mixed_pickles.Validation.MissingReference,
mixed_pickles.Severity.Error
)
config.set_severity(
mixed_pickles.Validation.ShortCommit,
mixed_pickles.Severity.Ignore
)
mixed_pickles.analyze_commits(config=config)
# Fetch commits for custom processing
commits = mixed_pickles.fetch_commits(limit=5)
for commit in commits:
print(f"{commit.short_hash}: {commit.message}")
Pre-commit Hook
Add to your .pre-commit-config.yaml:
repos:
- repo: local
hooks:
- id: mixed-pickles
name: Validate commit messages
entry: mixed-pickles
language: python
additional_dependencies: [mixed-pickles]
always_run: true
pass_filenames: false
stages: [pre-push]
With uv, you can also run it directly:
repos:
- repo: local
hooks:
- id: mixed-pickles
name: Validate commit messages
entry: uv run mixed-pickles
language: system
always_run: true
pass_filenames: false
stages: [pre-push]
CLI Options
| Option | Description |
|---|---|
--path <PATH> |
Repository path (default: current directory) |
--limit <N> |
Max commits to analyze |
--threshold <N> |
Minimum message length (default: 30) |
--quiet, -q |
Suppress output unless issues found |
--strict |
Treat warnings as errors |
--error <LIST> |
Validations to treat as errors |
--warn <LIST> |
Validations to treat as warnings |
--ignore <LIST> |
Validations to skip reporting |
--disable <LIST> |
Validations to disable entirely |
--config <PATH> |
Path to configuration file |
--no-config |
Ignore configuration file |
Validation aliases for CLI: short, ref, format, vague, wip, imperative
Configuration
Configure mixed-pickles via pyproject.toml for project-specific settings:
[tool.mixed-pickles]
# Minimum commit message length (default: 30)
threshold = 50
# Disable specific validations entirely
disable = ["reference", "format"]
# Override severity levels
[tool.mixed-pickles.severity]
wip = "error" # Block on WIP commits (default)
short = "warning" # Warn but allow (default)
vague = "ignore" # Don't report
reference = "info" # Informational only (default)
Or use a dedicated .mixed-pickles.toml file (takes precedence over pyproject.toml):
threshold = 50
disable = ["format"]
[severity]
short = "error"
Configuration Precedence
Settings are applied in this order (later overrides earlier):
- Defaults - Built-in default values
- Config file -
pyproject.tomlor.mixed-pickles.toml - CLI arguments - Command-line flags
Available Validations
| Name | Aliases | Default | Description |
|---|---|---|---|
short |
short-commit |
warning | Message below threshold |
wip |
wip-commit |
error | WIP/fixup/squash markers |
reference |
ref, missing-reference |
info | Missing issue reference |
format |
invalid-format |
info | Not conventional commits |
vague |
vague-language |
warning | Generic descriptions |
imperative |
non-imperative |
warning | Past/continuous tense |
Severity Levels
- Error: Fails the check (exit code 1)
- Warning: Reported but passes (fails with
--strict) - Info: Informational only
- Ignore: Tracked but not reported
Contributing
See CONTRIBUTING.md for contribution guidelines.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mixed_pickles-0.2.0.tar.gz.
File metadata
- Download URL: mixed_pickles-0.2.0.tar.gz
- Upload date:
- Size: 49.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2adf858c577c28f064c621c63a838ea7894506bfc2eb8ad806e5f7277f179046
|
|
| MD5 |
9e63b5019e70a626b4418043fb1a67c7
|
|
| BLAKE2b-256 |
abc057465bb4ee94e700a6e4a9a18f0b0e9ef455a87680490ba9a152351b7229
|
File details
Details for the file mixed_pickles-0.2.0-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: mixed_pickles-0.2.0-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 1.2 MB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb803f42c97be463d6116cadc3d3520fb57761a3ede134dc608669f4c111116d
|
|
| MD5 |
4421e24b2adeee5e0924635288a52d2e
|
|
| BLAKE2b-256 |
5aa84fafc6fcc03469e46df12eb9c1aeb25dd74814f2127e62db0ecf58f9e5d5
|
File details
Details for the file mixed_pickles-0.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: mixed_pickles-0.2.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.5 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c660c259ed92733bab3fd0546cd0fb083c49603a8dedfba62d3f8ea474683e73
|
|
| MD5 |
7f4191cf7cb1c1376c9df3f17d753b8b
|
|
| BLAKE2b-256 |
4038f0c6392793ed779a55b677d02fb1ae5d27043f31310ee7663b4dc093f177
|
File details
Details for the file mixed_pickles-0.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: mixed_pickles-0.2.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.8+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52e454a198b8352bbc0a261e842ba281f641f3f56134c79fc9211263887b0bb0
|
|
| MD5 |
bd0afad7ec326956360847d69c981d5a
|
|
| BLAKE2b-256 |
1a7fad795923b6a228d9f4d218409b0491398381364e4278dc6dfd8f65faa1c5
|
File details
Details for the file mixed_pickles-0.2.0-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: mixed_pickles-0.2.0-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec86e703fa44d4026b54556138b7507a90922aedd086c83619ea694a08585892
|
|
| MD5 |
e2752fc7ce7867b041de9a0b1ac177c6
|
|
| BLAKE2b-256 |
3fce7b3141148a0cbb2c3202df5ffc8ec964f5d8fb9fc25279eb7d91a8160c1d
|
File details
Details for the file mixed_pickles-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: mixed_pickles-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 1.4 MB
- Tags: CPython 3.8+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
166051dc69e454707ac87bc404f9b236cbe1827fadda81713121729c8a6d9633
|
|
| MD5 |
311f172df9e0a024660b2d27e750f151
|
|
| BLAKE2b-256 |
04ea6c93f1273192d29f2f7e42cc5b8b1ee89f1e707a7f2fb897b6e71dc84f7e
|