You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In one of my recent ventures into a Sphinx rabbit dragon hole, I learned about sphinx-lint. sphinx-lint checks for "stylistic and formal issues in .rst and .py files included in the documentation". A key benefit is that it can find reStructuredText errors a lot more quickly than Astropy's Read the Docs build (and consequently partially addresses the issue I brought up in #16161).
It turns out that sphinx-lint has a pre-commit hook which could be added to .pre-commit-config.yaml.
I applied sphinx-lint to PlasmaPy in PlasmaPy/PlasmaPy#2561, and it was able to find a few reStructuredText errors that hadn't previously been caught by sphinx-build. I applied sphinx-lint to Astropy and it found the following ∼50 issues, which would need to be fixed or intentionally ignored if this hook is added. [I'd suggest ignoring the licenses directory in this hook (since for PlasmaPy, it reported text like ``AS IS'' as having a reStructuredText error).]
astropy/extern/README.rst:5: Line ends with dangling hyphen (dangling-hyphen)
docs/convolution/index.rst:266: Line ends with dangling hyphen (dangling-hyphen)
docs/coordinates/index.rst:452: Line ends with dangling hyphen (dangling-hyphen)
docs/development/docguide.rst:66: found an unbalanced inline literal markup. (unbalanced-inline-literals-delimiters)
docs/development/docguide.rst:66: found an unbalanced inline literal markup. (unbalanced-inline-literals-delimiters)
docs/coordinates/representations.rst:693: OMG TABS!!!1 (horizontal-tab)
docs/coordinates/representations.rst:707: OMG TABS!!!1 (horizontal-tab)
docs/coordinates/representations.rst:708: OMG TABS!!!1 (horizontal-tab)
docs/coordinates/representations.rst:709: OMG TABS!!!1 (horizontal-tab)
docs/coordinates/representations.rst:710: OMG TABS!!!1 (horizontal-tab)
docs/coordinates/representations.rst:711: OMG TABS!!!1 (horizontal-tab)
docs/coordinates/representations.rst:712: OMG TABS!!!1 (horizontal-tab)
docs/coordinates/representations.rst:715: OMG TABS!!!1 (horizontal-tab)
docs/coordinates/representations.rst:716: OMG TABS!!!1 (horizontal-tab)
docs/coordinates/representations.rst:717: OMG TABS!!!1 (horizontal-tab)
docs/coordinates/representations.rst:718: OMG TABS!!!1 (horizontal-tab)
docs/development/releasing.rst:501: Line ends with dangling hyphen (dangling-hyphen)
docs/io/fits/appendix/header_transition.rst:51: Line ends with dangling hyphen (dangling-hyphen)
docs/modeling/example-fitting-model-sets.rst:83: OMG TABS!!!1 (horizontal-tab)
docs/modeling/parameters.rst:92: OMG TABS!!!1 (horizontal-tab)
docs/modeling/physical_models.rst:158: OMG TABS!!!1 (horizontal-tab)
docs/modeling/physical_models.rst:159: OMG TABS!!!1 (horizontal-tab)
docs/modeling/physical_models.rst:192: OMG TABS!!!1 (horizontal-tab)
docs/modeling/physical_models.rst:213: OMG TABS!!!1 (horizontal-tab)
docs/io/votable/index.rst:532: missing space before default role: ' to`~astropy.io.votable.parse`'. (missing-space-before-default-role)
docs/table/construct_table.rst:667: Line ends with dangling hyphen (dangling-hyphen)
docs/units/logarithmic_units.rst:286: OMG TABS!!!1 (horizontal-tab)
docs/units/logarithmic_units.rst:290: OMG TABS!!!1 (horizontal-tab)
docs/timeseries/lombscarglemb.rst:445: OMG TABS!!!1 (horizontal-tab)
docs/visualization/rgb.rst:25: Line ends with dangling hyphen (dangling-hyphen)
docs/io/unified.rst:190: Line ends with dangling hyphen (dangling-hyphen)
docs/io/unified.rst:669: Line ends with dangling hyphen (dangling-hyphen)
docs/table/operations.rst:405: Line ends with dangling hyphen (dangling-hyphen)
docs/timeseries/lombscargle.rst:929: OMG TABS!!!1 (horizontal-tab)
docs/timeseries/lombscargle.rst:942: OMG TABS!!!1 (horizontal-tab)
docs/timeseries/lombscargle.rst:943: OMG TABS!!!1 (horizontal-tab)
licenses/GATSPY_LICENSE.rst:23: No newline at end of file. (missing-final-newline)
licenses/AURA_LICENSE.rst:18: found an unbalanced inline literal markup. (unbalanced-inline-literals-delimiters)
licenses/PYFITS.rst:18: found an unbalanced inline literal markup. (unbalanced-inline-literals-delimiters)
docs/wcs/wcsapi.rst:24: Line ends with dangling hyphen (dangling-hyphen)
licenses/WCSLIB_LICENSE.rst:1: OMG TABS!!!1 (horizontal-tab)
docs/io/fits/appendix/history.rst:6: Line ends with dangling hyphen (dangling-hyphen)
docs/io/fits/appendix/history.rst:1490: Line ends with dangling hyphen (dangling-hyphen)
docs/wcs/relax.rst:110: Line ends with dangling hyphen (dangling-hyphen)
docs/wcs/relax.rst:152: Line ends with dangling hyphen (dangling-hyphen)
CHANGES.rst:13753: Line ends with dangling hyphen (dangling-hyphen)
CHANGES.rst:16104: Line ends with dangling hyphen (dangling-hyphen)
CHANGES.rst:524: found an unbalanced inline literal markup. (unbalanced-inline-literals-delimiters)
CHANGES.rst:3583: found an unbalanced inline literal markup. (unbalanced-inline-literals-delimiters)
CHANGES.rst:3583: found an unbalanced inline literal markup. (unbalanced-inline-literals-delimiters)
CHANGES.rst:14326: found an unbalanced inline literal markup. (unbalanced-inline-literals-delimiters)
CHANGES.rst:15610: found an unbalanced inline literal markup. (unbalanced-inline-literals-delimiters)
The text was updated successfully, but these errors were encountered:
In one of my recent ventures into a Sphinx
rabbitdragon hole, I learned aboutsphinx-lint
.sphinx-lint
checks for "stylistic and formal issues in.rst
and.py
files included in the documentation". A key benefit is that it can find reStructuredText errors a lot more quickly than Astropy's Read the Docs build (and consequently partially addresses the issue I brought up in #16161).It turns out that
sphinx-lint
has a pre-commit hook which could be added to.pre-commit-config.yaml
.I applied
sphinx-lint
to PlasmaPy in PlasmaPy/PlasmaPy#2561, and it was able to find a few reStructuredText errors that hadn't previously been caught bysphinx-build
. I appliedsphinx-lint
to Astropy and it found the following ∼50 issues, which would need to be fixed or intentionally ignored if this hook is added. [I'd suggest ignoring thelicenses
directory in this hook (since for PlasmaPy, it reported text like``AS IS''
as having a reStructuredText error).]The text was updated successfully, but these errors were encountered: