lib/reek/configuration/app_configuration.rb in reek-3.7.0 vs lib/reek/configuration/app_configuration.rb in reek-3.7.1
- old
+ new
@@ -88,13 +88,14 @@
# Returns the directive for a given directory.
#
# @param source_via [String] - the source of the code inspected
#
- # @return [Hash] the directory directive for the source or, if there is
- # none, the default directive
+ # @return [Hash] the directory directive for the source with the default directive
+ # reverse-merged into it.
def directive_for(source_via)
- directory_directives.directive_for(source_via) || default_directive
+ hit = directory_directives.directive_for(source_via)
+ hit ? default_directive.merge(hit) : default_directive
end
def path_excluded?(path)
excluded_paths.include?(path)
end