Files
go-lint/pkg/httpstatus/analyzer_test.go
~wispem-wantex f5b6076dce
All checks were successful
CI / test (push) Successful in 33s
linters: add autofix for httpstatus
2026-10-18 16:14:14 -07:00

23 lines
553 B
Go

package httpstatus_test
import (
"testing"
"golang.org/x/tools/go/analysis/analysistest"
"git.offline-twitter.com/offline-labs/go-lint/pkg/httpstatus"
)
func TestAnalyzer(t *testing.T) {
analysistest.RunWithSuggestedFixes(t, analysistest.TestData(), httpstatus.Analyzer, "default")
}
func TestAnalyzerWithSettings(t *testing.T) {
analyzer := httpstatus.NewAnalyzer(httpstatus.Settings{
TypicalStatusCodes: []int{201},
IsRestricted: true,
})
analysistest.RunWithSuggestedFixes(t, analysistest.TestData(), analyzer, "configured")
}