doctor

package
v0.0.0-...-4420375 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 6, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ProblemNotFullySplit identifies a split transaction whose bucketed children do not sum
	// to the transaction amount. This leads to an imbalance that doesn't show up as
	// unassigned.
	ProblemNotFullySplit = 1
	// ProblemSplitParentAssignedBucket identifies a split transaction that is itself assigned
	// a bucket. Only the children should be assigned to buckets. This problem has never been
	// observed in an actual MoneyWell document.
	ProblemSplitParentAssignedBucket = 2
	// ProblemTransferInsideCashFlowAssignedBucket identifies a transfer that should not be
	// assigned a bucket since both accounts are inside the cash flow.
	ProblemTransferInsideCashFlowAssignedBucket = 3
	// ProblemTransferOutsideCashFlowAssignedBucket identifies a transfer that should not be
	// assigned a bucket since both accounts are outside the cash flow.
	ProblemTransferOutsideCashFlowAssignedBucket = 4
	// ProblemTransferOutOfCashFlowMissingBucket identifies a transfer that should be assigned
	// a bucket since it moves money out of the cash flow.
	ProblemTransferOutOfCashFlowMissingBucket = 5
	// ProblemTransferFromCashFlowAssignedBucket identifies a transfer that should not be
	// assigned a bucket since it receives money from inside the cash flow.
	ProblemTransferFromCashFlowAssignedBucket = 6
	// ProblemBucketOptionalInsideCashFlow identifies a transaction marked as bucket optional
	// that should not be.
	ProblemBucketOptionalInsideCashFlow = 7
	// ProblemMissingBucketInsideCashFlow identifies a transaction missing an assigned bucket.
	ProblemMissingBucketInsideCashFlow = 8
	// ProblemBucketOutsideCashFlow identifies a non-transfer transaction incorrectly having
	// a transaction assigned.
	ProblemBucketOutsideCashFlow = 9
)

Variables

This section is empty.

Functions

func Diagnose

func Diagnose(moneywellPath string) error

Diagnose analyzes the given MoneyWell document for potential issues.

Types

type ProblematicTransaction

type ProblematicTransaction struct {
	Transaction int64
	Problem     int
	Description string
}

ProblematicTranscations represents a transaction diagnosed with a potential problem.

func GetProblematicTransactions

func GetProblematicTransactions(
	settings api.Settings,
	accounts []api.Account,
	transactions []api.Transaction,
) ([]ProblematicTransaction, error)

GetProblematicTransactions finds transactions with potential problems, typically leading to an imbalance between accounts and buckets within MoneyWell.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL