Microsoft C++ static analysis tool bolsters warning suppressions
Briefly

The Microsoft C++ Code Analysis tool has received updates that enhance warning suppression management, improving code maintainability and auditability. New features allow better tracking and justification of suppressed warnings. The integration with Visual Studio 2022 17.14 includes updated support for gsl::suppress, aligning with C++ Core Guidelines. Warnings can be suppressed using the gsl::suppress attribute, with added capabilities for the #pragma warning to manage justifications. Microsoft advises using [[gsl::suppress]] for managing warnings emitted by Microsoft C++ Code Analysis for better control.
The Microsoft C++ Code Analysis tool has been updated to provide better tracking, justification, and overall management of warning suppressions, leading to a more maintainable code base.
Enhancements to warning suppression offer improved auditability and review, enhanced code maintainability, better management of technical debt, and consistency across suppression mechanisms.
Support for gsl::suppress has been updated to align with the latest C++ Core Guidelines syntax, allowing warnings to be suppressed using the gsl::suppress attribute.
Both #pragma warning(suppress) and [[gsl::suppress]] offer fine-grained control over warning suppression, with the former being a general mechanism for any compiler warning.
Read at InfoWorld
[
|
]