def lint(self, commit):
LOG.debug("<STR_LIT>", commit.sha or "<STR_LIT>")<EOL>LOG.debug("<STR_LIT>" + ustr(commit))<EOL>for rule in self.configuration_rules:<EOL><INDENT>rule.apply(self.config, commit)<EOL><DEDENT>ignore_commit_types = ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]<EOL>for commit_type in ignore_commit_types:<EOL><INDENT>if getattr(commit, "<STR_LIT>".format(commit_type)) andgetattr(self.config, "<STR_LIT>".format(commit_type)):<EOL><INDENT>return []<EOL><DEDENT><DEDENT>violations = []<EOL>violations.extend(self._apply_line_rules([commit.message.title], commit, self.title_line_rules, <NUM_LIT:1>))<EOL>violations.extend(self._apply_line_rules(commit.message.body, commit, self.body_line_rules, <NUM_LIT:2>))<EOL>violations.extend(self._apply_commit_rules(self.commit_rules, commit))<EOL>violations.sort(key=lambda v: (-<NUM_LIT:1> if v.line_nr is None else v.line_nr, v.rule_id))<EOL>return violations<EOL>
Lint the last commit in a given git context by applying all ignore, title, body and commit rules.