Skip to content
This repository has been archived by the owner on May 3, 2020. It is now read-only.

Latest commit

 

History

History
85 lines (59 loc) · 2.9 KB

README.rst

File metadata and controls

85 lines (59 loc) · 2.9 KB

Kwalitee

https://badge.waffle.io/inveniosoftware/kwalitee.svg?label=Status%3A%20ready%20for%20work&title=Issues%20ready%20for%20work

Kwalitee is a tool that runs static analysis checks on Git repository.

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 with git commit --amend.

All checks can be disabled using:

git commit --no-verify

Kwalitee checks

  • Static analysis of files:
  • 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 and Reviewed-by.