#!/bin/sh

which py.test || exit 1
cd $(git rev-parse --show-toplevel)
find shiori -name '*.pyc' -delete
python setup.py test || exit 1
python setup.py check -r || exit 1

pychecker -X -s shiori/*.py
pychecker -X -s shiori_tests/*.py

pylint --ignore=migrations \
    -d too-few-public-methods \
    -d invalid-name \
    -d superfluous-parens \
    -d no-name-in-module \
    -d import-error \
    -d too-many-ancestors \
    -d no-member \
    -d too-many-public-methods \
    -d no-value-for-parameter \
    -d method-hidden \
    -d unused-argument \
    -d no-self-use \
    -d catching-non-exception \
    -d duplicate-code \
    -d unexpected-keyword-arg \
    shiori
