From c13eabf18f6541bb264aa1b041ee56206c95c810 Mon Sep 17 00:00:00 2001 From: Thomas Perale Date: Sun, 11 Oct 2026 11:42:13 +0200 Subject: [PATCH] utils/generate-cyclonedx: improve help text The argparse has a set of arguments you can pass to the ArgumentParser object to improve the looks of the help message. The example usage used to be defined in the "description" but a "usage" field exists [1]. Also link to the documentation in the epilog [2]. [1] https://docs.python.org/3/library/argparse.html#usage [2] https://docs.python.org/3/library/argparse.html#epilog Signed-off-by: Thomas Perale Signed-off-by: Arnout Vandecappelle --- utils/generate-cyclonedx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/generate-cyclonedx b/utils/generate-cyclonedx index c292ef7840..9d3baa23f1 100755 --- a/utils/generate-cyclonedx +++ b/utils/generate-cyclonedx @@ -529,9 +529,9 @@ def br2_root_deps(show_info_dict, virtual=False) -> list: def main(): parser = argparse.ArgumentParser( - description='''Create a CycloneDX SBoM for the Buildroot configuration. - Example usage: make show-info | utils/generate-cyclonedx > sbom.json - ''', + description="Create a CycloneDX SBoM for the Buildroot configuration.", + usage="make show-info | utils/%(prog)s > sbom.json", + epilog="For more information see https://buildroot.org/downloads/manual/manual.html#_generating_cyclonedx_sbom", formatter_class=argparse.ArgumentDefaultsHelpFormatter ) parser.add_argument("-i", "--in-file", nargs="?", type=argparse.FileType("r"),