lib/scss_lint/runner.rb in scss-lint-0.18.0 vs lib/scss_lint/runner.rb in scss-lint-0.19.0
- old
+ new
@@ -5,16 +5,18 @@
# Finds and aggregates all lints found by running the registered linters
# against a set of SCSS files.
class Runner
attr_reader :lints
+ # @param config [Config]
def initialize(config)
- @config = config
- @lints = []
+ @config = config
+ @lints = []
@linters = LinterRegistry.linters.map(&:new)
end
+ # @param files [Array]
def run(files)
raise NoFilesError, 'No SCSS files specified' if files.empty?
files.each do |file|
find_lints(file)
@@ -25,9 +27,10 @@
end
end
private
+ # @param file [String]
def find_lints(file)
engine = Engine.new(file)
config = @config.preferred ? @config : Config.for_file(file)
config ||= @config