microsoft / microsoft/typespec

How do we still expose to the user that a diagnostic was a warning with `warn-as-error`

Open
#2,984 0 comments 0 reactions 0 assignees View on GitHub
design:needed triaged:core
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

Moving option 3 discussion into a new issue from #2972

When using `--warn-as-error` all warnings are converted to error(which makes sense from the name) However this means that users only see errors when enabled(common in CI). This result in people not knowing if those are actually just warning that can be suppress or actual errors that should get resolved

One options would be to still display them as warning in the CLI by keeping a `originalSeveirty` entry on the diagnostic saved on the program.
Another option would be to have a different flag to keep warning but still make it fail `--fail-on-warning`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.