From 2180993b57923e1cf7a7fd420aa969b896bc5828 Mon Sep 17 00:00:00 2001 From: Morten Nielsen Date: Fri, 22 Sep 2023 21:16:18 -0700 Subject: [PATCH] Add initial work on code analyzers --- docs/docfx.json | 4 +- docs/rules/WinUIEx1001.md | 19 ++ docs/rules/WinUIEx1002.md | 32 ++ .../CodeFixResources.Designer.cs | 72 +++++ .../CodeFixResources.resx | 124 ++++++++ .../WinUIEx.Analyzers.CodeFixes.csproj | 22 ++ .../WinUIExAnalyzersCodeFixProvider.cs | 79 +++++ .../WinUIEx.Analyzers.Package.csproj | 38 +++ .../tools/install.ps1 | 272 +++++++++++++++++ .../tools/uninstall.ps1 | 279 ++++++++++++++++++ .../BaseAnalyzersUnitTests.cs | 49 +++ .../CSharpAnalyzerVerifier`1+Test.cs | 26 ++ .../Verifiers/CSharpAnalyzerVerifier`1.cs | 38 +++ .../Verifiers/CSharpCodeFixVerifier`2+Test.cs | 28 ++ .../Verifiers/CSharpCodeFixVerifier`2.cs | 61 ++++ .../CSharpCodeRefactoringVerifier`1+Test.cs | 26 ++ .../CSharpCodeRefactoringVerifier`1.cs | 36 +++ .../Verifiers/CSharpVerifierHelper.cs | 33 +++ .../VisualBasicAnalyzerVerifier`1+Test.cs | 17 ++ .../VisualBasicAnalyzerVerifier`1.cs | 38 +++ .../VisualBasicCodeFixVerifier`2+Test.cs | 16 + .../Verifiers/VisualBasicCodeFixVerifier`2.cs | 61 ++++ ...sualBasicCodeRefactoringVerifier`1+Test.cs | 14 + .../VisualBasicCodeRefactoringVerifier`1.cs | 36 +++ .../WinUIEx.Analyzers.Test.csproj | 29 ++ .../WinUIExAnalyzersUnitTests.cs | 157 ++++++++++ .../WinUIEx.Analyzers/Resources.Designer.cs | 117 ++++++++ .../WinUIEx.Analyzers/Resources.resx | 138 +++++++++ .../WinUIEx.Analyzers.csproj | 24 ++ .../WinUIExAlwaysNullAnalyzer.cs | 78 +++++ src/WinUIEx/WinUIEx.csproj | 18 ++ src/WinUIEx/tools/install.ps1 | 272 +++++++++++++++++ src/WinUIEx/tools/uninstall.ps1 | 279 ++++++++++++++++++ src/WinUIExtensions.sln | 117 ++++++++ 34 files changed, 2648 insertions(+), 1 deletion(-) create mode 100644 docs/rules/WinUIEx1001.md create mode 100644 docs/rules/WinUIEx1002.md create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/CodeFixResources.Designer.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/CodeFixResources.resx create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/WinUIEx.Analyzers.CodeFixes.csproj create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/WinUIExAnalyzersCodeFixProvider.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Package/WinUIEx.Analyzers.Package.csproj create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Package/tools/install.ps1 create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Package/tools/uninstall.ps1 create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/BaseAnalyzersUnitTests.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpAnalyzerVerifier`1+Test.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpAnalyzerVerifier`1.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeFixVerifier`2+Test.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeFixVerifier`2.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeRefactoringVerifier`1+Test.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeRefactoringVerifier`1.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpVerifierHelper.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicAnalyzerVerifier`1+Test.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicAnalyzerVerifier`1.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeFixVerifier`2+Test.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeFixVerifier`2.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1+Test.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/WinUIEx.Analyzers.Test.csproj create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/WinUIExAnalyzersUnitTests.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers/Resources.Designer.cs create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers/Resources.resx create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers/WinUIEx.Analyzers.csproj create mode 100644 src/WinUIEx.Analyzers/WinUIEx.Analyzers/WinUIExAlwaysNullAnalyzer.cs create mode 100644 src/WinUIEx/tools/install.ps1 create mode 100644 src/WinUIEx/tools/uninstall.ps1 diff --git a/docs/docfx.json b/docs/docfx.json index 34df403..9f79cd5 100644 --- a/docs/docfx.json +++ b/docs/docfx.json @@ -27,7 +27,9 @@ "files": [ "concepts/**/*.md", "concepts/**/*.yml", - "api/**/*.md", + "rules/**/*.md", + "rules/**/*.yml", + "api/**/*.md", "*.md", "toc.yml" ] diff --git a/docs/rules/WinUIEx1001.md b/docs/rules/WinUIEx1001.md new file mode 100644 index 0000000..39bd89f --- /dev/null +++ b/docs/rules/WinUIEx1001.md @@ -0,0 +1,19 @@ +## WinUIEX1001: The member will always be null. + +The member will always be null and should not be used. This API was there due to UWP API surface area requirements, but is not needed for WinUI, and thus was never implemented. + +|Item|Value| +|-|-| +|Category|MicrosoftCodeAnalysisCorrectness| +|Enabled|True| +|Severity|Warning| +|CodeFix|False| +--- + +One example is `Window.Current`: WinUI 3 does not have the notion of a current window. If you're interested in getting a reference to you main window, you could add a property to your `App` class that returns the main window, and set that property when you create the window. + +### References + + - [Windows Runtime APIs not supported in desktop apps](https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/desktop-to-uwp-supported-api) + - [Window.Current is null](https://github.com/microsoft/microsoft-ui-xaml/issues/4177) + - [Deprecate and hide from Intellisense APIs that always return null, like Window.Current](https://github.com/microsoft/WindowsAppSDK/issues/1660) \ No newline at end of file diff --git a/docs/rules/WinUIEx1002.md b/docs/rules/WinUIEx1002.md new file mode 100644 index 0000000..5846f82 --- /dev/null +++ b/docs/rules/WinUIEx1002.md @@ -0,0 +1,32 @@ +## WinUIEX1002: The member will always be null. + +The Dispatcher will always return null. It has been replaced by the DispatcherQueue. This API was there due to UWP API surface area requirements, but is not used in WinUI, and has been replaced by the DispatcherQueue. + +|Item|Value| +|-|-| +|Category|MicrosoftCodeAnalysisCorrectness| +|Enabled|True| +|Severity|Warning| +|CodeFix|False| +--- + +### Example + +To address this, change your use of `Dispatcher` from: +```cs +Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => +{ + +}); +``` +to: +```cs +DispatcherQueue.TryEnqueue(Microsoft.UI.Dispatching.DispatcherQueuePriority.Normal, () => +{ +}); +``` + +### References + - [Windows Runtime APIs not supported in desktop apps](https://learn.microsoft.com/en-us/windows/apps/desktop/modernize/desktop-to-uwp-supported-api) + - [Remove DependencyObject.Dispatcher and Window.Dispatcher](https://github.com/microsoft/microsoft-ui-xaml/issues/6027) + - [Dispatcher properties are now null](https://github.com/microsoft/microsoft-ui-xaml/issues/4164) \ No newline at end of file diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/CodeFixResources.Designer.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/CodeFixResources.Designer.cs new file mode 100644 index 0000000..d0c66b1 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/CodeFixResources.Designer.cs @@ -0,0 +1,72 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WinUIEx.Analyzers { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class CodeFixResources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal CodeFixResources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WinUIEx.Analyzers.CodeFixResources", typeof(CodeFixResources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Fix use of Dispatcher. + /// + internal static string CodeFixTitle { + get { + return ResourceManager.GetString("CodeFixTitle", resourceCulture); + } + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/CodeFixResources.resx b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/CodeFixResources.resx new file mode 100644 index 0000000..e371280 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/CodeFixResources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Fix use of Dispatcher + The title of the code fix. + + \ No newline at end of file diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/WinUIEx.Analyzers.CodeFixes.csproj b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/WinUIEx.Analyzers.CodeFixes.csproj new file mode 100644 index 0000000..8631a56 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/WinUIEx.Analyzers.CodeFixes.csproj @@ -0,0 +1,22 @@ + + + + netstandard2.0 + false + WinUIEx.Analyzers + + + + + + + + + + + + + + + + diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/WinUIExAnalyzersCodeFixProvider.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/WinUIExAnalyzersCodeFixProvider.cs new file mode 100644 index 0000000..f21adb0 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.CodeFixes/WinUIExAnalyzersCodeFixProvider.cs @@ -0,0 +1,79 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CodeActions; +using Microsoft.CodeAnalysis.CodeFixes; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.CodeAnalysis.Rename; +using Microsoft.CodeAnalysis.Text; +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Composition; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace WinUIEx.Analyzers +{ + [ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(WinUIExAnalyzersCodeFixProvider)), Shared] + public class WinUIExAnalyzersCodeFixProvider : CodeFixProvider + { + public sealed override ImmutableArray FixableDiagnosticIds + { + get { return ImmutableArray.Create(WinUIExAlwaysNullAnalyzer.DiagnosticId1002); } + } + + public sealed override FixAllProvider GetFixAllProvider() + { + // See https://github.com/dotnet/roslyn/blob/main/docs/analyzers/FixAllProvider.md for more information on Fix All Providers + return WellKnownFixAllProviders.BatchFixer; + } + + public sealed override async Task RegisterCodeFixesAsync(CodeFixContext context) + { + var root = await context.Document.GetSyntaxRootAsync(context.CancellationToken).ConfigureAwait(false); + + // TODO: Replace the following code with your own analysis, generating a CodeAction for each fix to suggest + var diagnostic = context.Diagnostics.First(); + var diagnosticSpan = diagnostic.Location.SourceSpan; + + // Find the type declaration identified by the diagnostic. + var token = root.FindToken(diagnosticSpan.Start); + var root2 = token.SyntaxTree.GetRoot(); + + var properties = token.Parent.FirstAncestorOrSelf(); + var declaration = token.Parent.AncestorsAndSelf().OfType().First(); + + // Register a code action that will invoke the fix. + context.RegisterCodeFix( + CodeAction.Create( + title: CodeFixResources.CodeFixTitle, + createChangedSolution: + c => MakeUppercaseAsync(context.Document, declaration, c), + // c => + // { + // document.po + // } + equivalenceKey: nameof(CodeFixResources.CodeFixTitle)), + diagnostic); + } + + private async Task MakeUppercaseAsync(Document document, TypeDeclarationSyntax typeDecl, CancellationToken cancellationToken) + { + // Compute new uppercase name. + var identifierToken = typeDecl.Identifier; + + // Get the symbol representing the type to be renamed. + var semanticModel = await document.GetSemanticModelAsync(cancellationToken); + var typeSymbol = semanticModel.GetDeclaredSymbol(typeDecl, cancellationToken); + + // Produce a new solution that has all references to that type renamed, including the declaration. + var originalSolution = document.Project.Solution; + var optionSet = originalSolution.Workspace.Options; + var newSolution = await Renamer.RenameSymbolAsync(document.Project.Solution, typeSymbol, "DispatcherQueue", optionSet, cancellationToken).ConfigureAwait(false); + + // Return the new solution with the now-uppercase type name. + return newSolution; + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Package/WinUIEx.Analyzers.Package.csproj b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Package/WinUIEx.Analyzers.Package.csproj new file mode 100644 index 0000000..1c5471c --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Package/WinUIEx.Analyzers.Package.csproj @@ -0,0 +1,38 @@ + + + + netstandard2.0 + false + true + true + + + + WinUIEx.Analyzers + 1.0.0.0 + mn + WinUIEx.Analyzers + Summary of changes made in this release of the package. + WinUIEx.Analyzers, analyzers + true + true + $(TargetsForTfmSpecificContentInPackage);_AddAnalyzersToOutput + + + + + + + + + + + + + + + + + + + diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Package/tools/install.ps1 b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Package/tools/install.ps1 new file mode 100644 index 0000000..f9bd789 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Package/tools/install.ps1 @@ -0,0 +1,272 @@ +param($installPath, $toolsPath, $package, $project) + +if($project.Object.SupportsPackageDependencyResolution) +{ + if($project.Object.SupportsPackageDependencyResolution()) + { + # Do not install analyzers via install.ps1, instead let the project system handle it. + return + } +} + +$analyzersPaths = Join-Path (Join-Path (Split-Path -Path $toolsPath -Parent) "analyzers") * -Resolve + +foreach($analyzersPath in $analyzersPaths) +{ + if (Test-Path $analyzersPath) + { + # Install the language agnostic analyzers. + foreach ($analyzerFilePath in Get-ChildItem -Path "$analyzersPath\*.dll" -Exclude *.resources.dll) + { + if($project.Object.AnalyzerReferences) + { + $project.Object.AnalyzerReferences.Add($analyzerFilePath.FullName) + } + } + } +} + +# $project.Type gives the language name like (C# or VB.NET) +$languageFolder = "" +if($project.Type -eq "C#") +{ + $languageFolder = "cs" +} +if($project.Type -eq "VB.NET") +{ + $languageFolder = "vb" +} +if($languageFolder -eq "") +{ + return +} + +foreach($analyzersPath in $analyzersPaths) +{ + # Install language specific analyzers. + $languageAnalyzersPath = join-path $analyzersPath $languageFolder + if (Test-Path $languageAnalyzersPath) + { + foreach ($analyzerFilePath in Get-ChildItem -Path "$languageAnalyzersPath\*.dll" -Exclude *.resources.dll) + { + if($project.Object.AnalyzerReferences) + { + $project.Object.AnalyzerReferences.Add($analyzerFilePath.FullName) + } + } + } +} +# SIG # Begin signature block +# MIInugYJKoZIhvcNAQcCoIInqzCCJ6cCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA/i+qRUHsWzI0s +# FVk99zLgt/HOEQ33uvkFsWtHTHZgf6CCDYEwggX/MIID56ADAgECAhMzAAACUosz +# qviV8znbAAAAAAJSMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD +# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p +# bmcgUENBIDIwMTEwHhcNMjEwOTAyMTgzMjU5WhcNMjIwOTAxMTgzMjU5WjB0MQsw +# CQYDVQ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wGcC0jF+cTik+HJog++dPEDXeIyBB+2pw +# 23hC5KaX9H05ZknluIq2oxf2MLpKL+gA+76T3k5PnzPNJFDogUn5eFIIsMRpNF0h +# MtPWoPJWYFK2odvKz1HwsuqHRg6hO//NwORcv4xPeAWEFO5+DOXzZKKp/BVDGe/D +# c++y9/l41qpz/F2c3a1lugdqnZz7ZeoaQ8/JMlwrmMbciqcAytCn9A59EWJ1xYd/ +# DaDhQ5Rd8hkcckuxJksjWf6URmc91cb4Jdatkyupq3dDGwCkjGNd2xetrOpqMLOZ +# quoDONSgc9rGrhkf3xgKKVRhLg9bxd3f2oQ0IsOBg2AC5td1eqp6TILc0gei2E3I +# uEAW1d+KXDnajvQmvQkaFHr5wEocTTLgrDglOPPhEaEumSTJS7jKFzUKHiBU005p +# CgQ1So2WJ2RqFx0ppez1N1AFczOVLFllK3WGPLkDsN1GgT0nFfoqvs1WKkzyb2d2 +# /v6PVER9xGky7LCu62dhsJCAFUbxF2dJxaC5ofrl98VaO/z72J9on9BTz+eCtcJ9 +# rDIpqktGeL02f6+4zctFCyi2wgm6eh8kKvRlAPmN4/MNt9pWHtEV//xFGzGeDajr +# diRhDoMZwsuon4QwS8b2YcKMoZ6gZ2lZah3960fTTmvBTBNqeBtR94KWCy0C0A== +# SIG # End signature block diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Package/tools/uninstall.ps1 b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Package/tools/uninstall.ps1 new file mode 100644 index 0000000..17fd920 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Package/tools/uninstall.ps1 @@ -0,0 +1,279 @@ +param($installPath, $toolsPath, $package, $project) + +if($project.Object.SupportsPackageDependencyResolution) +{ + if($project.Object.SupportsPackageDependencyResolution()) + { + # Do not uninstall analyzers via uninstall.ps1, instead let the project system handle it. + return + } +} + +$analyzersPaths = Join-Path (Join-Path (Split-Path -Path $toolsPath -Parent) "analyzers") * -Resolve + +foreach($analyzersPath in $analyzersPaths) +{ + # Uninstall the language agnostic analyzers. + if (Test-Path $analyzersPath) + { + foreach ($analyzerFilePath in Get-ChildItem -Path "$analyzersPath\*.dll" -Exclude *.resources.dll) + { + if($project.Object.AnalyzerReferences) + { + $project.Object.AnalyzerReferences.Remove($analyzerFilePath.FullName) + } + } + } +} + +# $project.Type gives the language name like (C# or VB.NET) +$languageFolder = "" +if($project.Type -eq "C#") +{ + $languageFolder = "cs" +} +if($project.Type -eq "VB.NET") +{ + $languageFolder = "vb" +} +if($languageFolder -eq "") +{ + return +} + +foreach($analyzersPath in $analyzersPaths) +{ + # Uninstall language specific analyzers. + $languageAnalyzersPath = join-path $analyzersPath $languageFolder + if (Test-Path $languageAnalyzersPath) + { + foreach ($analyzerFilePath in Get-ChildItem -Path "$languageAnalyzersPath\*.dll" -Exclude *.resources.dll) + { + if($project.Object.AnalyzerReferences) + { + try + { + $project.Object.AnalyzerReferences.Remove($analyzerFilePath.FullName) + } + catch + { + + } + } + } + } +} +# SIG # Begin signature block +# MIInugYJKoZIhvcNAQcCoIInqzCCJ6cCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDC68wb97fg0QGL +# yXrxJhYfmibzcOh8caqC0uZprfczDaCCDYEwggX/MIID56ADAgECAhMzAAACUosz +# qviV8znbAAAAAAJSMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD +# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p +# bmcgUENBIDIwMTEwHhcNMjEwOTAyMTgzMjU5WhcNMjIwOTAxMTgzMjU5WjB0MQsw +# C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7AQ0Dv3muHoNAt+cccMfYk23lHgh8LGBitCSFwu0q7ufv +# sXkoaIpwW0U0GikWhQoCH0U38SuzVbafg49FiE6ftkjOtiE03PwPYi1S6NSoDdaV +# kUuvjz3OcuN1IHg3CyLn2dO8xbUlWCUfgoWhI1nax9ch7wT4Sw8RdmGKdYTZoZmq +# vPXFRtDyZdmJDMDbTql/Brye8oEsDMoYKMmEYhY1t9TlusnWfUbxuBnyMqg/FkBy +# QF78WFfT8mygMqUGmINxPGT6daxqmq3nfAC2vOtLT4DplNYMEymfDceJzBhb8VCT +# UHc2CWK0qKT+eqwn30NBkwh//8aNHlXaA9Yq/9k2y+axIGdxFfG+X0stipRRpEXb +# xCFm7FPD5/S4ddBH829yEZLZ4XTwSZ6YS/d3mFzu5rgZl3UhjOJPXx40GQtUiDP4 +# XQZ/wW3154X/KtTypv62/Hl+CiMUrsO7MXtgwClfbJ3osg+zlpJgdraetVgmAUc1 +# mjz2GCYX7rIliGkAJREKn4rV2MZzuGLEpTjz9dB+1Xp9Ndi9q3jQgs6k3IDIUube +# YjPFFuPmFWRyi6oPTXmc4ExtTIewPvrOhwQ5q4ysxylkXoTS+UQt94BY2SvR+TMu +# 6doU+0Y73xsO8Zz+lREh3fjBsDbPAgOV5989X6bmkJEEIwIK8LYgqvyED8XXTg== +# SIG # End signature block diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/BaseAnalyzersUnitTests.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/BaseAnalyzersUnitTests.cs new file mode 100644 index 0000000..6af2346 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/BaseAnalyzersUnitTests.cs @@ -0,0 +1,49 @@ +using Microsoft.CodeAnalysis.CodeFixes; +using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.Testing; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Immutable; +using System.Threading; +using System.Threading.Tasks; + +namespace WinUIEx.Analyzers.Test +{ + public abstract class BaseAnalyzersUnitTest + where TAnalyzer : DiagnosticAnalyzer, new() + where TCodeFix : CodeFixProvider, new() + { + private static readonly Lazy _lazyNet60WinUI1_0 = + new Lazy(() => + { + return new ReferenceAssemblies("net6.0-windows10.0.19041.0", new PackageIdentity("Microsoft.NETCore.App.Ref", "6.0.0"), System.IO.Path.Combine("ref", "net6.0")) + .AddPackages(ImmutableArray.Create(new PackageIdentity[] { + new PackageIdentity("Microsoft.Windows.SDK.NET.Ref", "10.0.19041.29"), + new PackageIdentity("Microsoft.WindowsAppSDK", "1.0.0") })); + }); + public static ReferenceAssemblies Net60WinUI1_0 => _lazyNet60WinUI1_0.Value; + + protected static async Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] expected) + { + var test = new CSharpCodeFixVerifier.Test + { + ReferenceAssemblies = Net60WinUI1_0, + TestCode = source, + }; + test.ExpectedDiagnostics.AddRange(expected); + await test.RunAsync(CancellationToken.None); + } + protected static async Task VerifyCodeFixAsync(string source, DiagnosticResult expected, string fixedSource) + { + var test = new CSharpCodeFixVerifier.Test + { + ReferenceAssemblies = Net60WinUI1_0, + TestCode = source, + FixedCode = fixedSource + }; + test.ExpectedDiagnostics.Add(expected); + await test.RunAsync(CancellationToken.None); + } + protected DiagnosticResult Diagnostic(string diagnosticId) => WinUIEx.Analyzers.Test.CSharpCodeFixVerifier.Diagnostic(diagnosticId); + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpAnalyzerVerifier`1+Test.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpAnalyzerVerifier`1+Test.cs new file mode 100644 index 0000000..8be8343 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpAnalyzerVerifier`1+Test.cs @@ -0,0 +1,26 @@ +using Microsoft.CodeAnalysis.CSharp.Testing; +using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.Testing.Verifiers; + +namespace WinUIEx.Analyzers.Test +{ + public static partial class CSharpAnalyzerVerifier + where TAnalyzer : DiagnosticAnalyzer, new() + { + public class Test : CSharpAnalyzerTest + { + public Test() + { + SolutionTransforms.Add((solution, projectId) => + { + var compilationOptions = solution.GetProject(projectId).CompilationOptions; + compilationOptions = compilationOptions.WithSpecificDiagnosticOptions( + compilationOptions.SpecificDiagnosticOptions.SetItems(CSharpVerifierHelper.NullableWarnings)); + solution = solution.WithProjectCompilationOptions(projectId, compilationOptions); + + return solution; + }); + } + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpAnalyzerVerifier`1.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpAnalyzerVerifier`1.cs new file mode 100644 index 0000000..98082fa --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpAnalyzerVerifier`1.cs @@ -0,0 +1,38 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp.Testing; +using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.Testing; +using Microsoft.CodeAnalysis.Testing.Verifiers; +using System.Threading; +using System.Threading.Tasks; + +namespace WinUIEx.Analyzers.Test +{ + public static partial class CSharpAnalyzerVerifier + where TAnalyzer : DiagnosticAnalyzer, new() + { + /// + public static DiagnosticResult Diagnostic() + => CSharpAnalyzerVerifier.Diagnostic(); + + /// + public static DiagnosticResult Diagnostic(string diagnosticId) + => CSharpAnalyzerVerifier.Diagnostic(diagnosticId); + + /// + public static DiagnosticResult Diagnostic(DiagnosticDescriptor descriptor) + => CSharpAnalyzerVerifier.Diagnostic(descriptor); + + /// + public static async Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] expected) + { + var test = new Test + { + TestCode = source, + }; + + test.ExpectedDiagnostics.AddRange(expected); + await test.RunAsync(CancellationToken.None); + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeFixVerifier`2+Test.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeFixVerifier`2+Test.cs new file mode 100644 index 0000000..2de8f28 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeFixVerifier`2+Test.cs @@ -0,0 +1,28 @@ +using Microsoft.CodeAnalysis.CodeFixes; +using Microsoft.CodeAnalysis.CSharp.Testing; +using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.Testing.Verifiers; + +namespace WinUIEx.Analyzers.Test +{ + public static partial class CSharpCodeFixVerifier + where TAnalyzer : DiagnosticAnalyzer, new() + where TCodeFix : CodeFixProvider, new() + { + public class Test : CSharpCodeFixTest + { + public Test() + { + SolutionTransforms.Add((solution, projectId) => + { + var compilationOptions = solution.GetProject(projectId).CompilationOptions; + compilationOptions = compilationOptions.WithSpecificDiagnosticOptions( + compilationOptions.SpecificDiagnosticOptions.SetItems(CSharpVerifierHelper.NullableWarnings)); + solution = solution.WithProjectCompilationOptions(projectId, compilationOptions); + + return solution; + }); + } + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeFixVerifier`2.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeFixVerifier`2.cs new file mode 100644 index 0000000..cec6c14 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeFixVerifier`2.cs @@ -0,0 +1,61 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CodeFixes; +using Microsoft.CodeAnalysis.CSharp.Testing; +using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.Testing; +using Microsoft.CodeAnalysis.Testing.Verifiers; +using System.Threading; +using System.Threading.Tasks; + +namespace WinUIEx.Analyzers.Test +{ + public static partial class CSharpCodeFixVerifier + where TAnalyzer : DiagnosticAnalyzer, new() + where TCodeFix : CodeFixProvider, new() + { + /// + public static DiagnosticResult Diagnostic() + => CSharpCodeFixVerifier.Diagnostic(); + + /// + public static DiagnosticResult Diagnostic(string diagnosticId) + => CSharpCodeFixVerifier.Diagnostic(diagnosticId); + + /// + public static DiagnosticResult Diagnostic(DiagnosticDescriptor descriptor) + => CSharpCodeFixVerifier.Diagnostic(descriptor); + + /// + public static async Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] expected) + { + var test = new Test + { + TestCode = source, + }; + + test.ExpectedDiagnostics.AddRange(expected); + await test.RunAsync(CancellationToken.None); + } + + /// + public static async Task VerifyCodeFixAsync(string source, string fixedSource) + => await VerifyCodeFixAsync(source, DiagnosticResult.EmptyDiagnosticResults, fixedSource); + + /// + public static async Task VerifyCodeFixAsync(string source, DiagnosticResult expected, string fixedSource) + => await VerifyCodeFixAsync(source, new[] { expected }, fixedSource); + + /// + public static async Task VerifyCodeFixAsync(string source, DiagnosticResult[] expected, string fixedSource) + { + var test = new Test + { + TestCode = source, + FixedCode = fixedSource, + }; + + test.ExpectedDiagnostics.AddRange(expected); + await test.RunAsync(CancellationToken.None); + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeRefactoringVerifier`1+Test.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeRefactoringVerifier`1+Test.cs new file mode 100644 index 0000000..c9108f8 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeRefactoringVerifier`1+Test.cs @@ -0,0 +1,26 @@ +using Microsoft.CodeAnalysis.CodeRefactorings; +using Microsoft.CodeAnalysis.CSharp.Testing; +using Microsoft.CodeAnalysis.Testing.Verifiers; + +namespace WinUIEx.Analyzers.Test +{ + public static partial class CSharpCodeRefactoringVerifier + where TCodeRefactoring : CodeRefactoringProvider, new() + { + public class Test : CSharpCodeRefactoringTest + { + public Test() + { + SolutionTransforms.Add((solution, projectId) => + { + var compilationOptions = solution.GetProject(projectId).CompilationOptions; + compilationOptions = compilationOptions.WithSpecificDiagnosticOptions( + compilationOptions.SpecificDiagnosticOptions.SetItems(CSharpVerifierHelper.NullableWarnings)); + solution = solution.WithProjectCompilationOptions(projectId, compilationOptions); + + return solution; + }); + } + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeRefactoringVerifier`1.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeRefactoringVerifier`1.cs new file mode 100644 index 0000000..7cf059b --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpCodeRefactoringVerifier`1.cs @@ -0,0 +1,36 @@ +using Microsoft.CodeAnalysis.CodeRefactorings; +using Microsoft.CodeAnalysis.Testing; +using System.Threading; +using System.Threading.Tasks; + +namespace WinUIEx.Analyzers.Test +{ + public static partial class CSharpCodeRefactoringVerifier + where TCodeRefactoring : CodeRefactoringProvider, new() + { + /// + public static async Task VerifyRefactoringAsync(string source, string fixedSource) + { + await VerifyRefactoringAsync(source, DiagnosticResult.EmptyDiagnosticResults, fixedSource); + } + + /// + public static async Task VerifyRefactoringAsync(string source, DiagnosticResult expected, string fixedSource) + { + await VerifyRefactoringAsync(source, new[] { expected }, fixedSource); + } + + /// + public static async Task VerifyRefactoringAsync(string source, DiagnosticResult[] expected, string fixedSource) + { + var test = new Test + { + TestCode = source, + FixedCode = fixedSource, + }; + + test.ExpectedDiagnostics.AddRange(expected); + await test.RunAsync(CancellationToken.None); + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpVerifierHelper.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpVerifierHelper.cs new file mode 100644 index 0000000..08d8daf --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/CSharpVerifierHelper.cs @@ -0,0 +1,33 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using System; +using System.Collections.Immutable; + +namespace WinUIEx.Analyzers.Test +{ + internal static class CSharpVerifierHelper + { + /// + /// By default, the compiler reports diagnostics for nullable reference types at + /// , and the analyzer test framework defaults to only validating + /// diagnostics at . This map contains all compiler diagnostic IDs + /// related to nullability mapped to , which is then used to enable all + /// of these warnings for default validation during analyzer and code fix tests. + /// + internal static ImmutableDictionary NullableWarnings { get; } = GetNullableWarningsFromCompiler(); + + private static ImmutableDictionary GetNullableWarningsFromCompiler() + { + string[] args = { "/warnaserror:nullable" }; + var commandLineArguments = CSharpCommandLineParser.Default.Parse(args, baseDirectory: Environment.CurrentDirectory, sdkDirectory: Environment.CurrentDirectory); + var nullableWarnings = commandLineArguments.CompilationOptions.SpecificDiagnosticOptions; + + // Workaround for https://github.com/dotnet/roslyn/issues/41610 + nullableWarnings = nullableWarnings + .SetItem("CS8632", ReportDiagnostic.Error) + .SetItem("CS8669", ReportDiagnostic.Error); + + return nullableWarnings; + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicAnalyzerVerifier`1+Test.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicAnalyzerVerifier`1+Test.cs new file mode 100644 index 0000000..8e6a6d5 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicAnalyzerVerifier`1+Test.cs @@ -0,0 +1,17 @@ +using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.Testing.Verifiers; +using Microsoft.CodeAnalysis.VisualBasic.Testing; + +namespace WinUIEx.Analyzers.Test +{ + public static partial class VisualBasicAnalyzerVerifier + where TAnalyzer : DiagnosticAnalyzer, new() + { + public class Test : VisualBasicAnalyzerTest + { + public Test() + { + } + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicAnalyzerVerifier`1.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicAnalyzerVerifier`1.cs new file mode 100644 index 0000000..d82b594 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicAnalyzerVerifier`1.cs @@ -0,0 +1,38 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.Testing; +using Microsoft.CodeAnalysis.Testing.Verifiers; +using Microsoft.CodeAnalysis.VisualBasic.Testing; +using System.Threading; +using System.Threading.Tasks; + +namespace WinUIEx.Analyzers.Test +{ + public static partial class VisualBasicAnalyzerVerifier + where TAnalyzer : DiagnosticAnalyzer, new() + { + /// + public static DiagnosticResult Diagnostic() + => VisualBasicAnalyzerVerifier.Diagnostic(); + + /// + public static DiagnosticResult Diagnostic(string diagnosticId) + => VisualBasicAnalyzerVerifier.Diagnostic(diagnosticId); + + /// + public static DiagnosticResult Diagnostic(DiagnosticDescriptor descriptor) + => VisualBasicAnalyzerVerifier.Diagnostic(descriptor); + + /// + public static async Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] expected) + { + var test = new Test + { + TestCode = source, + }; + + test.ExpectedDiagnostics.AddRange(expected); + await test.RunAsync(CancellationToken.None); + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeFixVerifier`2+Test.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeFixVerifier`2+Test.cs new file mode 100644 index 0000000..d5392ae --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeFixVerifier`2+Test.cs @@ -0,0 +1,16 @@ +using Microsoft.CodeAnalysis.CodeFixes; +using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.Testing.Verifiers; +using Microsoft.CodeAnalysis.VisualBasic.Testing; + +namespace WinUIEx.Analyzers.Test +{ + public static partial class VisualBasicCodeFixVerifier + where TAnalyzer : DiagnosticAnalyzer, new() + where TCodeFix : CodeFixProvider, new() + { + public class Test : VisualBasicCodeFixTest + { + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeFixVerifier`2.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeFixVerifier`2.cs new file mode 100644 index 0000000..808aa4f --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeFixVerifier`2.cs @@ -0,0 +1,61 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CodeFixes; +using Microsoft.CodeAnalysis.Diagnostics; +using Microsoft.CodeAnalysis.Testing; +using Microsoft.CodeAnalysis.Testing.Verifiers; +using Microsoft.CodeAnalysis.VisualBasic.Testing; +using System.Threading; +using System.Threading.Tasks; + +namespace WinUIEx.Analyzers.Test +{ + public static partial class VisualBasicCodeFixVerifier + where TAnalyzer : DiagnosticAnalyzer, new() + where TCodeFix : CodeFixProvider, new() + { + /// + public static DiagnosticResult Diagnostic() + => VisualBasicCodeFixVerifier.Diagnostic(); + + /// + public static DiagnosticResult Diagnostic(string diagnosticId) + => VisualBasicCodeFixVerifier.Diagnostic(diagnosticId); + + /// + public static DiagnosticResult Diagnostic(DiagnosticDescriptor descriptor) + => VisualBasicCodeFixVerifier.Diagnostic(descriptor); + + /// + public static async Task VerifyAnalyzerAsync(string source, params DiagnosticResult[] expected) + { + var test = new Test + { + TestCode = source, + }; + + test.ExpectedDiagnostics.AddRange(expected); + await test.RunAsync(CancellationToken.None); + } + + /// + public static async Task VerifyCodeFixAsync(string source, string fixedSource) + => await VerifyCodeFixAsync(source, DiagnosticResult.EmptyDiagnosticResults, fixedSource); + + /// + public static async Task VerifyCodeFixAsync(string source, DiagnosticResult expected, string fixedSource) + => await VerifyCodeFixAsync(source, new[] { expected }, fixedSource); + + /// + public static async Task VerifyCodeFixAsync(string source, DiagnosticResult[] expected, string fixedSource) + { + var test = new Test + { + TestCode = source, + FixedCode = fixedSource, + }; + + test.ExpectedDiagnostics.AddRange(expected); + await test.RunAsync(CancellationToken.None); + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1+Test.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1+Test.cs new file mode 100644 index 0000000..701ff63 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1+Test.cs @@ -0,0 +1,14 @@ +using Microsoft.CodeAnalysis.CodeRefactorings; +using Microsoft.CodeAnalysis.Testing.Verifiers; +using Microsoft.CodeAnalysis.VisualBasic.Testing; + +namespace WinUIEx.Analyzers.Test +{ + public static partial class VisualBasicCodeRefactoringVerifier + where TCodeRefactoring : CodeRefactoringProvider, new() + { + public class Test : VisualBasicCodeRefactoringTest + { + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1.cs new file mode 100644 index 0000000..cfb6587 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1.cs @@ -0,0 +1,36 @@ +using Microsoft.CodeAnalysis.CodeRefactorings; +using Microsoft.CodeAnalysis.Testing; +using System.Threading; +using System.Threading.Tasks; + +namespace WinUIEx.Analyzers.Test +{ + public static partial class VisualBasicCodeRefactoringVerifier + where TCodeRefactoring : CodeRefactoringProvider, new() + { + /// + public static async Task VerifyRefactoringAsync(string source, string fixedSource) + { + await VerifyRefactoringAsync(source, DiagnosticResult.EmptyDiagnosticResults, fixedSource); + } + + /// + public static async Task VerifyRefactoringAsync(string source, DiagnosticResult expected, string fixedSource) + { + await VerifyRefactoringAsync(source, new[] { expected }, fixedSource); + } + + /// + public static async Task VerifyRefactoringAsync(string source, DiagnosticResult[] expected, string fixedSource) + { + var test = new Test + { + TestCode = source, + FixedCode = fixedSource, + }; + + test.ExpectedDiagnostics.AddRange(expected); + await test.RunAsync(CancellationToken.None); + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/WinUIEx.Analyzers.Test.csproj b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/WinUIEx.Analyzers.Test.csproj new file mode 100644 index 0000000..00da169 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/WinUIEx.Analyzers.Test.csproj @@ -0,0 +1,29 @@ + + + + net6.0-windows10.0.19041.0 + true + true + true + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/WinUIExAnalyzersUnitTests.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/WinUIExAnalyzersUnitTests.cs new file mode 100644 index 0000000..00fc73f --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers.Test/WinUIExAnalyzersUnitTests.cs @@ -0,0 +1,157 @@ +using Microsoft.CodeAnalysis.Testing; +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System; +using System.Collections.Immutable; +using System.Threading; +using System.Threading.Tasks; + +namespace WinUIEx.Analyzers.Test +{ + [TestClass] + public class WinUIExAnalyzersUnitTest : BaseAnalyzersUnitTest + { + [TestMethod] + public async Task AlwaysNull_Microsoft_UI_Xaml_Window_Current() + { + var testCode = @" + using Microsoft.UI.Xaml; + namespace ConsoleApplication1 + { + class MyClass + { + public void MethodName() + { + var current = {|#0:Window.Current|}; + } + } + }"; + var expected = Diagnostic("WinUIEx1001").WithLocation(0).WithArguments("Microsoft.UI.Xaml.Window.Current"); + await VerifyAnalyzerAsync(testCode, expected); + } + + [TestMethod] + public async Task DependencyObject_Dispatcher() + { + var testCode = @" + using Microsoft.UI.Xaml.Controls; + namespace ConsoleApplication1 + { + class MyClass + { + public void MethodName() + { + var border = new Border(); + var dispatcher = {|#0:border.Dispatcher|}; + } + } + }"; + var expected = Diagnostic("WinUIEx1002").WithLocation(0).WithArguments("Microsoft.UI.Xaml.Controls.Border.Dispatcher", "Border.DispatcherQueue"); + await VerifyAnalyzerAsync(testCode, expected); + } + + [TestMethod] + public async Task DependencyObject_Dispatcher_RunAsync() + { + var testCode = @" + using Microsoft.UI.Xaml.Controls; + namespace ConsoleApplication1 + { + class MyClass + { + public void MethodName() + { + var border = new Border(); + var dispatcher = {|#0:border.Dispatcher|}.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => {}); + } + } + }"; + var expected = Diagnostic("WinUIEx1002").WithLocation(0).WithArguments("Microsoft.UI.Xaml.Controls.Border.Dispatcher", "Border.DispatcherQueue"); + await VerifyAnalyzerAsync(testCode, expected); + } + + [TestMethod] + public async Task Window_Dispatcher() + { + var testCode = @" + using Microsoft.UI.Xaml; + namespace ConsoleApplication1 + { + class MyClass + { + public void MethodName() + { + var window = new Window(); + var dispatcher = {|#0:window.Dispatcher|}; + } + } + }"; + var expected = Diagnostic("WinUIEx1002").WithLocation(0).WithArguments("Microsoft.UI.Xaml.Window.Dispatcher", "Window.DispatcherQueue"); + await VerifyAnalyzerAsync(testCode, expected); + } + [TestMethod] + public async Task CustomWindow_Dispatcher() + { + var testCode = @" + using Microsoft.UI.Xaml; + namespace ConsoleApplication1 + { + class MyClass + { + public void MethodName() + { + var window = new MyWindow(); + var dispatcher = {|#0:window.Dispatcher|}; + } + } + class MyWindow : Window { } + }"; + var expected = Diagnostic("WinUIEx1002").WithLocation(0).WithArguments("ConsoleApplication1.MyWindow.Dispatcher", "MyWindow.DispatcherQueue"); + await VerifyAnalyzerAsync(testCode, expected); + } + + private static readonly Lazy _lazyNet60WinUI1_0 = + new Lazy(() => + { + return new ReferenceAssemblies("net6.0-windows10.0.19041.0", new PackageIdentity("Microsoft.NETCore.App.Ref", "6.0.0"), System.IO.Path.Combine("ref", "net6.0")) + .AddPackages(ImmutableArray.Create(new PackageIdentity[] { + new PackageIdentity("Microsoft.Windows.SDK.NET.Ref", "10.0.19041.29"), + new PackageIdentity("Microsoft.WindowsAppSDK", "1.4.230913002") })); + }); + + [TestMethod] + [Ignore] // TODO: Implement the code fixer + public async Task CodeFix_Dispatcher_To_DispatcherQueue() + { + var testCode = @" + using Microsoft.UI.Xaml.Controls; + namespace ConsoleApplication1 + { + class MyClass + { + public void MethodName() + { + var border = new Border(); + var dispatcher = {|#0:border.Dispatcher|}; + } + } + }"; + + var fixtest = @" + using Microsoft.UI.Xaml.Controls; + namespace ConsoleApplication1 + { + class MyClass + { + public void MethodName() + { + var border = new Border(); + var dispatcher = {|#0:border.DispatcherQueue|}; + } + } + }"; + + var expected = Diagnostic("WinUIEx1002").WithLocation(0).WithArguments("Microsoft.UI.Xaml.Controls.Border.Dispatcher", "Border.DispatcherQueue"); + await VerifyCodeFixAsync(testCode, expected, fixtest); + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers/Resources.Designer.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers/Resources.Designer.cs new file mode 100644 index 0000000..983f6d5 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers/Resources.Designer.cs @@ -0,0 +1,117 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WinUIEx.Analyzers { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WinUIEx.Analyzers.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to The member was never implemeted in WinUI 3.. + /// + internal static string AlwaysNullDescription { + get { + return ResourceManager.GetString("AlwaysNullDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The member '{0}' will always be null and should not be used.. + /// + internal static string AlwaysNullMessageFormat { + get { + return ResourceManager.GetString("AlwaysNullMessageFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The member will always be null.. + /// + internal static string AlwaysNullTitle { + get { + return ResourceManager.GetString("AlwaysNullTitle", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The Dispatcher will always return null. It has been replaced by the DispatcherQueue.. + /// + internal static string DispatcherDescription { + get { + return ResourceManager.GetString("DispatcherDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to The member '{0}' will always be null and should not be used. Instead use '{1}'.. + /// + internal static string DispatcherMessageFormat { + get { + return ResourceManager.GetString("DispatcherMessageFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Dispatcher is not available in WinUI 3. + /// + internal static string DispatcherTitle { + get { + return ResourceManager.GetString("DispatcherTitle", resourceCulture); + } + } + } +} diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers/Resources.resx b/src/WinUIEx.Analyzers/WinUIEx.Analyzers/Resources.resx new file mode 100644 index 0000000..c8858a8 --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers/Resources.resx @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + The member was never implemeted in WinUI 3. + + + The member '{0}' will always be null and should not be used. + + + The member will always be null. + + + The Dispatcher will always return null. It has been replaced by the DispatcherQueue. + + + The member '{0}' will always be null and should not be used. Instead use '{1}'. + + + Dispatcher is not available in WinUI 3 + + \ No newline at end of file diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers/WinUIEx.Analyzers.csproj b/src/WinUIEx.Analyzers/WinUIEx.Analyzers/WinUIEx.Analyzers.csproj new file mode 100644 index 0000000..86519bf --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers/WinUIEx.Analyzers.csproj @@ -0,0 +1,24 @@ + + + + netstandard2.0 + false + + + *$(MSBuildProjectFile)* + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + diff --git a/src/WinUIEx.Analyzers/WinUIEx.Analyzers/WinUIExAlwaysNullAnalyzer.cs b/src/WinUIEx.Analyzers/WinUIEx.Analyzers/WinUIExAlwaysNullAnalyzer.cs new file mode 100644 index 0000000..4e7101d --- /dev/null +++ b/src/WinUIEx.Analyzers/WinUIEx.Analyzers/WinUIExAlwaysNullAnalyzer.cs @@ -0,0 +1,78 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.Diagnostics; +using System.Collections.Generic; +using System.Collections.Immutable; + +namespace WinUIEx.Analyzers +{ + [DiagnosticAnalyzer(LanguageNames.CSharp)] + public class WinUIExAlwaysNullAnalyzer : DiagnosticAnalyzer + { + static Dictionary AlwaysNullProperties = new Dictionary() { + { "Microsoft.UI.Xaml.Window.Current", null }, + }; + + public const string DiagnosticId1001 = "WinUIEx1001"; + public const string DiagnosticId1002 = "WinUIEx1002"; + + // You can change these strings in the Resources.resx file. If you do not want your analyzer to be localize-able, you can use regular strings for Title and MessageFormat. + // See https://github.com/dotnet/roslyn/blob/main/docs/analyzers/Localizing%20Analyzers.md for more on localization + private static readonly LocalizableString Title1001 = new LocalizableResourceString(nameof(Resources.AlwaysNullTitle), Resources.ResourceManager, typeof(Resources)); + private static readonly LocalizableString MessageFormat1001 = new LocalizableResourceString(nameof(Resources.AlwaysNullMessageFormat), Resources.ResourceManager, typeof(Resources)); + private static readonly LocalizableString Description1001 = new LocalizableResourceString(nameof(Resources.AlwaysNullDescription), Resources.ResourceManager, typeof(Resources)); + private static readonly LocalizableString Title1002 = new LocalizableResourceString(nameof(Resources.DispatcherTitle), Resources.ResourceManager, typeof(Resources)); + private static readonly LocalizableString MessageFormat1002 = new LocalizableResourceString(nameof(Resources.DispatcherMessageFormat), Resources.ResourceManager, typeof(Resources)); + private static readonly LocalizableString Description1002 = new LocalizableResourceString(nameof(Resources.DispatcherDescription), Resources.ResourceManager, typeof(Resources)); + private const string Category = "Usage"; + + private static readonly DiagnosticDescriptor AlwaysNullRule = new DiagnosticDescriptor(DiagnosticId1001, Title1001, MessageFormat1001, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true, description: Description1001); + private static readonly DiagnosticDescriptor DispatcherRule = new DiagnosticDescriptor(DiagnosticId1002, Title1002, MessageFormat1002, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true, description: Description1002); + + public override ImmutableArray SupportedDiagnostics { get { return ImmutableArray.Create(AlwaysNullRule, DispatcherRule); } } + + public override void Initialize(AnalysisContext context) + { + context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); + context.EnableConcurrentExecution(); + context.RegisterOperationAction(AnalyzeOperation, OperationKind.PropertyReference); + //context.RegisterSyntaxNodeAction(AnalyzeExpression, SyntaxKind.InvocationExpression); + + } + + //private void AnalyzeExpression(SyntaxNodeAnalysisContext context) + //{ + // var invocationExpr = (InvocationExpressionSyntax)context.Node; + // var memberAccessExpr = invocationExpr.Expression as MemberAccessExpressionSyntax; + // if (memberAccessExpr == null) + // return; + // var memberSymbol = context.SemanticModel.GetSymbolInfo(memberAccessExpr).Symbol; + // if(memberSymbol.ContainingType.ToDisplayString() +"." + memberSymbol.Name == "Windows.UI.Core.CoreDispatcher.RunAsync") + // { + // var diagnostic = Diagnostic.Create(RuleWithAlternative, memberAccessExpr.GetLocation(), "Windows.UI.Core.CoreDispatcher.RunAsync", "DispatcherQueue.TryEnqueueAsync"); + // context.ReportDiagnostic(diagnostic); + // } + //} + + private void AnalyzeOperation(OperationAnalysisContext context) + { + Diagnostic diagnostic = null; + var propRefOp = context.Operation as Microsoft.CodeAnalysis.Operations.IPropertyReferenceOperation; + if (propRefOp != null) + { + var namedTypeSymbol = propRefOp.Member.ToDisplayString(); + var instanceNamedTypeSymbol = propRefOp.Instance != null ? (propRefOp.Instance.Type.ToDisplayString() + "." + propRefOp.Member.Name) : namedTypeSymbol; + + if (namedTypeSymbol == "Microsoft.UI.Xaml.DependencyObject.Dispatcher" || namedTypeSymbol == "Microsoft.UI.Xaml.Window.Dispatcher") + { + diagnostic = Diagnostic.Create(DispatcherRule, propRefOp.Syntax.GetLocation(), instanceNamedTypeSymbol, propRefOp.Instance.Type.Name + ".DispatcherQueue"); + } + else if (AlwaysNullProperties.ContainsKey(namedTypeSymbol)) + { + diagnostic = Diagnostic.Create(AlwaysNullRule, propRefOp.Syntax.GetLocation(), instanceNamedTypeSymbol); + } + } + if (diagnostic != null) + context.ReportDiagnostic(diagnostic); + } + } +} \ No newline at end of file diff --git a/src/WinUIEx/WinUIEx.csproj b/src/WinUIEx/WinUIEx.csproj index 39d2aba..0b5af1f 100644 --- a/src/WinUIEx/WinUIEx.csproj +++ b/src/WinUIEx/WinUIEx.csproj @@ -41,4 +41,22 @@ + + + $(TargetsForTfmSpecificContentInPackage);_AddAnalyzersToOutput + + + + + + + + + + + + + + + diff --git a/src/WinUIEx/tools/install.ps1 b/src/WinUIEx/tools/install.ps1 new file mode 100644 index 0000000..f9bd789 --- /dev/null +++ b/src/WinUIEx/tools/install.ps1 @@ -0,0 +1,272 @@ +param($installPath, $toolsPath, $package, $project) + +if($project.Object.SupportsPackageDependencyResolution) +{ + if($project.Object.SupportsPackageDependencyResolution()) + { + # Do not install analyzers via install.ps1, instead let the project system handle it. + return + } +} + +$analyzersPaths = Join-Path (Join-Path (Split-Path -Path $toolsPath -Parent) "analyzers") * -Resolve + +foreach($analyzersPath in $analyzersPaths) +{ + if (Test-Path $analyzersPath) + { + # Install the language agnostic analyzers. + foreach ($analyzerFilePath in Get-ChildItem -Path "$analyzersPath\*.dll" -Exclude *.resources.dll) + { + if($project.Object.AnalyzerReferences) + { + $project.Object.AnalyzerReferences.Add($analyzerFilePath.FullName) + } + } + } +} + +# $project.Type gives the language name like (C# or VB.NET) +$languageFolder = "" +if($project.Type -eq "C#") +{ + $languageFolder = "cs" +} +if($project.Type -eq "VB.NET") +{ + $languageFolder = "vb" +} +if($languageFolder -eq "") +{ + return +} + +foreach($analyzersPath in $analyzersPaths) +{ + # Install language specific analyzers. + $languageAnalyzersPath = join-path $analyzersPath $languageFolder + if (Test-Path $languageAnalyzersPath) + { + foreach ($analyzerFilePath in Get-ChildItem -Path "$languageAnalyzersPath\*.dll" -Exclude *.resources.dll) + { + if($project.Object.AnalyzerReferences) + { + $project.Object.AnalyzerReferences.Add($analyzerFilePath.FullName) + } + } + } +} +# SIG # Begin signature block +# MIInugYJKoZIhvcNAQcCoIInqzCCJ6cCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCA/i+qRUHsWzI0s +# FVk99zLgt/HOEQ33uvkFsWtHTHZgf6CCDYEwggX/MIID56ADAgECAhMzAAACUosz +# qviV8znbAAAAAAJSMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD +# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p +# bmcgUENBIDIwMTEwHhcNMjEwOTAyMTgzMjU5WhcNMjIwOTAxMTgzMjU5WjB0MQsw +# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u +# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB +# AQDQ5M+Ps/X7BNuv5B/0I6uoDwj0NJOo1KrVQqO7ggRXccklyTrWL4xMShjIou2I +# sbYnF67wXzVAq5Om4oe+LfzSDOzjcb6ms00gBo0OQaqwQ1BijyJ7NvDf80I1fW9O +# L76Kt0Wpc2zrGhzcHdb7upPrvxvSNNUvxK3sgw7YTt31410vpEp8yfBEl/hd8ZzA +# v47DCgJ5j1zm295s1RVZHNp6MoiQFVOECm4AwK2l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J2RqFx0ppez1N1AFczOVLFllK3WGPLkDsN1GgT0nFfoqvs1WKkzyb2d2 +# /v6PVER9xGky7LCu62dhsJCAFUbxF2dJxaC5ofrl98VaO/z72J9on9BTz+eCtcJ9 +# rDIpqktGeL02f6+4zctFCyi2wgm6eh8kKvRlAPmN4/MNt9pWHtEV//xFGzGeDajr +# diRhDoMZwsuon4QwS8b2YcKMoZ6gZ2lZah3960fTTmvBTBNqeBtR94KWCy0C0A== +# SIG # End signature block diff --git a/src/WinUIEx/tools/uninstall.ps1 b/src/WinUIEx/tools/uninstall.ps1 new file mode 100644 index 0000000..17fd920 --- /dev/null +++ b/src/WinUIEx/tools/uninstall.ps1 @@ -0,0 +1,279 @@ +param($installPath, $toolsPath, $package, $project) + +if($project.Object.SupportsPackageDependencyResolution) +{ + if($project.Object.SupportsPackageDependencyResolution()) + { + # Do not uninstall analyzers via uninstall.ps1, instead let the project system handle it. + return + } +} + +$analyzersPaths = Join-Path (Join-Path (Split-Path -Path $toolsPath -Parent) "analyzers") * -Resolve + +foreach($analyzersPath in $analyzersPaths) +{ + # Uninstall the language agnostic analyzers. + if (Test-Path $analyzersPath) + { + foreach ($analyzerFilePath in Get-ChildItem -Path "$analyzersPath\*.dll" -Exclude *.resources.dll) + { + if($project.Object.AnalyzerReferences) + { + $project.Object.AnalyzerReferences.Remove($analyzerFilePath.FullName) + } + } + } +} + +# $project.Type gives the language name like (C# or VB.NET) +$languageFolder = "" +if($project.Type -eq "C#") +{ + $languageFolder = "cs" +} +if($project.Type -eq "VB.NET") +{ + $languageFolder = "vb" +} +if($languageFolder -eq "") +{ + return +} + +foreach($analyzersPath in $analyzersPaths) +{ + # Uninstall language specific analyzers. + $languageAnalyzersPath = join-path $analyzersPath $languageFolder + if (Test-Path $languageAnalyzersPath) + { + foreach ($analyzerFilePath in Get-ChildItem -Path "$languageAnalyzersPath\*.dll" -Exclude *.resources.dll) + { + if($project.Object.AnalyzerReferences) + { + try + { + $project.Object.AnalyzerReferences.Remove($analyzerFilePath.FullName) + } + catch + { + + } + } + } + } +} +# SIG # Begin signature block +# MIInugYJKoZIhvcNAQcCoIInqzCCJ6cCAQExDzANBglghkgBZQMEAgEFADB5Bgor +# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG +# KX7zUQIBAAIBAAIBAAIBAAIBADAxMA0GCWCGSAFlAwQCAQUABCDC68wb97fg0QGL +# yXrxJhYfmibzcOh8caqC0uZprfczDaCCDYEwggX/MIID56ADAgECAhMzAAACUosz +# qviV8znbAAAAAAJSMA0GCSqGSIb3DQEBCwUAMH4xCzAJBgNVBAYTAlVTMRMwEQYD +# VQQIEwpXYXNoaW5ndG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24xKDAmBgNVBAMTH01pY3Jvc29mdCBDb2RlIFNpZ25p +# bmcgUENBIDIwMTEwHhcNMjEwOTAyMTgzMjU5WhcNMjIwOTAxMTgzMjU5WjB0MQsw +# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u +# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB +# AQDQ5M+Ps/X7BNuv5B/0I6uoDwj0NJOo1KrVQqO7ggRXccklyTrWL4xMShjIou2I +# sbYnF67wXzVAq5Om4oe+LfzSDOzjcb6ms00gBo0OQaqwQ1BijyJ7NvDf80I1fW9O +# L76Kt0Wpc2zrGhzcHdb7upPrvxvSNNUvxK3sgw7YTt31410vpEp8yfBEl/hd8ZzA +# v47DCgJ5j1zm295s1RVZHNp6MoiQFVOECm4AwK2l28i+YER1JO4IplTH44uvzX9o +# RnJHaMvWzZEpozPy4jNO2DDqbcNs4zh7AWMhE1PW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1 +# mjz2GCYX7rIliGkAJREKn4rV2MZzuGLEpTjz9dB+1Xp9Ndi9q3jQgs6k3IDIUube +# YjPFFuPmFWRyi6oPTXmc4ExtTIewPvrOhwQ5q4ysxylkXoTS+UQt94BY2SvR+TMu +# 6doU+0Y73xsO8Zz+lREh3fjBsDbPAgOV5989X6bmkJEEIwIK8LYgqvyED8XXTg== +# SIG # End signature block diff --git a/src/WinUIExtensions.sln b/src/WinUIExtensions.sln index 787c2d8..82cf3e5 100644 --- a/src/WinUIExtensions.sln +++ b/src/WinUIExtensions.sln @@ -68,6 +68,22 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "api", "api", "{FB009A01-72E EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinUIExMauiSample", "WinUIExMauiSample\WinUIExMauiSample.csproj", "{34D48E09-AC8C-4041-81BC-3B8D82337B28}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Analyzers", "Analyzers", "{F9BF4537-A009-425A-A2F4-AB41F112AFFC}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinUIEx.Analyzers", "WinUIEx.Analyzers\WinUIEx.Analyzers\WinUIEx.Analyzers.csproj", "{ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinUIEx.Analyzers.CodeFixes", "WinUIEx.Analyzers\WinUIEx.Analyzers.CodeFixes\WinUIEx.Analyzers.CodeFixes.csproj", "{AE67EC3E-1BB7-46BF-8A12-F038DE50435B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinUIEx.Analyzers.Package", "WinUIEx.Analyzers\WinUIEx.Analyzers.Package\WinUIEx.Analyzers.Package.csproj", "{B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinUIEx.Analyzers.Test", "WinUIEx.Analyzers\WinUIEx.Analyzers.Test\WinUIEx.Analyzers.Test.csproj", "{A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "rules", "rules", "{795121AE-46F8-497C-9A73-F9DFFCB6BC57}" + ProjectSection(SolutionItems) = preProject + ..\docs\rules\WinUIEx1001.md = ..\docs\rules\WinUIEx1001.md + ..\docs\rules\WinUIEx1002.md = ..\docs\rules\WinUIEx1002.md + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -309,6 +325,102 @@ Global {34D48E09-AC8C-4041-81BC-3B8D82337B28}.Release|x86.ActiveCfg = Release|Any CPU {34D48E09-AC8C-4041-81BC-3B8D82337B28}.Release|x86.Build.0 = Release|Any CPU {34D48E09-AC8C-4041-81BC-3B8D82337B28}.Release|x86.Deploy.0 = Release|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Debug|arm64.ActiveCfg = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Debug|arm64.Build.0 = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Debug|x64.ActiveCfg = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Debug|x64.Build.0 = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Debug|x86.ActiveCfg = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Debug|x86.Build.0 = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Experimental|Any CPU.ActiveCfg = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Experimental|Any CPU.Build.0 = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Experimental|arm64.ActiveCfg = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Experimental|arm64.Build.0 = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Experimental|x64.ActiveCfg = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Experimental|x64.Build.0 = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Experimental|x86.ActiveCfg = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Experimental|x86.Build.0 = Debug|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Release|Any CPU.Build.0 = Release|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Release|arm64.ActiveCfg = Release|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Release|arm64.Build.0 = Release|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Release|x64.ActiveCfg = Release|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Release|x64.Build.0 = Release|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Release|x86.ActiveCfg = Release|Any CPU + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5}.Release|x86.Build.0 = Release|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Debug|arm64.ActiveCfg = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Debug|arm64.Build.0 = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Debug|x64.ActiveCfg = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Debug|x64.Build.0 = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Debug|x86.ActiveCfg = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Debug|x86.Build.0 = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Experimental|Any CPU.ActiveCfg = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Experimental|Any CPU.Build.0 = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Experimental|arm64.ActiveCfg = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Experimental|arm64.Build.0 = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Experimental|x64.ActiveCfg = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Experimental|x64.Build.0 = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Experimental|x86.ActiveCfg = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Experimental|x86.Build.0 = Debug|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Release|Any CPU.Build.0 = Release|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Release|arm64.ActiveCfg = Release|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Release|arm64.Build.0 = Release|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Release|x64.ActiveCfg = Release|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Release|x64.Build.0 = Release|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Release|x86.ActiveCfg = Release|Any CPU + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B}.Release|x86.Build.0 = Release|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Debug|arm64.ActiveCfg = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Debug|arm64.Build.0 = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Debug|x64.ActiveCfg = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Debug|x64.Build.0 = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Debug|x86.ActiveCfg = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Debug|x86.Build.0 = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Experimental|Any CPU.ActiveCfg = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Experimental|Any CPU.Build.0 = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Experimental|arm64.ActiveCfg = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Experimental|arm64.Build.0 = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Experimental|x64.ActiveCfg = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Experimental|x64.Build.0 = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Experimental|x86.ActiveCfg = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Experimental|x86.Build.0 = Debug|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Release|Any CPU.Build.0 = Release|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Release|arm64.ActiveCfg = Release|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Release|arm64.Build.0 = Release|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Release|x64.ActiveCfg = Release|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Release|x64.Build.0 = Release|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Release|x86.ActiveCfg = Release|Any CPU + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB}.Release|x86.Build.0 = Release|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Debug|arm64.ActiveCfg = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Debug|arm64.Build.0 = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Debug|x64.ActiveCfg = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Debug|x64.Build.0 = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Debug|x86.ActiveCfg = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Debug|x86.Build.0 = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Experimental|Any CPU.ActiveCfg = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Experimental|Any CPU.Build.0 = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Experimental|arm64.ActiveCfg = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Experimental|arm64.Build.0 = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Experimental|x64.ActiveCfg = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Experimental|x64.Build.0 = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Experimental|x86.ActiveCfg = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Experimental|x86.Build.0 = Debug|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Release|Any CPU.Build.0 = Release|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Release|arm64.ActiveCfg = Release|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Release|arm64.Build.0 = Release|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Release|x64.ActiveCfg = Release|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Release|x64.Build.0 = Release|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Release|x86.ActiveCfg = Release|Any CPU + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -324,6 +436,11 @@ Global {0B722EAE-DA7A-4091-9024-9BB9CC37F527} = {8D51A09F-8405-4FDE-93DA-A94344FE21AD} {FB009A01-72E0-45DE-820D-1C206127E6B7} = {8D51A09F-8405-4FDE-93DA-A94344FE21AD} {34D48E09-AC8C-4041-81BC-3B8D82337B28} = {D1DA471E-DDC4-4E38-90DE-176962DC066C} + {ACDD7910-6BFA-4AE7-8C94-C8EB547D92D5} = {F9BF4537-A009-425A-A2F4-AB41F112AFFC} + {AE67EC3E-1BB7-46BF-8A12-F038DE50435B} = {F9BF4537-A009-425A-A2F4-AB41F112AFFC} + {B7FC7E59-7B97-41E5-AB0D-68D9E6361FAB} = {F9BF4537-A009-425A-A2F4-AB41F112AFFC} + {A00B1BD9-5DD5-4FED-BACF-7A846B0894CB} = {F9BF4537-A009-425A-A2F4-AB41F112AFFC} + {795121AE-46F8-497C-9A73-F9DFFCB6BC57} = {8D51A09F-8405-4FDE-93DA-A94344FE21AD} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {C9C19842-C961-4102-B010-686DFA11972C}