20 lines
		
	
	
		
			394 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			394 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| package golinters
 | |
| 
 | |
| import (
 | |
| 	"github.com/sonatard/noctx"
 | |
| 	"golang.org/x/tools/go/analysis"
 | |
| 
 | |
| 	"github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
 | |
| )
 | |
| 
 | |
| func NewNoctx() *goanalysis.Linter {
 | |
| 	a := noctx.Analyzer
 | |
| 
 | |
| 	return goanalysis.NewLinter(
 | |
| 		a.Name,
 | |
| 		"Finds sending http request without context.Context",
 | |
| 		[]*analysis.Analyzer{a},
 | |
| 		nil,
 | |
| 	).WithLoadMode(goanalysis.LoadModeTypesInfo)
 | |
| }
 | 
