Age | Commit message (Collapse) | Author |
|
Better coverage for extra-path, user-defined rules, debug.
|
|
This should bring the documentation close to its final form. Still need
to implement some of the minor features that are already documented though :)
|
|
Extra-path now defaults to 'None' instead of the current working
directory.
Documentation improvements:
- Features section on the homepage
- More documentation of the user-defined rules (still WIP)
|
|
Initial set of unit tests and documentation for the user defined rules.
More will follow.
Additionally:
- Added '__eq__' operator for options. Options are equal if their name,
value and description match.
|
|
This is the initial commit adding support for user-defined rules. It's a
rather large commit, but I decided to keep a few things out to
still try to keep the size manageable.
In particular, there will be follow-up commits adding more tests,
documentation and validation checks as well as general cleanup.
What is present in the current commit:
- Support for the 'extra-path' parameter that specifies where to search
for user-defined rules
- A new user_rules.py module that implements the business logic for
finding user-defined rule classes
- Example user-defined rules in examples/my_commit_rules.py and
examples/my_line_rules.py
- A new DirectoryOption class for specifying directory paths as rule
options
- ./run_tests.sh now print py.test warnings
|
|
- Added "debug" as an option that can also be set from config files.
- More unit and integration tests for debug
- Updated documentation to include a section on general gitlint options.
|
|
Gitlint will now ignore merge commits.
The rationale is that the original commit should already be linted and
that many merge commits that don't pass gitlint checks by default
(e.g. exceeding title length or empty body is very common).
This behavior can be overwritten by setting the general option
'ignore-merge-commit=false'.
|
|
Before, gitlint would only parse 'gitlint-ignore: all', now it also
supports 'gitlint-ignore: T1, body-hard-tab' and similar rules.
|
|
Also improved --install-hook unit tests
|
|
- Users can now add 'gitlint-ignore: all' to their git commit messages
to disable gitlint for a specific commit message.
Also:
- Some additional comments and method renaming
|
|
This new option allows users to choose whether the body-is-missing rule
should be ignored for merge commits.
This commit also adds the BoolOption class which was required to add
this new boolean option.
|
|
B6 (body-is-missing) should be ignored when the commit is a merge commit.
Merge commits can be generated by automated systems like Gerrit and
those systems copy the title from the source commit but may not copy the
body. commit-message-6 gives an example.
|
|
Rule to match the title against a given regular expression.
|
|
Also:
- Minor updates to README
- Bugfix for body-changed-file-mention rule when piping a commit
message into gitlint.
|
|
Added a new BodyChangedFileMention rule that will check whether certain
files are mentioned in the commit message body if those files are
changed.
|
|
- Some rule class renaming:
- BodyMaxLength -> BodyMaxLinLength
- BodyTooShort -> BodyMinLength
- BodyMinLength now has a 'min-length' options
- Fixed failing unit tests
|
|
Three new tests:
* TitleLeadingWhiteSpace - Leading whitespace in the title. Probably not
appropriate to test the body for leading whitespace as that may break
formatting such as this list.
* BodyTooShort - Body message doesn't contain enough detail. Set to 12
characters which is just selected without much thought.
* BodyMissing - No body message at all
Added examples to test these.
Added these tests to the defaults.
|
|
Lines in commit messages that start with a '#" will now be ignored.
|
|
|
|
The words that shouldn't be contained in the title as enforced by the
title-must-not-contain-word rule can now be specified in the config.
Additionally, multiple violations of the same rule can now occur on a
single line.
|
|
Rules can now have specific options set through gitlint config files
(e.g. setting line-length for the title-max-length rule).
|
|
Rule that asserts that the title has no trailing whitespace.
|
|
Rule that asserts that the 2nd line of the commit message (first line of
the commit message body) is empty.
This is the first multiline rule, i.e. a rule that acts on multiple
lines at once (in this case, the rule just checks the first line of the
multiline body).
|
|
New rule that checks that title does not contain certain words. Defaults
to not containing the word 'WIP'.
|
|
There is now a distinction between body and title rules + converted all
existing rules to have a title and body rule equivalent.
|
|
- setup.py
- travis integration
- README
- Vagrantfile
- run_tests.sh
- gitignore
- requirements.txt
|