diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 867636db..25d533b4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,7 @@ jobs: go install honnef.co/go/tools/cmd/staticcheck@v0.7.0 go install mvdan.cc/gofumpt@v0.9.2 go install github.com/securego/gosec/v2/cmd/gosec@v2.26.1 + go install golang.org/x/tools/cmd/deadcode@v0.45.0 - name: Vet run: go vet ./... @@ -44,6 +45,15 @@ jobs: - name: Staticcheck run: '"$(go env GOPATH)/bin/staticcheck" ./...' + - name: Deadcode + run: | + output_file=$(mktemp) + "$(go env GOPATH)/bin/deadcode" -test ./... > "$output_file" + if [ -s "$output_file" ]; then + cat "$output_file" + exit 1 + fi + - name: Gofumpt run: | changed="$("$(go env GOPATH)/bin/gofumpt" -l .)" diff --git a/go.mod b/go.mod index ccc604ea..1b05f625 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/openclaw/discrawl -go 1.26.3 +go 1.26.4 require ( github.com/alecthomas/kong v1.15.0