From ee0f8d3b2081530a4a9a917e2f2c59fc137da268 Mon Sep 17 00:00:00 2001 From: Hendry Wiranto Date: Fri, 17 Nov 2023 19:45:41 +0700 Subject: [PATCH] Remove test file checker (#7) --- pkg/analyzer/analyzer.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/pkg/analyzer/analyzer.go b/pkg/analyzer/analyzer.go index c7c500b..c1023ac 100644 --- a/pkg/analyzer/analyzer.go +++ b/pkg/analyzer/analyzer.go @@ -35,11 +35,6 @@ func run(pass *analysis.Pass) (interface{}, error) { return } - // check if it's a test file - if !isTestFile(pass.Fset.Position(callExpr.Pos()).Filename) { - return - } - selectorExpr, ok := callExpr.Fun.(*ast.SelectorExpr) if !ok { return @@ -58,8 +53,3 @@ func run(pass *analysis.Pass) (interface{}, error) { return nil, nil } - -// isTestFile checks if the file is a test file based on its name. -func isTestFile(filename string) bool { - return strings.HasSuffix(filename, "_test.go") -}