diff --git a/pkg/sql/lexbase/sql-gen.sh b/pkg/sql/lexbase/sql-gen.sh index ce891e32c1eb..b242ab6110c5 100755 --- a/pkg/sql/lexbase/sql-gen.sh +++ b/pkg/sql/lexbase/sql-gen.sh @@ -31,4 +31,3 @@ GENYACC=$LANG-gen.y echo "$ret"; exit 1; \ fi; rm $GENYACC - $6 -w $4 diff --git a/pkg/sql/parser/BUILD.bazel b/pkg/sql/parser/BUILD.bazel index d88388e85a12..1f2a3a36ad38 100644 --- a/pkg/sql/parser/BUILD.bazel +++ b/pkg/sql/parser/BUILD.bazel @@ -99,12 +99,10 @@ export HOME=$(GENDIR) export GOPATH=/nonexist-gopath export GOROOT= $(location :sql-gen) $(location sql.y) sql $(location replace_help_rules.awk) \ - $(location sql.go) $(location @org_golang_x_tools//cmd/goyacc) \ - $(location @com_github_cockroachdb_gostdlib//x/tools/cmd/goimports) \ + $(location sql.go) $(location @org_golang_x_tools//cmd/goyacc) """, exec_tools = [ ":sql-gen", - "@com_github_cockroachdb_gostdlib//x/tools/cmd/goimports", "@go_sdk//:bin/go", "@org_golang_x_tools//cmd/goyacc", ], diff --git a/pkg/sql/parser/sql.y b/pkg/sql/parser/sql.y index 6c3b08f3d65e..f873290ff778 100644 --- a/pkg/sql/parser/sql.y +++ b/pkg/sql/parser/sql.y @@ -25,18 +25,16 @@ package parser import ( "fmt" + "math" "strings" "go/constant" "github.com/cockroachdb/cockroach/pkg/geo/geopb" - "github.com/cockroachdb/cockroach/pkg/roachpb" "github.com/cockroachdb/cockroach/pkg/security/username" - "github.com/cockroachdb/cockroach/pkg/sql/lexbase" "github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgcode" "github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgerror" "github.com/cockroachdb/cockroach/pkg/sql/privilege" - "github.com/cockroachdb/cockroach/pkg/sql/roleoption" "github.com/cockroachdb/cockroach/pkg/sql/scanner" "github.com/cockroachdb/cockroach/pkg/sql/sem/tree" "github.com/cockroachdb/cockroach/pkg/sql/sem/tree/treebin" diff --git a/pkg/sql/pgrepl/pgreplparser/BUILD.bazel b/pkg/sql/pgrepl/pgreplparser/BUILD.bazel index d306c7808ffb..a8e62011a661 100644 --- a/pkg/sql/pgrepl/pgreplparser/BUILD.bazel +++ b/pkg/sql/pgrepl/pgreplparser/BUILD.bazel @@ -15,13 +15,11 @@ genrule( cmd = """ export GOPATH=/nonexist-gopath $(location :pgrepl-gen) $(location pgrepl.y) pgrepl ""\ - $(location pgrepl.go) $(location @org_golang_x_tools//cmd/goyacc) \ - $(location @com_github_cockroachdb_gostdlib//x/tools/cmd/goimports) \ + $(location pgrepl.go) $(location @org_golang_x_tools//cmd/goyacc) """, exec_tools = [ ":pgrepl-gen", - "@com_github_cockroachdb_gostdlib//x/tools/cmd/goimports", "@org_golang_x_tools//cmd/goyacc", ], visibility = ["//visibility:public"], diff --git a/pkg/sql/pgrepl/pgreplparser/pgrepl.y b/pkg/sql/pgrepl/pgreplparser/pgrepl.y index b372d76ff664..81515296ccd6 100644 --- a/pkg/sql/pgrepl/pgreplparser/pgrepl.y +++ b/pkg/sql/pgrepl/pgreplparser/pgrepl.y @@ -17,14 +17,11 @@ package pgreplparser import ( - "fmt" - "github.com/cockroachdb/cockroach/pkg/sql/pgrepl/lsn" "github.com/cockroachdb/cockroach/pkg/sql/pgrepl/pgrepltree" "github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgcode" "github.com/cockroachdb/cockroach/pkg/sql/pgwire/pgerror" "github.com/cockroachdb/cockroach/pkg/sql/sem/tree" - "github.com/cockroachdb/redact" ) %} diff --git a/pkg/sql/plpgsql/parser/BUILD.bazel b/pkg/sql/plpgsql/parser/BUILD.bazel index d9267c79f6ef..1a1e40f1d179 100644 --- a/pkg/sql/plpgsql/parser/BUILD.bazel +++ b/pkg/sql/plpgsql/parser/BUILD.bazel @@ -15,13 +15,11 @@ genrule( cmd = """ export GOPATH=/nonexist-gopath $(location :plpgsql-gen) $(location plpgsql.y) plpgsql ""\ - $(location plpgsql.go) $(location @org_golang_x_tools//cmd/goyacc) \ - $(location @com_github_cockroachdb_gostdlib//x/tools/cmd/goimports) \ + $(location plpgsql.go) $(location @org_golang_x_tools//cmd/goyacc) """, exec_tools = [ ":plpgsql-gen", - "@com_github_cockroachdb_gostdlib//x/tools/cmd/goimports", "@org_golang_x_tools//cmd/goyacc", ], visibility = ["//visibility:public"], diff --git a/pkg/sql/plpgsql/parser/plpgsql.y b/pkg/sql/plpgsql/parser/plpgsql.y index 2191fb097915..fa8ce2f44b6a 100644 --- a/pkg/sql/plpgsql/parser/plpgsql.y +++ b/pkg/sql/plpgsql/parser/plpgsql.y @@ -2,7 +2,6 @@ package parser import ( - "github.com/cockroachdb/cockroach/pkg/sql/plpgsql/parser/lexbase" "github.com/cockroachdb/cockroach/pkg/sql/scanner" "github.com/cockroachdb/cockroach/pkg/sql/sem/tree" "github.com/cockroachdb/cockroach/pkg/sql/sem/plpgsqltree" diff --git a/pkg/testutils/lint/lint_test.go b/pkg/testutils/lint/lint_test.go index f6c2ab7adc42..dba7464ea93b 100644 --- a/pkg/testutils/lint/lint_test.go +++ b/pkg/testutils/lint/lint_test.go @@ -1457,7 +1457,7 @@ func TestLint(t *testing.T) { if pkgSpecified { skip.IgnoreLint(t, "PKG specified") } - ignore := `zcgo*|\.(pb(\.gw)?)|(\.[eo]g)\.go|/testdata/|^sql/parser/sql\.go$|(_)?generated(_test)?\.go$` + ignore := `zcgo*|\.(pb(\.gw)?)|(\.[eo]g)\.go|/testdata/|^sql/parser/sql\.go$|(_)?generated(_test)?\.go$|^sql/pgrepl/pgreplparser/pgrepl\.go$|^sql/plpgsql/parser/plpgsql\.go$` cmd, stderr, filter, err := dirCmd(pkgDir, "crlfmt", "-fast", "-ignore", ignore, "-tab", "2", ".") if err != nil { t.Fatal(err)