diff --git a/hledger-lib/Hledger/Read/Common.hs b/hledger-lib/Hledger/Read/Common.hs index c55103d2a..219b4d1d6 100644 --- a/hledger-lib/Hledger/Read/Common.hs +++ b/hledger-lib/Hledger/Read/Common.hs @@ -193,7 +193,7 @@ instance Show (Reader m) where show r = rFormat r ++ " reader" rawOptsToInputOpts :: Day -> RawOpts -> InputOpts rawOptsToInputOpts day rawopts = - let noinferbalancingcosts = boolopt "strict" rawopts || stringopt "args" rawopts == "balancednoautoconversion" + let noinferbalancingcosts = boolopt "strict" rawopts || stringopt "args" rawopts == "balanced" -- Do we really need to do all this work just to get the requested end date? This is duplicating -- much of reportOptsToSpec. diff --git a/hledger/Hledger/Cli/Commands/Check.hs b/hledger/Hledger/Cli/Commands/Check.hs index 3ce187cbf..31edd8f52 100644 --- a/hledger/Hledger/Cli/Commands/Check.hs +++ b/hledger/Hledger/Cli/Commands/Check.hs @@ -50,18 +50,18 @@ cliOptsUpdateReportSpecWith roptsupdate copts@CliOpts{reportspec_} = -- | A type of error check that we can perform on the data. -- Some of these imply other checks that are done first, --- eg currently Parseable and Balancedwithautoconversion are always done, +-- eg currently Parseable and Autobalanced are always done, -- and Assertions are always done unless -I is in effect. data Check = -- done always Parseable - | Balancedwithautoconversion + | Autobalanced -- done always unless -I is used | Assertions -- done when -s is used, or on demand by check | Accounts | Commodities - | Balancednoautoconversion + | Balanced -- done on demand by check | Ordereddates | Payees diff --git a/hledger/Hledger/Cli/Commands/Check.md b/hledger/Hledger/Cli/Commands/Check.md index 981aa4332..c201241b4 100644 --- a/hledger/Hledger/Cli/Commands/Check.md +++ b/hledger/Hledger/Cli/Commands/Check.md @@ -32,9 +32,8 @@ including `check`: - **parseable** - data files are well-formed and can be [successfully parsed](hledger.html#input-files) -- **balancedwithautoconversion** - all transactions are [balanced](hledger.html#postings), - inferring missing amounts where necessary, and possibly converting commodities - using [costs] or automatically-inferred costs +- **autobalanced** - all transactions are [balanced](hledger.html#postings), after converting to cost. + Missing amounts and missing [costs] are inferred automatically where possible. - **assertions** - all [balance assertions] in the journal are passing. (This check can be disabled with `-I`/`--ignore-assertions`.) @@ -50,8 +49,9 @@ Or, they can be run by giving their names as arguments to `check`: - **commodities** - all commodity symbols used [have been declared](hledger.html#commodity-error-checking) -- **balancednoautoconversion** - transactions are balanced, possibly using - explicit costs but not [inferred ones](#costs) +- **balanced** - all transactions are balanced after converting to cost, + without inferring missing costs. + If conversion costs are required, they must be explicit. ### Other checks diff --git a/hledger/hledger.m4.md b/hledger/hledger.m4.md index 3953731ac..65a1e0e4e 100644 --- a/hledger/hledger.m4.md +++ b/hledger/hledger.m4.md @@ -5023,7 +5023,7 @@ This form looks convenient, but there are downsides: So generally this kind of entry is not recommended. You can make sure you have none of these by using `-s` ([strict mode](#strict-mode)), -or by running `hledger check balancednoautoconversion`. +or by running `hledger check balanced`. ## Reporting at cost diff --git a/hledger/test/check-balancednoautoconversion.test b/hledger/test/check-balanced.test similarity index 77% rename from hledger/test/check-balancednoautoconversion.test rename to hledger/test/check-balanced.test index 387cbbc91..aa3d2f917 100644 --- a/hledger/test/check-balancednoautoconversion.test +++ b/hledger/test/check-balanced.test @@ -3,6 +3,6 @@ 2011/01/01 x a -10£ b 16$ -$ hledger -f - check balancednoautoconversion +$ hledger -f - check balanced >2 /real postings' sum should be 0 but is: 16\$, -10£/ >=1 diff --git a/hledger/test/errors/README.md b/hledger/test/errors/README.md index 1a3abdfb7..b1103fbc3 100644 --- a/hledger/test/errors/README.md +++ b/hledger/test/errors/README.md @@ -123,8 +123,8 @@ Click error names to see an example. The table headings mean: |-------------------------------------------------------|------------|------|--------|---------|----------| | [accounts](#accounts) | ✓ | ✓ | ✓ | ✓✓ | ✓ | | [assertions](#assertions) | ✓ | ✓ | ✓ | ✓✓ | ✓ | +| [autobalanced](#autobalanced) | ✓ | ✓ | - | ✓ | ✓ | | [balanced](#balanced) | ✓ | ✓ | - | ✓ | ✓ | -| [balancednoautoconversion](#balancednoautoconversion) | ✓ | ✓ | - | ✓ | ✓ | | [commodities](#commodities) | ✓ | ✓ | ✓ | ✓✓ | ✓ | | [ordereddates](#ordereddates) | ✓ | ✓ | ✓ | ✓✓ | ✓ | | [parseable](#parseable) | ✓ | ✓ | ✓ | ✓✓ | ✓ | @@ -194,9 +194,9 @@ hledger reg 'a$' cur: -I # -f FILE ``` -### balanced +### autobalanced ``` -hledger: Error: /Users/simon/src/hledger/hledger/test/errors/./balanced.j:3-4: +hledger: Error: /Users/simon/src/hledger/hledger/test/errors/./autobalanced.j:3-4: 3 | 2022-01-01 | a 1 @@ -206,9 +206,9 @@ Consider adjusting this entry's amounts, or adding missing postings. ``` -### balancednoautoconversion +### balanced ``` -hledger: Error: /Users/simon/src/hledger/hledger/test/errors/./balancednoautoconversion.j:6-8: +hledger: Error: /Users/simon/src/hledger/hledger/test/errors/./balanced.j:6-8: 6 | 2022-01-01 | a 1 A | b -1 B diff --git a/hledger/test/errors/balancednoautoconversion.j b/hledger/test/errors/balanced.j similarity index 100% rename from hledger/test/errors/balancednoautoconversion.j rename to hledger/test/errors/balanced.j diff --git a/hledger/test/errors/balancednoautoconversion.test b/hledger/test/errors/balanced.test similarity index 67% rename from hledger/test/errors/balancednoautoconversion.test rename to hledger/test/errors/balanced.test index bffb8c723..5d6089267 100644 --- a/hledger/test/errors/balancednoautoconversion.test +++ b/hledger/test/errors/balanced.test @@ -1,5 +1,5 @@ -$ hledger check balancednoautoconversion -f balancednoautoconversion.j ->2 /hledger: Error: .*balancednoautoconversion.j:6-8: +$ hledger check balanced -f balanced.j +>2 /hledger: Error: .*balanced.j:6-8: 6 \| 2022-01-01 \| a 1 A \| b -1 B