Open BurdetteLamar opened 6 years ago
My guess is YARD is picking up readme
as the first README*
file in your directory. You can work around this by telling YARD where your readme is with
yard --readme README.md
Or by placing --readme README.md
in your .yardopts
file.
Or, as in my case, renaming to readme_files.
if the readme dictory is other's gem, we can't modify it.
a simple patch
readme = Dir.glob('README{,*[^~]}').
select { |fn| File.file? fn }. # this line
sort_by {|r| [r.count('.'), r.index('.'), r] }.first
fix the problem
When I have a directory named readme in my main project directory, yardoc fails.
Steps to reproduce
Here are my files/dirs in the project (top level):
$ ls -1 bin/ CODE_OF_CONDUCT.md Gemfile Gemfile.lock images/ lib/ LICENSE LICENSE.txt markdown_helper.gemspec MarkdownHelper/ pkg/ Rakefile readme/ README.md test/
Actual Output
Expected Output
No errors
Environment details:
ruby -v
): ruby 2.2.6p396 (2016-11-15 revision 56800) [i386-mingw32]yard -v
): yard 0.9.12Fwiw
Why, you may ask, would I have a directory named readme? Because my README.md file is built from a number of source files, most of which live in that directory. If interested, see gem markdown_helper.