Home | History | Annotate | Download | only in extensions

Lines Matching refs:Rule

20   - each line defines a rule; if the rule matches, the issue
24 rule matches anywhere in the file).
29 Rules are processed sequentially. A rule matches when:
34 * the rule text is completely contained into the source line
62 class Rule:
64 """A rule for ignoring issues"""
65 self.docname = docname # document to which this rule applies
67 # this rule matches only near that.
69 self.issue = issue # the markup fragment that triggered this rule
114 unused_rules = [rule for rule in self.rules if not rule.used]
118 for rule in unused_rules:
119 self.info(repr(rule))
129 for rule in self.rules:
130 if rule.docname != docname: continue
131 if rule.issue != issue: continue
136 # Ok, relax that requirement: just check if the rule fragment
138 if rule.line not in line: continue
140 # this rule matches. (lineno=None means "don't care")
141 if (rule.lineno is not None) and \
142 abs(rule.lineno - lineno) > 5: continue
143 # if it came this far, the rule matched
144 rule.used = True
206 rule = Rule(docname, lineno, issue, text)
207 rules.append(rule)