Sha256: b9a12b452d061cb7d2b778a2335552be74317a84e04fee0bd540164a71e05507

Contents?: true

Size: 514 Bytes

Versions: 9

Compression:

Stored size: 514 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='warning' reason='#{lint.description}' />"
        end

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

      output
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
scss-lint-0.10.1 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.10.0 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.9.0 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.7.1 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.7.0 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.6.7 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.6.6 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.6.5 lib/scss_lint/reporter/xml_reporter.rb
scss-lint-0.6 lib/scss_lint/reporter/xml_reporter.rb