Garethp / Rider-RimworldDevelopment

MIT License
9 stars 3 forks source link

Create Problem Analyzers #9

Closed Garethp closed 1 year ago

Garethp commented 1 year ago

As part of the goal of becoming a Rimworld IDE, one of the key feature is going to the ability to highlight problems with our XML. We're going to have to consider which items are worth highlighting as warnings, which are worth highlighting as errors and which are worth ignoring. One example is the fact that Rimworld Defs can do some custom XML passing, so even if we think some XML has been declared for something we can't match up to, that doesn't mean it's invalid.

Beacuse of some peculiarities of how Problem Analyzers work in Rider, they're disabled for XML. To get around this, we can create an implementation of an IDaemonStage and XmlDaemonStageProcessBase in which we can add our highlighting. A quick proof-of-concept is already working in the problem-analyzers branch.

To begin with, we want to only highlight errors when we know what the type of an XML Value should be, and the value is wrong. For starters, we should implement the following highlighters:

Garethp commented 1 year ago

This feature has been completed and will be released with 2023.3