'Load database of previously ignored issues.
A csv file, with exactly the same format as suspicious.csv
Fields: document name (normalized), line number, issue, surrounding text'

def load_rules(self, filename):

    self.info('loading    ignore    rules...    ', nonl=1)
    self.rules = rules = []
    try:
        if py3:
            f = open(filename, 'r')
        else:
            f = open(filename, 'rb')
    except IOError:
        return
    for (i, row) in enumerate(csv.reader(f)):
        if (len(row) != 4):
            raise ValueError(('wrong    format    in    %s,    line    %d:    %s' % (filename, (i + 1), row)))
        (docname, lineno, issue, text) = row
        if lineno:
            lineno = int(lineno)
        else:
            lineno = None
        if (not py3):
            docname = docname.decode('utf-8')
            issue = issue.decode('utf-8')
            text = text.decode('utf-8')
        rule = Rule(docname, lineno, issue, text)
        rules.append(rule)
    f.close()
    self.info(('done,    %d    rules    loaded' % len(self.rules)))
