Conversation
…ed params; does warn on duplicate unknown params
e2bf8e5 to
8ae1ea7
Compare
|
This is incomplete, it should handle argument forwarding with |
Skipants
left a comment
There was a problem hiding this comment.
I hope you don't mind some random reviewing your PR. I'm using Yard a lot lately and am invested in helping out.
| else | ||
| param_tags << tag | ||
| end | ||
| end |
There was a problem hiding this comment.
You can flatten down this if and improve readability IMO by using .filter_map to iterate here. Consider:
param_tags = parser.tags.filter_map do |tag|
next unless tag.tag_name == "param"
next tag if !tag.is_a?(Tags::RefTagList) || tag.name
tag.tags unless CodeObjects::Proxy === tag.owner
endfilter_map is Ruby 2.7+ and I'm not sure about Yard's current minimum Ruby version, so if it's lower you can use map{ ... }.compact instead.
Several improvements:
The first one was what motivated this work, I wanted to get rid of warnings about delegated params. The rest were changes I made along the way.
Completed Tasks
bundle exec rakelocally (if code is attached to PR).