reinforced / Reinforced.Typings

Converts C# classes to TypeScript interfaces (and many more) within project build. 0-dependency, minimal, gluten-free

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a config option to suppress "Type resolvation warning RT0003"

gmoothart opened this issue · comments

My project has a lot of instances of RT0003 warnings.

Reinforced.Typings : Type resolvation warning RT0003: Could not find suitable TypeScript type for {Namespace.Type}. 'unknown' assumed.

I'd like to be able to ignore these. Since I set UnresolvedToUnknown(true) it's not really an issue, a dev can always go back and add in a missing type if necessary.

Changing them to error would also be acceptable; I just don't want them as warnings which will be ignored and contribute to output clutter.

I thought I could use the standard warning suppression mechanism to suppress by code, I.e. <NoWarn>RT0003</NoWarn> in the build config or PackageReference or with something in the .editorconfig. But those don't seem to have any effect.

What needs to be done to suppress this error?

I'm putting together a PR for this. One option that I kind of like is "always suppress the warning if UnresolvedToUnknown is true". The rationale being that "unknown" is a safer default.

But that is a behavior change, so in the absence of more feedback I'm planning to add a new setting, "DisableTypeWarnings()", that will suppress them.

Resolved by RtSuppress, added in a036544