Closed sam-carlberg closed 2 years ago
This is expected behavior. In order to avoid making any dangerous unrecoverable mistakes with your filesystem, YARD will never remove files in the output directory.
If you're rerunning YARD generation, it's up to you to clear the directory beforehand if that is required.
Thanks for the clarification @lsegal
Steps to reproduce
Tested and reproduced in both a large legacy project and in a small proof-of-concept project
This is the minimal reproduction for the issue. I've done my best to remove all extraneous code and unique environment state on my machine before providing these steps:
echo "class Foo; end" > lib/foo.rb
)yardoc
to generate documentation for the new classdoc/Foo.html
was createdrm lib/foo.rb
)yardoc
againdoc/Foo.html
still existsActual Output
doc/Foo.html
still persistslib/foo.rb
is removed from.yardoc/checksums
Foo
is removed from the class list on the index pageExpected Output
doc/Foo.html
should be deletedlib/foo.rb
is removed from.yardoc/checksums
Foo
is removed from the class list on the index pageEnvironment details:
ruby -v
): ruby 2.6.6p146yard -v
): yard 0.9.27I have read the Contributing Guide.