diff --git a/AssignAll/AssignAll.Vsix/source.extension.vsixmanifest b/AssignAll/AssignAll.Vsix/source.extension.vsixmanifest index 9908d0f..d5d7b22 100644 --- a/AssignAll/AssignAll.Vsix/source.extension.vsixmanifest +++ b/AssignAll/AssignAll.Vsix/source.extension.vsixmanifest @@ -1,9 +1,9 @@ - + AssignAll - This is a sample diagnostic extension for the .NET Compiler Platform ("Roslyn"). + Diagnostic error if there are unassigned members in an object initializer and a code fix to add the missing ones. @@ -16,7 +16,7 @@ - - + + \ No newline at end of file diff --git a/RoslynAnalyzers.sln b/RoslynAnalyzers.sln index 3e4d490..e233def 100644 --- a/RoslynAnalyzers.sln +++ b/RoslynAnalyzers.sln @@ -1,21 +1,31 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29613.14 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32901.215 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssignAll", "AssignAll\AssignAll\AssignAll.csproj", "{0D09FF78-4E40-4B3A-A8A5-228248C57B0A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AssignAll", "AssignAll\AssignAll\AssignAll.csproj", "{0D09FF78-4E40-4B3A-A8A5-228248C57B0A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssignAll.Test", "AssignAll\AssignAll.Test\AssignAll.Test.csproj", "{A688797A-94FA-428C-9815-DCC927C1293A}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AssignAll.Test", "AssignAll\AssignAll.Test\AssignAll.Test.csproj", "{A688797A-94FA-428C-9815-DCC927C1293A}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssignAll.Vsix", "AssignAll\AssignAll.Vsix\AssignAll.Vsix.csproj", "{B176E12E-F1EB-4776-9D13-3F4E9064E08D}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssignAll.Vsix", "AssignAll\AssignAll.Vsix\AssignAll.Vsix.csproj", "{076FA7EA-CC46-44B4-B24E-19FAF20DF1FB}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Files", "Files", "{D4A0A564-543B-4220-8194-F1E7447A4E2D}" -ProjectSection(SolutionItems) = preProject - appveyor.yml = appveyor.yml - README.md = README.md -EndProjectSection + ProjectSection(SolutionItems) = preProject + appveyor.yml = appveyor.yml + README.md = README.md + EndProjectSection EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Samples.ConsoleNet6", "Samples.ConsoleNet6\Samples.ConsoleNet6.csproj", "{4A5DE914-8128-4CA6-87CE-0B9A9F2B91FE}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Samples.ConsoleNet6", "Samples.ConsoleNet6\Samples.ConsoleNet6.csproj", "{4A5DE914-8128-4CA6-87CE-0B9A9F2B91FE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Analyzer1", "temp\Analyzer1\Analyzer1\Analyzer1.csproj", "{39E394EC-FEBB-4EDF-BF92-16E94B18112E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Analyzer1.CodeFixes", "temp\Analyzer1\Analyzer1.CodeFixes\Analyzer1.CodeFixes.csproj", "{A471C930-FBCA-4C5A-8366-06BD2E8BB3BB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Analyzer1.Package", "temp\Analyzer1\Analyzer1.Package\Analyzer1.Package.csproj", "{8E03FEA6-0C0D-488C-B134-63D58D53BC81}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Analyzer1.Test", "temp\Analyzer1\Analyzer1.Test\Analyzer1.Test.csproj", "{45346443-A863-44C1-9CDF-2E8170423FA3}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Analyzer1.Vsix", "temp\Analyzer1\Analyzer1.Vsix\Analyzer1.Vsix.csproj", "{B643EE38-6D03-4CD4-BD33-5689C869AF9E}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -31,14 +41,34 @@ Global {A688797A-94FA-428C-9815-DCC927C1293A}.Debug|Any CPU.Build.0 = Debug|Any CPU {A688797A-94FA-428C-9815-DCC927C1293A}.Release|Any CPU.ActiveCfg = Release|Any CPU {A688797A-94FA-428C-9815-DCC927C1293A}.Release|Any CPU.Build.0 = Release|Any CPU - {B176E12E-F1EB-4776-9D13-3F4E9064E08D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {B176E12E-F1EB-4776-9D13-3F4E9064E08D}.Debug|Any CPU.Build.0 = Debug|Any CPU - {B176E12E-F1EB-4776-9D13-3F4E9064E08D}.Release|Any CPU.ActiveCfg = Release|Any CPU - {B176E12E-F1EB-4776-9D13-3F4E9064E08D}.Release|Any CPU.Build.0 = Release|Any CPU + {076FA7EA-CC46-44B4-B24E-19FAF20DF1FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {076FA7EA-CC46-44B4-B24E-19FAF20DF1FB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {076FA7EA-CC46-44B4-B24E-19FAF20DF1FB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {076FA7EA-CC46-44B4-B24E-19FAF20DF1FB}.Release|Any CPU.Build.0 = Release|Any CPU {4A5DE914-8128-4CA6-87CE-0B9A9F2B91FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4A5DE914-8128-4CA6-87CE-0B9A9F2B91FE}.Debug|Any CPU.Build.0 = Debug|Any CPU {4A5DE914-8128-4CA6-87CE-0B9A9F2B91FE}.Release|Any CPU.ActiveCfg = Release|Any CPU {4A5DE914-8128-4CA6-87CE-0B9A9F2B91FE}.Release|Any CPU.Build.0 = Release|Any CPU + {39E394EC-FEBB-4EDF-BF92-16E94B18112E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {39E394EC-FEBB-4EDF-BF92-16E94B18112E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {39E394EC-FEBB-4EDF-BF92-16E94B18112E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {39E394EC-FEBB-4EDF-BF92-16E94B18112E}.Release|Any CPU.Build.0 = Release|Any CPU + {A471C930-FBCA-4C5A-8366-06BD2E8BB3BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A471C930-FBCA-4C5A-8366-06BD2E8BB3BB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A471C930-FBCA-4C5A-8366-06BD2E8BB3BB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A471C930-FBCA-4C5A-8366-06BD2E8BB3BB}.Release|Any CPU.Build.0 = Release|Any CPU + {8E03FEA6-0C0D-488C-B134-63D58D53BC81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8E03FEA6-0C0D-488C-B134-63D58D53BC81}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8E03FEA6-0C0D-488C-B134-63D58D53BC81}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8E03FEA6-0C0D-488C-B134-63D58D53BC81}.Release|Any CPU.Build.0 = Release|Any CPU + {45346443-A863-44C1-9CDF-2E8170423FA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45346443-A863-44C1-9CDF-2E8170423FA3}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45346443-A863-44C1-9CDF-2E8170423FA3}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45346443-A863-44C1-9CDF-2E8170423FA3}.Release|Any CPU.Build.0 = Release|Any CPU + {B643EE38-6D03-4CD4-BD33-5689C869AF9E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B643EE38-6D03-4CD4-BD33-5689C869AF9E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B643EE38-6D03-4CD4-BD33-5689C869AF9E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B643EE38-6D03-4CD4-BD33-5689C869AF9E}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/temp/Analyzer1/Analyzer1.CodeFixes/Analyzer1.CodeFixes.csproj b/temp/Analyzer1/Analyzer1.CodeFixes/Analyzer1.CodeFixes.csproj new file mode 100644 index 0000000..48d9229 --- /dev/null +++ b/temp/Analyzer1/Analyzer1.CodeFixes/Analyzer1.CodeFixes.csproj @@ -0,0 +1,22 @@ + + + + netstandard2.0 + false + Analyzer1 + + + + + + + + + + + + + + + + diff --git a/temp/Analyzer1/Analyzer1.CodeFixes/Analyzer1CodeFixProvider.cs b/temp/Analyzer1/Analyzer1.CodeFixes/Analyzer1CodeFixProvider.cs new file mode 100644 index 0000000..a64eec1 --- /dev/null +++ b/temp/Analyzer1/Analyzer1.CodeFixes/Analyzer1CodeFixProvider.cs @@ -0,0 +1,71 @@ +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 Analyzer1 +{ + [ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(Analyzer1CodeFixProvider)), Shared] + public class Analyzer1CodeFixProvider : CodeFixProvider + { + public sealed override ImmutableArray FixableDiagnosticIds + { + get { return ImmutableArray.Create(Analyzer1Analyzer.DiagnosticId); } + } + + 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 declaration = root.FindToken(diagnosticSpan.Start).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), + equivalenceKey: nameof(CodeFixResources.CodeFixTitle)), + diagnostic); + } + + private async Task MakeUppercaseAsync(Document document, TypeDeclarationSyntax typeDecl, CancellationToken cancellationToken) + { + // Compute new uppercase name. + var identifierToken = typeDecl.Identifier; + var newName = identifierToken.Text.ToUpperInvariant(); + + // 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, newName, optionSet, cancellationToken).ConfigureAwait(false); + + // Return the new solution with the now-uppercase type name. + return newSolution; + } + } +} diff --git a/temp/Analyzer1/Analyzer1.CodeFixes/CodeFixResources.Designer.cs b/temp/Analyzer1/Analyzer1.CodeFixes/CodeFixResources.Designer.cs new file mode 100644 index 0000000..80f08b5 --- /dev/null +++ b/temp/Analyzer1/Analyzer1.CodeFixes/CodeFixResources.Designer.cs @@ -0,0 +1,83 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +namespace Analyzer1 +{ + /// + /// 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", "4.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("Analyzer1.CodeFixResources", typeof(CodeFixResources).GetTypeInfo().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 Make uppercase. + /// + internal static string CodeFixTitle + { + get + { + return ResourceManager.GetString("CodeFixTitle", resourceCulture); + } + } + } +} diff --git a/temp/Analyzer1/Analyzer1.CodeFixes/CodeFixResources.resx b/temp/Analyzer1/Analyzer1.CodeFixes/CodeFixResources.resx new file mode 100644 index 0000000..97abe68 --- /dev/null +++ b/temp/Analyzer1/Analyzer1.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 + + + Make uppercase + The title of the code fix. + + \ No newline at end of file diff --git a/temp/Analyzer1/Analyzer1.Package/Analyzer1.Package.csproj b/temp/Analyzer1/Analyzer1.Package/Analyzer1.Package.csproj new file mode 100644 index 0000000..db4ac82 --- /dev/null +++ b/temp/Analyzer1/Analyzer1.Package/Analyzer1.Package.csproj @@ -0,0 +1,45 @@ + + + + netstandard2.0 + false + true + true + + + + Analyzer1 + 1.0.0.0 + andre + http://LICENSE_URL_HERE_OR_DELETE_THIS_LINE + http://PROJECT_URL_HERE_OR_DELETE_THIS_LINE + http://ICON_URL_HERE_OR_DELETE_THIS_LINE + http://REPOSITORY_URL_HERE_OR_DELETE_THIS_LINE + false + Analyzer1 + Summary of changes made in this release of the package. + Copyright + Analyzer1, analyzers + true + true + + $(TargetsForTfmSpecificContentInPackage);_AddAnalyzersToOutput + + + + + + + + + + + + + + + + + + + diff --git a/temp/Analyzer1/Analyzer1.Package/tools/install.ps1 b/temp/Analyzer1/Analyzer1.Package/tools/install.ps1 new file mode 100644 index 0000000..f9bd789 --- /dev/null +++ b/temp/Analyzer1/Analyzer1.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 +# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u +# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVN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HRg6hO//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/temp/Analyzer1/Analyzer1.Package/tools/uninstall.ps1 b/temp/Analyzer1/Analyzer1.Package/tools/uninstall.ps1 new file mode 100644 index 0000000..17fd920 --- /dev/null +++ b/temp/Analyzer1/Analyzer1.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 +# CQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVkbW9u +# ZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0aW9uMR4wHAYDVQQDExVNaWNy +# b3NvZnQgQ29ycG9yYXRpb24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7wT4Sw8RdmGKdYTZoZmq +# 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/temp/Analyzer1/Analyzer1.Test/Analyzer1.Test.csproj b/temp/Analyzer1/Analyzer1.Test/Analyzer1.Test.csproj new file mode 100644 index 0000000..88b68cf --- /dev/null +++ b/temp/Analyzer1/Analyzer1.Test/Analyzer1.Test.csproj @@ -0,0 +1,28 @@ + + + + net6.0 + + true + true + + + + + + + + + + + + + + + + + + + + + diff --git a/temp/Analyzer1/Analyzer1.Test/Analyzer1UnitTests.cs b/temp/Analyzer1/Analyzer1.Test/Analyzer1UnitTests.cs new file mode 100644 index 0000000..b89fd6c --- /dev/null +++ b/temp/Analyzer1/Analyzer1.Test/Analyzer1UnitTests.cs @@ -0,0 +1,59 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Threading.Tasks; +using VerifyCS = Analyzer1.Test.CSharpCodeFixVerifier< + Analyzer1.Analyzer1Analyzer, + Analyzer1.Analyzer1CodeFixProvider>; + +namespace Analyzer1.Test +{ + [TestClass] + public class Analyzer1UnitTest + { + //No diagnostics expected to show up + [TestMethod] + public async Task TestMethod1() + { + var test = @""; + + await VerifyCS.VerifyAnalyzerAsync(test); + } + + //Diagnostic and CodeFix both triggered and checked for + [TestMethod] + public async Task TestMethod2() + { + var test = @" + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + using System.Diagnostics; + + namespace ConsoleApplication1 + { + class {|#0:TypeName|} + { + } + }"; + + var fixtest = @" + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + using System.Diagnostics; + + namespace ConsoleApplication1 + { + class TYPENAME + { + } + }"; + + var expected = VerifyCS.Diagnostic("Analyzer1").WithLocation(0).WithArguments("TypeName"); + await VerifyCS.VerifyCodeFixAsync(test, expected, fixtest); + } + } +} diff --git a/temp/Analyzer1/Analyzer1.Test/Verifiers/CSharpAnalyzerVerifier`1+Test.cs b/temp/Analyzer1/Analyzer1.Test/Verifiers/CSharpAnalyzerVerifier`1+Test.cs new file mode 100644 index 0000000..a5178af --- /dev/null +++ b/temp/Analyzer1/Analyzer1.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 Analyzer1.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/temp/Analyzer1/Analyzer1.Test/Verifiers/CSharpAnalyzerVerifier`1.cs b/temp/Analyzer1/Analyzer1.Test/Verifiers/CSharpAnalyzerVerifier`1.cs new file mode 100644 index 0000000..92c2d05 --- /dev/null +++ b/temp/Analyzer1/Analyzer1.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 Analyzer1.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/temp/Analyzer1/Analyzer1.Test/Verifiers/CSharpCodeFixVerifier`2+Test.cs b/temp/Analyzer1/Analyzer1.Test/Verifiers/CSharpCodeFixVerifier`2+Test.cs new file mode 100644 index 0000000..ce5be30 --- /dev/null +++ b/temp/Analyzer1/Analyzer1.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 Analyzer1.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/temp/Analyzer1/Analyzer1.Test/Verifiers/CSharpCodeFixVerifier`2.cs b/temp/Analyzer1/Analyzer1.Test/Verifiers/CSharpCodeFixVerifier`2.cs new file mode 100644 index 0000000..c9a4a42 --- /dev/null +++ b/temp/Analyzer1/Analyzer1.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 Analyzer1.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/temp/Analyzer1/Analyzer1.Test/Verifiers/CSharpCodeRefactoringVerifier`1+Test.cs b/temp/Analyzer1/Analyzer1.Test/Verifiers/CSharpCodeRefactoringVerifier`1+Test.cs new file mode 100644 index 0000000..dd4822e --- /dev/null +++ b/temp/Analyzer1/Analyzer1.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 Analyzer1.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/temp/Analyzer1/Analyzer1.Test/Verifiers/CSharpCodeRefactoringVerifier`1.cs b/temp/Analyzer1/Analyzer1.Test/Verifiers/CSharpCodeRefactoringVerifier`1.cs new file mode 100644 index 0000000..34aaedd --- /dev/null +++ b/temp/Analyzer1/Analyzer1.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 Analyzer1.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/temp/Analyzer1/Analyzer1.Test/Verifiers/CSharpVerifierHelper.cs b/temp/Analyzer1/Analyzer1.Test/Verifiers/CSharpVerifierHelper.cs new file mode 100644 index 0000000..fbfa927 --- /dev/null +++ b/temp/Analyzer1/Analyzer1.Test/Verifiers/CSharpVerifierHelper.cs @@ -0,0 +1,33 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using System; +using System.Collections.Immutable; + +namespace Analyzer1.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/temp/Analyzer1/Analyzer1.Test/Verifiers/VisualBasicAnalyzerVerifier`1+Test.cs b/temp/Analyzer1/Analyzer1.Test/Verifiers/VisualBasicAnalyzerVerifier`1+Test.cs new file mode 100644 index 0000000..0f4e0e5 --- /dev/null +++ b/temp/Analyzer1/Analyzer1.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 Analyzer1.Test +{ + public static partial class VisualBasicAnalyzerVerifier + where TAnalyzer : DiagnosticAnalyzer, new() + { + public class Test : VisualBasicAnalyzerTest + { + public Test() + { + } + } + } +} diff --git a/temp/Analyzer1/Analyzer1.Test/Verifiers/VisualBasicAnalyzerVerifier`1.cs b/temp/Analyzer1/Analyzer1.Test/Verifiers/VisualBasicAnalyzerVerifier`1.cs new file mode 100644 index 0000000..ab37258 --- /dev/null +++ b/temp/Analyzer1/Analyzer1.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 Analyzer1.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/temp/Analyzer1/Analyzer1.Test/Verifiers/VisualBasicCodeFixVerifier`2+Test.cs b/temp/Analyzer1/Analyzer1.Test/Verifiers/VisualBasicCodeFixVerifier`2+Test.cs new file mode 100644 index 0000000..e96227a --- /dev/null +++ b/temp/Analyzer1/Analyzer1.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 Analyzer1.Test +{ + public static partial class VisualBasicCodeFixVerifier + where TAnalyzer : DiagnosticAnalyzer, new() + where TCodeFix : CodeFixProvider, new() + { + public class Test : VisualBasicCodeFixTest + { + } + } +} diff --git a/temp/Analyzer1/Analyzer1.Test/Verifiers/VisualBasicCodeFixVerifier`2.cs b/temp/Analyzer1/Analyzer1.Test/Verifiers/VisualBasicCodeFixVerifier`2.cs new file mode 100644 index 0000000..a177e92 --- /dev/null +++ b/temp/Analyzer1/Analyzer1.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 Analyzer1.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/temp/Analyzer1/Analyzer1.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1+Test.cs b/temp/Analyzer1/Analyzer1.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1+Test.cs new file mode 100644 index 0000000..f8fca9e --- /dev/null +++ b/temp/Analyzer1/Analyzer1.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 Analyzer1.Test +{ + public static partial class VisualBasicCodeRefactoringVerifier + where TCodeRefactoring : CodeRefactoringProvider, new() + { + public class Test : VisualBasicCodeRefactoringTest + { + } + } +} diff --git a/temp/Analyzer1/Analyzer1.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1.cs b/temp/Analyzer1/Analyzer1.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1.cs new file mode 100644 index 0000000..a0d83e6 --- /dev/null +++ b/temp/Analyzer1/Analyzer1.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 Analyzer1.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/temp/Analyzer1/Analyzer1.Vsix/Analyzer1.Vsix.csproj b/temp/Analyzer1/Analyzer1.Vsix/Analyzer1.Vsix.csproj new file mode 100644 index 0000000..20f9f9a --- /dev/null +++ b/temp/Analyzer1/Analyzer1.Vsix/Analyzer1.Vsix.csproj @@ -0,0 +1,48 @@ + + + + + + net472 + AssignAll.Vsix + AssignAll.Vsix + + + + false + false + false + false + false + false + Roslyn + + + + + + + + Program + $(DevEnvDir)devenv.exe + /rootsuffix $(VSSDKTargetPlatformRegRootSuffix) + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/temp/Analyzer1/Analyzer1.Vsix/source.extension.vsixmanifest b/temp/Analyzer1/Analyzer1.Vsix/source.extension.vsixmanifest new file mode 100644 index 0000000..b871def --- /dev/null +++ b/temp/Analyzer1/Analyzer1.Vsix/source.extension.vsixmanifest @@ -0,0 +1,24 @@ + + + + + AssignAll + This is a sample diagnostic extension for the .NET Compiler Platform ("Roslyn"). + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/temp/Analyzer1/Analyzer1/Analyzer1.csproj b/temp/Analyzer1/Analyzer1/Analyzer1.csproj new file mode 100644 index 0000000..7176c81 --- /dev/null +++ b/temp/Analyzer1/Analyzer1/Analyzer1.csproj @@ -0,0 +1,21 @@ + + + + netstandard2.0 + false + + + *$(MSBuildProjectFile)* + + + + + + + + + + + + + diff --git a/temp/Analyzer1/Analyzer1/Analyzer1Analyzer.cs b/temp/Analyzer1/Analyzer1/Analyzer1Analyzer.cs new file mode 100644 index 0000000..1482977 --- /dev/null +++ b/temp/Analyzer1/Analyzer1/Analyzer1Analyzer.cs @@ -0,0 +1,54 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.CodeAnalysis.Diagnostics; +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using System.Threading; + +namespace Analyzer1 +{ + [DiagnosticAnalyzer(LanguageNames.CSharp)] + public class Analyzer1Analyzer : DiagnosticAnalyzer + { + public const string DiagnosticId = "Analyzer1"; + + // 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 Title = new LocalizableResourceString(nameof(Resources.AnalyzerTitle), Resources.ResourceManager, typeof(Resources)); + private static readonly LocalizableString MessageFormat = new LocalizableResourceString(nameof(Resources.AnalyzerMessageFormat), Resources.ResourceManager, typeof(Resources)); + private static readonly LocalizableString Description = new LocalizableResourceString(nameof(Resources.AnalyzerDescription), Resources.ResourceManager, typeof(Resources)); + private const string Category = "Naming"; + + private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true, description: Description); + + public override ImmutableArray SupportedDiagnostics { get { return ImmutableArray.Create(Rule); } } + + public override void Initialize(AnalysisContext context) + { + context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); + context.EnableConcurrentExecution(); + + // TODO: Consider registering other actions that act on syntax instead of or in addition to symbols + // See https://github.com/dotnet/roslyn/blob/main/docs/analyzers/Analyzer%20Actions%20Semantics.md for more information + context.RegisterSymbolAction(AnalyzeSymbol, SymbolKind.NamedType); + } + + private static void AnalyzeSymbol(SymbolAnalysisContext context) + { + // TODO: Replace the following code with your own analysis, generating Diagnostic objects for any issues you find + var namedTypeSymbol = (INamedTypeSymbol)context.Symbol; + + // Find just those named type symbols with names containing lowercase letters. + if (namedTypeSymbol.Name.ToCharArray().Any(char.IsLower)) + { + // For all such symbols, produce a diagnostic. + var diagnostic = Diagnostic.Create(Rule, namedTypeSymbol.Locations[0], namedTypeSymbol.Name); + + context.ReportDiagnostic(diagnostic); + } + } + } +} diff --git a/temp/Analyzer1/Analyzer1/Resources.Designer.cs b/temp/Analyzer1/Analyzer1/Resources.Designer.cs new file mode 100644 index 0000000..6b0e73d --- /dev/null +++ b/temp/Analyzer1/Analyzer1/Resources.Designer.cs @@ -0,0 +1,105 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +namespace Analyzer1 +{ + /// + /// 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", "4.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("Analyzer1.Resources", typeof(Resources).GetTypeInfo().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 Type names should be all uppercase.. + /// + internal static string AnalyzerDescription + { + get + { + return ResourceManager.GetString("AnalyzerDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type name '{0}' contains lowercase letters. + /// + internal static string AnalyzerMessageFormat + { + get + { + return ResourceManager.GetString("AnalyzerMessageFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type name contains lowercase letters. + /// + internal static string AnalyzerTitle + { + get + { + return ResourceManager.GetString("AnalyzerTitle", resourceCulture); + } + } + } +} diff --git a/temp/Analyzer1/Analyzer1/Resources.resx b/temp/Analyzer1/Analyzer1/Resources.resx new file mode 100644 index 0000000..410edcc --- /dev/null +++ b/temp/Analyzer1/Analyzer1/Resources.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + Type names should be all uppercase. + An optional longer localizable description of the diagnostic. + + + Type name '{0}' contains lowercase letters + The format-able message the diagnostic displays. + + + Type name contains lowercase letters + The title of the diagnostic. + + \ No newline at end of file diff --git a/temp2/AssignAll/AssignAll.sln b/temp2/AssignAll/AssignAll.sln new file mode 100644 index 0000000..8dfd7d2 --- /dev/null +++ b/temp2/AssignAll/AssignAll.sln @@ -0,0 +1,49 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33213.308 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssignAll", "AssignAll\AssignAll\AssignAll.csproj", "{DF44F8AA-F09E-4718-A227-A96D2D6059DD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssignAll.CodeFixes", "AssignAll\AssignAll.CodeFixes\AssignAll.CodeFixes.csproj", "{6E473567-1C5C-4933-B45A-FBD653F37706}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssignAll.Package", "AssignAll\AssignAll.Package\AssignAll.Package.csproj", "{D438D372-C906-4DB9-AF7B-B100757D3CC8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssignAll.Test", "AssignAll\AssignAll.Test\AssignAll.Test.csproj", "{6BB5C782-969E-41E0-B2EF-E243FAE8AFD1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AssignAll.Vsix", "AssignAll\AssignAll.Vsix\AssignAll.Vsix.csproj", "{C2B76637-9A81-4113-A6FB-C67135C9B093}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DF44F8AA-F09E-4718-A227-A96D2D6059DD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DF44F8AA-F09E-4718-A227-A96D2D6059DD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DF44F8AA-F09E-4718-A227-A96D2D6059DD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DF44F8AA-F09E-4718-A227-A96D2D6059DD}.Release|Any CPU.Build.0 = Release|Any CPU + {6E473567-1C5C-4933-B45A-FBD653F37706}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6E473567-1C5C-4933-B45A-FBD653F37706}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6E473567-1C5C-4933-B45A-FBD653F37706}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6E473567-1C5C-4933-B45A-FBD653F37706}.Release|Any CPU.Build.0 = Release|Any CPU + {D438D372-C906-4DB9-AF7B-B100757D3CC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D438D372-C906-4DB9-AF7B-B100757D3CC8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D438D372-C906-4DB9-AF7B-B100757D3CC8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D438D372-C906-4DB9-AF7B-B100757D3CC8}.Release|Any CPU.Build.0 = Release|Any CPU + {6BB5C782-969E-41E0-B2EF-E243FAE8AFD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6BB5C782-969E-41E0-B2EF-E243FAE8AFD1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6BB5C782-969E-41E0-B2EF-E243FAE8AFD1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6BB5C782-969E-41E0-B2EF-E243FAE8AFD1}.Release|Any CPU.Build.0 = Release|Any CPU + {C2B76637-9A81-4113-A6FB-C67135C9B093}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C2B76637-9A81-4113-A6FB-C67135C9B093}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C2B76637-9A81-4113-A6FB-C67135C9B093}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C2B76637-9A81-4113-A6FB-C67135C9B093}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {BED6C120-F333-462F-A82C-E02E3FAA543D} + EndGlobalSection +EndGlobal diff --git a/temp2/AssignAll/AssignAll/AssignAll.CodeFixes/AssignAll.CodeFixes.csproj b/temp2/AssignAll/AssignAll/AssignAll.CodeFixes/AssignAll.CodeFixes.csproj new file mode 100644 index 0000000..1a2ea51 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.CodeFixes/AssignAll.CodeFixes.csproj @@ -0,0 +1,22 @@ + + + + netstandard2.0 + false + AssignAll + + + + + + + + + + + + + + + + diff --git a/temp2/AssignAll/AssignAll/AssignAll.CodeFixes/AssignAllCodeFixProvider.cs b/temp2/AssignAll/AssignAll/AssignAll.CodeFixes/AssignAllCodeFixProvider.cs new file mode 100644 index 0000000..6a23c59 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.CodeFixes/AssignAllCodeFixProvider.cs @@ -0,0 +1,71 @@ +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 AssignAll +{ + [ExportCodeFixProvider(LanguageNames.CSharp, Name = nameof(AssignAllCodeFixProvider)), Shared] + public class AssignAllCodeFixProvider : CodeFixProvider + { + public sealed override ImmutableArray FixableDiagnosticIds + { + get { return ImmutableArray.Create(AssignAllAnalyzer.DiagnosticId); } + } + + 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 declaration = root.FindToken(diagnosticSpan.Start).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), + equivalenceKey: nameof(CodeFixResources.CodeFixTitle)), + diagnostic); + } + + private async Task MakeUppercaseAsync(Document document, TypeDeclarationSyntax typeDecl, CancellationToken cancellationToken) + { + // Compute new uppercase name. + var identifierToken = typeDecl.Identifier; + var newName = identifierToken.Text.ToUpperInvariant(); + + // 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, newName, optionSet, cancellationToken).ConfigureAwait(false); + + // Return the new solution with the now-uppercase type name. + return newSolution; + } + } +} diff --git a/temp2/AssignAll/AssignAll/AssignAll.CodeFixes/CodeFixResources.Designer.cs b/temp2/AssignAll/AssignAll/AssignAll.CodeFixes/CodeFixResources.Designer.cs new file mode 100644 index 0000000..e748423 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.CodeFixes/CodeFixResources.Designer.cs @@ -0,0 +1,83 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +namespace AssignAll +{ + /// + /// 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", "4.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("AssignAll.CodeFixResources", typeof(CodeFixResources).GetTypeInfo().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 Make uppercase. + /// + internal static string CodeFixTitle + { + get + { + return ResourceManager.GetString("CodeFixTitle", resourceCulture); + } + } + } +} diff --git a/temp2/AssignAll/AssignAll/AssignAll.CodeFixes/CodeFixResources.resx b/temp2/AssignAll/AssignAll/AssignAll.CodeFixes/CodeFixResources.resx new file mode 100644 index 0000000..97abe68 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.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 + + + Make uppercase + The title of the code fix. + + \ No newline at end of file diff --git a/temp2/AssignAll/AssignAll/AssignAll.Package/AssignAll.Package.csproj b/temp2/AssignAll/AssignAll/AssignAll.Package/AssignAll.Package.csproj new file mode 100644 index 0000000..4a2725c --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.Package/AssignAll.Package.csproj @@ -0,0 +1,45 @@ + + + + netstandard2.0 + false + true + true + + + + AssignAll + 1.0.0.0 + andre + http://LICENSE_URL_HERE_OR_DELETE_THIS_LINE + http://PROJECT_URL_HERE_OR_DELETE_THIS_LINE + http://ICON_URL_HERE_OR_DELETE_THIS_LINE + http://REPOSITORY_URL_HERE_OR_DELETE_THIS_LINE + false + AssignAll + Summary of changes made in this release of the package. + Copyright + AssignAll, analyzers + true + true + + $(TargetsForTfmSpecificContentInPackage);_AddAnalyzersToOutput + + + + + + + + + + + + + + + + + + + diff --git a/temp2/AssignAll/AssignAll/AssignAll.Package/tools/install.ps1 b/temp2/AssignAll/AssignAll/AssignAll.Package/tools/install.ps1 new file mode 100644 index 0000000..f9bd789 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.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 +# CQYDVQQGEwJV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ZWQxJjAkBgNVBAsTHVRoYWxlcyBUU1Mg +# RVNOOjNCRDQtNEI4MC02OUMzMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFt +# cCBTZXJ2aWNlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvQZXxZFm +# a6plmuOyvNpV8xONOwcYolZG/BjyZWGSk5JOGaLyrKId5VxVHWHlsmJE4Svnzsdp +# sKmVx8otONveIUFvSceEZp8VXmu5m1fu8L7c+3lwXcibjccqtEvtQslokQVx0r+L +# 54abrNDarwFG73IaRidIS1i9c+unJ8oYyhDRLrCysFAVxyQhPNZkWK7Z8/VGukaK +# LAWHXCh/+R53h42gFL+9/mAALxzCXXuofi8f/XKCm7xNwVc1hONCCz6oq94AufzV +# NkkIW4brUQgYpCcJm9U0XNmQvtropYDn9UtY8YQ0NKenXPtdgLHdQ8Nnv3igErKL +# rWI0a5n5jjdKfwk+8mvakqdZmlOseeOS1XspQNJAK1uZllAITcnQZOcO5ofjOQ33 +# ujWckAXdz+/x3o7l4AU/TSOMzGZMwhUdtVwC3dSbItpSVFgnjM2COEJ9zgCadvOi +# rGDLN471jZI2jClkjsJTdgPk343TQA4JFvds/unZq0uLr+niZ3X44OBx2x+gVlln +# 2c4UbZXNueA4yS1TJGbbJFIILAmTUA9Auj5eISGTbNiyWx79HnCOTar39QEKozm4 +# LnTmDXy0/KI/H/nYZGKuTHfckP28wQS06rD+fDS5xLwcRMCW92DkHXmtbhGyRilB +# OL5LxZelQfxt54wl4WUC0AdAEolPekODwO8CAwEAAaOCATYwggEyMB0GA1UdDgQW +# BBSXbx+zR1p4IIAeguA6rHKkrfl7UDAfBgNVHSMEGDAWgBSfpxVdAF5iXYP05dJl +# pxtTNRnpcjBfBgNVHR8EWDBWMFSgUqBQhk5odHRwOi8vd3d3Lm1pY3Jvc29mdC5j +# b20vcGtpb3BzL2NybC9NaWNyb3NvZnQlMjBUaW1lLVN0YW1wJTIwUENBJTIwMjAx +# MCg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F+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/temp2/AssignAll/AssignAll/AssignAll.Package/tools/uninstall.ps1 b/temp2/AssignAll/AssignAll/AssignAll.Package/tools/uninstall.ps1 new file mode 100644 index 0000000..17fd920 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.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 +# CQYDVQQGEwJVUzETMBEGA1UECBM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THVRoYWxlcyBUU1Mg +# RVNOOjNCRDQtNEI4MC02OUMzMSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFt +# cCBTZXJ2aWNlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAvQZXxZFm +# a6plmuOyvNpV8xONOwcYolZG/BjyZWGSk5JOGaLyrKId5VxVHWHlsmJE4Svnzsdp +# sKmVx8otONveIUFvSceEZp8VXmu5m1fu8L7c+3lwXcibjccqtEvtQslokQVx0r+L +# 54abrNDarwFG73IaRidIS1i9c+unJ8oYyhDRLrCysFAVxyQhPNZkWK7Z8/VGukaK +# LAWHXCh/+R53h42gFL+9/mAALxzCXXuofi8f/XKCm7xNwVc1hONCCz6oq94AufzV +# NkkIW4brUQgYpCcJm9U0XNmQvtropYDn9UtY8YQ0NKenXPtdgLHdQ8Nnv3igErKL +# rWI0a5n5jjdKfwk+8mvakqdZmlOseeOS1XspQNJAK1uZllAITcnQZOcO5ofjOQ33 +# ujWckAXdz+/x3o7l4AU/TSOMzGZMwhUdtVwC3dSbItpSVFgnjM2COEJ9zgCadvOi +# rGDLN471jZI2jClkjsJTdgPk343TQA4JFvds/unZq0uLr+niZ3X44OBx2x+gVlln +# 2c4UbZXNueA4yS1TJGbbJFIILAmTUA9Auj5eISGTbNiyWx79HnCOTar39QEKozm4 +# LnTmDXy0/KI/H/nYZGKuTHfckP28wQS06rD+fDS5xLwcRMCW92DkHXmtbhGyRilB +# OL5LxZelQfxt54wl4WUC0AdAEolPekODwO8CAwEAAaOCATYwggEyMB0GA1UdDgQW +# BBSXbx+zR1p4IIAeguA6rHKkrfl7UDAfBgNVHSMEGDAWgBSfpxVdAF5iXYP05dJl +# pxtTNRnpcjBfBgNVHR8EWDBWMFSgUqBQhk5odHRwOi8vd3d3Lm1pY3Jvc29mdC5j +# b20vcGtpb3BzL2NybC9NaWNyb3NvZnQlMjBUaW1lLVN0YW1wJTIwUENBJTIwMjAx +# MCgxKS5jcmwwbAYIKw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Hgh8LGBitCSFwu0q7ufv +# 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/temp2/AssignAll/AssignAll/AssignAll.Test/AssignAll.Test.csproj b/temp2/AssignAll/AssignAll/AssignAll.Test/AssignAll.Test.csproj new file mode 100644 index 0000000..a508ed3 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.Test/AssignAll.Test.csproj @@ -0,0 +1,28 @@ + + + + net7.0 + + true + true + + + + + + + + + + + + + + + + + + + + + diff --git a/temp2/AssignAll/AssignAll/AssignAll.Test/AssignAllUnitTests.cs b/temp2/AssignAll/AssignAll/AssignAll.Test/AssignAllUnitTests.cs new file mode 100644 index 0000000..1a51af7 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.Test/AssignAllUnitTests.cs @@ -0,0 +1,59 @@ +using Microsoft.VisualStudio.TestTools.UnitTesting; +using System.Threading.Tasks; +using VerifyCS = AssignAll.Test.CSharpCodeFixVerifier< + AssignAll.AssignAllAnalyzer, + AssignAll.AssignAllCodeFixProvider>; + +namespace AssignAll.Test +{ + [TestClass] + public class AssignAllUnitTest + { + //No diagnostics expected to show up + [TestMethod] + public async Task TestMethod1() + { + var test = @""; + + await VerifyCS.VerifyAnalyzerAsync(test); + } + + //Diagnostic and CodeFix both triggered and checked for + [TestMethod] + public async Task TestMethod2() + { + var test = @" + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + using System.Diagnostics; + + namespace ConsoleApplication1 + { + class {|#0:TypeName|} + { + } + }"; + + var fixtest = @" + using System; + using System.Collections.Generic; + using System.Linq; + using System.Text; + using System.Threading.Tasks; + using System.Diagnostics; + + namespace ConsoleApplication1 + { + class TYPENAME + { + } + }"; + + var expected = VerifyCS.Diagnostic("AssignAll").WithLocation(0).WithArguments("TypeName"); + await VerifyCS.VerifyCodeFixAsync(test, expected, fixtest); + } + } +} diff --git a/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/CSharpAnalyzerVerifier`1+Test.cs b/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/CSharpAnalyzerVerifier`1+Test.cs new file mode 100644 index 0000000..572e3d5 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.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 AssignAll.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/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/CSharpAnalyzerVerifier`1.cs b/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/CSharpAnalyzerVerifier`1.cs new file mode 100644 index 0000000..564fc8a --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.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 AssignAll.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/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/CSharpCodeFixVerifier`2+Test.cs b/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/CSharpCodeFixVerifier`2+Test.cs new file mode 100644 index 0000000..1b2279b --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.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 AssignAll.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/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/CSharpCodeFixVerifier`2.cs b/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/CSharpCodeFixVerifier`2.cs new file mode 100644 index 0000000..6948bcd --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.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 AssignAll.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/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/CSharpCodeRefactoringVerifier`1+Test.cs b/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/CSharpCodeRefactoringVerifier`1+Test.cs new file mode 100644 index 0000000..1a1e27b --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.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 AssignAll.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/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/CSharpCodeRefactoringVerifier`1.cs b/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/CSharpCodeRefactoringVerifier`1.cs new file mode 100644 index 0000000..5b1c8e1 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.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 AssignAll.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/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/CSharpVerifierHelper.cs b/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/CSharpVerifierHelper.cs new file mode 100644 index 0000000..6e1b334 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/CSharpVerifierHelper.cs @@ -0,0 +1,33 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using System; +using System.Collections.Immutable; + +namespace AssignAll.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/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/VisualBasicAnalyzerVerifier`1+Test.cs b/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/VisualBasicAnalyzerVerifier`1+Test.cs new file mode 100644 index 0000000..3f65fc4 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.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 AssignAll.Test +{ + public static partial class VisualBasicAnalyzerVerifier + where TAnalyzer : DiagnosticAnalyzer, new() + { + public class Test : VisualBasicAnalyzerTest + { + public Test() + { + } + } + } +} diff --git a/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/VisualBasicAnalyzerVerifier`1.cs b/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/VisualBasicAnalyzerVerifier`1.cs new file mode 100644 index 0000000..211e050 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.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 AssignAll.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/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/VisualBasicCodeFixVerifier`2+Test.cs b/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/VisualBasicCodeFixVerifier`2+Test.cs new file mode 100644 index 0000000..ae67c5d --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.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 AssignAll.Test +{ + public static partial class VisualBasicCodeFixVerifier + where TAnalyzer : DiagnosticAnalyzer, new() + where TCodeFix : CodeFixProvider, new() + { + public class Test : VisualBasicCodeFixTest + { + } + } +} diff --git a/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/VisualBasicCodeFixVerifier`2.cs b/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/VisualBasicCodeFixVerifier`2.cs new file mode 100644 index 0000000..3b37676 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.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 AssignAll.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/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1+Test.cs b/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1+Test.cs new file mode 100644 index 0000000..87095d4 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.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 AssignAll.Test +{ + public static partial class VisualBasicCodeRefactoringVerifier + where TCodeRefactoring : CodeRefactoringProvider, new() + { + public class Test : VisualBasicCodeRefactoringTest + { + } + } +} diff --git a/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1.cs b/temp2/AssignAll/AssignAll/AssignAll.Test/Verifiers/VisualBasicCodeRefactoringVerifier`1.cs new file mode 100644 index 0000000..e21edaf --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.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 AssignAll.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/temp2/AssignAll/AssignAll/AssignAll.Vsix/AssignAll.Vsix.csproj b/temp2/AssignAll/AssignAll/AssignAll.Vsix/AssignAll.Vsix.csproj new file mode 100644 index 0000000..6ee3ed8 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.Vsix/AssignAll.Vsix.csproj @@ -0,0 +1,48 @@ + + + + + + net481 + AssignAll.Vsix + AssignAll.Vsix + + + + false + false + false + false + false + false + Roslyn + + + + + + + + Program + $(DevEnvDir)devenv.exe + /rootsuffix $(VSSDKTargetPlatformRegRootSuffix) + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/temp2/AssignAll/AssignAll/AssignAll.Vsix/source.extension.vsixmanifest b/temp2/AssignAll/AssignAll/AssignAll.Vsix/source.extension.vsixmanifest new file mode 100644 index 0000000..37b5468 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll.Vsix/source.extension.vsixmanifest @@ -0,0 +1,24 @@ + + + + + AssignAll + This is a sample diagnostic extension for the .NET Compiler Platform ("Roslyn"). + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/temp2/AssignAll/AssignAll/AssignAll/AssignAll.csproj b/temp2/AssignAll/AssignAll/AssignAll/AssignAll.csproj new file mode 100644 index 0000000..87113d2 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll/AssignAll.csproj @@ -0,0 +1,24 @@ + + + + netstandard2.0 + false + + + *$(MSBuildProjectFile)* + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + + + diff --git a/temp2/AssignAll/AssignAll/AssignAll/AssignAllAnalyzer.cs b/temp2/AssignAll/AssignAll/AssignAll/AssignAllAnalyzer.cs new file mode 100644 index 0000000..ecb0500 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll/AssignAllAnalyzer.cs @@ -0,0 +1,54 @@ +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using Microsoft.CodeAnalysis.CSharp.Syntax; +using Microsoft.CodeAnalysis.Diagnostics; +using System; +using System.Collections.Generic; +using System.Collections.Immutable; +using System.Linq; +using System.Threading; + +namespace AssignAll +{ + [DiagnosticAnalyzer(LanguageNames.CSharp)] + public class AssignAllAnalyzer : DiagnosticAnalyzer + { + public const string DiagnosticId = "AssignAll"; + + // 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 Title = new LocalizableResourceString(nameof(Resources.AnalyzerTitle), Resources.ResourceManager, typeof(Resources)); + private static readonly LocalizableString MessageFormat = new LocalizableResourceString(nameof(Resources.AnalyzerMessageFormat), Resources.ResourceManager, typeof(Resources)); + private static readonly LocalizableString Description = new LocalizableResourceString(nameof(Resources.AnalyzerDescription), Resources.ResourceManager, typeof(Resources)); + private const string Category = "Naming"; + + private static readonly DiagnosticDescriptor Rule = new DiagnosticDescriptor(DiagnosticId, Title, MessageFormat, Category, DiagnosticSeverity.Warning, isEnabledByDefault: true, description: Description); + + public override ImmutableArray SupportedDiagnostics { get { return ImmutableArray.Create(Rule); } } + + public override void Initialize(AnalysisContext context) + { + context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.None); + context.EnableConcurrentExecution(); + + // TODO: Consider registering other actions that act on syntax instead of or in addition to symbols + // See https://github.com/dotnet/roslyn/blob/main/docs/analyzers/Analyzer%20Actions%20Semantics.md for more information + context.RegisterSymbolAction(AnalyzeSymbol, SymbolKind.NamedType); + } + + private static void AnalyzeSymbol(SymbolAnalysisContext context) + { + // TODO: Replace the following code with your own analysis, generating Diagnostic objects for any issues you find + var namedTypeSymbol = (INamedTypeSymbol)context.Symbol; + + // Find just those named type symbols with names containing lowercase letters. + if (namedTypeSymbol.Name.ToCharArray().Any(char.IsLower)) + { + // For all such symbols, produce a diagnostic. + var diagnostic = Diagnostic.Create(Rule, namedTypeSymbol.Locations[0], namedTypeSymbol.Name); + + context.ReportDiagnostic(diagnostic); + } + } + } +} diff --git a/temp2/AssignAll/AssignAll/AssignAll/Resources.Designer.cs b/temp2/AssignAll/AssignAll/AssignAll/Resources.Designer.cs new file mode 100644 index 0000000..664a499 --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll/Resources.Designer.cs @@ -0,0 +1,105 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.0 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +using System; +using System.Reflection; + +namespace AssignAll +{ + /// + /// 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", "4.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("AssignAll.Resources", typeof(Resources).GetTypeInfo().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 Type names should be all uppercase.. + /// + internal static string AnalyzerDescription + { + get + { + return ResourceManager.GetString("AnalyzerDescription", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type name '{0}' contains lowercase letters. + /// + internal static string AnalyzerMessageFormat + { + get + { + return ResourceManager.GetString("AnalyzerMessageFormat", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Type name contains lowercase letters. + /// + internal static string AnalyzerTitle + { + get + { + return ResourceManager.GetString("AnalyzerTitle", resourceCulture); + } + } + } +} diff --git a/temp2/AssignAll/AssignAll/AssignAll/Resources.resx b/temp2/AssignAll/AssignAll/AssignAll/Resources.resx new file mode 100644 index 0000000..410edcc --- /dev/null +++ b/temp2/AssignAll/AssignAll/AssignAll/Resources.resx @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + Type names should be all uppercase. + An optional longer localizable description of the diagnostic. + + + Type name '{0}' contains lowercase letters + The format-able message the diagnostic displays. + + + Type name contains lowercase letters + The title of the diagnostic. + + \ No newline at end of file