lsegal / yard

YARD is a Ruby Documentation tool. The Y stands for "Yay!"
http://yardoc.org
MIT License
1.94k stars 397 forks source link

`--list-undoc` breaks `yard doc` reporting #1393

Open ojab opened 3 years ago

ojab commented 3 years ago

Steps to reproduce

class Xxx
  def x
    puts 'xxx'
  end
end
$ yard doc xxx.rb 
Files:           1
Modules:         0 (    0 undocumented)
Classes:         1 (    1 undocumented)
Constants:       0 (    0 undocumented)
Attributes:      0 (    0 undocumented)
Methods:         1 (    1 undocumented)
 0.00% documented
$ yard doc --list-undoc xxx.rb 
[warn]: Unrecognized/invalid option: --list-undoc
Files:           0
Modules:         0 (    0 undocumented)
Classes:         0 (    0 undocumented)
Constants:       0 (    0 undocumented)
Attributes:      0 (    0 undocumented)
Methods:         0 (    0 undocumented)
 100.00% documented
$ yard doc --list-undoc --db .yardoc/ xxx.rb 
[warn]: Unrecognized/invalid option: --list-undoc
Files:           1
Modules:         0 (    0 undocumented)
Classes:         1 (    1 undocumented)
Constants:       0 (    0 undocumented)
Attributes:      0 (    0 undocumented)
Methods:         1 (    1 undocumented)
 0.00% documented

Undocumented Objects:

(in file: xxx.rb)
Xxx
Xxx#x

I suppose db should be implicitly set and --list-undoc should be added to the list of supported options.

Environment details:

I have read the Contributing Guide.

lsegal commented 3 years ago

--list-undoc is not supported in yard doc. That option is part of yard stats.

The command above worked due to internal behavior, but it is considered undefined behavior to use yard doc --list-undoc