Skip to content

fix: limit diagnostics-format options to actually supported formats (fixes #2007)#2164

Open
gavin913427-hash wants to merge 1 commit intoasyncapi:masterfrom
gavin913427-hash:fix/diagnostics-format-support
Open

fix: limit diagnostics-format options to actually supported formats (fixes #2007)#2164
gavin913427-hash wants to merge 1 commit intoasyncapi:masterfrom
gavin913427-hash:fix/diagnostics-format-support

Conversation

@gavin913427-hash
Copy link
Copy Markdown

What

Limit --diagnostics-format options to only the actually supported formats.

Why

The help message showed 12 formats but only 7 were actually supported. The unsupported formats (github-actions, sarif, code-climate, gitlab, markdown) would silently fall back to stylish format, which was confusing for users.

How

  • Changed the diagnostics-format flag options from Object.values(OutputFormat) to a hardcoded list of the 7 supported formats
  • Removed the unused OutputFormat import

Changes

File Change
src/apps/cli/internal/flags/parser.flags.ts Limit options to supported formats, remove unused import

Testing

# Before: shows 12 options in help
asyncapi validate --help

# After: shows only 7 supported options
asyncapi validate --help
# Options: stylish, json, junit, html, text, teamcity, pretty

Fixes #2007

The help message showed 12 formats but only 7 were actually supported.
The unsupported formats (github-actions, sarif, code-climate, gitlab,
markdown) would silently fall back to 'stylish' format.

Now the help message correctly shows only the 7 supported formats:
stylish, json, junit, html, text, teamcity, pretty.

Fixes asyncapi#2007
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 3, 2026

⚠️ No Changeset found

Latest commit: 43e480b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 3, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Triage

Development

Successfully merging this pull request may close these issues.

[BUG] The validate subcommand does not fully support the --diagnostics-format options despite its help message

1 participant