-
-
Notifications
You must be signed in to change notification settings - Fork 321
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
check
command should not stop after the first error
#2203
Comments
check
command should not stop after the first error
I'd be happy to test a PR exploring this. Some checks are relatively easy to continue from on failure; others are not. But I don't find it causing pain in practice, do you ? I don't have a slow edit-check-fix cycle. |
Maybe one day. Right now my Haskell skills are subpar and I have no familiarity with hledger's code base (sadly). I'll try and change that in the future.
In a carefully maintained chart of accounts this isn't problematic (especially if one has some kind of auto-complete for account names), but scenarios vary. Still, on a more general note, I think having the |
Not detracting from your point, but remember strict account checking is optional and simply avoiding it is another option when the chart of accounts hasn't yet stabilised. |
Yes, I know, but strictness checking is also the only way to know which accounts have not been declared and are being used. One can always get the used accounts' listing from a non-strict Thank you for the suggestion, though. |
Currently, if one turns on strict mode or uses the check command (eg.
check accounts
,check payees
), hledger stops after the first undeclared account/payee is encountered.While this is technically correct, it makes one repeat the edit-check-fix cycle more times than should be needed.
Here's an example:
As it stands, we have 2 undeclared accounts and 2 undeclared payees. Let's check them with
hledger
:The same thing happens for payees:
hledger
never sees payeeB
and thus never complains about it because it quits after reportingA
is not declared.I think it would be helpful if hledger continued processing the data and collected as much undeclared accounts / payees as possible before presenting them to the user.
Perhaps this would not belong in the
-s
argument's default behaviour (so as not to overwhelm new users), but only in the explicitcheck
command (it does make sense to report all undeclared accounts if I ask tocheck accounts
, I think).The text was updated successfully, but these errors were encountered: