Class: RuboCop::Formatter::GitHubActionsFormatter

Inherits:
BaseFormatter
  • Object
show all
Defined in:
lib/rubocop/formatter/git_hub_actions_formatter.rb

Overview

This formatter formats report data as GitHub Workflow commands resulting in GitHub check annotations when run within GitHub Actions.

Constant Summary collapse

ESCAPE_MAP =
{ '%' => '%25', "\n" => '%0A', "\r" => '%0D' }.freeze

Instance Attribute Summary

Attributes inherited from BaseFormatter

#options, #output

Instance Method Summary collapse

Methods inherited from BaseFormatter

#file_started, #finished, #initialize, #started

Constructor Details

This class inherits a constructor from RuboCop::Formatter::BaseFormatter

Instance Method Details

#file_finished(file, offenses) ⇒ Object


10
11
12
# File 'lib/rubocop/formatter/git_hub_actions_formatter.rb', line 10

def file_finished(file, offenses)
  offenses.each { |offense| report_offense(file, offense) }
end