github.com/nozzle/golangci-lint@v1.49.0-nz3/test/testdata/thelper_go118.go (about)

     1  //go:build go1.18
     2  
     3  //golangcitest:args -Ethelper
     4  package testdata
     5  
     6  import "testing"
     7  
     8  func fhelperWithHelperAfterAssignment(f *testing.F) { // want "test helper function should start from f.Helper()"
     9  	_ = 0
    10  	f.Helper()
    11  }
    12  
    13  func fhelperWithNotFirst(s string, f *testing.F, i int) { // want `parameter \*testing.F should be the first`
    14  	f.Helper()
    15  }
    16  
    17  func fhelperWithIncorrectName(o *testing.F) { // want `parameter \*testing.F should have name f`
    18  	o.Helper()
    19  }
    20  
    21  func FuzzSubtestShouldNotBeChecked(f *testing.F) {
    22  	f.Add(5, "hello")
    23  	f.Fuzz(func(t *testing.T, a int, b string) {})
    24  }