-
Notifications
You must be signed in to change notification settings - Fork 120
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
dartdoc should allow file-level attributes #2266
Comments
Hi @timsneath thanks for the report. Is the goal to reduce the number of undocumented elements, or to not expose any elements in a file in Dartdoc? If you don't want them exposed in dartdoc, then removing the export should do the trick. |
According to this doc it looks like you can mark the |
The latter: since otherwise the thousands of constants otherwise pollute the documentation and slow it down hugely. For example, compare the page and sidebar of: Unfortunately, these options don't work, as far as I can tell:
The constants themselves are essentially self-documenting in the code, and they would be even more self-documenting if I could group them without every other line being a |
Ah I see. You want to mark most of a file as For now, the constants which shouldn't be seen in documentation could be moved to a separate file, |
Not quite: I want the whole
I tried to do this -- but I may have misunderstood your instructions. I created a separate You can see the results in this branch, in which I've also added the |
At first glance this sounds like something that should go in dartdoc_options.yaml; tag the file, and have dartdoc pretend any item in the file has a |
Hey Janice! Thank you -- yes, that would work well for me. In my scenario, I have about 3000 constants (and growing) that really don't need documentation (the name is self-documenting), and having to prefix each of them with @Nodoc bloats the file unnecessarily. |
This file provides Dart constants that map onto Win32 constants. There are thousands of these, and there's no reason for me to document them. So I want to
/// @nodoc
them.The only way to do that is on a constant-by-constant basis, for example:
https://github.com/timsneath/win32/blob/3e568f0e4fe2deaba3b92c2cdc0d2bb04b739f0b/lib/src/constants.dart#L1715-L1725
Aside from the redundancy and extra work, this ruins the flow of the file and makes it hard to see which constants are grouped together. I'd love a way to annotate this as a file-level
nodoc
so I could put all these together.The text was updated successfully, but these errors were encountered: