code: def proselint(paths=None, version=None, clean=None, debug=None,
                output_json=None, time=None, demo=None, compact=None):
      
      if time:
          click.echo(timing_test())
          return
  
      # In debug or clean mode, delete cache & *.pyc files before running.
      if debug or clean:
          clear_cache()
  
      # Use the demo file by default.
      if demo:
          paths = [demo_file]
  
      # Expand the list of directories and files.
      filepaths = extract_files(list(paths))
  
      # Lint the files
      num_errors = 0
  
      # Use stdin if no paths were specified
      if len(paths) == 0:
          filepaths.append('-')
  
      for fp in filepaths:
          try:
              if fp == '-':
                  fp = '<stdin>'
                  f = sys.stdin
              else:
                  f = click.open_file(
                      fp, 'r', encoding="utf-8", errors="replace")
              errors = lint(f, debug=debug)
              num_errors += len(errors)
              print_errors(fp, errors, output_json, compact=compact)
          except Exception:
              traceback.print_exc()
  
      # Return an exit code
      close_cache_shelves()
      if num_errors > 0:
          sys.exit(1)
      else:
          sys.exit(0)
docs: A CLI for proselint, a linter for prose.