question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add suppress warning type for any `'myst' reference target not found`

See original GitHub issue

The following warning:

../../CONTRIBUTING.md:4: WARNING: 'myst' reference target not found: README.md

doesn’t seem to be raised in the same was as other myst warnings, eg doesn’t have [myst.header] at the end of the warning.

To Reproduce

Steps to reproduce the behavior:

  1. Create markdown document with a reference to root level readme eg [README](README.md)
  2. Add suppress_warnings = ['myst.reference'] to sphinx conf.py
  3. Build docs with sphinx

Expected behavior

Would be nice to suppress any warning by any arbitrary text.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:3
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
ravindk89commented, Sep 1, 2022

@mara004 what worked for me is:

suppress_warnings = [ 'ref.myst']
2reactions
arweduscommented, Sep 8, 2021

I guess that the need of the original author is to suppress these warnings, not to fix the issue itself. I have the same request.

I include some files in the Sphinx documentation which are targeted at people who navigate the source code in an IDE or in a github or Bitbucket GUI. I include links to certain files which should not be copied to the documentation output, e.g. a header file or source file, to support easy navigation in the code.

The warnings we get are along the lines of:

/home/user/workspace/package/README.md:13: WARNING: 'myst' reference target not found: ./CMakeLists.txt
/home/user/workspace/package/README.md:13: WARNING: 'myst' reference target not found: ./src/main.cpp
/home/user/workspace/package/README.md:13: WARNING: 'myst' reference target not found: ./test/excluded-document.md

Wanted behavior: Just remove the link and output the text (if available) or the link.

ideally, all files which are excluded or have different file extension (e.g. *.txt, *.cpp, *.h, *.xml) do not raise a warning, while others do.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Changelog - MyST-Parser - Read the Docs
✨ NEW: Add warning types myst.subtype : All parsing warnings are assigned a type/subtype, and also the messages are appended with them. These...
Read more >
Sphinx autodoc gives WARNING: py:class reference target ...
This is simply a bug in the Python docs themselves--references to some of the Python built-ins (including type ) do no resolve correctly...
Read more >
Changelog
#9917: C and C++, parse fundamental types no matter the order of simple type specifiers. ... #9479: autodoc: Emit a warning if target...
Read more >
myst-parser Changelog
... see errors like `WARNING reference target not found`. Markdown links are of the format `[text](link)`. MyST-Parser looks to smartly resolve such links, ......
Read more >
sphinx.pdf
Any cross-reference that has no matching target ... A list of warning types to suppress arbitrary warning messages.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found