Sha256: 94cac713c0a5b88f9075d359124b1a41c3b677c343b1c41fd60e132e1e089e00
Contents?: true
Size: 516 Bytes
Versions: 1
Compression:
Stored size: 516 Bytes
Contents
# frozen_string_literal: true module SiteHealth # Checks for XML-errors (backed by the excellent Nokogiri gem) class XML < Checker name 'xml' types 'xml' issue_types( parse_error: { title: 'XML error', severity: :major, priority: :high, } ) protected def check errors = page.doc.errors.map(&:to_s) errors.each do |error| add_issue_type(:parse_error, detail: error) end end end SiteHealth.register_checker(XML) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
site_health-0.2.0 | lib/site_health/checkers/xml.rb |