class Standard::Lsp::StdinRubocopRunner

def file_finished(_file, offenses)

def file_finished(_file, offenses)
  @offenses = offenses
end

def formatted_source

def formatted_source
  @options[:stdin]
end

def initialize(config)

def initialize(config)
  @options = {}
  @offenses = []
  @errors = []
  @warnings = []
  @config_for_working_directory = config.rubocop_config_store.for_pwd
  super(
    config.rubocop_options.merge(DEFAULT_RUBOCOP_OPTIONS),
    config.rubocop_config_store
  )
end

def run(path, contents)

def run(path, contents)
  @errors = []
  @warnings = []
  @offenses = []
  @options[:stdin] = contents
  super([path])
  raise Interrupt if aborting?
rescue ::RuboCop::Runner::InfiniteCorrectionLoop => error
  if defined?(::RubyLsp::Requests::Formatting::Error)
    raise ::RubyLsp::Requests::Formatting::Error, error.message
  else
    raise error
  end
rescue ::RuboCop::ValidationError => error
  raise ConfigurationError, error.message
rescue => error
  if defined?(::RubyLsp::Requests::Formatting::Error)
    raise ::RubyLsp::Requests::Support::InternalRuboCopError, error
  else
    raise error
  end
end