Skip to content

[unused_deps] Print information about arguments in help#1410

Merged
AnnaSvalova merged 1 commit intobazelbuild:mainfrom
styurin:st/unused_deps-usage
Nov 5, 2025
Merged

[unused_deps] Print information about arguments in help#1410
AnnaSvalova merged 1 commit intobazelbuild:mainfrom
styurin:st/unused_deps-usage

Conversation

@styurin
Copy link
Contributor

@styurin styurin commented Nov 3, 2025

This change updates help of unused_deps to show arguments:

$ unused_deps --help
usage: unused_deps TARGET...

For Java rules in TARGETs, prints commands to delete deps unused at compile time.
Note these may be used at run time; see documentation for more information.

  -build_tool string
    	the build executable (like bazel) (default "bazel")
  -cquery
    	Use 'cquery' command instead of 'query'
  -extra_action_file string
    	When specified, just prints suspected unused deps.
  -extra_build_flags string
    	Extra build flags to use when building the targets.
  -output_file string
    	used only with extra_action_file
  -version
    	Print the version of unused_deps

Previously it would not include information about arguments:

unused_deps --help
usage: unused_deps TARGET...

For Java rules in TARGETs, prints commands to delete deps unused at compile time.
Note these may be used at run time; see documentation for more information.

This change also changes usage to be printed to stdout when help is requested with --help. It's printed to stderr otherwise.

@AnnaSvalova AnnaSvalova self-requested a review November 5, 2025 15:38
@AnnaSvalova AnnaSvalova merged commit 30d1c54 into bazelbuild:main Nov 5, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants