Sha256: 1db45bd0f927ecdcca1cc2a0402bfcff47e04b1f83b895f1c66df4c25f710509
Contents?: true
Size: 624 Bytes
Versions: 10
Compression:
Stored size: 624 Bytes
Contents
# frozen_string_literal: true module RailsBestPractices class CLI # Run analyze with ruby code # @param [Array] argv command argments # @return [Boolean] return true, if there is no violation. # @example # RailsBestPractices::CLI.run(['-d', '-o', 'path/to/file']) def self.run(argv) options = OptionParser.parse!(argv) if !argv.empty? && !File.exist?(argv.first) raise Errno::ENOENT, "#{argv.first} doesn't exist" end analyzer = Analyzer.new(argv.first, options) analyzer.analyze analyzer.output analyzer.runner.errors.empty? end end end
Version data entries
10 entries across 10 versions & 1 rubygems