-
Notifications
You must be signed in to change notification settings - Fork 81
/
option.go
32 lines (28 loc) · 840 Bytes
/
option.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package gocloc
import "regexp"
// ClocOptions is gocloc processor options.
type ClocOptions struct {
Debug bool
SkipDuplicated bool
ExcludeExts map[string]struct{}
IncludeLangs map[string]struct{}
ReNotMatch *regexp.Regexp
ReMatch *regexp.Regexp
ReNotMatchDir *regexp.Regexp
ReMatchDir *regexp.Regexp
// OnCode is triggered for each line of code.
OnCode func(line string)
// OnBlack is triggered for each blank line.
OnBlank func(line string)
// OnComment is triggered for each line of comments.
OnComment func(line string)
}
// NewClocOptions create new ClocOptions with default values.
func NewClocOptions() *ClocOptions {
return &ClocOptions{
Debug: false,
SkipDuplicated: false,
ExcludeExts: make(map[string]struct{}),
IncludeLangs: make(map[string]struct{}),
}
}