Skip to content

Commit 5290ff0

Browse files
committed
Updates per code review feedback
1 parent 6437e0e commit 5290ff0

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

src/SourceBuild/content/eng/tools/tasks/Microsoft.DotNet.UnifiedBuild.Tasks/WriteSbrpUsageReport.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,12 @@ private void ScanProjectReferences()
173173

174174
foreach (DownloadDependency downloadDep in lockFile.PackageSpec.TargetFrameworks.SelectMany(fx => fx.DownloadDependencies))
175175
{
176-
TrackPackageReference(lockFile.Path, downloadDep.Name, downloadDep.VersionRange.MinVersion?.ToString(), null);
176+
TrackPackageReference(lockFile.Path, downloadDep.Name, downloadDep.VersionRange.MinVersion?.ToString(), Enumerable.Empty<string>());
177177
}
178178
}
179179
}
180180

181-
private void TrackPackageReference(string lockFilePath, string? name, string? version, IEnumerable<string>? tfms)
181+
private void TrackPackageReference(string lockFilePath, string? name, string? version, IEnumerable<string> tfms)
182182
{
183183
string id = PackageInfo.GetId(name, version);
184184
if (!_sbrpPackages.TryGetValue(id, out PackageInfo? info))
@@ -192,12 +192,9 @@ private void TrackPackageReference(string lockFilePath, string? name, string? ve
192192
info.References.Add(lockFilePath, referencedTfms);
193193
}
194194

195-
if (tfms != null)
195+
foreach (string tfm in tfms)
196196
{
197-
foreach (string tfm in tfms)
198-
{
199-
referencedTfms!.Add(tfm);
200-
}
197+
referencedTfms!.Add(tfm);
201198
}
202199
}
203200

0 commit comments

Comments
 (0)