FIXME
# File lib/rubocop/cop/team.rb, line 17 def autocorrect? @options[:auto_correct] end
# File lib/rubocop/cop/team.rb, line 42 def cops @cops ||= begin @cop_classes.each_with_object([]) do |cop_class, instances| next unless cop_enabled?(cop_class) instances << cop_class.new(@config, @options) end end end
# File lib/rubocop/cop/team.rb, line 21 def debug? @options[:debug] end
# File lib/rubocop/cop/team.rb, line 51 def forces @forces ||= Force.all.each_with_object([]) do |force_class, forces| joining_cops = cops.select { |cop| cop.join_force?(force_class) } next if joining_cops.empty? forces << force_class.new(joining_cops) end end
# File lib/rubocop/cop/team.rb, line 25 def inspect_file(processed_source) # If we got any syntax errors, return only the syntax offenses. # Parser may return nil for AST even though there are no syntax errors. # e.g. sources which contain only comments unless processed_source.valid_syntax? diagnostics = processed_source.diagnostics return Lint::Syntax.offenses_from_diagnostics(diagnostics) end commissioner = Commissioner.new(cops, forces) offenses = commissioner.investigate(processed_source) process_commissioner_errors( processed_source.file_path, commissioner.errors) autocorrect(processed_source.buffer, cops) offenses end
Generated with the Darkfish Rdoc Generator 2.