DataDog / datadog-ci

Use Datadog from your CI.
https://datadoghq.com
Apache License 2.0
127 stars 55 forks source link

Add help output to commands #865

Open josegonzalez opened 1 year ago

josegonzalez commented 1 year ago

Feature request description

I have no idea what each of the flags does for any of the commands. Attempting to get help from the cli shows the following:

% datadog-ci git-metadata --help
Unknown Syntax Error: Command not found; did you mean:

$ datadog-ci git-metadata upload [--dry-run] [--verbose] [--git-sync] [--no-gitsync] [--directory #0] [--repository-url #0]
While running git-metadata --help
josediazgonzalez@ip-192-168-1-6 ship-it % datadog-ci git-metadata -h
Unknown Syntax Error: Command not found; did you mean:

$ datadog-ci git-metadata upload [--dry-run] [--verbose] [--git-sync] [--no-gitsync] [--directory #0] [--repository-url #0]
While running git-metadata -h
josediazgonzalez@ip-192-168-1-6 ship-it % datadog-ci git-metadata:help
Unknown Syntax Error: Command not found; did you mean one of:

  0. datadog-ci dsyms upload [--max-concurrency #0] [--dry-run] [--config #0] <basePath>
  1. datadog-ci flutter-symbols upload [--flavor #0] [--dart-symbols-location #0] [--ios-dsyms] [--ios-dsyms-location #0] [--android-mapping] [--android-mapping-location #0] [--pubspec #0] [--service-name #0] [--max-concurrency #0] [--version #0] [--dry-run] [--disable-git] [--repository-url #0]
  2. datadog-ci git-metadata upload [--dry-run] [--verbose] [--git-sync] [--no-gitsync] [--directory #0] [--repository-url #0]
  3. datadog-ci junit upload [--service #0] [--env #0] [--dry-run] [--tags #0] [--max-concurrency #0] [--logs] [--xpath-tag #0] [--skip-git-metadata-upload] [--git-repository-url #0] <basePaths> ...
  4. datadog-ci lambda instrument [-f,--function #0] [--functions-regex,--functionsRegex #0] [-r,--region #0] [-e,--extension-version,--extensionVersion #0] [-v,--layer-version,--layerVersion #0] [--tracing #0] [--merge-xray-traces,--mergeXrayTraces #0] [--flush-metrics-to-logs,--flushMetricsToLogs #0] [-d,--dry] [--config #0] [--forwarder #0] [--log-level,--logLevel #0] [--apm-flush-deadline #0] [--service #0] [--env #0] [--version #0] [--extra-tags,--extraTags #0] [-s,--source-code-integration,--sourceCodeIntegration] [-u,--upload-git-metadata,--uploadGitMetadata] [-i,--interactive] [--capture-lambda-payload,--captureLambdaPayload #0] [--profile #0]
  5. datadog-ci lambda uninstrument [-f,--function #0] [-r,--region #0] [--config #0] [-d,--dry] [--forwarder #0] [--functions-regex,--functionsRegex #0] [-i,--interactive] [--profile #0]
  6. datadog-ci metric [--no-fail] [--metrics #0] [--level #0]
  7. datadog-ci react-native codepush [--build-version #0] [--service #0] [--bundle #0] [--sourcemap #0] [--platform #0] [--dry-run] [--repository-url #0] [--disable-git] [--max-concurrency #0] [--project-path #0] [--config #0] [--app #0] [--deployment #0] [--remove-sources-content]
  8. datadog-ci react-native upload [--release-version #0] [--build-version #0] [--service #0] [--bundle #0] [--sourcemap #0] [--platform #0] [--dry-run] [--repository-url #0] [--disable-git] [--max-concurrency #0] [--project-path #0] [--config #0] [--remove-sources-content]
  9. datadog-ci react-native xcode [--service #0] [--dry-run] [--force] [--compose-sourcemaps-path #0] [--repository-url #0] [--disable-git] [--config #0] [--remove-sources-content] [--info-plist-path #0] [scriptPath]
 10. datadog-ci sarif upload [--service #0] [--env #0] [--dry-run] [--no-verify] [--tags #0] [--max-concurrency #0] <basePaths> ...
 11. datadog-ci sourcemaps upload [--release-version #0] [--service #0] [--minified-path-prefix #0] [--project-path #0] [--max-concurrency #0] [--dry-run] [--repository-url #0] [--disable-git] <basePath>
 12. datadog-ci synthetics run-tests [--apiKey #0] [--appKey #0] [--config #0] [--datadogSite #0] [--failOnCriticalErrors] [--failOnMissingTests] [--failOnTimeout] [-f,--files #0] [-j,--jUnitReport #0] [--mobileApp,--mobileApplicationVersionFilePath #0] [-p,--public-id #0] [-n,--runName #0] [--subdomain #0] [-s,--search #0] [-t,--tunnel] [-v,--variable #0]
 13. datadog-ci tag [--no-fail] [--tags #0] [--level #0]
 14. datadog-ci trace [--no-fail] [--name #0] [--tags #0] <command> ...
 15. datadog-ci version

While running git-metadata:help

Unless you know to look in the repository codebase, I don't know how one is expected to understand whats going on.

Solution

I would like the help output in the command readme's to be output when I use the -h or --help flags.

Additional context

I'm running the following on MacOS Monterrey 12.6.5:

% datadog-ci version
v2.10.0

Command

git-metadata

lraucy commented 1 year ago

Hey 👋

Thank you for submitting an issue 🙏

I know this is not what you are looking for but right now documentation of each of the individual commands are present in the repository directly, like here through the README file.

For the -h/--help command, we'll look into it.

josegonzalez commented 1 year ago

Yeah I mentioned the docs in my initial issue :)