Skip to content

Main module detection #1336

Description

@zverok

I just recently noticed that for, say, Nokogiri gem, main module's docs are saying just

– DO NOT MODIFY!!!! This file is automatically generated by rex 1.0.7 from lexical definition file “lib/nokogiri/css/tokenizer.rex”. ++

That's contents of lib/nokogiri/tokenizer.rb, while lib/nokogiri.rb has proper module docs. (To add insult to injury, -- and ++ in tokenizer.rb is RDoc's agreement to "ignore those comments as docs", which YARD in RDoc-compatibility mode should probably respect).

The same I noticed about my own gem Inforboxer, it is not a content of the lib/infoboxer.rb. The gem is currently in "feature-complete, just maintenance" state, I haven't seriously touched it for quite some time, but when it was developed I had a great attention to docs, and checked "how it rendered" many times, and it was OK. I am not sure whether it is something that I changed in some recent bugfix release caused the docs problem, or some new YARD version, but definitely looks like a bug to me.

Couple more examples:

  • Faraday: rdoc.info vs main file
  • Sequel: rdoc.info, main file (this one more tricky, as sequel's main file is seque/core, but YARD correctly list it first in the list of "where this module defined"...)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions