Skip to content

gdgenerate: Include context in link parsing error messages

Philip Withnall requested to merge pwithnall/gi-docgen:link-error-context into main

Otherwise it’s quite hard to find which link you’ve typed as iface@ when actually it’s class@ and you’ve bulk-edited multiple files’ worth of doc comments.

This changes the link parsing error messages from:

WARNING: Invalid fragment for 'GIRepository.ConstantInfo': it should be class
[alias@GIRepository.ConstantInfo]) or for a union discriminator (see
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

to:

WARNING: In documentation for GIRepository.TypeInfo:
Invalid fragment for 'GIRepository.ConstantInfo': it should be class
[alias@GIRepository.ConstantInfo]) or for a union discriminator (see
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Philip Withnall pwithnall@gnome.org

Merge request reports