@@ -18,28 +18,30 @@ func New(settings *config.GodoxSettings) *goanalysis.Linter {
1818		Name : linterName ,
1919		Doc :  goanalysis .TheOnlyanalyzerDoc ,
2020		Run : func (pass  * analysis.Pass ) (any , error ) {
21- 			runGodox (pass , settings )
22- 
23- 			return  nil , nil 
21+ 			return  run (pass , settings ), nil 
2422		},
2523	}
2624
2725	return  goanalysis .NewLinter (
2826		linterName ,
29- 		"Tool for detection  of FIXME, TODO and other comment  keywords" ,
27+ 		"Detects usage  of FIXME, TODO and other keywords inside comments " ,
3028		[]* analysis.Analyzer {analyzer },
3129		nil ,
3230	).WithLoadMode (goanalysis .LoadModeSyntax )
3331}
3432
35- func  runGodox (pass  * analysis.Pass , settings  * config.GodoxSettings ) {
33+ func  run (pass  * analysis.Pass , settings  * config.GodoxSettings )  error  {
3634	for  _ , file  :=  range  pass .Files  {
3735		position , isGoFile  :=  goanalysis .GetGoFilePosition (pass , file )
3836		if  ! isGoFile  {
3937			continue 
4038		}
4139
42- 		messages  :=  godox .Run (file , pass .Fset , settings .Keywords ... )
40+ 		messages , err  :=  godox .Run (file , pass .Fset , settings .Keywords ... )
41+ 		if  err  !=  nil  {
42+ 			return  err 
43+ 		}
44+ 
4345		if  len (messages ) ==  0  {
4446			continue 
4547		}
@@ -55,4 +57,6 @@ func runGodox(pass *analysis.Pass, settings *config.GodoxSettings) {
5557			})
5658		}
5759	}
60+ 
61+ 	return  nil 
5862}
0 commit comments