Sha256: 51654f6b3c71bcd849a3ca3f6d5acc42d29b295207eb128739f708a54623206e

Contents?: true

Size: 625 Bytes

Versions: 16

Compression:

Stored size: 625 Bytes

Contents

module SCSSLint
  # Reports lints in an XML format.
  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

16 entries across 16 versions & 1 rubygems

Version Path
scss-lint-0.22.0 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.21.0 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.20.3 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.20.2 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.20.1 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.20.0 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.19.0 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.18.0 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.17.3 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.17.2 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.17.1 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.17.0 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.16.1 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.16.0 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.15.0 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.14.0 lib/scss_lint/reporter/xml_reporter.rb