-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Way to get diff information? #314
Comments
This is something I've wanted to add but haven't gotten to. This should be fairly easy, I'll keep this issue open to get this implemented. For now, there's a fairly easy workaround using I'll re-iterate though that this is NOT officially supported, I'm not committing to keep that working in future versions of gitlint. |
Awesome, thanks for considering this! 🎉 |
Implemented in #334, will go out with the next release (0.18.0) |
- Python 3.11 support - Last release to support Python 3.6 - Behavior Change: In a future release, gitlint will be switching to use `re.search` instead of `re.match` semantics for all rules. (#254) - gitlint no longer uses the `sh` library by default in an attempt to reduce external dependencies. - `--commits` now also accepts a comma-separated list of commit hashes, making it possible to lint a list of non-contiguous commits without invoking gitlint multiple times (#283) - Improved handling of branches that have no commits (#188) - Support for `GITLINT_CONFIG` env variable (#189) - Added a new `gitlint-ci` pre-commit hook, making it easier to run gitlint through pre-commit in CI (#191) - Contrib Rules: - New `contrib-disallow-cleanup-commits` rule (#312) - New `contrib-allowed-authors` rule (#358) - User Defined rules: - Gitlint now recognizes `fixup=amend` commits, available as `commit.is_fixup_amend_commit=True` - Gitlint now parses diff **stat** information, available in `commit.changed_files_stats` (#314) - Bugfixes: - Use correct encoding when using `--msg-filename` parameter (#310) - Various documentation fixes (#244) (#263) (#266) (#294) (#295) (#347) (#364) - Under-the-hood: - Dependencies updated - Moved to blacked for formatting - Fixed nasty CI issue (#298) - Unit tests fix (#256) - Vagrant box removed in favor of github dev containers (#348) - Removed a few lingering references to the `master` branch in favor of `main` - Moved roadmap and project planning to github projects Full Release details in CHANGELOG.md.
Is there a way to get information about the diff of the actual commit the rule is working on?
I want to implement a check that compares the size of the diff to the size of the commit message and if a certain ratio is exceeded, emits an error or warning (e.g.: 1000 LOC change and only 1 line of message might be a no-no for some 😄 )
The text was updated successfully, but these errors were encountered: