115 references to Diagnostic
Microsoft.CodeAnalysis.Analyzers.UnitTests (14)
ImplementationIsObsoleteAnalyzerTests.cs (2)
212VerifyVB.Diagnostic().WithSpan(2, 7, 2, 16).WithArguments("SomeClass", "IMyInterface", "https://example.com"), 214VerifyVB.Diagnostic().WithSpan(6, 7, 6, 21).WithArguments("SomeOtherClass", "IMyInterface", "https://example.com"),
InternalImplementationOnlyTests.cs (6)
476VerifyVB.Diagnostic().WithSpan(2, 7, 2, 16).WithArguments("SomeClass", "IMyInterface"), 478VerifyVB.Diagnostic().WithSpan(6, 7, 6, 21).WithArguments("SomeOtherClass", "IMyInterface"), 549VerifyVB.Diagnostic().WithSpan(3, 7, 3, 9).WithArguments("C1", "ISymbol"), 617VerifyVB.Diagnostic().WithSpan(6, 7, 6, 9).WithArguments("C2", "ISymbol"), 722VerifyVB.Diagnostic().WithSpan(3, 7, 3, 9).WithArguments("C1", "IOperation"), 746VerifyVB.Diagnostic().WithSpan(6, 7, 6, 9).WithArguments("C2", "IOperation"),
MetaAnalyzers\ClassIsNotDiagnosticAnalyzerTests.cs (1)
48VerifyVB.Diagnostic().WithLocation(6, 18).WithArguments("NotAnAnalyzer"));
MetaAnalyzers\CompilerExtensionTargetFrameworkAnalyzerTests.cs (1)
170VerifyVB.Diagnostic().WithLocation(0).WithArguments(GetDisplayName(framework)),
MetaAnalyzers\DoNotStorePerCompilationDataOntoFieldsRuleTests.cs (1)
607VerifyVB.Diagnostic()
MetaAnalyzers\DoNotUseCompilationGetSemanticModelTests.cs (1)
220VerifyVB.Diagnostic().WithLocation(line, column);
MetaAnalyzers\InvalidReportDiagnosticRuleTests.cs (1)
270VerifyVB.Diagnostic()
UseReturnValueFromImmutableObjectMethodTests.cs (1)
209VerifyVB.Diagnostic().WithLocation(markupKey).WithArguments(objectName, methodName);
Microsoft.CodeAnalysis.BannedApiAnalyzers.UnitTests (2)
RestrictedInternalsVisibleToAnalyzerTests.cs (2)
28VerifyVB.Diagnostic() 33VerifyVB.Diagnostic()
Microsoft.CodeAnalysis.NetAnalyzers.UnitTests (87)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\AvoidEmptyInterfacesTests.cs (2)
336vbTest.ExpectedDiagnostics.Add(VerifyVB.Diagnostic().WithSpan(@"/folder1/Test0.vb", 2, 26, 2, 27).WithSpan(@"/folder2/Test1.vb", 2, 26, 2, 27)); 350=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\AvoidExcessiveParametersOnGenericTypesTests.cs (1)
26VerifyVB.Diagnostic().WithSpan(2, 14, 2, 15).WithArguments("C", AvoidExcessiveParametersOnGenericTypes.MaximumNumberOfTypeParameters));
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\CancellationTokenParametersMustComeLastTests.cs (2)
318VerifyVB.Diagnostic().WithLocation(7, 21) 354VerifyVB.Diagnostic().WithLocation(7, 21)
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\CollectionPropertiesShouldBeReadOnlyTests.cs (1)
20=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotDeclareProtectedMembersInSealedTypesTests.cs (1)
25VerifyVB.Diagnostic().WithSpan(3, 19, 3, 20).WithArguments("M", "C"));
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotDeclareStaticMembersOnGenericTypesTests.cs (1)
460=> VerifyVB.Diagnostic().WithLocation(line, column);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotDeclareVisibleInstanceFieldsTests.cs (1)
438=> VerifyVB.Diagnostic().WithLocation(line, column);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotExposeGenericListsTests.cs (1)
373=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotHideBaseClassMethodsTests.cs (1)
486=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotNameEnumValuesReservedTests.cs (1)
124=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotOverloadOperatorEqualsOnReferenceTypesTests.cs (1)
37VerifyVB.Diagnostic().WithSpan(3, 28, 3, 29).WithArguments("C"));
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotPassTypesByReferenceTests.cs (2)
34VerifyVB.Diagnostic().WithSpan(3, 30, 3, 31).WithArguments("s"), 35VerifyVB.Diagnostic().WithSpan(3, 49, 3, 50).WithArguments("o"));
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\DoNotPrefixEnumValuesWithTypeNameTests.cs (1)
392=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\ImplementStandardExceptionConstructorsTests.cs (1)
347=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\InterfaceMethodsShouldBeCallableByChildTypesTests.cs (1)
28=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\MarkAttributesWithAttributeUsageTests.cs (1)
148=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\MovePInvokesToNativeMethodsClassTests.cs (1)
26=> VerifyVB.Diagnostic().WithLocation(line, column);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\NonConstantFieldsShouldNotBeVisibleTests.cs (1)
155=> VerifyVB.Diagnostic().WithLocation(line, column);
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OverloadOperatorEqualsOnOverridingValueTypeEqualsTests.cs (1)
307=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OverrideEqualsOnOverloadingOperatorEqualsTests.cs (1)
192=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\OverrideGetHashCodeOnOverridingEqualsTests.cs (1)
128=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\ParameterNamesShouldMatchBaseDeclarationTests.cs (1)
684=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\PassSystemUriObjectsInsteadOfStringsTests.cs (1)
502=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\PropertiesShouldNotReturnArraysTests.cs (1)
149=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\PropertyNamesShouldNotMatchGetMethodsTests.cs (1)
772=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\ProvideObsoleteAttributeMessageTests.cs (1)
198=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\StaticHolderTypeTests.cs (1)
29=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\TypesThatOwnDisposableFieldsShouldBeDisposableTests.cs (3)
767VerifyVB.Diagnostic().WithLocation(0).WithArguments("NoDisposeClass", "_fs1"), @" 843VerifyVB.Diagnostic().WithLocation(0).WithArguments("NoDisposeClass", "_fs1', '_fs2', '_fs3', '_fs4"), @" 934ExpectedDiagnostics = { VerifyVB.Diagnostic().WithLocation(0).WithArguments("SomeClass", args), },
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UriParametersShouldNotBeStringsTests.cs (1)
301=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UriPropertiesShouldNotBeStringsTests.cs (1)
240=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UriReturnValuesShouldNotBeStringsTests.cs (1)
204=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UseEventsWhereAppropriateTests.cs (1)
629=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UseIntegralOrStringArgumentForIndexersTests.cs (1)
271=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\ApiDesignGuidelines\UsePropertiesWhereAppropriateTests.cs (1)
584=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\Documentation\AvoidUsingCrefTagsWithAPrefixTests.cs (1)
91=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidUninstantiatedInternalClassesTests.cs (1)
1710=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\Maintainability\AvoidUnusedPrivateFieldsTests.cs (1)
444=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\QualityGuidelines\AvoidPropertySelfAssignmentTests.cs (1)
412=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\QualityGuidelines\DoNotCallOverridableMethodsInConstructorsTests.cs (1)
541=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\QualityGuidelines\DoNotRaiseExceptionsInExceptionClausesTests.cs (1)
150=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\QualityGuidelines\MarkMembersAsStaticTests.cs (16)
128VerifyVB.Diagnostic().WithLocation(0).WithArguments("Method1"), 129VerifyVB.Diagnostic().WithLocation(1).WithArguments("Method2"), 130VerifyVB.Diagnostic().WithLocation(2).WithArguments("Method3"), 131VerifyVB.Diagnostic().WithLocation(3).WithArguments("Method4"), 132VerifyVB.Diagnostic().WithLocation(4).WithArguments("Property1"), 133VerifyVB.Diagnostic().WithLocation(5).WithArguments("Property2"), 134VerifyVB.Diagnostic().WithLocation(6).WithArguments("MyProperty"), 135VerifyVB.Diagnostic().WithLocation(7).WithArguments("CustomEvent")); 289VerifyVB.Diagnostic().WithLocation(0).WithArguments("Method1"), 290VerifyVB.Diagnostic().WithLocation(1).WithArguments("Method3"), 291VerifyVB.Diagnostic().WithLocation(2).WithArguments("Method4"), 292VerifyVB.Diagnostic().WithLocation(3).WithArguments("Property1"), 293VerifyVB.Diagnostic().WithLocation(4).WithArguments("Property2"), 294VerifyVB.Diagnostic().WithLocation(5).WithArguments("MyProperty"), 295VerifyVB.Diagnostic().WithLocation(6).WithArguments("CustomEvent")); 778VerifyVB.Diagnostic().WithLocation(0).WithArguments("M"));
Microsoft.CodeQuality.Analyzers\QualityGuidelines\RemoveEmptyFinalizersTests.cs (1)
602=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\QualityGuidelines\RethrowToPreserveStackDetailsTests.Fixer.cs (1)
83", VerifyVB.Diagnostic().WithLocation(8, 13),
Microsoft.CodeQuality.Analyzers\QualityGuidelines\SealMethodsThatSatisfyPrivateInterfacesTests.cs (1)
518=> VerifyVB.Diagnostic()
Microsoft.CodeQuality.Analyzers\QualityGuidelines\ValidateArgumentsOfPublicMethodsTests.cs (1)
34=> VerifyVB.Diagnostic()
Microsoft.NetCore.Analyzers\Resources\MarkAssembliesWithNeutralResourcesLanguageTests.cs (3)
67End Class", VerifyVB.Diagnostic()); 90await VerifyBasicWithDependenciesAsync(@"<Assembly: System.Resources.NeutralResourcesLanguage("""")>", VerifyVB.Diagnostic().WithLocation(1, 2)); 98await VerifyBasicWithDependenciesAsync(@"<Assembly: System.Resources.NeutralResourcesLanguage(Nothing)>", VerifyVB.Diagnostic().WithLocation(1, 2));
Microsoft.NetCore.Analyzers\Runtime\AvoidUnsealedAttributesTests.cs (1)
139=> VerifyVB.Diagnostic()
Microsoft.NetCore.Analyzers\Runtime\DisposableFieldsShouldBeDisposedTests.cs (1)
31=> VerifyVB.Diagnostic()
Microsoft.NetCore.Analyzers\Runtime\DisposableTypesShouldDeclareFinalizerTests.cs (1)
503VerifyVB.Diagnostic().WithLocation(line, column);
Microsoft.NetCore.Analyzers\Runtime\DisposeMethodsShouldCallBaseClassDisposeTests.cs (1)
27=> VerifyVB.Diagnostic()
Microsoft.NetCore.Analyzers\Runtime\DoNotLockOnObjectsWithWeakIdentityTests.cs (1)
384=> VerifyVB.Diagnostic()
Microsoft.NetCore.Analyzers\Runtime\DoNotPassLiteralsAsLocalizedParametersTests.cs (1)
1935=> VerifyVB.Diagnostic()
Microsoft.NetCore.Analyzers\Runtime\NormalizeStringsToUppercaseTests.cs (1)
256=> VerifyVB.Diagnostic()
Microsoft.NetCore.Analyzers\Runtime\SpecifyCultureInfoTests.cs (1)
783VerifyVB.Diagnostic()
Microsoft.NetCore.Analyzers\Runtime\TestForNaNCorrectlyTests.cs (1)
615=> VerifyVB.Diagnostic()
Microsoft.NetCore.Analyzers\Runtime\UseOrdinalStringComparisonTests.cs (1)
27=> VerifyVB.Diagnostic()
Microsoft.NetFramework.Analyzers\DoNotCatchCorruptedStateExceptionsTests.cs (1)
1540=> VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(signature, typeName);
Microsoft.NetFramework.Analyzers\TypesShouldNotExtendCertainBaseTypesTests.cs (8)
357return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message); 373return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message); 389return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message); 405return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message); 421return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message); 437return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message); 453return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message); 469return VerifyVB.Diagnostic().WithLocation(line, column).WithArguments(message);
Roslyn.Diagnostics.Analyzers.UnitTests (12)
DoNotMixAttributesFromDifferentVersionsOfMEFTests.cs (1)
643VerifyVB.Diagnostic()
ExportedPartsShouldHaveImportingConstructorTests.cs (9)
230ExpectedDiagnostics = { VerifyVB.Diagnostic().WithSpan(4, 2, 4, 17).WithArguments("D") }, 479ExpectedDiagnostics = { VerifyVB.Diagnostic().WithSpan(3, 2, 3, 8).WithArguments("C") }, 551ExpectedDiagnostics = { VerifyVB.Diagnostic().WithSpan(1, 2, 1, mefNamespace.Length + 9).WithArguments("C") }, 650ExpectedDiagnostics = { VerifyVB.Diagnostic().WithSpan(3, 2, 3, 8).WithArguments("C") }, 728ExpectedDiagnostics = { VerifyVB.Diagnostic().WithSpan(5, 5, 5, 21).WithArguments("C") }, 802ExpectedDiagnostics = { VerifyVB.Diagnostic().WithSpan(3, 5, 3, 21).WithArguments("C") }, 882ExpectedDiagnostics = { VerifyVB.Diagnostic().WithSpan(5, 6, 5, 26).WithArguments("C") }, 960VerifyVB.Diagnostic().WithSpan(9, 5, 9, 32).WithArguments("C"), 961VerifyVB.Diagnostic().WithSpan(12, 5, 12, 34).WithArguments("C"),
TestExportsShouldNotBeDiscoverableTests.cs (2)
135ExpectedDiagnostics = { VerifyVB.Diagnostic().WithSpan(3, 2, 3, 8).WithArguments("C") }, 169ExpectedDiagnostics = { VerifyVB.Diagnostic().WithSpan(1, 2, 1, mefNamespace.Length + 9).WithArguments("C") },