module Pluginscan # Responsible for scanning one line of a file for issues of a certain type class LineIssuesScanner def initialize(check) @check = check end def scan(line, lineno) @check.run(line).map do |match| ignored = @check.ignore?(match, line) Finding.new(lineno, line, match, ignored) end end end end