Sha256: 3bdaaa070366359906cdabe65c16d48de875e34f3aa2c2d2f1b167bd5d7408d4

Contents?: true

Size: 552 Bytes

Versions: 7

Compression:

Stored size: 552 Bytes

Contents

module SCSSLint
  # Reports a single line per lint.
  class Reporter::DefaultReporter < Reporter
    def report_lints
      return unless lints.any?

      lints.map do |lint|
        type = lint.error? ? '[E]'.color(:red) : '[W]'.color(:yellow)

        linter_name = "#{lint.linter.name}: ".color(:green) if lint.linter
        message = "#{linter_name}#{lint.description}"

        "#{lint.filename.color(:cyan)}:" <<
          "#{lint.location.line}".color(:magenta) <<
          " #{type} #{message}"
      end.join("\n") + "\n"
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
scss-lint-0.30.0 lib/scss_lint/reporter/default_reporter.rb
scss-lint-0.29.0 lib/scss_lint/reporter/default_reporter.rb
scss-lint-0.28.0 lib/scss_lint/reporter/default_reporter.rb
scss-lint-0.27.0 lib/scss_lint/reporter/default_reporter.rb
scss-lint-0.26.2 lib/scss_lint/reporter/default_reporter.rb
scss-lint-0.26.1 lib/scss_lint/reporter/default_reporter.rb
scss-lint-0.26.0 lib/scss_lint/reporter/default_reporter.rb