code: def lint(input_file, debug=False):
      
      options = load_options()
  
      if isinstance(input_file, string_types):
          text = input_file
      else:
          text = input_file.read()
  
      # Get the checks.
      checks = get_checks(options)
  
      # Apply all the checks.
      errors = []
      for check in checks:
  
          result = check(text)
  
          for error in result:
              (start, end, check, message, replacements) = error
              (line, column) = line_and_column(text, start)
              if not is_quoted(start, text):
                  errors += [(check, message, line, column, start, end,
                             end - start, "warning", replacements)]
  
          if len(errors) > options["max_errors"]:
              break
  
      # Sort the errors by line and column number.
      errors = sorted(errors[:options["max_errors"]], key=lambda e: (e[2], e[3]))
  
      return errors
docs: Run the linter on the input file.