Skip to content

Commit dd1de34

Browse files
committed
Do not allow intersphinx mappings unless :external: role is used - add this role to rstcheck linting
1 parent 5d5bdcc commit dd1de34

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

docs/.rstcheck.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[rstcheck]
22
ignore_directives=automodule,http:get,tabs,tab,prompt,http:patch,http:post,http:put,http:delete
3-
ignore_roles=djangosetting,setting,featureflags,buildpyversions
3+
ignore_roles=djangosetting,setting,featureflags,buildpyversions,external+rtd:doc,external,external+rtd
44
ignore_substitutions=org_brand,com_brand,:smile:,:arrows_counterclockwise:,:heavy_plus_sign:,:tada:,:heart:,:pencil2:
55
# This error needs to be ignored for now
66
# See: https://github.com/myint/rstcheck/issues/19

docs/conf.py

+3
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@
9494
"rtd": ("https://docs.readthedocs.io/en/stable/", None),
9595
"rtd-dev": ("https://dev.readthedocs.io/en/latest/", None),
9696
}
97+
# Redundant in Sphinx 5.0
98+
# https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#confval-intersphinx_disabled_reftypes
99+
intersphinx_disabled_reftypes = ["std:doc"]
97100
myst_enable_extensions = [
98101
"deflist",
99102
]

docs/dev/contribute.rst

+2
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ projects, feel free to suggest the language on Transifex to start the process.
9090
Triaging issues
9191
---------------
9292

93+
.. rstcheck: ignore-roles="external+rtd:doc"
94+
9395
Everyone is encouraged to help improving, refining, verifying and prioritizing
9496
issues on Github. The Read the Docs core :external+rtd:doc:`team` uses the following
9597
guidelines for issue triage on all of our projects. These guidelines describe

0 commit comments

Comments
 (0)