Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Jun 10, 2024
1 parent d6a8cb6 commit f86b00c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pkg/golinters/ttempdir/ttempdir.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ import (
)

func New(settings *config.TtempdirSettings) *goanalysis.Linter {
ttempdirAnalyzer := analyzer.New()
a := analyzer.New()

var cfg map[string]map[string]any
if settings != nil {
cfg = map[string]map[string]any{
ttempdirAnalyzer.Name: {
a.Name: {
analyzer.FlagAllName: settings.All,
analyzer.FlagMaxRecursionLevelName: settings.MaxRecursionLevel,
},
}
}

return goanalysis.NewLinter(
ttempdirAnalyzer.Name,
ttempdirAnalyzer.Doc,
[]*analysis.Analyzer{ttempdirAnalyzer},
a.Name,
"Detects the use of os.MkdirTemp, ioutil.TempDir or os.TempDir instead of t.TempDir",
[]*analysis.Analyzer{a},
cfg,
).WithLoadMode(goanalysis.LoadModeSyntax)
}

0 comments on commit f86b00c

Please sign in to comment.