diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 799acad06..4d88a233e 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -61,10 +61,6 @@ jobs: working-directory: src/k8s run: make go.vet - - name: go deadcode - working-directory: src/k8s - run: make go.deadcode - - name: go test working-directory: src/k8s run: make go.unit diff --git a/src/k8s/Makefile b/src/k8s/Makefile index 8e6c40f20..42ad1def1 100644 --- a/src/k8s/Makefile +++ b/src/k8s/Makefile @@ -13,9 +13,6 @@ go.vet: go.unit: $(DQLITE_BUILD_SCRIPTS_DIR)/static-go-test.sh -v ./pkg/... ./cmd/... ./api/... -coverprofile=coverage.txt --cover -go.deadcode: - $(TOOLS_DIR)/deadcode.sh - go.doc: bin/static/k8s bin/static/k8s generate-docs --output-dir ../../docs/src/_parts/commands/ diff --git a/src/k8s/tools/deadcode.sh b/src/k8s/tools/deadcode.sh deleted file mode 100755 index 14bc3604d..000000000 --- a/src/k8s/tools/deadcode.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -eu - -# Build deadcode -TOOLS_DIR="$(realpath `dirname "${0}"`)" -( - cd "${TOOLS_DIR}" - go install golang.org/x/tools/cmd/deadcode -) - -# Run deadcode -DIR="${TOOLS_DIR}/../hack" -. "${DIR}/static-dqlite.sh" -( - cd "${TOOLS_DIR}/.." - x="$($(go env GOPATH)/bin/deadcode -tags dqlite,libsqlite3 -test ./...)" - if [ ! -z "$x" ]; then - echo "$x" - exit 1 - fi -) diff --git a/src/k8s/tools/go.mod b/src/k8s/tools/go.mod index 9c9a9e5de..02a4e8ebf 100644 --- a/src/k8s/tools/go.mod +++ b/src/k8s/tools/go.mod @@ -2,10 +2,7 @@ module github.com/canonical/k8s/tools go 1.22 -require ( - github.com/regclient/regclient v0.6.1 - golang.org/x/tools v0.20.0 -) +require github.com/regclient/regclient v0.6.1 require ( github.com/docker/libtrust v0.0.0-20160708172513-aabc10ec26b7 // indirect @@ -17,9 +14,6 @@ require ( github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/ulikunitz/xz v0.5.12 // indirect - golang.org/x/mod v0.17.0 // indirect - golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.20.0 // indirect - golang.org/x/telemetry v0.0.0-20240405141642-5e7a33625e65 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/src/k8s/tools/go.sum b/src/k8s/tools/go.sum index 1bf76fa9e..42e110ebf 100644 --- a/src/k8s/tools/go.sum +++ b/src/k8s/tools/go.sum @@ -30,17 +30,9 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/ulikunitz/xz v0.5.12 h1:37Nm15o69RwBkXM0J6A5OlE67RZTfzUxTj8fB3dfcsc= github.com/ulikunitz/xz v0.5.12/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -golang.org/x/mod v0.17.0 h1:zY54UmvipHiNd+pm+m0x9KhZ9hl1/7QNMyxXbc6ICqA= -golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/telemetry v0.0.0-20240405141642-5e7a33625e65 h1:2YD4MqNQYEQlI4t931POAM5w8fe4ZFkHRWTJhRIAjz8= -golang.org/x/telemetry v0.0.0-20240405141642-5e7a33625e65/go.mod h1:W6pterlIx28wS98MzYROSpZ8u12XJW5a0ZVeaJ6pfSo= -golang.org/x/tools v0.20.0 h1:hz/CVckiOxybQvFw6h7b/q80NTr9IUQb4s1IIzW7KNY= -golang.org/x/tools v0.20.0/go.mod h1:WvitBU7JJf6A4jOdg4S1tviW9bhUxkgeCui/0JHctQg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/src/k8s/tools/tools.go b/src/k8s/tools/tools.go index ad2694534..1c97d3164 100644 --- a/src/k8s/tools/tools.go +++ b/src/k8s/tools/tools.go @@ -2,5 +2,4 @@ package main import ( _ "github.com/regclient/regclient/cmd/regsync" - _ "golang.org/x/tools/cmd/deadcode" )