Sha256: 568942aae19e902eb3b304ade48214c72bc9082b6f8344c37daa21b6548ed5c2
Contents?: true
Size: 1.11 KB
Versions: 23
Compression:
Stored size: 1.11 KB
Contents
# frozen_string_literal: true module SlimLint # Contains information about a problem or issue with a Slim document. class Lint # @return [String] file path to which the lint applies attr_reader :filename # @return [String] line number of the file the lint corresponds to attr_reader :line # @return [SlimLint::Linter] linter that reported the lint attr_reader :linter # @return [String] error/warning message to display to user attr_reader :message # @return [Symbol] whether this lint is a warning or an error attr_reader :severity # Creates a new lint. # # @param linter [SlimLint::Linter] # @param filename [String] # @param line [Fixnum] # @param message [String] # @param severity [Symbol] def initialize(linter, filename, line, message, severity = :warning) @linter = linter @filename = filename @line = line || 0 @message = message @severity = severity end # Return whether this lint has a severity of error. # # @return [Boolean] def error? @severity == :error end end end
Version data entries
23 entries across 23 versions & 1 rubygems
Version | Path |
---|---|
slim_lint-0.17.0 | lib/slim_lint/lint.rb |
slim_lint-0.16.1 | lib/slim_lint/lint.rb |
slim_lint-0.16.0 | lib/slim_lint/lint.rb |