Sha256: 765bfbebec5632e1a8c087f4eb0a96f20533346b0eb61f04c576bdea85567c94

Contents?: true

Size: 547 Bytes

Versions: 20

Compression:

Stored size: 547 Bytes

Contents

module SlimLint
  # Contains information about all lints detected during a scan.
  class Report
    # List of lints that were found.
    attr_accessor :lints

    # List of files that were linted.
    attr_reader :files

    # Creates a report.
    #
    # @param lints [Array<SlimLint::Lint>] lints that were found
    # @param files [Array<String>] files that were linted
    def initialize(lints, files)
      @lints = lints.sort_by { |l| [l.filename, l.line] }
      @files = files
    end

    def failed?
      @lints.any?
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
slim_lint-0.15.1 lib/slim_lint/report.rb
slim_lint-0.15.0 lib/slim_lint/report.rb
slim_lint-0.14.0 lib/slim_lint/report.rb
slim_lint-0.13.0 lib/slim_lint/report.rb
slim_lint-0.12.0 lib/slim_lint/report.rb
slim_lint-0.11.0 lib/slim_lint/report.rb
slim_lint-0.10.0 lib/slim_lint/report.rb
slim_lint-0.9.0 lib/slim_lint/report.rb
slim_lint-0.8.3 lib/slim_lint/report.rb
slim_lint-0.8.2 lib/slim_lint/report.rb
slim_lint-0.8.1 lib/slim_lint/report.rb
slim_lint-0.8.0 lib/slim_lint/report.rb
slim_lint-0.7.2 lib/slim_lint/report.rb
slim_lint-0.7.1 lib/slim_lint/report.rb
slim_lint-0.7.0 lib/slim_lint/report.rb
slim_lint-0.6.1 lib/slim_lint/report.rb
slim_lint-0.6.0 lib/slim_lint/report.rb
slim_lint-0.5.0 lib/slim_lint/report.rb
slim_lint-0.4.0 lib/slim_lint/report.rb
slim_lint-0.3.0 lib/slim_lint/report.rb