You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.defrename(name)
...
end
Describe 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
The text was updated successfully, but these errors were encountered:
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 benil
. 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:
Describe 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 withsord
.Additional context
N/A
The text was updated successfully, but these errors were encountered: