Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Consider how should Scope be treated for UnconditionalSuppressMessage #2130

Open

Description

@mateoatr

Scopes are only relevant on the context of global unconditional suppressions -- and they are only ever used to check if a valid scope was used. The original intention of the property was to use it to check whether the target where a suppression is enacted is indeed a type or a member, but because we use documentation format on the target this is not needed at all (since the target must be a fully-qualified string prepended with T, M, F, etc. letting it know the parser whether it is a type, method, field, and so on).

This rises the question of whether the Scope property of UnconditionalSuppressMessage should either be ignored or checked against the target (even though this is currently not needed for the above reasons; although we could expand the understood Target strings by using other parsers such as System.Reflection.Runtime.TypeParsing).

Activity

  1. vitek-karas commented on Jul 7, 2021

    @vitek-karas
    Member

    Can we just copy what Roslyn does for SuppressMessageAttribute?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions