-
Notifications
You must be signed in to change notification settings - Fork 401
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 references to RFCs defining good documentation practices #25
Conversation
In these RFCs, great details and example are given about the right way to do documentation. I’m not sure if this is worth being detailed on cheats.rs, but a link is a way as good as another to find these documents. In particular, these RFC are way more detailed than the Reference book. See https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#writing-documentation for a proof that RFC1574 is used for std.
I'm torn on this one. I think the essence of "how to write docs" should be part of the API guidelines, and that one should be / is linked. However, right now the API Guidelines / Section 4 link to a mildly confusing RFC1687 thread, that backlinks to RFC 1574, from all of which you have to piece together that information yourself. Until the API guidelines are fixed it might make sense to link the RFCs directly. I wouldn't link RFC0505 though, but just Appendix A of RFC1574 as you did, which already contains the full version. Also, as the RFC is somewhat opinionated and std-specific, I'd place that link in a "Idiomatic Rust / Documentation" (or maybe "More Cheats") section. Any thoughts? |
I forgot the API Gudelines / Section 4. But after going back to this, I agree, it is less useful than RFC1574. It could make sense to list some of the common headings:
I would definitely like to have such a list in a cheat sheet. When coding, it allows to make sure you didn’t forget to document anything important. I could do a separate PR for this, if you wish. |
Two thoughts:
My concern boils down to: aren't documentation guidelines an "API design" concern? I totally agree |
Quick FYI, I changed "Idiomatic Rust" to now include "API Design", and also filed an issue about C-CRATE-DOC (rust-lang/api-guidelines#188). |
We create a section about doc comments and API, it’s not just tooling.
I have just added a commit to show what I would like to see on cheats.rs about headings in doc comments. About your thoughts:
|
About the merge conflict, I could do another PR with changes of 6e23df2 |
I like the new version much more where it's listed as part of the Idiomatic Rust table, thanks! I'll merge and make some fine adjustments to see how it looks. Once the API Guidelines change I might rework this a bit more, but I'll try to keep the spirit of this PR alive. If you feel things regress over time, feel free to open an Issue / PR. |
Awesome! |
In these RFCs, great details and example are given about the right way to do
documentation. I’m not sure if this is worth being detailed on
cheats.rs, but a link is a way as good as another to find these
documents.
In particular, these RFC are way more detailed than the Reference book.
See Rust-lang Contributing.md for a proof that RFC1574 is used for std.