Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-6736 Ensure consistent CLI options
  3. HDDS-8065

Follow GNU long options convention for CLI options

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Done
    • None
    • 1.4.0
    • None

    Description

      GNU adds long options to these conventions. Long options consist of – followed by a name made of alphanumeric characters and dashes. Option names are typically one to three words long, with hyphens to separate words. Users can abbreviate the option names as long as the abbreviations are unique.

      https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html

      Proposal: Add lower case hyphen arg names for those that only has camel case long option:

      e.g.
      https://github.com/apache/ozone/blob/91757d51451e184039366e3dd38d1b64c8864af9/hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/pipeline/ListPipelinesSubcommand.java#L60-L61

        @CommandLine.Option(
            names = {"-ffc", "--filterByFactor"},
      

      to become

        @CommandLine.Option(
            names = {"-ffc", "--filter-by-factor", "--filterByFactor"},
      

      Attachments

        Issue Links

          Activity

            People

              targetoee JiaChi Wang
              smeng Siyao Meng
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: