Skip to content

Commit

Permalink
Removing unnecessary types
Browse files Browse the repository at this point in the history
  • Loading branch information
JanKrivanek committed Feb 20, 2024
1 parent 72749c4 commit 9314121
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 42 deletions.
4 changes: 0 additions & 4 deletions src/Analyzers/API/BuildAnalyzerConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ public class BuildAnalyzerConfiguration
public static BuildAnalyzerConfiguration Default { get; } = new()
{
LifeTimeScope = Experimental.LifeTimeScope.PerProject,
SupportedInvocationConcurrency = InvocationConcurrency.Parallel,
PerformanceWeightClass = Experimental.PerformanceWeightClass.Normal,
EvaluationAnalysisScope = Experimental.EvaluationAnalysisScope.AnalyzedProjectOnly,
Severity = BuildAnalyzerResultSeverity.Info,
IsEnabled = false,
Expand All @@ -18,8 +16,6 @@ public class BuildAnalyzerConfiguration
public static BuildAnalyzerConfiguration Null { get; } = new();

public LifeTimeScope? LifeTimeScope { get; internal init; }
public InvocationConcurrency? SupportedInvocationConcurrency { get; internal init; }
public PerformanceWeightClass? PerformanceWeightClass { get; internal init; }
public EvaluationAnalysisScope? EvaluationAnalysisScope { get; internal init; }
public BuildAnalyzerResultSeverity? Severity { get; internal init; }
public bool? IsEnabled { get; internal init; }
Expand Down
10 changes: 0 additions & 10 deletions src/Analyzers/API/InvocationConcurrency.cs

This file was deleted.

11 changes: 0 additions & 11 deletions src/Analyzers/API/PerformanceWeightClass.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ namespace Microsoft.Build.Analyzers.Infrastructure;
internal sealed class BuildAnalyzerConfigurationInternal
{
public LifeTimeScope LifeTimeScope { get; internal init; }
public InvocationConcurrency SupportedInvocationConcurrency { get; internal init; }
public PerformanceWeightClass PerformanceWeightClass { get; internal init; }
public EvaluationAnalysisScope EvaluationAnalysisScope { get; internal init; }
public BuildAnalyzerResultSeverity Severity { get; internal init; }
public bool IsEnabled { get; internal init; }
Expand Down
2 changes: 0 additions & 2 deletions src/Analyzers/Infrastructure/ConfigurationProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,9 @@ public static BuildAnalyzerConfigurationInternal GetMergedConfiguration(BuildAna

return new BuildAnalyzerConfigurationInternal()
{
SupportedInvocationConcurrency = GetConfigValue(editorConfig, defaultConfig, cfg => cfg.SupportedInvocationConcurrency),
EvaluationAnalysisScope = GetConfigValue(editorConfig, defaultConfig, cfg => cfg.EvaluationAnalysisScope),
IsEnabled = GetConfigValue(editorConfig, defaultConfig, cfg => cfg.IsEnabled),
LifeTimeScope = GetConfigValue(editorConfig, defaultConfig, cfg => cfg.LifeTimeScope),
PerformanceWeightClass = GetConfigValue(editorConfig, defaultConfig, cfg => cfg.PerformanceWeightClass),
Severity = GetConfigValue(editorConfig, defaultConfig, cfg => cfg.Severity)
};

Expand Down
13 changes: 0 additions & 13 deletions src/Analyzers/OM/ParsedItemsContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,9 @@
using Microsoft.Build.Construction;

namespace Microsoft.Build.Experimental;
public enum ItemType
{
ProjectReference,
PackageReference,
Compile,
EmbeddedResource
}

public static class ItemTypeExtensions
{
public static IEnumerable<ProjectItemElement> GetItemsOfType(this IEnumerable<ProjectItemElement> items, ItemType itemType)
=> GetItemsOfType(items, itemType.ToString());

public static IEnumerable<ProjectItemElement> GetItemsOfType(this IEnumerable<ProjectItemElement> items,
string itemType)
{
Expand All @@ -36,9 +26,6 @@ public class ItemsHolder(IEnumerable<ProjectItemElement> items, IEnumerable<Proj
public IEnumerable<ProjectItemElement> Items { get; } = items;
public IEnumerable<ProjectItemGroupElement> ItemGroups { get; } = itemGroups;

public IEnumerable<ProjectItemElement> GetItemsOfType(ItemType itemType)
=> Items.GetItemsOfType(itemType);

public IEnumerable<ProjectItemElement> GetItemsOfType(string itemType)
{
return Items.GetItemsOfType(itemType);
Expand Down

0 comments on commit 9314121

Please sign in to comment.