Sha256: 0b0d06a38136211792e28c3800f63946d0f29a8331ac1d3d8cb46b189f3044c5

Contents?: true

Size: 624 Bytes

Versions: 1

Compression:

Stored size: 624 Bytes

Contents

require 'pluginscan/file_finder'
require 'pluginscan/reports/issues_report/issues_scanner'
require 'pluginscan/reports/issues_report/issue_checks'

module Pluginscan
  module Reports
    class IssuesReport
      def initialize(plugin_directory, printer = IssuesPrinter.new)
        found_files = FileFinder.new(plugin_directory)
        issues = IssuesScanner.new(THE_CHECKS).scan(found_files.php_files)
        @data = {
          issues: issues,
          file_count: found_files.count,
        }
        @printer = printer
      end

      def print
        @printer.print(@data)
        true
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pluginscan-0.9.0 lib/pluginscan/reports/issues_report.rb