Skip to content

Commit

Permalink
Remove test file checker (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
hendrywiranto authored Nov 17, 2023
1 parent 3285549 commit ee0f8d3
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions pkg/analyzer/analyzer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
}

0 comments on commit ee0f8d3

Please sign in to comment.