Skip to content
This repository has been archived by the owner on Mar 18, 2022. It is now read-only.

Add an option to ignore tests #1

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,11 @@ type Config struct {
MatchWithConstants bool
MinStringLength int
MinOccurrences int
IgnoreTests bool
}

func Run(files []*ast.File, fset *token.FileSet, cfg *Config) ([]Issue, error) {
p := New("", "", false, cfg.MatchWithConstants, false, cfg.MinStringLength)
p := New("", "", cfg.IgnoreTests, cfg.MatchWithConstants, false, cfg.MinStringLength)
var issues []Issue
for _, f := range files {
ast.Walk(&treeVisitor{
Expand Down