Skip to content

build(deps): bump github.com/matoous/godox from 0.0.0-20230222163458-006bad1f9d26 to 1.1.0 #5355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ require (
github.com/macabu/inamedparam v0.1.3
github.com/maratori/testableexamples v1.0.0
github.com/maratori/testpackage v1.1.1
github.com/matoous/godox v0.0.0-20230222163458-006bad1f9d26
github.com/matoous/godox v1.1.0
github.com/mattn/go-colorable v0.1.14
github.com/mgechev/revive v1.6.0
github.com/mitchellh/go-homedir v1.1.0
Expand Down
5 changes: 2 additions & 3 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 10 additions & 6 deletions pkg/golinters/godox/godox.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,30 @@ func New(settings *config.GodoxSettings) *goanalysis.Linter {
Name: linterName,
Doc: goanalysis.TheOnlyanalyzerDoc,
Run: func(pass *analysis.Pass) (any, error) {
runGodox(pass, settings)

return nil, nil
return run(pass, settings), nil
},
}

return goanalysis.NewLinter(
linterName,
"Tool for detection of FIXME, TODO and other comment keywords",
"Detects usage of FIXME, TODO and other keywords inside comments",
[]*analysis.Analyzer{analyzer},
nil,
).WithLoadMode(goanalysis.LoadModeSyntax)
}

func runGodox(pass *analysis.Pass, settings *config.GodoxSettings) {
func run(pass *analysis.Pass, settings *config.GodoxSettings) error {
for _, file := range pass.Files {
position, isGoFile := goanalysis.GetGoFilePosition(pass, file)
if !isGoFile {
continue
}

messages := godox.Run(file, pass.Fset, settings.Keywords...)
messages, err := godox.Run(file, pass.Fset, settings.Keywords...)
if err != nil {
return err
}

if len(messages) == 0 {
continue
}
Expand All @@ -55,4 +57,6 @@ func runGodox(pass *analysis.Pass, settings *config.GodoxSettings) {
})
}
}

return nil
}
Loading