Suppress/Ignore duplicate label warnings while enabling sphinx.ext.autosectionlabel

629 views
Skip to first unread message

Wei Jianwen

unread,
Oct 23, 2020, 3:36:56 AM10/23/20
to sphinx-dev
Hi,

I use Sphnix "-W" option to turn warnings into errors for checking purpose. It works well in most cases by helping fix issues on early stages. But enabling sphinx.ext.autosectionlabel generates quite a number of duplicate labels, say "Reference" for each chapter, which are treated as errors.

Can I keep both "-W" and "sphinx.ext.autosectionlabel" and ignore duplicate label warnings?

Thank you!

Jianwen

Komiya Takeshi

unread,
Oct 25, 2020, 12:03:34 PM10/25/20
to sphin...@googlegroups.com
Hi,

You can use `suppress_warnings` configurations to suppress them.
https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-suppress_warnings

Thanks,
Takeshi KOMIYA

2020年10月23日(金) 16:36 Wei Jianwen <wei.j...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "sphinx-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-dev+...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/sphinx-dev/97220fd0-4e80-4b9a-9938-c24cbc117b6bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages