all repos

clerk @ e2e9e2b27783c07fe5724268bf7ae828b3aacac7

missing tooling for ledger/hledger

clerk/internal/linter/rules.go (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
lint: add duplicated-transaction, 1 day ago
1
package linter
2
3
import "olexsmir.xyz/clerk/internal/analyzer"
4
5
type RuleID string
6
7
// Rule is the best interface that every rule must implement.
8
type Rule interface {
9
	ID() RuleID
10
	Severity() Severity
11
	CheckJournal(an *analyzer.Analysis) []Find
12
}
13
14
// Rules is list of all available rules.
15
var Rules = []Rule{
16
	&ParseError{},
17
	&EmptyPostings{},
18
	&OmittedPrecision{},
19
	&MissingCommodity{},
20
	&MissingStatus{},
21
	&MissingPayee{},
22
	&AccountDepthLimit{MaxDepth: 4},
23
	&MultipleOmittedAmounts{},
24
	&OrderDate{},
25
	&DuplicatedAccount{},
26
	&DuplicatedCommodity{},
27
	&DuplicatedTransaction{},
28
	&UndeclaredCommodity{},
29
	&UndeclaredAccount{},
30
	&UnbalancedTransaction{},
31
	// &UnusedAccount{},
32
}