Support GitHub Actions annotations for project-level NuGet warnings without line numbers (e.g. NU1506)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 57/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github-actions, typescript
Hướng nghiên cứu
Start by reading the existing .github/csc.json problem matcher and compare its patterns with the NU1506 log examples in this issue. Check how the matcher is registered in the GitHub Actions workflow and inspect related changes from issue #717. Done means a project-level NuGet warning without line or column information produces an annotation associated with its project file.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
actions/setup-dotnet@v5 registers a problem matcher for .NET diagnostics, but some NuGet warnings, such as NU1506, are not recognized and therefore do not appear as GitHub Actions annotations.
For example, the following warnings appear in the build output:
D:\a\WinGetJet\WinGetJet\WinGetJet\WindowsPackageManager.Tests\WindowsPackageManager.Tests.csproj : warning NU1506: Duplicate 'PackageVersion' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageVersion' items are: Microsoft.WindowsPackageManager.ComInterop 1.29.380, Microsoft.WindowsPackageManager.ComInterop 1.29.380.
D:\a\WinGetJet\WinGetJet\WinGetJet\WindowsPackageManager\WindowsPackageManager.csproj : warning NU1506: Duplicate 'PackageVersion' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageVersion' items are: Microsoft.WindowsPackageManager.ComInterop 1.29.380, Microsoft.WindowsPackageManager.ComInterop 1.29.380.
D:\a\WinGetJet\WinGetJet\WinGetJet\WinGetJet\WinGetJet.csproj : warning NU1506: Duplicate 'PackageVersion' items found. Remove the duplicate items or use the Update functionality to ensure a consistent restore behavior. The duplicate 'PackageVersion' items are: Microsoft.WindowsPackageManager.ComInterop 1.29.380, Microsoft.WindowsPackageManager.ComInterop 1.29.380.
These are valid NuGet warnings, but they do not produce annotations in GitHub Actions.
Steps to reproduce
- Configure central package management with duplicate
PackageVersionentries. - Use
actions/setup-dotnet@v5in a GitHub Actions workflow. - Run
dotnet restoreordotnet build. - Observe the
NU1506warnings in the workflow logs.
Expected behavior
NuGet warnings that reference a project file should produce GitHub Actions warning annotations, even when no source line or column information is available.
Actual behavior
The warnings are visible in the workflow logs but are not reported as GitHub Actions annotations.
Possible cause
The existing csc.json problem matcher requires:
- A line number, optionally followed by a column number.
- A trailing project path enclosed in square brackets.
However, project-level NuGet warnings such as NU1506 do not necessarily provide either.
Suggested improvement
Extend the existing problem matcher or register an additional matcher to support .NET/NuGet diagnostics without line and column information.
These diagnostics should still be associated with the referenced project file.
Related issues
- #603 — Add problem matcher for NuGetAudit (closed as not planned)
- #605 — Add msbuild.json as problem matcher (closed without merging)
- #717 — Expand the CSC problem matcher (merged)
Although these address related diagnostic-matching problems, the NU1506 output format is still not supported by the matcher included in setup-dotnet@v5.
Justification
Missing annotations make NuGet warnings harder to discover, especially in large projects where build logs can contain extensive output.
Supporting project-level NuGet diagnostics would improve warning visibility in GitHub Actions job summaries and pull requests without requiring each repository to maintain a custom problem matcher.
- Ngôn ngữ chính
- TypeScript
- Star
- 1.2k
- Fork
- 579
- Merge trung bình
- 6 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 1
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của actions/setup-dotnet
-
rollForward: latestMajor installs the latest LTS SDK even when it is older than sdk.versionCó thể đã có người làm @kamronbatman đã nhận 8 ngày trước. Đang mởbug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
actions/setup-dotnet#802 · 1 bình luận · 6 reaction ·
-
feature request
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
actions/setup-dotnet#801 · 1 bình luận · 1 reaction ·
-
feature request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 45/100
actions/setup-dotnet#778 · 3 bình luận · 1 reaction ·
-
feature request
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
actions/setup-dotnet#701 · 3 bình luận ·
-
feature request
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 55/100
actions/setup-dotnet#659 · 1 bình luận · 2 reaction ·
Tất cả issue của actions/setup-dotnet
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 87/100
Maintainer thường phản hồi trong vòng 1 ngày
-
🛠️ dette technique
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 61/100
betagouv/mon-entreprise#4752 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 5 ngày
-
type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
franciscoBSalgueiro/en-croissant#1111 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area/providers type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#64845 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày