-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
When documenting with YARD, one can simply add a ? suffix to a type in a @param or @return to indicate that the value may be nil. However, sord generates an error when this syntax is used and does not recognize the type or that it is nilable, but merely results in an error being generated.
For example:
# @param name [String?] The new name, or `nil` to reset the default name.
def rename(name)
...
endDescribe the solution you'd like
That the YARD syntax be permitted and generate correct RBI/RBS.
Describe alternatives you've considered
The use [Type,nil] works well enough and achieves the expected result, though it would be ideal to not have to alter existing YARD documentation and deviate from its conventions in order to make it compliant with sord.
Additional context
N/A
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request