tools/internal/cmd/deadcode
Alan Donovan aac7fb67ae internal/cmd/deadcode: a command to report dead code in Go programs
This CL adds a command to report functions that are unreachable
from the main functions of applications and tests.

It uses the Rapid Type Analysis (RTA) algorithm to
compute reachability, and reports all functions referenced
by the SSA representation that were not found to be
reachable, grouped by package and sorted by position.

Also, a basic integration test.

Change-Id: Ide78b4e22d4f4066bf901e2d676e5058ca132827
Reviewed-on: https://go-review.googlesource.com/c/tools/+/507738
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Alan Donovan <adonovan@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
2023-07-10 18:10:37 +00:00
..
testdata internal/cmd/deadcode: a command to report dead code in Go programs 2023-07-10 18:10:37 +00:00
deadcode.go internal/cmd/deadcode: a command to report dead code in Go programs 2023-07-10 18:10:37 +00:00
deadcode_test.go internal/cmd/deadcode: a command to report dead code in Go programs 2023-07-10 18:10:37 +00:00
doc.go internal/cmd/deadcode: a command to report dead code in Go programs 2023-07-10 18:10:37 +00:00