File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ func Test_settingsWrapper_InferEnabledChecks(t *testing.T) {
4040 t .Logf ("enabled by default checks:\n %s" , strings .Join (enabledByDefaultChecks , "\n " ))
4141
4242 insert := func (in []string , toInsert ... string ) []string {
43- return append ( slices .Clone (in ) , toInsert ... )
43+ return slices .Concat (in , toInsert )
4444 }
4545
4646 remove := func (in []string , toRemove ... string ) []string {
Original file line number Diff line number Diff line change 11package lintersdb
22
33import (
4+ "slices"
45 "testing"
56
67 "github.com/stretchr/testify/require"
@@ -113,9 +114,7 @@ func TestValidator_Validate(t *testing.T) {
113114
114115 v := NewValidator (m )
115116
116- var testCases []validatorTestCase
117- testCases = append (testCases , validateLintersNamesTestCases ... )
118- testCases = append (testCases , validatePresetsTestCases ... )
117+ testCases := slices .Concat (validateLintersNamesTestCases , validatePresetsTestCases )
119118
120119 for _ , test := range testCases {
121120 t .Run (test .desc , func (t * testing.T ) {
@@ -133,9 +132,7 @@ func TestValidator_Validate_error(t *testing.T) {
133132
134133 v := NewValidator (m )
135134
136- var testCases []validateErrorTestCase
137- testCases = append (testCases , validateLintersNamesErrorTestCases ... )
138- testCases = append (testCases , validatePresetsErrorTestCases ... )
135+ testCases := slices .Concat (validateLintersNamesErrorTestCases , validatePresetsErrorTestCases )
139136
140137 for _ , test := range testCases {
141138 t .Run (test .desc , func (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments