[ApiCompat] Include description in generated suppression file output

Open
#39,892 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
tooling

Research direction

Locate the ApiCompat suppression-file generation entry point and its related tests. Start by tracing how DiagnosticId and Target are written to the XML, then check how diagnostic descriptions are available. Done means an optional Description element can contain the human-readable diagnostic text shown in the issue, with coverage for the generated output.

Written by the indexing model from the issue text.

Description

Area-ApiCompat

When you generate a suppression file, it is largely unreadable by humans, requiring a lot of investigation to determine what the issues are.

Example:

<Suppression>
  <DiagnosticId>CP0005</DiagnosticId>
  <Target>M:Android.Net.Wifi.WifiManager.WpsCallback.OnFailed(Android.Net.Wifi.WpsFailureReason)</Target>
</Suppression>

The "old" internal Microsoft.DotNet.ApiCompat provided a much more human readable suppression file format:

CannotAddAbstractMembers : Member 'public void Android.Net.Wifi.WifiManager.WpsCallback.OnFailed(Android.Net.Wifi.WpsFailureReason)' is abstract in the implementation but is missing in the contract.

It would be nice to (optionally) include the human readable version in the generated XML suppression file:

<Suppression>
  <DiagnosticId>CP0005</DiagnosticId>
  <Target>M:Android.Net.Wifi.WifiManager.WpsCallback.OnFailed(Android.Net.Wifi.WpsFailureReason)</Target>
  <Description>CannotAddAbstractMembers : Member 'public void Android.Net.Wifi.WifiManager.WpsCallback.OnFailed(Android.Net.Wifi.WpsFailureReason)' is abstract in the implementation but is missing in the contract.</Description>
</Suppression>
Dominant language
C#
Stars
3.2k
Forks
1.3k
Avg merge
4d 1h
Merged PRs (30d)
235

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/sdk

All issues in dotnet/sdk

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.