Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reStructuredText linting step to Azure Pipelines job #1576

Open
mloskot opened this issue May 24, 2019 · 2 comments
Open

Add reStructuredText linting step to Azure Pipelines job #1576

mloskot opened this issue May 24, 2019 · 2 comments
Labels
task Planned work (implies someone assigns it to him/her)

Comments

@mloskot
Copy link
Member

mloskot commented May 24, 2019

This is TODO item to lint the *.rst files before building and deploying the docs.

@mloskot mloskot self-assigned this May 24, 2019
@mloskot mloskot added the task Planned work (implies someone assigns it to him/her) label May 24, 2019
mloskot added a commit to mloskot/gdal that referenced this issue May 26, 2019
@mloskot
Copy link
Member Author

mloskot commented May 26, 2019

I've experimented with the famous https://github.com/twolfson/restructuredtext-lint/ but there seem to be issues with Sphinx directives and roles:

ERROR source/drivers/raster/pds.rst:29 Unknown directive type "supports_virtualio".
ERROR source/drivers/raster/pds.rst:103 Unknown interpreted text role "ref".

How to handle those needs to be investigated.

@mloskot
Copy link
Member Author

mloskot commented May 26, 2019

I've experimented with https://github.com/myint/rstcheck too and it seems to have issues with Breathe directives

source/api/cpl.rst:10: (ERROR/3) Unknown directive type "doxygenfile".
source/api/gdaldataset_cpp.rst:7: (ERROR/3) Unknown directive type "doxygenclass".

Another interseting feature of rstcheck is validation of code blocks

source/tutorials/raster_api_tut.rst:34: (ERROR/3) (c) fatal error: gdal.h: No such file or directory
source/tutorials/raster_api_tut.rst:103: (ERROR/3) (c) error: unknown type name ‘GDALDriverH’

But the tool configurability seem to be a work (brainstorm) in progress https://github.com/myint/rstcheck/issues/31 Alternatively, cpp language can be ignored at single .rst file level https://github.com/myint/rstcheck#ignore-specific-languages (I have not found way to ignore it at .rstcheck.cfg config level).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Planned work (implies someone assigns it to him/her)
Projects
None yet
Development

No branches or pull requests

1 participant