code: def _check_file(parameters):
      
      (filename, args) = parameters
  
      if filename == '-':
          contents = sys.stdin.read()
      else:
          with contextlib.closing(
              docutils.io.FileInput(source_path=filename)
          ) as input_file:
              contents = input_file.read()
  
      args = load_configuration_from_file(
          os.path.dirname(os.path.realpath(filename)), args)
  
      ignore_directives_and_roles(args.ignore_directives, args.ignore_roles)
  
      for substitution in args.ignore_substitutions:
          contents = contents.replace('|{}|'.format(substitution), 'None')
  
      ignore = {
          'languages': args.ignore_language,
          'messages': args.ignore_messages,
      }
      all_errors = []
      for error in check(contents,
                         filename=filename,
                         report_level=args.report,
                         ignore=ignore,
                         debug=args.debug):
          all_errors.append(error)
      return (filename, all_errors)
docs: Return list of errors.