GaloisInc / cryptol

Cryptol: The Language of Cryptography
https://galoisinc.github.io/cryptol/master/RefMan.html
BSD 3-Clause "New" or "Revised" License
1.14k stars 126 forks source link

:check-doc location information for errors #1710

Open weaversa opened 3 months ago

weaversa commented 3 months ago

Notice the missing space:

/**
 * ```
 * :check True
 *```
 */

And when running :check-doc I got:

MyModule> :check-doc

Unclosed code block
Successes: 0, Failures: 1

This missing space was buried in a larger file and it took some time to figure out where to look. Would it be possible to provide location information for errors?

glguy commented 2 months ago

I'd eventually like to thread filename:line information into docstrings but currently the situation has improved in two ways:

  1. The markdown parser considers this example a valid code fence (because GitHub markdown considers is valid)
  2. When errors are encountered the output reports the name of the definition being checked and the line of text that was invalid