colcon / colcon-core

Command line tool to build sets of software packages
http://colcon.readthedocs.io
Apache License 2.0
107 stars 46 forks source link

Hide verb block from help if there are no verbs #654

Closed cottsay closed 4 months ago

cottsay commented 4 months ago

Rather than show an empty verb block when there are no verbs, just hide the block from the help text entirely.

Before:

$ COLCON_EXTENSION_BLOCKLIST=colcon_core.verb colcon --help
usage: colcon [-h] [--log-base LOG_BASE] [--log-level LOG_LEVEL] {} ...

options:
  -h, --help            show this help message and exit
  --log-base LOG_BASE   The base path for all log directories (default: ./log, to disable: /dev/null)
  --log-level LOG_LEVEL
                        Set log level for the console output, either by numeric or string value (default: warning)

colcon verbs:
  {}

Environment variables:
  ...

After:

$ COLCON_EXTENSION_BLOCKLIST=colcon_core.verb colcon --help
usage: colcon [-h] [--log-base LOG_BASE] [--log-level LOG_LEVEL]

options:
  -h, --help            show this help message and exit
  --log-base LOG_BASE   The base path for all log directories (default: ./log, to disable: /dev/null)
  --log-level LOG_LEVEL
                        Set log level for the console output, either by numeric or string value (default: warning)

Environment variables:
  ...

Follow-up to #620

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.26%. Comparing base (aa80ae5) to head (9da103d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #654 +/- ## ======================================= Coverage 87.26% 87.26% ======================================= Files 67 67 Lines 3904 3904 Branches 773 773 ======================================= Hits 3407 3407 Misses 391 391 Partials 106 106 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.