class PuppetLint::Report::GitHubActionsReporter

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

Constants

ESCAPE_MAP

Public Class Methods

format_problem(file, problem) click to toggle source
# File lib/puppet-lint/report/github.rb, line 10
def self.format_problem(file, problem)
  "\n::#{problem[:kind]} file=#{file},line=#{problem[:line]},col=#{problem[:column]}::#{github_escape(problem[:message])} (check: #{problem[:check]})\n"
end
github_escape(string) click to toggle source
# File lib/puppet-lint/report/github.rb, line 14
def self.github_escape(string)
  string.gsub(Regexp.union(ESCAPE_MAP.keys), ESCAPE_MAP)
end