GU0084
November 24, 2021 ยท View on GitHub
Assert exception message
| Topic | Value |
|---|---|
| Id | GU0084 |
| Severity | Hidden |
| Enabled | True |
| Category | Gu.Analyzers.Correctness |
| Code | AssertAnalyzer |
Description
Test that the exception message is the expected with an assert.
Motivation
ADD MOTIVATION HERE
How to fix violations
ADD HOW TO FIX VIOLATIONS HERE
Configure severity
Via ruleset file.
Configure the severity per project, for more info see MSDN.
Via #pragma directive.
#pragma warning disable GU0084 // Assert exception message
Code violating the rule here
#pragma warning restore GU0084 // Assert exception message
Or put this at the top of the file to disable all instances.
#pragma warning disable GU0084 // Assert exception message
Via attribute [SuppressMessage].
[System.Diagnostics.CodeAnalysis.SuppressMessage("Gu.Analyzers.Correctness",
"GU0084:Assert exception message",
Justification = "Reason...")]