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
I'm trying to make an automated modification to some code comments in a large repo. Specifically, I need to capture some multi-line comments (which are already being parsed with yard) and replace them with something else.
Is there a way for yard to tell me which commented line numbers a tag spans across? For example, if I have a YARD::Tags::Tag object, #<YARD::Tags::Tag @tag_name="API", @text="JWTs", @name=nil, @types=nil, @object=#<yardoc class JwtsController>>, can I get the line where the @text "JWTs" is?
On a related note, the parser gem does not seem to parse comments. Is there a different tool for parsing @tags in ruby comments?
Thanks!
*edit: Turns out that the parser gem can parse comments, but treats them all as single lines of plain strings. It's not aware of @tags.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to make an automated modification to some code comments in a large repo. Specifically, I need to capture some multi-line comments (which are already being parsed with yard) and replace them with something else.
Is there a way for yard to tell me which commented line numbers a tag spans across? For example, if I have a YARD::Tags::Tag object,
#<YARD::Tags::Tag @tag_name="API", @text="JWTs", @name=nil, @types=nil, @object=#<yardoc class JwtsController>>
, can I get the line where the@text
"JWTs" is?On a related note, the parser gem does not seem to parse comments. Is there a different tool for parsing
@tags
in ruby comments?Thanks!
*edit: Turns out that the parser gem can parse comments, but treats them all as single lines of plain strings. It's not aware of
@tags
.Beta Was this translation helpful? Give feedback.
All reactions