lib/rubocop/cop/base.rb in rubocop-0.88.0 vs lib/rubocop/cop/base.rb in rubocop-0.89.0
- old
+ new
@@ -135,10 +135,11 @@
def external_dependency_checksum
nil
end
def self.inherited(subclass)
+ super
Registry.global.enlist(subclass)
end
# Call for abstract Cop classes
def self.exclude_from_registry
@@ -187,11 +188,10 @@
### Configuration Helpers
def cop_config
# Use department configuration as basis, but let individual cop
# configuration override.
- @cop_config ||= @config.for_cop(self.class.department.to_s)
- .merge(@config.for_cop(self))
+ @cop_config ||= @config.for_badge(self.class.badge)
end
def config_to_allow_offenses
Formatter::DisabledConfigFormatter
.config_to_allow_offenses[cop_name] ||= {}