-
-
Notifications
You must be signed in to change notification settings - Fork 534
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
Added support for using sea-orm with #[deny(missing_docs)] #1522
Added support for using sea-orm with #[deny(missing_docs)] #1522
Conversation
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.
Hey @emirror-de, thanks for contributing!! Is this ready? Please click "Ready for review" once it's.
A nitpick: I wonder why there is a space before the documentation? #[doc = " Generated by sea-orm-macros"]
Is there any reason behind it?
Thanks for the review! I added it as draft to have a base for discussion and I was not sure if I missed something.
It is just a matter of style:
The latter has been proposed in the corresponding issue. I personally prefer the first one, but I am happy to align it with the way it fits best for I was also thinking in moving |
Interesting observation. I agree. |
May be we can enable this in one of our tests or examples, so as to prove the point. And we will be able to catch it in our CI moving forward. But not changing it in |
OK, so you suggest adding a project to the examples with:
[dependencies]
sea-orm = { path = "../../", features = ["default"] }
//! Denying missing docs test.
#![deny(missing_docs)] If I understood you correctly? |
Yes. Or we can simply hijack the |
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.
Hey @emirror-de, thanks for the CI update! I find there are more to be done. Adding #![deny(missing_docs)]
alone won't catch it. We need to make the entity module as public in order to properly test it.
I'm going to take on the task :)
* Added support for using sea-orm with #[deny(missing_docs)] (#1522) * feat(macros): Added documentation tags for generated entities * chore: Added deny(missing_docs) attribute to basic example * chore: Fix clippy errors * ci: test missing docs of derive macros generated types * Try missing docs (CI should fail) * Revert "Try missing docs (CI should fail)" This reverts commit 83356bf. --------- Co-authored-by: Lewin Probst, M.Sc <[email protected]>
As discussed in #1472, this PR addresses the issue to allow
#[deny(missing_docs)]
in crates havingsea-orm
as dependency by adding#[doc = " Generated by sea-orm-macros"]
to derived types/variants/fields insea-orm-macros
.PR Info
New Features
sea-orm
to use#[deny(missing_docs)]
.