-
-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
imp: simpler, clearer date parse error messages
When the error message repeated the invalid date at the end, it was possible to misinterpret that as a suggested fix (reported in chat). Instead, date errors (most of them) now rely on the highlighted data excerpt above. This is also preferable since it shows the original date as written, not a reconstruction with a possibly different format. Should this be the policy for all error messages going forward ? It would be easier. Can we assume the data excerpt is always visible along with the error message ? It isn't shown by flycheck-hledger in emacs, eg.
- Loading branch information
1 parent
5519f4a
commit fae6e49
Showing
3 changed files
with
25 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
# * parseable error | ||
# ** 1. | ||
$ hledger check -f parseable-dates.j | ||
>2 /hledger: Error: .*parseable-dates.j:3:1: | ||
$$$ hledger check -f parseable-dates.j | ||
>>>2 /hledger: Error: .*parseable-dates.j:3:1: | ||
\| | ||
3 \| 2022\/1\/32 | ||
\| \^\^\^\^\^\^\^\^\^ | ||
|
||
This date is invalid, please correct it: 2022\/1\/32 | ||
This is not a valid date, please fix it. | ||
|
||
/ | ||
>= 1 | ||
>>>= 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters