[go: up one dir, main page]

CI: check rst syntax in [sanity]

What

Adds a job to the sanity stage that checks the syntax of restructure text files (.rst files).

Why

To avoid silly errors like this:

causing merge-train pileups like this: image

How

  1. add a new target make -C docs sphinx-check

It allows to run sphinx (to check syntax) without actually writing any output files (using --builder dummy). However, to run sphinx, we must ensure the generated input files exist (like the manuals of binaries). I took a very manual approach to this, having the target manually create them.

  1. build this target in a new CI job.

Manually testing the MR

Locally

  1. Run make -C docs sphinx-check locally.
  2. Introduce an error in an rst file (check the links above for inspiration)
  3. Try running it again.

In the CI

Check out the job. I ran it once with a phony error:

https://gitlab.com/tezos/tezos/-/jobs/7764802321

and once without phony error:

https://gitlab.com/tezos/tezos/-/jobs/7764865899

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Arvid Jakobsson

Merge request reports

Loading