Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove some unused locals #9573

Merged
merged 1 commit into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ dotnet_diagnostic.IDE0030WithoutSuggestion.severity = error
dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (nullable)
dotnet_diagnostic.IDE0051.severity = warning # Private member unused
dotnet_diagnostic.IDE0052.severity = warning # Remove unread private members
dotnet_diagnostic.IDE0059.severity = error # Unnecessary assignment
dotnet_diagnostic.IDE0079.severity = warning # Unused suppresion
dotnet_diagnostic.IDE0083.severity = warning # Use pattern matching
dotnet_diagnostic.IDE0084.severity = warning # Use IsNot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ internal async Task<List<ProjectSystemReferenceInfo>> GetReferencesAsync(Configu

private static async Task<bool> GetAttributeTreatAsUsedAsync(IProjectProperties metadata)
{
var propertyNames = await metadata.GetPropertyNamesAsync();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only change here that has an impact at runtime.

string? value = await metadata.GetEvaluatedPropertyValueAsync(ProjectReference.TreatAsUsedProperty);

return value is not null && PropertySerializer.SimpleTypes.ToValue<bool>(value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ async Task<string> GetCacheFilePathAsync(CancellationToken cancellationToken)
guidProject: Guid.Empty,
fVersionSpecific: true,
fEnsureCreated: true,
out bool isTemporary,
out _, // isTemporary
out string workingFolderPath);

return Path.Combine(workingFolderPath, ProjectItemCacheFileName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ private static PackageRestoreCycleDetector CreateInstance()
{
var project = UnconfiguredProjectFactory.CreateWithActiveConfiguredProjectProvider(IProjectThreadingServiceFactory.Create());

var projectSystemOptions = new Mock<IProjectSystemOptions>();

var telemetryService = new Mock<ITelemetryService>();
var nonModelNotificationService = new Mock<INonModalNotificationService>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ public static IEnumerable<object[]> GetEmbeddedRules()
foreach (var rule in GetAllRules())
{
string ruleName = (string)rule[0];
string fullPath = (string)rule[1];

if (s_embeddedRuleNames.Contains(ruleName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,6 @@ public async Task IsUpToDateAsync_True_NewProjectRebuiltThenBuilt()

var t0 = DateTime.UtcNow.AddMinutes(-3); // t0 Input file timestamp
var t1 = DateTime.UtcNow.AddMinutes(-2); // t1 Rebuild (sets output file timestamp)
var t2 = DateTime.UtcNow.AddMinutes(-1); // t2 Check up-to-date (true)

_fileSystem.AddFile(_inputPath, t0);

Expand Down
Loading