From: Keith Randall Date: Mon, 6 Aug 2018 17:42:28 +0000 (-0700) Subject: cmd/compile: remove vet-blocking hack X-Git-Tag: go1.12beta1~1267 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=4a4e3b0bc7e74aa45ac29bf1446e9af69ec13dcd;p=gostls13.git cmd/compile: remove vet-blocking hack ...and add the vet failures to the vet whitelist. Change-Id: Idcf4289f39dda561c85f3b0afe396e5299e6495f Reviewed-on: https://go-review.googlesource.com/127995 Run-TryBot: Keith Randall TryBot-Result: Gobot Gobot Reviewed-by: David Chase --- diff --git a/src/cmd/compile/internal/gc/testdata/novet.go b/src/cmd/compile/internal/gc/testdata/novet.go deleted file mode 100644 index 0fcbba290c..0000000000 --- a/src/cmd/compile/internal/gc/testdata/novet.go +++ /dev/null @@ -1,9 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// This file exists just to convince vet not to check this directory. -// (vet will not check a directory with two different packages in it.) -// TODO: remove this hack & add failing tests to the whitelist. - -package foo diff --git a/src/cmd/vet/all/whitelist/all.txt b/src/cmd/vet/all/whitelist/all.txt index 397ee4e987..b974d21c6a 100644 --- a/src/cmd/vet/all/whitelist/all.txt +++ b/src/cmd/vet/all/whitelist/all.txt @@ -28,6 +28,25 @@ encoding/json/tagkey_test.go: struct field tag `:"BadFormat"` not compatible wit runtime/testdata/testprog/deadlock.go: unreachable code runtime/testdata/testprog/deadlock.go: unreachable code +// Compiler tests that make sure even vet-failing code adheres to the spec. +cmd/compile/internal/gc/testdata/arithConst_test.go: a (64 bits) too small for shift of 4294967296 +cmd/compile/internal/gc/testdata/arithConst_test.go: a (64 bits) too small for shift of 4294967296 +cmd/compile/internal/gc/testdata/arithConst_test.go: a (32 bits) too small for shift of 4294967295 +cmd/compile/internal/gc/testdata/arithConst_test.go: a (32 bits) too small for shift of 4294967295 +cmd/compile/internal/gc/testdata/arithConst_test.go: a (16 bits) too small for shift of 65535 +cmd/compile/internal/gc/testdata/arithConst_test.go: a (16 bits) too small for shift of 65535 +cmd/compile/internal/gc/testdata/arithConst_test.go: a (8 bits) too small for shift of 255 +cmd/compile/internal/gc/testdata/arithConst_test.go: a (8 bits) too small for shift of 255 +cmd/compile/internal/gc/testdata/arith_test.go: x (64 bits) too small for shift of 100 +cmd/compile/internal/gc/testdata/arith_test.go: int32(x) (32 bits) too small for shift of 4294967295 +cmd/compile/internal/gc/testdata/arith_test.go: int16(x) (16 bits) too small for shift of 65535 +cmd/compile/internal/gc/testdata/arith_test.go: int8(x) (8 bits) too small for shift of 255 +cmd/compile/internal/gc/testdata/arith_test.go: w (32 bits) too small for shift of 32 +cmd/compile/internal/gc/testdata/break_test.go: unreachable code +cmd/compile/internal/gc/testdata/break_test.go: unreachable code +cmd/compile/internal/gc/testdata/namedReturn_test.go: self-assignment of t to t +cmd/compile/internal/gc/testdata/short_test.go: unreachable code + // Non-standard method signatures. // These cases are basically ok. // Errors are handled reasonably and there's no clear need for interface satisfaction.