class Standard::Lsp::StdinRubocopRunner
github.com/Shopify/ruby-lsp/blob/8d4c17efce4e8ecc8e7c557ab2981db6b22c0b6d/lib/ruby_lsp/requests/support/rubocop_runner.rb#L20<br>Originally lifted from:
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