sphinx-lint
sphinx-lint copied to clipboard
[question] Problem matcher for sphinx-lint ?
Is there a problem matcher for sphinx-lint's output? I tried sphinx-doc/github-problem-matcher but it seems to be designed for Sphinx output.
I don't think so.
I'll be OK to tweak output a bit if needed for it to be more "standard", so if a standard problem matcher exists it could be used.
Note:
-
GitHub Actions recognizes trailing "error" and "warning" (case insensitive) and turn them into issue annotations, without the need for a problem matcher specification file.
-
Sphinx's problem matcher almost fit sphinx-lint output, except for two situations. First is severity: Sphinx build shows "warning" and "error", and sphinx-lint doesn't. The second is that it has loose match the looks for .rst file, but sphinx-lint also works in Gettext translation file (.po).
For now I created an action for it: https://github.com/rffontenelle/sphinx-lint-problem-matcher/blob/main/sphinx_lint_matcher.json
@rffontenelle So you can add a link to your matcher from sphinx-lint README, and call it a day?
It is actually a GitHub Actions action. You call it like:
- name: Checkout the repo source code
uses: actions/checkout@v4
- name: Add problem matcher:
uses: rffontenelle/sphinx-lint-problem-matcher@master
- name: Lint
run: sphinx-lint /path/to/file
Is there an interest in adding this problem-matcher action to this repository or other sphinx-related (i.e. making it official) ? Case not, I believe this issue can be closed.