Skip to content

Sort option #51

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

Merged
merged 3 commits into from
Nov 18, 2022
Merged

Sort option #51

merged 3 commits into from
Nov 18, 2022

Conversation

rtobar
Copy link
Contributor

@rtobar rtobar commented Nov 17, 2022

An idea on how to tackle #50. Not fully convinced with the list of supported fields ("line" on its own doesn't have much value), and probably some things can be improved, but overall it's working as expected.

In order to improve error reporting we first need to communicate typed
error objects from the checking functions instead of error messages,
where we can't (easily and reliably) recover the error details anymore.

Error objects know how to format themselves, so we print them directly,
and let them do their internal formatting.

Signed-off-by: Rodrigo Tobar <[email protected]>
Signed-off-by: Rodrigo Tobar <[email protected]>
Users can specify now a command-line option to sort errors before they
are reported to stdout. When no option is given, errors are reported as
they are generated, preserving backwards compatibility. When given, a
comma-delimited list of field names must be given, with errors being
sorted by the first field, then the second, and so on.

Signed-off-by: Rodrigo Tobar <[email protected]>
@JulienPalard JulienPalard merged commit 574fbf3 into sphinx-contrib:main Nov 18, 2022
@JulienPalard
Copy link
Collaborator

Thanks!

@rtobar rtobar deleted the sort-option branch November 28, 2022 13:33
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