Closed krystof-k closed 2 months ago
You should be seeing the following, since yard server
does not support --query
:
[warn]: Unrecognized/invalid option: --query
This is intended behavior since yard server does not directly run yard doc
. In order to filter, you would need --query
in the specific project's .yardopts
file. In the case of serving a single directory, "specific project" means your current project.
Closing this since it works as intended, you should specify arguments to yard doc
in your .yardopts
, and yard server
is not meant to be a superset of yard doc
.
Thanks @lsegal, you're right, I see, I just didn't look, sorry about that:
[warn]: Unrecognized/invalid option: --query
[warn]: Unrecognized/invalid option: --hide-tag
Anyway I find it a little confusing, I'd expect all the options of yard doc
to work as well, it would be nice to add support for it.
.yardopts
doesn't quite work, because I want to run two servers, one with everything and one with just a specific tag, maybe it is somehow possible to use different files for each server, I'll try to look that up.
yard server
ignores--query
parameter and renders everything.Steps to reproduce
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:
yard server --reload --query 'has_tag?(:todo)'
yard doc --query 'has_tag?(:todo)'
doc/index.html
@todo
Actual Output
yard server
ignores the query,yard doc
respects it.Expected Output
Both
yard server
andyard doc
behave the same and respects the query.Environment details:
ruby -v
): ruby 3.1.4p223yard -v
): yard 0.9.34I have read the Contributing Guide.