Cc'ing from the hledger mail list:
Here are some recent changes in master, let me know if you have concerns:
-
The order in which correctness checks are performed is now documented, and tweaked: commodities are now checked before accounts, and tags are now checked before ordereddates. (The order is relevant because we show only the first failure.)
-
ordereddates now ignores
--date2
and secondary dates; it checks primary dates only (simplifying internals and UX).
And here are two more which have been held back, as they might be too controversial:
-
Move the balance assertions check to
--strict
mode (ie, don't check them by default). -
Move the ordereddates check to
--strict
mode, and check it before balance assertions.
In other words, emphasise ordereddates a bit more and balance assertions a bit less.
This might be a bad idea. Some possible benefits:
-
My main goal was to get ordereddates failure reported before balance assertions failure. When I get a failing balance assertion during data entry it's often because I copy-pasted an old transaction without updating the date, and it would be more useful to see the ordereddates error, pointing me directly at the cause.
-
Moving them both to strict mode allows the checks to still be explained as a nice linear sequence, with the most basic/useful checks coming first.
-
Also, balance assertions fairly often get in the way, forcing you to run commands again with
-I
. Eg when you want to run reports to troubleshoot problems during data entry, or when you are piping hledger print output to a second hledger command. -
ordereddates is IMHO a useful check with no major downsides. If you want to keep some entries outside the overall date order you can always move them to their own file. It would be ok to be a little less flexible and a little more opinionated on best practice here.
And costs:
-
hledger would do less correctness checking by default. Now unless you use
-s/--strict
, you could see and use report output without realising you have failing balance assertions. This cuts both ways. -
The meaning of
-s/--strict
changes. To start using it, or keep using it, you'd now also need to conform to ordereddates. (Or use a backward compatibility flag, or use 'hledger check' instead.)
There are other ways to get some of these benefits.. though I haven't found any quite as straightforward.