'Marks the expression violation as disabled if it finds the disable
pragma anywhere on the first line of the violation, or at the start of
the line preceding the violation.
Pragma format::
xss-lint: disable=violation-name,other-violation-name
Examples::
<% // xss-lint: disable=underscore-not-escaped %>
<%= gettext(\'Single Line\') %>
<%= gettext(\'Single Line\') %><% // xss-lint: disable=underscore-not-escaped %>
Arguments:
string_lines: A StringLines containing the contents of the file in
violation.
Side Effect:
Sets self.is_disabled as appropriate based on whether the pragma is
found.'

def _mark_expression_disabled(self, string_lines):

    has_previous_line = (self.start_line > 1)
    if has_previous_line:
        line_to_check = string_lines.line_number_to_line((self.start_line - 1))
        self._mark_disabled(line_to_check, scope_start_string=True)
        if self.is_disabled:
            return
    line_to_check = string_lines.line_number_to_line(self.start_line)
    self._mark_disabled(line_to_check, scope_start_string=False)
