From 0f1458a82530f614d59f8078f5b3a27d9a7db7a4 Mon Sep 17 00:00:00 2001 From: "Andrew S. Brown" Date: Sun, 16 Jan 2022 10:22:57 -0800 Subject: [PATCH] Bump makezero to 1.1.0 Now includes support for multiple makes per line --- go.mod | 2 +- go.sum | 6 ++---- test/testdata/makezero.go | 6 ++++++ 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index 005ca34afad9..4c686f6aab07 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/OpenPeeDeeP/depguard v1.1.0 github.com/alexkohler/prealloc v1.0.0 github.com/ashanbrown/forbidigo v1.3.0 - github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde + github.com/ashanbrown/makezero v1.1.0 github.com/bkielbasa/cyclop v1.2.0 github.com/blizzy78/varnamelen v0.5.0 github.com/bombsimon/wsl/v3 v3.3.0 diff --git a/go.sum b/go.sum index f009b2a97fdb..77cc106288a3 100644 --- a/go.sum +++ b/go.sum @@ -91,12 +91,10 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= -github.com/ashanbrown/forbidigo v1.2.0 h1:RMlEFupPCxQ1IogYOQUnIQwGEUGK8g5vAPMRyJoSxbc= -github.com/ashanbrown/forbidigo v1.2.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= github.com/ashanbrown/forbidigo v1.3.0 h1:VkYIwb/xxdireGAdJNZoo24O4lmnEWkactplBlWTShc= github.com/ashanbrown/forbidigo v1.3.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= -github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde h1:YOsoVXsZQPA9aOTy1g0lAJv5VzZUvwQuZqug8XPeqfM= -github.com/ashanbrown/makezero v0.0.0-20210520155254-b6261585ddde/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= +github.com/ashanbrown/makezero v1.1.0 h1:b2FVq4dTlBpy9f6qxhbyWH+6zy56IETE9cFbBGtDqs8= +github.com/ashanbrown/makezero v1.1.0/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= diff --git a/test/testdata/makezero.go b/test/testdata/makezero.go index e0f47122d8df..40b2ef3cd806 100644 --- a/test/testdata/makezero.go +++ b/test/testdata/makezero.go @@ -8,6 +8,12 @@ func Makezero() []int { return append(x, 1) // ERROR "append to slice `x` with non-zero initialized length" } +func MakezeroMultiple() []int { + x, y := make([]int, math.MaxInt8), make([]int, math.MaxInt8) + return append(x, // ERROR "append to slice `x` with non-zero initialized length" + append(y, 1)...) // ERROR "append to slice `y` with non-zero initialized length" +} + func MakezeroNolint() []int { x := make([]int, math.MaxInt8) return append(x, 1) //nolint:makezero // ok that we're appending to an uninitialized slice