tree: e4198e0473d4ff737f629dbf1505fe7c880af89e [path history] [tgz]
  1. BUILD.bazel
  2. README.md
  3. unused_deps.go
unused_deps/README.md

Unused Deps

unused_deps is a command line tool to determine any unused dependencies in java_library rules. targets. It outputs buildozer commands to apply the suggested prunings.

Dependencies

  1. Protobuf go runtime: to download (if not using bazel) go get -u github.com/golang/protobuf/{proto,protoc-gen-go}

Installation

  1. Change directory to the buildifier/unused_deps
gopath=$(go env GOPATH)
cd $gopath/src/github.com/bazelbuild/buildtools/unused_deps
  1. Install
go install

Usage

unused_deps TARGET...

Here, TARGET is a space-separated list of Bazel labels, with support for :all and ...