summaryrefslogtreecommitdiffstats
path: root/examples
AgeCommit message (Collapse)Author
2016-12-05Additional unit and integration testsJoris Roovers
Better coverage for extra-path, user-defined rules, debug.
2016-12-03More documentation for user-defined rulesJoris Roovers
This should bring the documentation close to its final form. Still need to implement some of the minor features that are already documented though :)
2016-12-02Documentation improvements + extra-path default path fixJoris Roovers
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)
2016-12-01Initial unit tests and docs for user defined rulesJoris Roovers
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.
2016-08-04Initial support for user-defined rulesJoris Roovers
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
2016-06-16Debug mode improvementsJoris Roovers
- 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.
2016-04-15Ignore merge commits by defaultJoris Roovers
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'.
2015-10-04gitlint-ignore commit msg config can now ignore specific rulesJoris Roovers
Before, gitlint would only parse 'gitlint-ignore: all', now it also supports 'gitlint-ignore: T1, body-hard-tab' and similar rules.
2015-10-02Unit tests for --uninstall-hookJoris Roovers
Also improved --install-hook unit tests
2015-10-02Disable gitlint on a per commit basisJoris Roovers
- 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
2015-09-25ignore-merge-commit option for body-is-missing ruleJoris Roovers
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.
2015-09-24Ignore B6 when merge commitToby Oxborrow
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.
2015-09-22TitleRegexMatches ruleJoris Roovers
Rule to match the title against a given regular expression.
2015-09-17All multiline body rules now use the gitcontextJoris Roovers
Also: - Minor updates to README - Bugfix for body-changed-file-mention rule when piping a commit message into gitlint.
2015-09-17BodyChangedFileMention ruleJoris Roovers
Added a new BodyChangedFileMention rule that will check whether certain files are mentioned in the commit message body if those files are changed.
2015-09-15Rule renaming + Fixed unit testsJoris Roovers
- Some rule class renaming: - BodyMaxLength -> BodyMaxLinLength - BodyTooShort -> BodyMinLength - BodyMinLength now has a 'min-length' options - Fixed failing unit tests
2015-09-14TitleLeadingWhiteSpace, BodyTooShort, BodyMissingToby Oxborrow
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.
2015-09-11gitlint now ignores commented out linesJoris Roovers
Lines in commit messages that start with a '#" will now be ignored.
2015-09-11Title max length set to 72 chars (previously 80)Joris Roovers
2015-09-10'words' option for title-must-not-contain-word ruleJoris Roovers
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.
2015-09-10Support for setting rule options through gitlint fileJoris Roovers
Rules can now have specific options set through gitlint config files (e.g. setting line-length for the title-max-length rule).
2015-09-08TitleTrailingPunctuation ruleJoris Roovers
Rule that asserts that the title has no trailing whitespace.
2015-09-08Added BodyFirstLineEmpty ruleJoris Roovers
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).
2015-09-08Title does not contain word rulesJoris Roovers
New rule that checks that title does not contain certain words. Defaults to not containing the word 'WIP'.
2015-09-02Title and body rulesJoris Roovers
There is now a distinction between body and title rules + converted all existing rules to have a title and body rule equivalent.
2015-09-02Initial commitJoris Roovers
- setup.py - travis integration - README - Vagrantfile - run_tests.sh - gitignore - requirements.txt