Commit Graph

34 Commits

Author SHA1 Message Date
Simon Michael
ea58a7ccd7 imp: check: check ordereddates before balance assertions, when both are enabled 2024-05-02 21:11:04 -10:00
Simon Michael
4abb8ffc2e ;doc: check: expand check descriptions 2024-05-02 19:59:00 -10:00
Simon Michael
55401282a0 imp: run checks in a well-defined order; and tweak that order
Now commodities are checked before accounts, and tags before recentassertions.
Also some check doc cleanups.
2024-04-26 18:59:45 -10:00
Simon Michael
0c85b48d2c ;doc: use ``cli not ``shell for command-line examples 2023-11-26 08:30:04 -10:00
Simon Michael
50f26c280e ;doc:check: cleanup 2023-08-22 09:56:25 +01:00
Simon Michael
5f1bf0404a imp:check: more intuitive "balanced..." check names
balancedwithautoconversion -> autobalanced
balancednoautoconversion   -> balanced
2023-08-22 08:38:52 +01:00
Simon Michael
002773f650 imp:check:recentassertions: give a more useful error location
hledger check recentassertions now reports the error at the first
posting that's more than 7 days later than the latest balance
assertion (rather than at the balance assertion).  This is the thing
actually triggering the error, and it is more likely to be visible or
at least closer when you are working at the end of a journal file.
2023-07-12 19:54:18 -10:00
Simon Michael
0567935e4b cli: simplify command doc inclusion, give them normal heading structure 2023-02-20 16:24:54 -10:00
Simon Michael
7a9b0fd94c feat: check: the tags check checks tag names 2023-02-16 11:56:22 -10:00
Simon Michael
513b6b5164 ;doc: check: adjacentconversionpostings was dropped 2023-02-04 08:03:54 -10:00
Simon Michael
da5b4667df ;doc: rename directive sections, fix many links 2023-02-04 08:01:47 -10:00
Simon Michael
de330bdfce imp: journal: check for adjacent conversion postings only in strict mode
This avoids breaking existing journals if, say, they happen to have
a single "equity:trading" posting somewhere.
2023-01-25 19:00:29 -10:00
Simon Michael
985c15f039 ;doc: cli: clean up/rename directives sections 2022-12-11 01:59:26 -10:00
Simon Michael
474ad22b94 ;doc: officially rename "transaction prices" to "costs" in docs
(though not in code)
2022-12-10 18:50:45 -10:00
Simon Michael
910b37abf8 fix: check: recentassertions: drop the cleared requirement (#1899)
It was causing trouble and complicating things too much.
I wanted it as another signal of being "caught up", but YAGNI.
2022-08-03 09:53:55 +01:00
Simon Michael
c025d228a1 doc: check: add more details about recentassertions 2022-08-01 06:53:04 +01:00
Simon Michael
1ed8c20978 feat: check recentassertions disallows assertion lag > 7 days
hledger check recentassertions (or flycheck-hledger if you enable this
check) will complain if any balance-asserted account does not have a
balance assertion within 7 days before its latest posting.  This aims
to prevent the situation where you are regularly updating your
journal, but forgetting to check your balances against the real world,
eventually requiring you to dig back through months of data to find
the error.
2022-08-01 06:53:04 +01:00
Stephen Morgan
0f1837816d lib,cli,ui,web: Add check balancednoautoconversion command, which checks that
transactions are balanced possibly using explicit prices, but without
inferring any prices. This is included in --strict mode.

Renames check autobalanced to check balancedwithautoconversion.
2021-06-07 18:58:58 -10:00
Simon Michael
7acfb63e9b ;doc: check: cleanup 2021-05-14 08:30:56 -10:00
Simon Michael
07128cbb05 ;doc: check: ordereddates: clarify within in each file 2021-05-14 07:36:35 -10:00
Simon Michael
7b8a873471 ;check: update manual 2021-03-03 15:43:38 -08:00
Simon Michael
7510d99aec check: accept case-insensitive prefixes as arguments
Might a bad idea, but avoiding wasteful typing..
2021-01-05 16:18:24 -08:00
Simon Michael
ac39d59016 ;check: doc: link to payee directive 2020-12-31 12:57:39 -08:00
Simon Michael
3898a66dda ;check: doc: wording 2020-12-31 12:40:46 -08:00
Simon Michael
c8eb347835 ;check: no longer experimental 2020-12-31 12:17:48 -08:00
Simon Michael
8306420b61 check: also check "accounts"/"commodities" on demand
(cherry picked from commit 0c2bf54f2955e3a25fd0282acc42608f957abaea)
2020-12-31 08:33:36 -08:00
Simon Michael
3c232fbd7d check: add "payees" check requiring payee declarations 2020-12-30 18:08:30 -08:00
Simon Michael
fbf9418756 ;doc: update links to journal manual 2020-12-24 12:49:04 -08:00
Simon Michael
7a692284a9 ;doc: replace a few addon with add-on 2020-12-08 09:27:36 -08:00
Simon Michael
26dc66e118 ;check: doc updates 2020-11-30 08:49:10 -08:00
Simon Michael
a5adc14aaa ;check: doc updates 2020-11-30 08:41:07 -08:00
Simon Michael
4dba59b0a1 ;check: doc updates 2020-11-30 08:26:16 -08:00
Simon Michael
a0907e6567 check: doc 2020-11-29 21:21:20 -08:00
Simon Michael
724fb9961d check: new command incorporating check-dates, check-dupes, etc.
This is intended to work in three modes:

- hledger check: just run the standard data checks, like all other
commands but with no output on success. Equivalent to
hledger stats >/dev/null but simpler and platform-independent.

- hledger check --strict: run the standard + strict data checks,
like other commands in strict mode.

- hledger check CHECK1 CHECK2 ...: run the named checks. This allows
running more or less checks than the default or strict mode, or
a single check of interest. The arguments are standard lowercase names
for the checks. For now this command supports two checks: "dates" and
"leafnames". These are equivalent to the check-dates and check-dupes
commands which are now hidden and considered deprecated, though
still supported for the moment.

This command needs more work and I'm rushing it a little, but I think
it's the right direction and I'd like to put it out there to get
feedback.
2020-11-29 13:27:35 -08:00