'Adds results from a different linter to the Mako results, after shifting
the offset into the original Mako template.
Arguments:
other_linter_results: Results from another linter.
start_offset: The offset of the linted code, a part of the template,
inside the original Mako template.
results: A list of results into which violations will be added.
Side effect:
Adds violations to results.'

def _shift_and_add_violations(self, other_linter_results, start_offset, results):

    for violation in other_linter_results.violations:
        expression = violation.expression
        expression.start_index += start_offset
        if (expression.end_index is not None):
            expression.end_index += start_offset
        results.violations.append(ExpressionRuleViolation(violation.rule, expression))
