Skip to content

Are profile names the only way of selecting multiple rules in a single tag inside gsl::suppress? #2046

Closed

Description

@dmitrykobets-msft

In.force: Enforcement currently specifies only 3 warning "groups", one for each of the 3 profiles: type, bounds, lifetime.

However, one might want to be more granular, for instance suppressing all warnings under a certain major section or subsection i.e., [[gsl::suppress(C)]] or [[gsl::suppress(C.ctor)]].

If this is accepted, then certain naming conventions should be cleaned up / standardized. Some examples:

  • Throughout the CG the C section rules are referred to simply like C.20 or C.160, even if they are in different subsections (C.20 is under C.ctor and C.160 is under C.over). In contrast, the SL major section rules always include the subsection (i.e., SL.io.4, SL.str.3, ...).
  • The ES family only has implicit(unnamed) subsections although these can probably be made explicit.
  • The C.1-C.9 rules aren't under any subsection, whereas the other C.* rules are under subsections.

Activity

  1. hsutter commented on Jul 27, 2023

    @hsutter
    Contributor

    Editors call: We agree that this is a problem we have to solve, and we'll keep this issue open as we give it thought, including exploring finding good names for all sections and deciding whether to consistently embrace multi-level names.

  2. hsutter commented on Jul 27, 2023

    @hsutter
    Contributor

    See also #2044

  3. hsutter commented on Feb 15, 2024

    @hsutter
    Contributor

    Editors call: Yes, those three profile names are the only exceptions to that suppress must give a single rule number.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions