Skip to content

Commit 1ab85de

Browse files
add IgnoreTests to API, so API users can exclude tests as well. (#17)
1 parent c926a3f commit 1ab85de

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

api.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ type Issue struct {
1313
}
1414

1515
type Config struct {
16+
IgnoreTests bool
1617
MatchWithConstants bool
1718
MinStringLength int
1819
MinOccurrences int
@@ -26,7 +27,7 @@ func Run(files []*ast.File, fset *token.FileSet, cfg *Config) ([]Issue, error) {
2627
p := New(
2728
"",
2829
"",
29-
false,
30+
cfg.IgnoreTests,
3031
cfg.MatchWithConstants,
3132
cfg.ParseNumbers,
3233
cfg.NumberMin,

0 commit comments

Comments
 (0)