Skip to content

Directive error message brevity #49817

@RikkiGibson

Description

@RikkiGibson

It feels like when we are showing editor squiggles, it is redundant to display the diagnostic location, in the diagnostic message itself. Example:

Image

Perhaps we should try to location-prefix the message when the diagnostics are displayed in console, while leaving the SimpleDiagnostic.Message text location-independent (but potentially still content-dependent, e.g. it could consider saying something like "property 'Foo' must have a separator like ..."). This is similar to what the compiler command line does:

Compiler command line error:
C:\Users\rikki\src\fbp-scratch\misc.cs(8,33): error CS1061: 'string' does not contain a definition for 'Pastel' and no accessible extension method 'Pastel' accepting a first argument of type 'string' could be found (are you missing a using directive or an assembly reference?)

Error in the editor:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-run-fileItems related to the "dotnet run <file>" effortuntriagedRequest triage from a team member

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions