phindle / error-lens

Visual Studio Code extension which enhances the display of errors and warnings.
https://marketplace.visualstudio.com/items?itemName=PhilHindle.errorlens
MIT License
89 stars 40 forks source link

Warnings receive higher priority than errors #20

Open georgebonnr opened 5 years ago

georgebonnr commented 5 years ago

If a warning level error is present on a given line, it becomes the displayed errorLens message in place of an error level error that may be present on the same line.

Example:

  1. A serious error is present image
  2. I make a change that triggers a warning on the same line (in this case the warning is coming from Prettier, but other warnings trigger the same behavior) image
  3. I am informed about the warning, but don't know that a more severe error is also present.

With the default error messaging styles in VSCode, it would be easy to see that both an error and a warning are present on the same line, but with the full-line highlighting I believe we need to be thoughtful about the hierarchy of which error is displayed.

Proposal: Priority order of ['error', 'warning', 'info', 'hint']. This could also be user configurable.

phindle commented 5 years ago

Thanks for spotting this, feels like a bug, so I'll ensure errors are always prioritised.