#!/usr/bin/python -tt

class EvalMatches( object ):
    def __call__(self, lines, fn):
        errors = []
        curline = 1
        for l in lines:
            l = l.rstrip('\r').rstrip('\n')
            l = l.expandtabs(3)
            if len(l) > 110:
                errors.append( (fn, curline, "Line is too long! Keep it < 110 chars (with tab width of 3)"))
            curline += 1
        return errors


evaluate_matches = EvalMatches()

forbidden = [
    " "*110+"a",
    '\t\t' + 105*"a"
]

allowed = [
    "\t\tResonable sized line",
    " "*110,
    '\t\t' + 104*"a",
    # When tabs are correctly expanded, the next line is only 79 chars long
    # when tabs are replaced, it is 81
    """\t\t\t \t \t (Coords(s.get_safe_int("pointy_x"), s.get_safe_int("point_y")))"""
]
