lib/reek/smells/smell_detector.rb in reek-4.0.2 vs lib/reek/smells/smell_detector.rb in reek-4.0.3
- old
+ new
@@ -53,9 +53,15 @@
def exception?(context)
context.matches?(value(EXCLUDE_KEY, context, DEFAULT_EXCLUDE_SET))
end
+ def self.todo_configuration_for(smells)
+ default_exclusions = default_config.fetch 'exclude'
+ exclusions = default_exclusions + smells.map(&:context)
+ { smell_type => { 'exclude' => exclusions.uniq } }
+ end
+
private
attr_accessor :smells_found
def enabled_for?(context)