'Checks for violations in a JavaScript file.
Arguments:
file_contents: The contents of the JavaScript file.
results: A file results objects to which violations will be added.'

def check_javascript_file_is_safe(self, file_contents, results):

    no_caller_check = None
    no_argument_check = None
    self._check_jquery_function(file_contents, 'append', Rules.javascript_jquery_append, no_caller_check, self._is_jquery_argument_safe, results)
    self._check_jquery_function(file_contents, 'prepend', Rules.javascript_jquery_prepend, no_caller_check, self._is_jquery_argument_safe, results)
    self._check_jquery_function(file_contents, 'unwrap|wrap|wrapAll|wrapInner|after|before|replaceAll|replaceWith', Rules.javascript_jquery_insertion, no_caller_check, self._is_jquery_argument_safe, results)
    self._check_jquery_function(file_contents, 'appendTo|prependTo|insertAfter|insertBefore', Rules.javascript_jquery_insert_into_target, self._is_jquery_insert_caller_safe, no_argument_check, results)
    self._check_jquery_function(file_contents, 'html', Rules.javascript_jquery_html, no_caller_check, self._is_jquery_html_argument_safe, results)
    self._check_javascript_interpolate(file_contents, results)
    self._check_javascript_escape(file_contents, results)
    self._check_concat_with_html(file_contents, Rules.javascript_concat_html, results)
    self.underscore_linter.check_underscore_file_is_safe(file_contents, results)
    results.prepare_results(file_contents, line_comment_delim=self.LINE_COMMENT_DELIM)
