Skip to content

Remove obsolete suppressions when re-generating suppression files #28070

@ViktorHofer

Description

@ViktorHofer

When an existing suppression file is re-generated, its content is read, deserialized into a set of suppressions and then stored in a list. When then at a later point, the suppressions are serialized to disk (because the ´--generate-suppression-file` flag is provided), the existing deserialized suppressions plus the new ones are written to disk. Therefore, obsolete suppressions which don't apply anymore are preserved and never get trimmed out.

It would be good to offer a flag to trim out such obsolete suppressions, similar to the one that the legacy APICompat tooling already offers: https://github.com/dotnet/arcade/blob/025103bcaefad81506465eeb7bb09b107b20f32d/src/Microsoft.DotNet.ApiCompat/src/ApiCompatRunner.cs#L45

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions