Skip to content

Lint doc syntax

Context

Check that the doc format syntax is correct. The CI will fail otherwise.

The test only checks src/proto_alpha/lib_protocol/. This is intentional. The rationale behind this choice is as follows:

  • The protocol files of the alpha protocol eventually become frozen. When they do, any errors, even errors in the docstrings of mli files, are impossible to change. (We could make patches which are applied only when generating the doc but not when compiling the source, but that's out of scope and also quite a lot of complications.)

  • When generating doc, odoc generates the doc for the dependencies too (to have something to link refs towards?) which means that testing the syntax is valid for, say, bin_node will trigger all the doc errors of the frozen protocols which we cannot fix. The proper way to deal with this is too complicated and so we simply don't test the other libraries. (FWIW the proper way is to (a) ODOC_WARN_ERROR=true dune build <tagerts-below-the-frozen-protocols>, (b) ODOC_WARN_ERROR=false dune build <the-frozen-protocols>, followed by (c) ODOC_WARN_ERROR=true dune build <tagerts-above-the-frozen-protocols>. But there is no easy way to determine what's below/above.)

  • It's faster and this is just intended as a quick-check of linting.

Manually testing the MR

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 Raphaël Proust

Merge request reports