Gitlint-core is the core library for Gitlint, a Python-based linter that enforces style and consistency for Git commit messages. It is an actively maintained project with regular releases, providing robust checks and customizability for commit hooks and CI pipelines.
pip install gitlint-coreVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to programmatically lint a commit message string using `gitlint-core`. It initializes a `GitlintConfig` and `Gitlint` instance, then passes a commit message string to the `lint` method. Violations are returned as a list of `RuleViolation` objects.
Upgrade your Python interpreter to 3.7 or later. Check the official Python EOL dates for guidance.
Remove any reliance on the `GITLINT_USE_SH_LIB` environment variable. The library now uses a more robust internal git command execution.
Review your custom rule regexes and update them if they were implicitly relying on `re.match`'s start-of-string anchoring. Explicitly use `^` for start-of-string matching if needed.
For CLI usage or pinned dependencies, `pip install gitlint`. For programmatic use with looser dependency control, `pip install gitlint-core`. If you previously installed `gitlint`, you might need to uninstall both to fully clean up (e.g., `pip uninstall gitlint gitlint-core`).
Run `gitlint uninstall-hook` followed by `gitlint install-hook` in your repository to update the hook.
No dependency data recorded yet.