Skip to content

Hide generated items in documentation#309

Merged
la10736 merged 2 commits intola10736:masterfrom
wiktor-k:wiktor-k/hide-generated-items
May 8, 2025
Merged

Hide generated items in documentation#309
la10736 merged 2 commits intola10736:masterfrom
wiktor-k:wiktor-k/hide-generated-items

Conversation

@wiktor-k
Copy link
Copy Markdown
Contributor

@wiktor-k wiktor-k commented May 7, 2025

When the missing_docs lint is enabled in a crate that uses rstest then any public #[fixture]s generate lint errors ("missing documentation for a struct" and "missing documentation for an associated function").

Use #[doc(hidden)] to hide these autogenerated items in documentation.

Just in case anyone has a better idea I'm all ears (e.g. adding some documentation to these items, or allowing missing_docs lint).

(For context, here is the original issue that sparked this PR: https://gitlab.archlinux.org/archlinux/signstar/-/merge_requests/230/diffs#note_268412)

Thanks and have a nice day! 👋

When the `missing_docs` lint is enabled in a crate that uses `rstest` then
any public `#[fixture]`s generate lint errors ("missing documentation for a struct"
and "missing documentation for an associated function").

Use `#[doc(hidden)]` to hide these autogenerated items in documentation.

Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>
@la10736
Copy link
Copy Markdown
Owner

la10736 commented May 7, 2025

Thanks, for your contribution. I'll take a look ASAP... But my ASAP could not be so AS SOON 😢

@la10736
Copy link
Copy Markdown
Owner

la10736 commented May 7, 2025

Thanks, for your contribution. I'll take a look ASAP... But my ASAP could not be so AS SOON 😢

Ok, it's quite simple. I can do it.

Copy link
Copy Markdown
Owner

@la10736 la10736 left a comment

Choose a reason for hiding this comment

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

It's ok for me, but can you add a E2E test to check it?

@wiktor-k
Copy link
Copy Markdown
Contributor Author

wiktor-k commented May 8, 2025

It's ok for me, but can you add a E2E test to check it?

Great, thanks! Please check if the tests are in correct place. I've tested the tests by removing the lints and the fixes to the fixture macros and I think it should be fine... phew 😅

Copy link
Copy Markdown
Owner

@la10736 la10736 left a comment

Choose a reason for hiding this comment

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

LGTM, Thanks again. I'll just wait the CI before merge it

Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>
@wiktor-k wiktor-k force-pushed the wiktor-k/hide-generated-items branch from 4ca8eeb to 66038f6 Compare May 8, 2025 10:07
@la10736 la10736 merged commit 7378592 into la10736:master May 8, 2025
2 checks passed
@la10736
Copy link
Copy Markdown
Owner

la10736 commented May 8, 2025

Thanks again

@wiktor-k wiktor-k deleted the wiktor-k/hide-generated-items branch May 8, 2025 17:37
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