;check: accept parseable/autobalanced/assertions as arguments, for completeness
This commit is contained in:
		
							parent
							
								
									7510d99aec
								
							
						
					
					
						commit
						b15a634a44
					
				| @ -52,11 +52,19 @@ cliOptsUpdateReportSpecWith roptsupdate copts@CliOpts{reportspec_} = | |||||||
|     Right rs -> copts{reportspec_=rs} |     Right rs -> copts{reportspec_=rs} | ||||||
| 
 | 
 | ||||||
| -- | A type of error check that we can perform on the data. | -- | A type of error check that we can perform on the data. | ||||||
| -- (Currently, just the optional checks that only the check command | -- Some of these imply other checks that are done first, | ||||||
| -- can do; not the checks done by default or with --strict.) | -- eg currently Parseable and Autobalanced are always done, | ||||||
|  | -- and Assertions are always done unless -I is in effect. | ||||||
| data Check = | data Check = | ||||||
|     Accounts |   -- done always | ||||||
|  |     Parseable | ||||||
|  |   | Autobalanced | ||||||
|  |   -- done always unless -I is used | ||||||
|  |   | Assertions | ||||||
|  |   -- done when -s is used, or on demand by check | ||||||
|  |   | Accounts | ||||||
|   | Commodities |   | Commodities | ||||||
|  |   -- done on demand by check | ||||||
|   | Ordereddates |   | Ordereddates | ||||||
|   | Payees |   | Payees | ||||||
|   | Uniqueleafnames |   | Uniqueleafnames | ||||||
| @ -105,6 +113,8 @@ runCheck copts@CliOpts{rawopts_} j (check,args) = do | |||||||
|       Ordereddates    -> journalCheckOrdereddates copts' j |       Ordereddates    -> journalCheckOrdereddates copts' j | ||||||
|       Payees          -> journalCheckPayeesDeclared j |       Payees          -> journalCheckPayeesDeclared j | ||||||
|       Uniqueleafnames -> journalCheckUniqueleafnames j |       Uniqueleafnames -> journalCheckUniqueleafnames j | ||||||
|  |       -- the other checks have been done earlier during withJournalDo | ||||||
|  |       _               -> Right () | ||||||
| 
 | 
 | ||||||
|   case results of |   case results of | ||||||
|     Right () -> return () |     Right () -> return () | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user