-
I'd like to use It looks like the basic components of this already exist: I can run
I can parse this output for the entity names, then cross-check them with the output
But this seems clumsy, not to mention it would be brittle -- sensitive to any changes in the output formats of either command. What I'd like is an option to produce (directly) a machine-parseable report that includes the fields |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
YARD typically doesn't have porcelain style output because if you need specific structure to be parsed by "machine", it's easy enough to use its programmatic API to access via standard irb / Ruby scripting directly: require 'yard'
YARD::CLI::Yardoc.run('-n', '-q')
undoc = YARD::Registry.all.select {|o| o.docstring.blank? }
undoc.each do |obj|
puts "#{obj.file}:#{obj.line}: #{obj.type} #{obj.path}"
# but really your tool can just use obj right here.
end CodeObjects are documented via https://rubydoc.info/gems/yard/YARD/CodeObjects/Base |
Beta Was this translation helpful? Give feedback.
YARD typically doesn't have porcelain style output because if you need specific structure to be parsed by "machine", it's easy enough to use its programmatic API to access via standard irb / Ruby scripting directly:
CodeObjects are documented via https://rubydoc.info/gems/yard/YARD/CodeObjects/Base