cli: "balanced" check is enabled only with "check" command
This commit is contained in:
parent
2e6bc32820
commit
4f9473240f
@ -199,14 +199,14 @@ rawOptsToInputOpts day usecoloronstdout postingaccttags rawopts =
|
|||||||
|
|
||||||
let
|
let
|
||||||
-- Allow/disallow implicit-cost conversion transactions, according to policy in Check.md.
|
-- Allow/disallow implicit-cost conversion transactions, according to policy in Check.md.
|
||||||
-- Disallow them if we see the --strict flag, or if we see a "balanced" argument,
|
-- Disallow them if we see the --strict flag, or if we see a "balanced" argument with the "check" command,
|
||||||
-- which we assume means the user is running "hledger check balanced".
|
-- which we assume means the user is running "hledger check balanced".
|
||||||
-- XXX #2377 The check was originally named "balancednoautoconversion",
|
-- XXX #2377 The check was originally named "balancednoautoconversion",
|
||||||
-- but later it was renamed, so this is no longer good; any command with "balanced"
|
-- but later it was renamed, so this is no longer good; any command with "balanced"
|
||||||
-- as an argument will also enable this check, normally enabled only in strict mode.
|
-- as an argument will also enable this check, normally enabled only in strict mode.
|
||||||
noinferbalancingcosts = -- keep synced with Check.*
|
noinferbalancingcosts = -- keep synced with Check.*
|
||||||
boolopt "strict" rawopts
|
boolopt "strict" rawopts
|
||||||
|| stringopt "args" rawopts == "balanced"
|
|| (stringopt "args" rawopts == "balanced" && stringopt "command" rawopts == "check")
|
||||||
|
|
||||||
-- Do we really need to do all this work just to get the requested end date? This is duplicating
|
-- Do we really need to do all this work just to get the requested end date? This is duplicating
|
||||||
-- much of reportOptsToSpec.
|
-- much of reportOptsToSpec.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user