;update manuals

This commit is contained in:
Simon Michael 2020-11-30 08:41:40 -08:00
parent 679373c835
commit e983380098
3 changed files with 241 additions and 158 deletions

View File

@ -3543,17 +3543,27 @@ check
.P .P
.PD .PD
Check for various kinds of errors in your data. Check for various kinds of errors in your data.
\f[I]experimental\f[R]
.PP .PP
hledger provides a number of built-in error checks to help prevent hledger provides a number of built-in error checks to help prevent
problems in your data. problems in your data.
Some, but not all, of these are run automatically before all commands. Some of these are run automatically; or, you can use this
You can also use this \f[C]check\f[R] command to run any of the \f[C]check\f[R] command to run them on demand, with no output and a zero
available tests. exit code if all is well.
They are named, and run, as follows: Some examples:
.IP
.nf
\f[C]
hledger check # basic checks
hledger check -s # basic + strict checks
hledger check ordereddates uniqueleafnames # basic + specified checks
\f[R]
.fi
.PP .PP
\f[C]hledger check\f[R] runs the basic checks, like all other commands, Here are the checks currently available:
but with no output unless there is a problem. .SS Basic checks
These are: .PP
These are always run by this command and other commands:
.IP \[bu] 2 .IP \[bu] 2
\f[B]parseable\f[R] - data files are well-formed and can be successfully \f[B]parseable\f[R] - data files are well-formed and can be successfully
parsed parsed
@ -3562,41 +3572,51 @@ parsed
missing amounts where necessary, and possibly converting commodities missing amounts where necessary, and possibly converting commodities
using transaction prices or automatically-inferred transaction prices using transaction prices or automatically-inferred transaction prices
.IP \[bu] 2 .IP \[bu] 2
\f[B]assertions\f[R] - all balance assertions are passing (except with \f[B]assertions\f[R] - all balance assertions in the journal are
\f[C]-I\f[R]/\f[C]--ignore-assertions\f[R]) passing.
(This check can be disabled with
\f[C]-I\f[R]/\f[C]--ignore-assertions\f[R].)
.SS Strict checks
.PP .PP
\f[C]hledger check --strict\f[R] also runs the additional \[dq]strict These are always run by this and other commands when
mode\[dq] checks, which are: \f[C]-s\f[R]/\f[C]--strict\f[R] is used (strict mode):
.IP \[bu] 2 .IP \[bu] 2
\f[B]accounts\f[R] - all account names used by transactions have been \f[B]accounts\f[R] - all account names used by transactions have been
declared declared
.IP \[bu] 2 .IP \[bu] 2
\f[B]commodities\f[R] - all commodity symbols used have been declared \f[B]commodities\f[R] - all commodity symbols used have been declared
.SS Other checks
.PP .PP
\f[C]hledger check CHECK1 CHECK2 ...\f[R] runs all of the named checks, These checks can be run by specifying their names as arguments to the
in turn. check command:
This may be useful when neither the default nor strict checks are
exactly what you want, or when you want to focus on a single check of
interest.
The arguments are standard lowercase names for the checks.
Currently only these checks can be run in this way:
.IP \[bu] 2 .IP \[bu] 2
\f[B]dates\f[R] - transactions are ordered by date (similar to the old \f[B]ordereddates\f[R] - transactions are ordered by date (similar to
\f[C]check-dates\f[R] command) the old \f[C]check-dates\f[R] command)
.IP \[bu] 2 .IP \[bu] 2
\f[B]leafnames\f[R] - all account leaf names are unique ((similar to the \f[B]uniqueleafnames\f[R] - all account leaf names are unique (similar
old \f[C]check-dupes\f[R] command) to the old \f[C]check-dupes\f[R] command)
.PP .PP
See also: This command would run all of the checks above:
.IP
.nf
\f[C]
$ hledger check -s ordereddates uniqueleafnames
\f[R]
.fi
.SS Addon checks
.PP .PP
Some checks are shipped as addon scripts for now (cf Some checks are not yet integrated with this command, but are available
https://github.com/simonmichael/hledger/tree/master/bin, and Cookbook -> as [addon commands] in
Scripting): https://github.com/simonmichael/hledger/tree/master/bin:
.IP \[bu] 2 .IP \[bu] 2
\f[B]tagfiles\f[R] - all tag values containing / (a forward slash) exist \f[B]hledger-check-tagfiles\f[R] - all tag values containing / (a
as file paths forward slash) exist as file paths
.IP \[bu] 2 .IP \[bu] 2
\f[B]fancyassertions\f[R] - more complex balance assertions are passing \f[B]hledger-check-fancyassertions\f[R] - more complex balance
assertions are passing
.PP
You could make your own similar scripts to perform custom checks;
Cookbook -> Scripting may be helpful.
.SS close .SS close
.PP .PP
close, equity close, equity

View File

@ -2972,52 +2972,95 @@ File: hledger.info, Node: check, Next: close, Prev: cashflow, Up: COMMANDS
========= =========
check check
Check for various kinds of errors in your data. Check for various kinds of errors in your data. _experimental_
hledger provides a number of built-in error checks to help prevent hledger provides a number of built-in error checks to help prevent
problems in your data. Some, but not all, of these are run problems in your data. Some of these are run automatically; or, you can
automatically before all commands. You can also use this 'check' use this 'check' command to run them on demand, with no output and a
command to run any of the available tests. They are named, and run, as zero exit code if all is well. Some examples:
follows:
'hledger check' runs the basic checks, like all other commands, but hledger check # basic checks
with no output unless there is a problem. These are: hledger check -s # basic + strict checks
hledger check ordereddates uniqueleafnames # basic + specified checks
Here are the checks currently available:
* Menu:
* Basic checks::
* Strict checks::
* Other checks::
* Addon checks::

File: hledger.info, Node: Basic checks, Next: Strict checks, Up: check
3.9.1 Basic checks
------------------
These are always run by this command and other commands:
* *parseable* - data files are well-formed and can be successfully * *parseable* - data files are well-formed and can be successfully
parsed parsed
* *autobalanced* - all transactions are balanced, inferring missing * *autobalanced* - all transactions are balanced, inferring missing
amounts where necessary, and possibly converting commodities using amounts where necessary, and possibly converting commodities using
transaction prices or automatically-inferred transaction prices transaction prices or automatically-inferred transaction prices
* *assertions* - all balance assertions are passing (except with
'-I'/'--ignore-assertions')
'hledger check --strict' also runs the additional "strict mode" * *assertions* - all balance assertions in the journal are passing.
checks, which are: (This check can be disabled with '-I'/'--ignore-assertions'.)

File: hledger.info, Node: Strict checks, Next: Other checks, Prev: Basic checks, Up: check
3.9.2 Strict checks
-------------------
These are always run by this and other commands when '-s'/'--strict' is
used (strict mode):
* *accounts* - all account names used by transactions have been * *accounts* - all account names used by transactions have been
declared declared
* *commodities* - all commodity symbols used have been declared * *commodities* - all commodity symbols used have been declared
'hledger check CHECK1 CHECK2 ...' runs all of the named checks, in 
turn. This may be useful when neither the default nor strict checks are File: hledger.info, Node: Other checks, Next: Addon checks, Prev: Strict checks, Up: check
exactly what you want, or when you want to focus on a single check of
interest. The arguments are standard lowercase names for the checks.
Currently only these checks can be run in this way:
* *dates* - transactions are ordered by date (similar to the old 3.9.3 Other checks
'check-dates' command) ------------------
* *leafnames* - all account leaf names are unique ((similar to the
old 'check-dupes' command)
See also: These checks can be run by specifying their names as arguments to the
check command:
Some checks are shipped as addon scripts for now (cf * *ordereddates* - transactions are ordered by date (similar to the
https://github.com/simonmichael/hledger/tree/master/bin, and Cookbook -> old 'check-dates' command)
Scripting):
* *tagfiles* - all tag values containing / (a forward slash) exist as * *uniqueleafnames* - all account leaf names are unique (similar to
file paths the old 'check-dupes' command)
* *fancyassertions* - more complex balance assertions are passing
This command would run all of the checks above:
$ hledger check -s ordereddates uniqueleafnames

File: hledger.info, Node: Addon checks, Prev: Other checks, Up: check
3.9.4 Addon checks
------------------
Some checks are not yet integrated with this command, but are available
as [addon commands] in
https://github.com/simonmichael/hledger/tree/master/bin:
* *hledger-check-tagfiles* - all tag values containing / (a forward
slash) exist as file paths
* *hledger-check-fancyassertions* - more complex balance assertions
are passing
You could make your own similar scripts to perform custom checks;
Cookbook -> Scripting may be helpful.
 
File: hledger.info, Node: close, Next: codes, Prev: check, Up: COMMANDS File: hledger.info, Node: close, Next: codes, Prev: check, Up: COMMANDS
@ -4574,80 +4617,88 @@ Node: cashflow104183
Ref: #cashflow104305 Ref: #cashflow104305
Node: check105521 Node: check105521
Ref: #check105624 Ref: #check105624
Node: close107565 Node: Basic checks106228
Ref: #close107667 Ref: #basic-checks106344
Node: close usage109189 Node: Strict checks106837
Ref: #close-usage109282 Ref: #strict-checks106976
Node: codes112095 Node: Other checks107219
Ref: #codes112203 Ref: #other-checks107356
Node: commodities112915 Node: Addon checks107755
Ref: #commodities113042 Ref: #addon-checks107870
Node: descriptions113124 Node: close108324
Ref: #descriptions113252 Ref: #close108426
Node: diff113556 Node: close usage109948
Ref: #diff113662 Ref: #close-usage110041
Node: files114709 Node: codes112854
Ref: #files114809 Ref: #codes112962
Node: help114956 Node: commodities113674
Ref: #help115056 Ref: #commodities113801
Node: import116137 Node: descriptions113883
Ref: #import116251 Ref: #descriptions114011
Node: Importing balance assignments117173 Node: diff114315
Ref: #importing-balance-assignments117354 Ref: #diff114421
Node: Commodity display styles118003 Node: files115468
Ref: #commodity-display-styles118174 Ref: #files115568
Node: incomestatement118303 Node: help115715
Ref: #incomestatement118436 Ref: #help115815
Node: notes119781 Node: import116896
Ref: #notes119894 Ref: #import117010
Node: payees120262 Node: Importing balance assignments117932
Ref: #payees120368 Ref: #importing-balance-assignments118113
Node: prices120788 Node: Commodity display styles118762
Ref: #prices120894 Ref: #commodity-display-styles118933
Node: print121235 Node: incomestatement119062
Ref: #print121345 Ref: #incomestatement119195
Node: print-unique126141 Node: notes120540
Ref: #print-unique126267 Ref: #notes120653
Node: register126552 Node: payees121021
Ref: #register126679 Ref: #payees121127
Node: Custom register output131128 Node: prices121547
Ref: #custom-register-output131257 Ref: #prices121653
Node: register-match132594 Node: print121994
Ref: #register-match132728 Ref: #print122104
Node: rewrite133079 Node: print-unique126900
Ref: #rewrite133194 Ref: #print-unique127026
Node: Re-write rules in a file135049 Node: register127311
Ref: #re-write-rules-in-a-file135183 Ref: #register127438
Node: Diff output format136393 Node: Custom register output131887
Ref: #diff-output-format136562 Ref: #custom-register-output132016
Node: rewrite vs print --auto137654 Node: register-match133353
Ref: #rewrite-vs.-print---auto137833 Ref: #register-match133487
Node: roi138389 Node: rewrite133838
Ref: #roi138487 Ref: #rewrite133953
Node: stats150697 Node: Re-write rules in a file135808
Ref: #stats150796 Ref: #re-write-rules-in-a-file135942
Node: tags151584 Node: Diff output format137152
Ref: #tags151682 Ref: #diff-output-format137321
Node: test152201 Node: rewrite vs print --auto138413
Ref: #test152309 Ref: #rewrite-vs.-print---auto138592
Node: Add-on commands153056 Node: roi139148
Ref: #add-on-commands153173 Ref: #roi139246
Node: ui154516 Node: stats151456
Ref: #ui154604 Ref: #stats151555
Node: web154658 Node: tags152343
Ref: #web154761 Ref: #tags152441
Node: iadd154877 Node: test152960
Ref: #iadd154988 Ref: #test153068
Node: interest155070 Node: Add-on commands153815
Ref: #interest155177 Ref: #add-on-commands153932
Node: ENVIRONMENT155417 Node: ui155275
Ref: #environment155529 Ref: #ui155363
Node: FILES156514 Node: web155417
Ref: #files-1156617 Ref: #web155520
Node: LIMITATIONS156830 Node: iadd155636
Ref: #limitations156949 Ref: #iadd155747
Node: TROUBLESHOOTING157691 Node: interest155829
Ref: #troubleshooting157804 Ref: #interest155936
Node: ENVIRONMENT156176
Ref: #environment156288
Node: FILES157273
Ref: #files-1157376
Node: LIMITATIONS157589
Ref: #limitations157708
Node: TROUBLESHOOTING158450
Ref: #troubleshooting158563
 
End Tag Table End Tag Table

View File

@ -2557,54 +2557,66 @@ COMMANDS
check check
check check
Check for various kinds of errors in your data. Check for various kinds of errors in your data. experimental
hledger provides a number of built-in error checks to help prevent hledger provides a number of built-in error checks to help prevent
problems in your data. Some, but not all, of these are run automati- problems in your data. Some of these are run automatically; or, you
cally before all commands. You can also use this check command to run can use this check command to run them on demand, with no output and a
any of the available tests. They are named, and run, as follows: zero exit code if all is well. Some examples:
hledger check runs the basic checks, like all other commands, but with hledger check # basic checks
no output unless there is a problem. These are: hledger check -s # basic + strict checks
hledger check ordereddates uniqueleafnames # basic + specified checks
Here are the checks currently available:
Basic checks
These are always run by this command and other commands:
o parseable - data files are well-formed and can be successfully parsed o parseable - data files are well-formed and can be successfully parsed
o autobalanced - all transactions are balanced, inferring missing o autobalanced - all transactions are balanced, inferring missing
amounts where necessary, and possibly converting commodities using amounts where necessary, and possibly converting commodities using
transaction prices or automatically-inferred transaction prices transaction prices or automatically-inferred transaction prices
o assertions - all balance assertions are passing (except with -I/--ig- o assertions - all balance assertions in the journal are passing.
nore-assertions) (This check can be disabled with -I/--ignore-assertions.)
hledger check --strict also runs the additional "strict mode" checks, Strict checks
which are: These are always run by this and other commands when -s/--strict is
used (strict mode):
o accounts - all account names used by transactions have been declared o accounts - all account names used by transactions have been declared
o commodities - all commodity symbols used have been declared o commodities - all commodity symbols used have been declared
hledger check CHECK1 CHECK2 ... runs all of the named checks, in turn. Other checks
This may be useful when neither the default nor strict checks are ex- These checks can be run by specifying their names as arguments to the
actly what you want, or when you want to focus on a single check of in- check command:
terest. The arguments are standard lowercase names for the checks.
Currently only these checks can be run in this way:
o dates - transactions are ordered by date (similar to the old check- o ordereddates - transactions are ordered by date (similar to the old
dates command) check-dates command)
o leafnames - all account leaf names are unique ((similar to the old o uniqueleafnames - all account leaf names are unique (similar to the
check-dupes command) old check-dupes command)
See also: This command would run all of the checks above:
Some checks are shipped as addon scripts for now (cf $ hledger check -s ordereddates uniqueleafnames
https://github.com/simonmichael/hledger/tree/master/bin, and Cookbook
-> Scripting):
o tagfiles - all tag values containing / (a forward slash) exist as Addon checks
file paths Some checks are not yet integrated with this command, but are available
as [addon commands] in https://github.com/simon-
michael/hledger/tree/master/bin:
o fancyassertions - more complex balance assertions are passing o hledger-check-tagfiles - all tag values containing / (a forward
slash) exist as file paths
o hledger-check-fancyassertions - more complex balance assertions are
passing
You could make your own similar scripts to perform custom checks; Cook-
book -> Scripting may be helpful.
close close
close, equity close, equity