hledger-lib-1.41: A library providing the core functionality of hledger

Safe Haskell | None
Language | Haskell2010

Hledger.Data.JournalChecks

Description

Various additional validation checks that can be performed on a Journal. Some are called as part of reading a file in strict mode, others can be called only via the check command.

Synopsis

- journalStrictChecks :: Journal -> Either String ()
- journalCheckAccounts :: Journal -> Either String ()
- journalCheckBalanceAssertions :: Journal -> Either String ()
- journalCheckCommodities :: Journal -> Either String ()
- journalCheckPayees :: Journal -> Either String ()
- journalCheckPairedConversionPostings :: Journal -> Either String ()
- journalCheckRecentAssertions :: Journal -> Either String ()
- journalCheckTags :: Journal -> Either String ()
- module Hledger.Data.JournalChecks.Ordereddates
- module Hledger.Data.JournalChecks.Uniqueleafnames

# Documentation

journalStrictChecks :: Journal -> Either String () #

Run the extra -s/--strict checks on a journal, in order of priority, returning the first error message if any of them fail.

journalCheckAccounts :: Journal -> Either String () #

Check that all the journal's postings are to accounts with account directives, returning an error message otherwise.

journalCheckBalanceAssertions :: Journal -> Either String () #

Check all balance assertions in the journal and return an error message if any of them fail. (Technically, this also tries to balance the journal and can return balancing failure errors; ensure the journal is already balanced (with journalBalanceTransactions) to avoid this.)

journalCheckCommodities :: Journal -> Either String () #

Check that all the commodities used in this journal's postings and P directives have been declared by commodity directives, returning an error message otherwise.

journalCheckPayees :: Journal -> Either String () #

Check that all the journal's transactions have payees declared with payee directives, returning an error message otherwise.

journalCheckPairedConversionPostings :: Journal -> Either String () #

In each tranaction, check that any conversion postings occur in adjacent pairs.

journalCheckRecentAssertions :: Journal -> Either String () #

Check that accounts with balance assertions have no posting more than maxlag days after their latest balance assertion.

journalCheckTags :: Journal -> Either String () #

Check that all the journal's tags (on accounts, transactions, postings..) have been declared with tag directives, returning an error message otherwise.

module Hledger.Data.JournalChecks.Ordereddates

module Hledger.Data.JournalChecks.Uniqueleafnames