zowe / zowe-cli

Zowe CLI
Eclipse Public License 2.0
108 stars 85 forks source link

Show strings instead of regexes for allowed values in CLI help #2133

Closed t1m0thyj closed 1 month ago

t1m0thyj commented 1 month ago

What It Does

Fixes #1863

How to Test

  1. Run zowe zos-files list data-set --protocol invalid and verify that there are no ^ or $ characters in the command response:

    You specified:
    invalid
    
    The value must match one of the following regular expressions:
    [ 'http', 'https' ].
  2. Run zowe auth logout apiml --help and verify that there is no ^ character before "apimlAuthenticationToken":

       --token-type | --tt (string)
    
          The type of token to get and use for the API. Omit this option to use the
          default token type, which is provided by 'zowe auth login'.
    
          Allowed values: apimlAuthenticationToken.*, jwtToken, LtpaToken2

Review Checklist I certify that I have:

Additional Comments

Note: Removing the ^ in front of "apimlAuthenticationToken" is purely cosmetic and should not change the behavior, because it will be added by SyntaxValidator: https://github.com/zowe/zowe-cli/blob/59a4b1ea5fbdba0e7bf133daca25665077fa77fa/packages/imperative/src/cmd/src/syntax/SyntaxValidator.ts#L300-L304

codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 91.12%. Comparing base (113e5eb) to head (11c8edc). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2133 +/- ## ======================================= Coverage 91.12% 91.12% ======================================= Files 636 636 Lines 19035 19035 Branches 4008 3942 -66 ======================================= Hits 17346 17346 Misses 1688 1688 Partials 1 1 ```

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

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud