sphinx-contrib / sphinx-lint

Check for stylistic and formal issues in .rst and .py files included in the documentation
https://pypi.org/project/sphinx-lint/
Other
75 stars 20 forks source link

Unnecessary-parenthesis only catches a single error per line #119

Open A5rocks opened 1 month ago

A5rocks commented 1 month ago

A few other rules do this too (like check_missing_colon_in_role), but take unnecessary-parenthesis as an example: because unnecessary-parenthesis runs a regex that catches a single instance, it will only catch a single instance per line.

This isn't a bug, but still makes it annoying to fix issues as things pop up one after another. Feel free to close this though.

I'd be happy to contribute this if this is something to be fixed.

AlexWaygood commented 1 month ago

I'd be willing to accept a fix for this, but it also sounds like the kind of thing that could lead to a big performance regression if done in a suboptimal way, so I'd definitely like to keep an eye on that. (sphinx-lint is one of the slowest tools in CPython's pre-commit setup, so I wouldn't want it getting slower!)