#!/bin/sh

# Check code with pylint.
# Usage: See pylint --help.

pylint --rcfile=$(dirname "$0")/data/pylintrc "$@" \
\
    | egrep -v "Attribute '[A-Z0-9_]+' defined outside __init__" \
    | egrep -v "Instance of 'ConstantMember' has no '.+?' member" \
    | egrep -v "Instance of 'ConstantSection' has no '.+?s' member" \
    | egrep -v "Module 'gaupol.gtk..?conf' has no '.+?' member" \
    | egrep -v "No name '.+?' in module '.+?\.test\.?'" \
    | egrep -v "Undefined variable 'fobj'" \
    | egrep -v "functools.partial is not callable" \
\
    | sed "s/\*\+ Module \(.*\)$/<\1>/" \
    | sed "s/>$/>\n</" \
    | sed "/<$/{N;/<\n./D}" \
    | sed "/>$/{N;/>\n</D}" \
    | sed "s/[<>]$//" \
    | grep -v "^$" \
    | sed "s/^</\n\xE2\x97\x8F /"
