Sha256: 7c24e15757435cc0468c2d9f16c8acbbd480826daa7cb2af20fa1d6de8e555ea

Contents?: true

Size: 589 Bytes

Versions: 4

Compression:

Stored size: 589 Bytes

Contents

module SCSSLint
  class Reporter::XMLReporter < Reporter
    def report_lints
      output = '<?xml version="1.0" encoding="utf-8"?>'

      output << '<lint>'
      lints.group_by(&:filename).each do |filename, file_lints|
        output << "<file name='#{filename}'>"

        file_lints.each do |lint|
          output << "<issue line='#{lint.line}' " <<
                           "severity='#{lint.severity}' " <<
                           "reason='#{lint.description}' />"
        end

        output << '</file>'
      end
      output << '</lint>'

      output
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
scss-lint-0.13.0 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.12.1 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.12.0 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.11.1 lib/scss_lint/reporter/xml_reporter.rb