Suppress GitHub Actions check annotations while preserving warnings in build output
GitHub Actions surfaces compiler warnings as check annotations on PRs, causing distracting warnings on files that weren't changed. This fix prevents the annotations while keeping warnings visible in build logs and local development.
Changes
- Added
/p:GenerateGitHubActionsAnnotations=falseto the Azure Pipelines build task inazure-pipelines.yml
This approach:
- Suppresses: GitHub Actions check annotations on pull requests (preventing distracting annotations on unchanged files)
- Preserves: Warnings in local builds, CI logs, and IDE for developers to see and address
Why This Approach
The initial approach using <NoWarn> in Directory.Build.props was too broad and would have hidden warnings everywhere. This targeted solution only affects GitHub Actions annotations while maintaining visibility of warnings for code quality purposes.
Original prompt
This section details on the original issue you should resolve
<issue_title>Unchanged files with check annotations warnings on every pullrequest</issue_title> <issue_description>Describe the bug On every new pull request we see: Unchanged files with check annotations. This is distracting from the actual change.
Expected behavior No warnings are shown on files that have no changes. </issue_description>
Comments on the Issue (you are @copilot in this section)
- Fixes stryker-mutator/stryker-net#3363
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
@copilot I'm not sure we actually want to hide these warnings in all cases, we may only want to hide them from github actions results such as here: https://github.com/stryker-mutator/stryker-net/actions/runs/19988296376
@copilot I'm not sure we actually want to hide these warnings in all cases, we may only want to hide them from github actions results such as here: https://github.com/stryker-mutator/stryker-net/actio...
Changed the approach in commit 9b63c7a. Instead of suppressing warnings globally, I've:
- Reverted the
<NoWarn>changes from Directory.Build.props - Added
/p:GenerateGitHubActionsAnnotations=falseto the Azure Pipelines build task
This keeps warnings visible in build logs and local development while preventing them from appearing as check annotations on PRs.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code