Cleanup some code and update nuget packages#471
Conversation
WalkthroughThis pull request updates multiple package dependencies across the project, bumping System.IO.Hashing and System.Collections.Immutable from 10.0.3 to 10.0.5 in the net472 target groups of main projects, and upgrading TUnit from 1.19.16 to 1.19.57 in test projects. Additionally, TinyCsvParser dependencies are updated from 3.0.0 to 3.0.1. The code logic in AssetsPackageDependencyReader is simplified by removing null-validation checks, and a test method validating null targets scenarios is removed. Possibly related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/NuGetUtility/NuGetUtility.csproj`:
- Line 1: Remove the hidden BOM character at the start of the file so the
opening Project element reads exactly "<Project Sdk=\"Microsoft.NET.Sdk\">";
open the NuGetUtility.csproj in a text editor that can show/strip BOM (or
re-save as UTF-8 without BOM) and ensure the first character is '<' with no
invisible bytes before the Project element to prevent spurious diffs.
In
`@tests/targets/MultiTargetProjectWithDifferentDependencies/MultiTargetProjectWithDifferentDependencies.csproj`:
- Line 1: The file MultiTargetProjectWithDifferentDependencies.csproj contains a
hidden BOM character before the opening <Project> tag; remove the BOM by
re-saving the file as UTF-8 without BOM (or strip the leading invisible
character) so the file starts exactly with "<Project
Sdk=\"Microsoft.NET.Sdk\">", then commit the cleaned file to eliminate spurious
diffs and ensure tooling/CI treats the file normally.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8d7b2773-3f16-476d-93b6-60d86fe6f04e
📒 Files selected for processing (8)
src/NuGetLicense/NuGetLicense.csprojsrc/NuGetUtility/NuGetUtility.csprojsrc/NuGetUtility/Wrapper/NuGetWrapper/ProjectModel/AssetsPackageDependencyReader.cstests/FileLicenseMatcher.Test/FileLicenseMatcher.Test.csprojtests/NuGetUtility.Test/ReferencedPackagesReader/ReferencedPackageReaderTest.cstests/NuGetUtility.UrlToLicenseMapping.Test/NuGetUtility.UrlToLicenseMapping.Test.csprojtests/targets/MultiTargetProjectWithDifferentDependencies/MultiTargetProjectWithDifferentDependencies.csprojtests/targets/PackageReferenceProject/PackageReferenceProject.csproj
💤 Files with no reviewable changes (1)
- tests/NuGetUtility.Test/ReferencedPackagesReader/ReferencedPackageReaderTest.cs
| @@ -1,4 +1,4 @@ | |||
| <Project Sdk="Microsoft.NET.Sdk"> | |||
| <Project Sdk="Microsoft.NET.Sdk"> | |||
There was a problem hiding this comment.
Remove the hidden BOM character at file start.
Line 1 contains a BOM/hidden character before <Project>, which is best removed to avoid unnecessary diff noise.
Suggested cleanup
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <Project Sdk="Microsoft.NET.Sdk"> | |
| <Project Sdk="Microsoft.NET.Sdk"> |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@src/NuGetUtility/NuGetUtility.csproj` at line 1, Remove the hidden BOM
character at the start of the file so the opening Project element reads exactly
"<Project Sdk=\"Microsoft.NET.Sdk\">"; open the NuGetUtility.csproj in a text
editor that can show/strip BOM (or re-save as UTF-8 without BOM) and ensure the
first character is '<' with no invisible bytes before the Project element to
prevent spurious diffs.
| @@ -1,11 +1,11 @@ | |||
| <Project Sdk="Microsoft.NET.Sdk"> | |||
| <Project Sdk="Microsoft.NET.Sdk"> | |||
There was a problem hiding this comment.
Remove the hidden BOM character at file start.
Line 1 includes a BOM/hidden character before <Project>, which can cause unnecessary churn in diffs and editor/tooling behavior.
Suggested cleanup
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <Project Sdk="Microsoft.NET.Sdk"> | |
| <Project Sdk="Microsoft.NET.Sdk"> |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@tests/targets/MultiTargetProjectWithDifferentDependencies/MultiTargetProjectWithDifferentDependencies.csproj`
at line 1, The file MultiTargetProjectWithDifferentDependencies.csproj contains
a hidden BOM character before the opening <Project> tag; remove the BOM by
re-saving the file as UTF-8 without BOM (or strip the leading invisible
character) so the file starts exactly with "<Project
Sdk=\"Microsoft.NET.Sdk\">", then commit the cleaned file to eliminate spurious
diffs and ensure tooling/CI treats the file normally.



Summary by CodeRabbit
Chores
Refactor
Tests