mirror of
				https://github.com/nsnail/spectre.console.git
				synced 2025-11-01 01:25:27 +08:00 
			
		
		
		
	Renames BaseAnalyzer to SpectreAnalyzer
This commit is contained in:
		 Phil Scott
					Phil Scott
				
			
				
					committed by
					
						 Patrik Svensson
						Patrik Svensson
					
				
			
			
				
	
			
			
			 Patrik Svensson
						Patrik Svensson
					
				
			
						parent
						
							8b058d6342
						
					
				
				
					commit
					721d73e9eb
				
			| @@ -1,11 +1,14 @@ | ||||
| using System.Threading; | ||||
| using Spectre.Console; | ||||
|  | ||||
| namespace Spectre.Console.Analyzer.Sandbox | ||||
| { | ||||
|     class Program | ||||
|     /// <summary> | ||||
|     /// Sample sandbox for testing out analyzers. | ||||
|     /// </summary> | ||||
|     public static class Program | ||||
|     { | ||||
|         static void Main() | ||||
|         /// <summary> | ||||
|         /// Main. | ||||
|         /// </summary> | ||||
|         public static void Main() | ||||
|         { | ||||
|             AnsiConsole.WriteLine("Project is set up with a reference to Spectre.Console.Analyzer"); | ||||
|         } | ||||
|   | ||||
| @@ -4,7 +4,9 @@ | ||||
|     <OutputType>Exe</OutputType> | ||||
|     <TargetFramework>net5.0</TargetFramework> | ||||
|   </PropertyGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <AdditionalFiles Include="..\stylecop.json" Link="Properties/stylecop.json" /> | ||||
|   </ItemGroup> | ||||
|   <ItemGroup> | ||||
|     <ProjectReference Include="..\Spectre.Console.Analyzer\Spectre.Console.Analyzer.csproj" PrivateAssets="all" ReferenceOutputAssembly="false" OutputItemType="Analyzer" /> | ||||
|     <ProjectReference Include="..\Spectre.Console\Spectre.Console.csproj" /> | ||||
|   | ||||
| @@ -12,7 +12,7 @@ namespace Spectre.Console.Analyzer | ||||
|     /// Analyzer to suggest using available instances of AnsiConsole over the static methods. | ||||
|     /// </summary> | ||||
|     [DiagnosticAnalyzer(LanguageNames.CSharp)] | ||||
|     public class FavorInstanceAnsiConsoleOverStaticAnalyzer : BaseAnalyzer | ||||
|     public class FavorInstanceAnsiConsoleOverStaticAnalyzer : SpectreAnalyzer | ||||
|     { | ||||
|         private static readonly DiagnosticDescriptor _diagnosticDescriptor = | ||||
|             Descriptors.S1010_FavorInstanceAnsiConsoleOverStatic; | ||||
|   | ||||
| @@ -14,7 +14,7 @@ namespace Spectre.Console.Analyzer | ||||
|     /// </summary> | ||||
|     [DiagnosticAnalyzer(LanguageNames.CSharp)] | ||||
|     [Shared] | ||||
|     public class NoConcurrentLiveRenderablesAnalyzer : BaseAnalyzer | ||||
|     public class NoConcurrentLiveRenderablesAnalyzer : SpectreAnalyzer | ||||
|     { | ||||
|         private static readonly DiagnosticDescriptor _diagnosticDescriptor = | ||||
|             Descriptors.S1020_AvoidConcurrentCallsToMultipleLiveRenderables; | ||||
|   | ||||
| @@ -14,7 +14,7 @@ namespace Spectre.Console.Analyzer | ||||
|     /// </summary> | ||||
|     [DiagnosticAnalyzer(LanguageNames.CSharp)] | ||||
|     [Shared] | ||||
|     public class NoPromptsDuringLiveRenderablesAnalyzer : BaseAnalyzer | ||||
|     public class NoPromptsDuringLiveRenderablesAnalyzer : SpectreAnalyzer | ||||
|     { | ||||
|         private static readonly DiagnosticDescriptor _diagnosticDescriptor = | ||||
|             Descriptors.S1021_AvoidPromptCallsDuringLiveRenderables; | ||||
|   | ||||
| @@ -5,7 +5,7 @@ namespace Spectre.Console.Analyzer | ||||
|     /// <summary> | ||||
|     /// Base class for Spectre analyzers. | ||||
|     /// </summary> | ||||
|     public abstract class BaseAnalyzer : DiagnosticAnalyzer | ||||
|     public abstract class SpectreAnalyzer : DiagnosticAnalyzer | ||||
|     { | ||||
|         /// <inheritdoc /> | ||||
|         public override void Initialize(AnalysisContext context) | ||||
| @@ -10,7 +10,7 @@ namespace Spectre.Console.Analyzer | ||||
|     /// Analyzer to enforce the use of AnsiConsole over System.Console for known methods. | ||||
|     /// </summary> | ||||
|     [DiagnosticAnalyzer(LanguageNames.CSharp)] | ||||
|     public class UseSpectreInsteadOfSystemConsoleAnalyzer : BaseAnalyzer | ||||
|     public class UseSpectreInsteadOfSystemConsoleAnalyzer : SpectreAnalyzer | ||||
|     { | ||||
|         private static readonly DiagnosticDescriptor _diagnosticDescriptor = | ||||
|             Descriptors.S1000_UseAnsiConsoleOverSystemConsole; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user