Method: YARD::CLI::Stats#print_undocumented_objects

Defined in:
lib/yard/cli/stats.rb

Prints list of undocumented objects

Since:

  • 0.6.0

[View source]

69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/yard/cli/stats.rb', line 69

def print_undocumented_objects
  return if !@undoc_list || @undoc_list.empty?
  puts
  puts "Undocumented Objects:"

  objects = @undoc_list.sort_by {|o| o.file }
  max = objects.sort_by {|o| o.path.length }.last.path.length
  if @compact
    objects.each do |object|
      puts("%-#{max}s     (%s)" % [object.path, object.file])
    end
  else
    last_file = nil
    objects.each do |object|
      if object.file != last_file
        puts
        puts "(in file: #{object.file})"
      end
      puts object.path
      last_file = object.file
    end
  end
end