Skip to content
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 lint enum_tuple_variant_field_now_doc_hidden #685

Merged
merged 4 commits into from
Mar 8, 2024

Conversation

arpity22
Copy link
Contributor

@arpity22 arpity22 commented Mar 8, 2024

Lint for when a field in tuple variant in public enum is now marked as #[doc(hidden)]

Issue mentioned in #578

Copy link
Owner

@obi1kenobi obi1kenobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lint looks good, thanks! Just a couple of formatting nitpicks, and this is ready to merge 🚀

#[doc(hidden)]
pub enum PulicEnumC{
TupleVariantWithPublicField(#[doc(hidden)] u8,i64),
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please use rustfmt on all Rust files and ensure they end with a trailing newline?

You should be able to configure your editor to do this automatically on save.

field {
field_name: name @output @tag
public_api_eligible @filter(op: "=", value: ["$true"])

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Copy link
Owner

@obi1kenobi obi1kenobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done!

@obi1kenobi obi1kenobi enabled auto-merge (squash) March 8, 2024 15:51
@obi1kenobi obi1kenobi merged commit 641edee into obi1kenobi:main Mar 8, 2024
35 checks passed
@obi1kenobi
Copy link
Owner

I'm planning to make a new release this weekend, so this lint will be part of it and you'll get a shout-out in the release notes 🚀

Might you be interested in writing the lint for enum struct variants' fields as well? It's very, very similar to this one, and it would be great to ship them both together in the same release.

@arpity22
Copy link
Contributor Author

arpity22 commented Mar 8, 2024

Sure, I will start working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants