rdoc icon indicating copy to clipboard operation
rdoc copied to clipboard

Questions about file selection

Open BurdetteLamar opened this issue 1 year ago • 2 comments

I'm looking at file selection for the rdoc command.

I see in the code that certain files and directories are excluded by default:

  • Each file whose name ends with ~, .orig, .rej, .bak, .gemspec.
  • Each file or directory whose name begins with ..
  • Each directory named test or spec.

When I run rdoc (no arguments or options) in ruby/rdoc/, certain other files (and possibly directories) are excluded:

  • console in bin/.
  • rdoc and ri in exe/.
  • ri.1 in man/.
  • epock.rake in rakelib/.

Questions:

  • Where is the code that controls these?
  • Are there other exclusions that I'm not (yet) seeing?

BurdetteLamar avatar Aug 25 '24 14:08 BurdetteLamar

I don't know the rules off the top of my head, but you can find code around what's removed and included at:

RDoc#normalized_file_list

https://github.com/ruby/rdoc/blob/95cc15b99e44b1a22ebbf0d9dcad432e4a690b3f/lib/rdoc/rdoc.rb#L275-L315

RDoc#remove_unparseable

https://github.com/ruby/rdoc/blob/95cc15b99e44b1a22ebbf0d9dcad432e4a690b3f/lib/rdoc/rdoc.rb#L428-L434

colby-swandale avatar Aug 26 '24 00:08 colby-swandale

Thanks, @colby-swandale; will look into this.

BurdetteLamar avatar Aug 26 '24 01:08 BurdetteLamar