Skip to content

Add Diagnostic object for lint emissions #47

@xFrednet

Description

@xFrednet

The error messages of Rust are remarkable, creating them can be challenging, though. Rustc uses a Diagnostic struct and a DiagnosticBuilder to create these messages. For this project, I'd like to have something similar.

Things to keep in mind:

  1. The Diagnostic object has to be FFI safe (Maybe it can first use Vec during construction and then swap to an FFI safe diagnostic)

  2. The information of the Diagnostic backend should be the common denominator off all backends as it kind of dictates, what each backend has to provide as a lint emission mechanism.

    Rust-analyzer supports rustc's diagnostic structure AFAIK, so it's most likely safe to take that as a rough example.

And probably plenty of other things I can't think of rn.

Metadata

Metadata

Assignees

Labels

A-apiArea: Stable APIC-enhancementCategory: New feature or requestE-help-wantedParticipation: Issues with some complexity and where help would be highly appreciated

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions