lib/rubocop/cop/base.rb in rubocop-1.63.4 vs lib/rubocop/cop/base.rb in rubocop-1.64.1

- old
+ new

@@ -58,16 +58,19 @@ # @api public def self.autocorrect_incompatible_with [] end - # Cops (other than builtin) are encouraged to implement this + # Returns an url to view this cops documentation online. + # Requires 'DocumentationBaseURL' to be set for your department. + # Will follow the convention of RuboCops own documentation structure, + # overwrite this method to accommodate your custom layout. # @return [String, nil] # # @api public - def self.documentation_url - Documentation.url_for(self) if builtin? + def self.documentation_url(config = nil) + Documentation.url_for(self, config) end def self.inherited(subclass) super subclass.instance_variable_set(:@gem_requirements, gem_requirements.dup) @@ -395,19 +398,9 @@ ensure reset_investigation end ### Actually private methods - - # rubocop:disable Layout/ClassStructure - def self.builtin? - return false unless (m = instance_methods(false).first) # any custom method will do - - path, _line = instance_method(m).source_location - path.start_with?(__dir__) - end - private_class_method :builtin? - # rubocop:enable Layout/ClassStructure def reset_investigation @currently_disabled_lines = @current_offenses = @processed_source = @current_corrector = nil end