Kwalitee¶
Kwalitee is a tool that runs static analysis checks on Git repository.
- Free software: GPLv2 license
- Documentation: https://kwalitee.readthedocs.io/
Introduction¶
Kwalitee is a tool that runs static analysis checks on invenio and invenio-related repositories. It can be used as a web service using the Github API or as a git hook from the command line.
It aims at slowly, but steadily enforce good practices regarding commit message formatting, code layout (PEP8), documentation (PYDOCSTYLE) and help the integrators doing their job without having to worry about recurrent mistakes.
It relies on and thanks the following softwares and libraries:
Git Hooks¶
Install git hooks into your repository using:
cd /path/to/git-repo
kwalitee githooks install
and uninstall hooks using:
kwalitee githooks uninstall
Following hooks are installed:
pre-commit
- run PEP8, pyflakes and copyright year checks on files being committed. If errors are found, the commit is aborted.prepare-commit-msg
- prepare standard form commit message.post-commit
- check commit message form and signatures. If errors are found, they can be fixed withgit commit --amend
.
All checks can be disabled using:
git commit --no-verify
Kwalitee checks¶
- Commit message analysis:
- First line less than 50 chars and according to the
pattern
<component>: <short description>
(using nouns). - Body with detailed description of what this patch does, formatted as a bulletted list. (using present tense).
- Required signatures:
Signed-off-by
andReviewed-by
.
- First line less than 50 chars and according to the
pattern
User’s Guide¶
This part of the documentation will show you how to get started in using Kwalitee.
API Reference¶
If you are looking for information on a specific function, class or method, this part of the documentation is for you.
Additional Notes¶
Notes on how to contribute, legal information and changes are here for the interested.