CppCoreGuidelines
CppCoreGuidelines copied to clipboard
Are profile names the only way of selecting multiple rules in a single `tag` inside `gsl::suppress`?
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
Csection rules are referred to simply likeC.20orC.160, even if they are in different subsections (C.20is underC.ctorandC.160is underC.over). In contrast, theSLmajor 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.9rules aren't under any subsection, whereas the otherC.*rules are under subsections.
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.
See also #2044
Editors call: Yes, those three profile names are the only exceptions to that suppress must give a single rule number.