The CLI is a class responsible of handling all the command line interface logic.
Entry point for the application logic. Here we do the command line arguments processing and inspect the target files @return [Fixnum] UNIX exit code
# File lib/rubocop/cli.rb, line 22 def run(args = ARGV) trap_interrupt @options, remaining_args = Options.new.parse(args) act_on_options target_files = target_finder.find(remaining_args) inspector = FileInspector.new(@options) any_failed = inspector.process_files(target_files, @config_store) do wants_to_quit? end inspector.display_error_summary !any_failed && !wants_to_quit ? 0 : 1 rescue Cop::AmbiguousCopName => e $stderr.puts "Ambiguous cop name #{e.message} needs namespace " 'qualifier.' return 1 rescue => e $stderr.puts e.message $stderr.puts e.backtrace return 1 end
Generated with the Darkfish Rdoc Generator 2.