lib/reek/source/source_locator.rb in reek-4.8.2 vs lib/reek/source/source_locator.rb in reek-5.0.0

- old
+ new

@@ -22,21 +22,21 @@ end # Traverses all paths we initialized the SourceLocator with, finds # all relevant Ruby files and returns them as a list. # - # @return [Array<Pathname>] - Ruby paths found + # @return [Array<Pathname>] Ruby paths found def sources source_paths end private attr_reader :configuration, :paths, :options - # :reek:TooManyStatements: { max_statements: 7 } - # :reek:NestedIterators: { max_allowed_nesting: 2 } + # @quality :reek:TooManyStatements { max_statements: 7 } + # @quality :reek:NestedIterators { max_allowed_nesting: 2 } def source_paths paths.each_with_object([]) do |given_path, relevant_paths| unless given_path.exist? print_no_such_file_error(given_path) next @@ -65,29 +65,29 @@ def path_excluded?(path) configuration.path_excluded?(path) end - # :reek:UtilityFunction + # @quality :reek:UtilityFunction def print_no_such_file_error(path) warn "Error: No such file - #{path}" end - # :reek:UtilityFunction + # @quality :reek:UtilityFunction def hidden_directory?(path) path.basename.to_s.start_with? '.' end def ignore_path?(path) path_excluded?(path) || hidden_directory?(path) end - # :reek:UtilityFunction + # @quality :reek:UtilityFunction def ruby_file?(path) path.extname == '.rb' end - # :reek:UtilityFunction + # @quality :reek:UtilityFunction def current_directory?(path) [Pathname.new('.'), Pathname.new('./')].include?(path) end end end