mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-19 18:29:36 +03:00
;check errors: drop unwanted newline & "strict mode" prefix
This commit is contained in:
parent
b47d582583
commit
e59603a04a
@ -377,7 +377,7 @@ journalCheckPayeesDeclared j = sequence_ $ map checkpayee $ jtxns j
|
|||||||
checkpayee t
|
checkpayee t
|
||||||
| p `elem` ps = Right ()
|
| p `elem` ps = Right ()
|
||||||
| otherwise =
|
| otherwise =
|
||||||
Left $ "\nundeclared payee \""++T.unpack p++"\""
|
Left $ "undeclared payee \""++T.unpack p++"\""
|
||||||
++ "\nin transaction at: "++showGenericSourcePos (tsourcepos t)
|
++ "\nin transaction at: "++showGenericSourcePos (tsourcepos t)
|
||||||
where
|
where
|
||||||
p = transactionPayee t
|
p = transactionPayee t
|
||||||
@ -391,7 +391,7 @@ journalCheckAccountsDeclared j = sequence_ $ map checkacct $ journalPostings j
|
|||||||
checkacct Posting{paccount,ptransaction}
|
checkacct Posting{paccount,ptransaction}
|
||||||
| paccount `elem` as = Right ()
|
| paccount `elem` as = Right ()
|
||||||
| otherwise =
|
| otherwise =
|
||||||
Left $ "\nstrict mode: undeclared account \""++T.unpack paccount++"\""
|
Left $ "undeclared account \""++T.unpack paccount++"\""
|
||||||
++ case ptransaction of
|
++ case ptransaction of
|
||||||
Just Transaction{tsourcepos} -> "\nin transaction at: "++showGenericSourcePos tsourcepos
|
Just Transaction{tsourcepos} -> "\nin transaction at: "++showGenericSourcePos tsourcepos
|
||||||
Nothing -> ""
|
Nothing -> ""
|
||||||
@ -407,8 +407,7 @@ journalCheckCommoditiesDeclared j =
|
|||||||
checkcommodities Posting{..} =
|
checkcommodities Posting{..} =
|
||||||
case mfirstundeclaredcomm of
|
case mfirstundeclaredcomm of
|
||||||
Nothing -> Right ()
|
Nothing -> Right ()
|
||||||
Just c -> Left $
|
Just c -> Left $ "undeclared commodity \""++T.unpack c++"\""
|
||||||
"\nstrict mode: undeclared commodity \""++T.unpack c++"\""
|
|
||||||
++ case ptransaction of
|
++ case ptransaction of
|
||||||
Just Transaction{tsourcepos} -> "\nin transaction at: "++showGenericSourcePos tsourcepos
|
Just Transaction{tsourcepos} -> "\nin transaction at: "++showGenericSourcePos tsourcepos
|
||||||
Nothing -> ""
|
Nothing -> ""
|
||||||
|
Loading…
Reference in New Issue
Block a user