stryker-net icon indicating copy to clipboard operation
stryker-net copied to clipboard

Suppress GitHub Actions check annotations while preserving warnings in build output

Open Copilot opened this issue 4 months ago • 3 comments

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=false to the Azure Pipelines build task in azure-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 avatar Nov 28 '25 12:11 Copilot

@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

rouke-broersma avatar Dec 09 '25 12:12 rouke-broersma

@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:

  1. Reverted the <NoWarn> changes from Directory.Build.props
  2. Added /p:GenerateGitHubActionsAnnotations=false to 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.

Copilot avatar Dec 09 '25 12:12 Copilot