bevy icon indicating copy to clipboard operation
bevy copied to clipboard

Expanding guidelines for docs

Open EmiOnGit opened this issue 2 years ago • 7 comments

How can Bevy's documentation be improved?

I've been looking over the documentation a couple of times, thinking that a specific part is inconsistently or at least unusually written.

However, often times the content is still right and I'm not sure if this should or shouldn't be corrected. I'm fully aware that to many rules would only scare people away therefore I suggest to only recommend them instead of strictly enforcing them.

Some example points out of my head:

Also a weird thing that I noticed, is that the winit links here aren't working in the docs but do work in my editor

EmiOnGit avatar Aug 30 '23 20:08 EmiOnGit

Should a link always point to the doc? Most links are pointed to the source code here

This seems like a bug / collision in the Transform docs. Only the entry under the "examples" heading should be linking off to source code.

rparrett avatar Aug 30 '23 21:08 rparrett

This seems like a bug / collision in the Transform docs

good to know. I'll open a pr later

EmiOnGit avatar Aug 30 '23 21:08 EmiOnGit

I'm happy to extend the guidance, but things that can't be enforced automatically shouldn't be turned into rules unless they're extremely intuitive :)

alice-i-cecile avatar Aug 30 '23 21:08 alice-i-cecile

Should doc comments always end with a dot(.)?

For this one, I think it should be enforced in review for sentences to always end with a dot: it's straightforward to do so, and it follow the style of the doc comments in the Rust std. Currently both styles are used in the Bevy doc.

Kanabenki avatar Jan 26 '24 13:01 Kanabenki

Ideally we could lint for that rather than dealing with it in review.

alice-i-cecile avatar Jan 26 '24 14:01 alice-i-cecile

Would some kind of simple regex-based check in CI do the trick? I don't think this would necessarily fit as a clippy lint, and I checked some code spelling tools but they don't seem to handle that.

Kanabenki avatar Jan 26 '24 14:01 Kanabenki

Yeah, something along those lines would work fine. Obviously you'd want to have a check for "any punctuation". Ideally the CI check only runs on modified files (and we do a full pass to fix up everything in one big but trivial PR at the start). I do meaningfully prefer this style, but enforcing it in reviews is tedious for both reviewers and authors.

alice-i-cecile avatar Jan 26 '24 15:01 alice-i-cecile