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

rst-lint -> rstcheck #23

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

rst-lint -> rstcheck #23

wants to merge 5 commits into from

Conversation

peterjc
Copy link
Owner

@peterjc peterjc commented Mar 9, 2020

Work in progress exploring using rstcheck which adds support for RST blocks in other languages like Python, Bash or JSON. Would address #22

Idea here is rstcheck will also validate python
blocks etc, as well as the reStructuredText via
docutils. That would need new error codes:

$ flake8 --select RST some_python.py
some_python.py:8:1: RST999 Unexpected prefix: '(python) unexpected EOF while parsing'

See GitHub issue #22, using the example there:

def some():
    """
    ====
    Test
    ====

    .. code:: python

        print(

    End.
    """
    pass
A bit of a hack as change from rst-lint to rstcheck
was not quite transparent.
@peterjc
Copy link
Owner Author

peterjc commented Mar 9, 2020

Looks like can call rstcheck. ignore_directives_and_roles(...) to tell it additional directives and roles to ignore in advance

@peterjc
Copy link
Owner Author

peterjc commented Apr 15, 2021

Currently no easy way to stop rstlint automatically ignoring Sphinx directives and roles, which would ideally be configurable.

@peterjc
Copy link
Owner Author

peterjc commented Apr 16, 2022

Cross reference rstcheck/rstcheck#65 (comment) - with rstcheck under active maintenance again, this is worth revisiting.

@Cielquan
Copy link

For the future: When this PR is merged we could add a link to rstcheck pointing to this repo in a Usage with flake8 section or so.

@peterjc
Copy link
Owner Author

peterjc commented Apr 21, 2022

See rstcheck/rstcheck#95 - may be best waiting for the API to settle before refreshing this.

@Cielquan
Copy link

I just released v6.0.0a1 of rstcheck. If you would like to take a look.

The roadmap until the full release is here: rstcheck/rstcheck#104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants