chore: bump golangci-lint and fix all linting issues (#21761)
This commit is contained in:
@@ -139,7 +139,7 @@ func ListenerMux(listeners ...Listener) Listener {
|
||||
|
||||
mux.onBatch = func(batch PacketBatch) error {
|
||||
for _, listener := range listeners {
|
||||
err := batch.apply(&listener)
|
||||
err := batch.apply(&listener) //nolint:gosec // aliasing is safe here
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -332,6 +332,8 @@ func TestCompareModuleSchemas(t *testing.T) {
|
||||
}
|
||||
|
||||
func requireModuleSchema(t *testing.T, types ...schema.Type) schema.ModuleSchema {
|
||||
t.Helper()
|
||||
|
||||
s, err := schema.CompileModuleSchema(types...)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ func (c Field) ValidateValue(value interface{}, typeSet TypeSet) error {
|
||||
}
|
||||
err := enumType.ValidateValue(value.(string))
|
||||
if err != nil {
|
||||
return fmt.Errorf("invalid value for enum field %q: %v", c.Name, err)
|
||||
return fmt.Errorf("invalid value for enum field %q: %v", c.Name, err) //nolint:errorlint // false positive due to using go1.12
|
||||
}
|
||||
default:
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ func TestAppSimulator_mirror(t *testing.T) {
|
||||
})
|
||||
}
|
||||
|
||||
func testAppSimulatorMirror(t *testing.T, retainDeletes bool) { // nolint: thelper // this isn't a test helper function
|
||||
func testAppSimulatorMirror(t *testing.T, retainDeletes bool) { //nolint: thelper // this isn't a test helper function
|
||||
stateSimOpts := statesim.Options{CanRetainDeletions: retainDeletes}
|
||||
mirror, err := NewSimulator(Options{
|
||||
StateSimOptions: stateSimOpts,
|
||||
|
||||
Reference in New Issue
Block a user