-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a skip_jsdoc attribute. #3338
Conversation
I'm not sure I did the schema-bumping correctly, but I tried to do what's in line with past practice: I bumped the schema version but not the crate versions, which seems to usually happen right when releasing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this! The code looks good, but could you add a page about this to the guide?
The source Markdown is at guide/src
, and this should specifically go in guide/src/reference/attributes/on-rust-exports
.
You also have to add an entry to guide/src/SUMMARY.md
, otherwise the page won't show up in the table of contents.
Also, yes, you bumped the schema version properly.
Thanks for the pointers! I've added a guide entry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Looks like it's not working on the latest version 0.2.84
|
Yes: 0.2.84 was release in February and this was only merged in March. |
Hmm, so it shouldn't be in the official documentation. Hopefully, a new version will be released soon, it's already April. |
This adds a
skip_jsdoc
attribute to suppress the generation of jsdoc@param
and@returns
comments.This was motivated by #1847, but I ended up going a different route because I found it awkward to put long descriptions in attributes. The idea is that if you can skip the auto-generated jsdoc, you can comment the parameters and return values yourself:
It's a little sad that this approach doesn't keep the type information in sync, but I still think it's nicer than an alternative like
(especially if the description is longer)