pydocstyle
pydocstyle copied to clipboard
[Feature Request] Option to customize error message output
It would be great to be able to customize the pydocstyle error message output.
In addition to being a pleasant feature, this would further allow improved integration into some IDEs such as PyCharm. I have tried out a minimal change to output error messages on a single line. This then makes it possible to configure a file watcher that directly shows error stripe marks along with appropriate error messages in the editor window:

You can easily try it out for yourself by following the instructions on this fork.
As an idea, something like the pylint --msg-template option would do the job perfectly and could be used as follows:
pydocstyle --msg-template='{filename}:{line} {definition}: {message}' my_filename.py
It seems like this could be implemented with relatively little effort. The relevant part of the code can be found here: https://github.com/PyCQA/pydocstyle/blob/5e964875aef99b9df6f238616228ef1286afcfac/src/pydocstyle/violations.py#L86
Happy to submit a PR if you're keen on the proposal...
This is an awesome idea!
If you use flake8 + flake8-docstrings you can already do this.