@@ -367,38 +367,19 @@ func TestUnsafeOk(t *testing.T) {
367367}
368368
369369func TestSortedResults (t * testing.T ) {
370- testCases := []struct {
371- opt string
372- want string
373- }{
374- {
375- opt : "--sort-results=false" ,
376- want : "testdata/sort_results/main.go:15:13: Error return value is not checked (errcheck)" + "\n " +
377- "testdata/sort_results/main.go:12:5: var `db` is unused (unused)" ,
378- },
379- {
380- opt : "--sort-results=true" ,
381- want : "testdata/sort_results/main.go:12:5: var `db` is unused (unused)" + "\n " +
382- "testdata/sort_results/main.go:15:13: Error return value is not checked (errcheck)" ,
383- },
384- }
385-
386370 binPath := testshared .InstallGolangciLint (t )
387371
388- for _ , test := range testCases {
389- t .Run (test .opt , func (t * testing.T ) {
390- t .Parallel ()
391-
392- testshared .NewRunnerBuilder (t ).
393- WithNoConfig ().
394- WithArgs ("--output.text.print-issued-lines=false" , test .opt ).
395- WithTargetPath (testdataDir , "sort_results" ).
396- WithBinPath (binPath ).
397- Runner ().
398- Run ().
399- ExpectExitCode (exitcodes .IssuesFound ).ExpectOutputEq (test .want + "\n " )
400- })
401- }
372+ testshared .NewRunnerBuilder (t ).
373+ WithNoConfig ().
374+ WithArgs ("--output.text.print-issued-lines=false" ).
375+ WithTargetPath (testdataDir , "sort_results" ).
376+ WithBinPath (binPath ).
377+ Runner ().
378+ Run ().
379+ ExpectExitCode (exitcodes .IssuesFound ).ExpectOutputEq (
380+ "testdata/sort_results/main.go:15:13: Error return value is not checked (errcheck)" + "\n " +
381+ "testdata/sort_results/main.go:12:5: var `db` is unused (unused)" + "\n " ,
382+ )
402383}
403384
404385func TestIdentifierUsedOnlyInTests (t * testing.T ) {
0 commit comments