diff --git a/hledger-lib/Hledger/Data/JournalChecks.hs b/hledger-lib/Hledger/Data/JournalChecks.hs index dba78ce7a..a5a3ba3a9 100644 --- a/hledger-lib/Hledger/Data/JournalChecks.hs +++ b/hledger-lib/Hledger/Data/JournalChecks.hs @@ -186,7 +186,7 @@ journalCheckTags j = do -- where -- col = T.length (showTransactionLineFirstPart txn') + 2 -- col2 = col + T.length tagname - 1 - declaredtags = journalTagsDeclared j + declaredtags = journalTagsDeclared j ++ builtinTags msg = (unlines [ "%s:%d:" ,"%s" @@ -197,6 +197,19 @@ journalCheckTags j = do ,"tag %s" ]) +-- | Tag names which have special significance to hledger. +builtinTags = [ + "type" -- declares an account's type + ,"t" -- generated by timedot letters notation + -- optionally generated on periodic transactions and auto postings + ,"generated-transaction" + ,"generated-posting" + -- used internally, not shown (but queryable) + ,"_generated-transaction" + ,"_generated-posting" + ,"_conversion-matched" + ] + -- | In each tranaction, check that any conversion postings occur in adjacent pairs. journalCheckPairedConversionPostings :: Journal -> Either String () journalCheckPairedConversionPostings j =