docs: configure rstfmt
for formatting docs files [DET-3784]
#1024
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
We lacked a tool for formatting our reStructuredText files the way we
have for Python and Go; this adds configuration and Makefile targets for
using such a tool that I developed.
Test Plan
make -C docs fmt
, skim the changes, check that Sphinx still builds everythingCommentary
Several people recently expressed an interest in adding this sort of thing, so I finally got around to making this PR after having the pieces sitting around for a while.
Because of the rather experimental status of
rstfmt
, I'm not yet adding a correspondingcheck
target; that way, we don't get blocked if something goes wrong with it. If it looks good for a while, I'll add that later.(That also means I can leave the actual formatting changes out of this PR so that we can keep them separate from the config changes and not have to squash them together.)