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

[question] Problem matcher for sphinx-lint ? #107

Open
rffontenelle opened this issue Dec 22, 2023 · 5 comments
Open

[question] Problem matcher for sphinx-lint ? #107

rffontenelle opened this issue Dec 22, 2023 · 5 comments

Comments

@rffontenelle
Copy link
Contributor

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.

@JulienPalard
Copy link
Collaborator

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.

@rffontenelle
Copy link
Contributor Author

Note:

  1. GitHub Actions recognizes trailing "error" and "warning" (case insensitive) and turn them into issue annotations, without the need for a problem matcher specification file.

  2. 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

@JulienPalard
Copy link
Collaborator

@rffontenelle So you can add a link to your matcher from sphinx-lint README, and call it a day?

@rffontenelle
Copy link
Contributor Author

rffontenelle commented Dec 23, 2023

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

@rffontenelle
Copy link
Contributor Author

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.

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

No branches or pull requests

2 participants