class HamlLint::Reporter::GithubReporter

Outputs GitHub workflow commands for GitHub check annotations when run within GitHub actions.

def added_lint(lint, report)

def added_lint(lint, report)
  if lint.severity >= report.fail_level
    print_workflow_command(lint: lint)
  else
    print_workflow_command(severity: 'warning', lint: lint)
  end
end

def display_report(report)

def display_report(report)
  print_summary(report)
end

def github_escape(string)

def github_escape(string)
  string.gsub(Regexp.union(ESCAPE_MAP.keys), ESCAPE_MAP)
end

def print_workflow_command(lint:, severity: 'error')

def print_workflow_command(lint:, severity: 'error')
  log.log "::#{severity} file=#{lint.filename},line=#{lint.line}::#{github_escape(lint.message)}"
end