Skip to content

Commit

Permalink
lint: simplify TestRoachVet
Browse files Browse the repository at this point in the history
Release note: None
  • Loading branch information
knz committed Dec 18, 2020
1 parent 6c22bf4 commit 77e0156
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions pkg/testutils/lint/lint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1931,11 +1931,9 @@ func TestLint(t *testing.T) {
filters := []stream.Filter{
// Ignore generated files.
stream.GrepNot(`pkg/.*\.pb\.go:`),
stream.GrepNot(`pkg/col/coldata/.*\.eg\.go:`),
stream.GrepNot(`pkg/col/colserde/arrowserde/.*_generated\.go:`),
stream.GrepNot(`pkg/sql/colexec/.*\.eg\.go:`),
stream.GrepNot(`pkg/sql/colexec/.*_generated\.go:`),
stream.GrepNot(`pkg/sql/pgwire/hba/conf.go:`),
stream.GrepNot(`pkg/.*\.pb\.gw\.go:`),
stream.GrepNot(`pkg/.*\.[eo]g\.go:`),
stream.GrepNot(`pkg/.*_generated\.go:`),

// Ignore types that can change by system.
stream.GrepNot(`pkg/util/sysutil/sysutil_unix.go:`),
Expand All @@ -1945,19 +1943,10 @@ func TestLint(t *testing.T) {
stream.GrepNot(`include/jemalloc/jemalloc\.h`),

stream.GrepNot(`declaration of "?(pE|e)rr"? shadows`),
stream.GrepNot(`\.pb\.gw\.go:[0-9:]+: declaration of "?ctx"? shadows`),
stream.GrepNot(`\.[eo]g\.go:[0-9:]+: declaration of ".*" shadows`),
// This exception is for hash.go, which re-implements runtime.noescape
// for efficient hashing.
stream.GrepNot(`pkg/sql/colexec/hash.go:[0-9:]+: possible misuse of unsafe.Pointer`),
stream.GrepNot(`^#`), // comment line
// This exception is for the colexec generated files.
stream.GrepNot(`pkg/sql/colexec/.*\.eg.go:[0-9:]+: self-assignment of .* to .*`),
// Roachpb generated switch on `error`. It's OK for now because
// the inner error is always unwrapped (it's a protobuf
// enum). Eventually we want to use generalized error
// encode/decode instead and drop the linter exception.
stream.GrepNot(`pkg/roachpb/batch_generated\.go:.*invalid direct cast on error object`),
// Roachpb's own error package takes ownership of error unwraps
// (by enforcing that errors can never been wrapped under a
// roachpb.Error, which is an inconvenient limitation but it is
Expand Down

0 comments on commit 77e0156

Please sign in to comment.