hledger-lib-1.30: A reusable library providing the core functionality of hledger

Safe Haskell | Safe-Inferred
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

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

# Documentation

journalCheckAccounts :: Journal -> Either String () Source #

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

journalCheckCommodities :: Journal -> Either String () Source #

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

journalCheckPayees :: Journal -> Either String () Source #

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

journalCheckPairedConversionPostings :: Journal -> Either String () Source #

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

journalCheckRecentAssertions :: Day -> Journal -> Either String () Source #

Check that all the journal's accounts with balance assertions have an assertion no more than 7 days before their latest posting. Today's date is provided for error messages.

journalCheckTags :: Journal -> Either String () Source #

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