class ERBLint::Reporters::GitlabReporter
def format_offense(filename, offense)
def format_offense(filename, offense) { description: offense.message, check_name: offense.simple_name, fingerprint: generate_fingerprint(filename, offense), severity: offense.severity, location: { path: filename, lines: { begin: offense.line_number, end: offense.last_line, }, }, } end
def formatted_data
def formatted_data formatted_files.to_json end
def formatted_files
def formatted_files processed_files.flat_map do |filename, offenses| formatted_offenses(filename, offenses) end end
def formatted_offenses(filename, offenses)
def formatted_offenses(filename, offenses) offenses.map do |offense| format_offense(filename, offense) end end
def generate_fingerprint(filename, offense)
def generate_fingerprint(filename, offense) Digest::MD5.hexdigest( "#{offense.simple_name}@#{filename}:#{offense.line_number}:#{offense.last_line}", ) end
def preview; end
def preview; end
def show
def show puts formatted_data end