GuOrg/Gu.Localization

Xaml analyzer + fix if possible

Opened this issue · 3 comments

Before:

<TextBlock Text ="One resource" />

After:

<TextBlock Text ="{l:static p:Resources.One_resource" />

@mgoertz-msft is there any hope for being able to do ^?

@JohanLarsson Are you asking if there is hope to be able to create an analyzer + code fixer for XAML files that could do this?

If so, I'm afraid this won't be possible until we add full support for XAML to Roslyn so that you could write your own analyzers, use XAML syntax trees, etc. The current document analyzer we have is based in the Roslyn internal DocumentDiagnosticAnalyzer and is specific to the XAML Language Service in Visual Studio.

Yes, that was my question, your name was suggested for who to ask so I pinged you here. Analyzers for xaml would be sweet.

I agree, that would be sweet, and it's certainly something we are thinking about.