Class: Gitlab::Ci::Parsers::Accessibility::Pa11y

Inherits:
Object
  • Object
show all
Defined in:
lib/gitlab/ci/parsers/accessibility/pa11y.rb

Instance Method Summary collapse

Instance Method Details

#parse!(json_data, accessibility_report) ⇒ Object


8
9
10
11
12
13
14
15
16
# File 'lib/gitlab/ci/parsers/accessibility/pa11y.rb', line 8

def parse!(json_data, accessibility_report)
  root = Gitlab::Json.parse(json_data).with_indifferent_access

  parse_all(root, accessibility_report)
rescue JSON::ParserError => e
  accessibility_report.set_error_message("JSON parsing failed: #{e}")
rescue StandardError => e
  accessibility_report.set_error_message("Pa11y parsing failed: #{e}")
end