tldr-pages / tldr-bot

A simple bot that performs automation tasks on the main tldr repo
https://github.com/tldr-bot
MIT License
29 stars 8 forks source link

Improve readability of error report messages #2

Open waldyrious opened 7 years ago

waldyrious commented 7 years ago

This was first suggested in https://github.com/tldr-pages/tldr/pull/1380#issuecomment-302349497.

Ideally the error messages would be more human-friendly. Currently they look like this:

The build for this PR has failed with the following message:

pages/linux/calc.md:10: TLDR103 Command example is missing its closing backtick

Please fix the error(s) and push again.

It would be nice to have something the like following, instead:

The build for this PR has failed with the following errors:

On pages/linux/calc.md, line 10:
   `calc -p '{{85 * (36 / 4)}}'
Error: Command example is missing its closing backtick.

Please fix the error(s) and push again.

agnivade commented 7 years ago

@waldyrious - The first part of this needs to be done from the main tldr repo.

The second part needs to be done from the tldr-lint side. That might be difficult to do.

waldyrious commented 7 years ago

Is that because of the printing of the offending line? Because the rest of the information is already present in the current message. Maybe we could start with something simpler, like this:

On pages/linux/calc.md, line 10: Command example is missing its closing backtick.
agnivade commented 7 years ago

Yea that can be done. Will see.