| Topic | Value |
|---|---|
| Id | GU0018a |
| Severity | Warning |
| Enabled | True |
| Category | Gu.Analyzers.Correctness |
| Code | VariableDeclaratorAnalyzer |
Name mock.
namespace N { using Moq; using NUnit.Framework;
public class C
{
[Test]
public void M()
{
var ↓wrongName = new Mock<IPlc>(MockBehavior.Strict);
}
}
}
namespace N { using Moq; using NUnit.Framework;
public class C
{
[Test]
public void M()
{
var plcMock = new Mock<IPlc>(MockBehavior.Strict);
}
}
}
Configure the severity per project, for more info see MSDN.
#pragma warning disable GU0018a // Name mock
Code violating the rule here
#pragma warning restore GU0018a // Name mockOr put this at the top of the file to disable all instances.
#pragma warning disable GU0018a // Name mock[System.Diagnostics.CodeAnalysis.SuppressMessage("Gu.Analyzers.Correctness",
"GU0018a:Name mock",
Justification = "Reason...")]