SYMBOL INDEX (36372 symbols across 4026 files) FILE: analyzers/src/RuleDescriptorGenerator/Descriptors/Rule.cs type Rule (line 22) | [ExcludeFromCodeCoverage] FILE: analyzers/src/RuleDescriptorGenerator/Descriptors/RuleParameter.cs class RuleParameter (line 24) | [ExcludeFromCodeCoverage] method RuleParameter (line 37) | public RuleParameter() { } method RuleParameter (line 39) | public RuleParameter(object attribute) method ToServerApi (line 52) | private static string ToServerApi(int type) => method PropertyValue (line 66) | private static T PropertyValue(object target, string propertyName) FILE: analyzers/src/RuleDescriptorGenerator/Program.cs class Program (line 27) | [ExcludeFromCodeCoverage] method Main (line 30) | public static void Main(string[] args) method LoadAnalyzerTypes (line 46) | private static Type[] LoadAnalyzerTypes(string path) => method LoadRules (line 55) | private static Rule[] LoadRules(Type[] analyzers) => method RuleParameters (line 62) | private static RuleParameter[] RuleParameters(Type analyzer) => method UniqueIds (line 70) | private static string[] UniqueIds(Type analyzer) => method IsUtilityAnalyzer (line 73) | private static bool IsUtilityAnalyzer(Type analyzerType) FILE: analyzers/src/SonarAnalyzer.CFG/CfgSerializer/CfgSerializer.RoslynCfgWalker.cs class CfgSerializer (line 23) | public static partial class CfgSerializer class RoslynCfgWalker (line 25) | private class RoslynCfgWalker method RoslynCfgWalker (line 32) | public RoslynCfgWalker(DotWriter writer, RoslynCfgIdProvider cfgIdPr... method Visit (line 39) | public void Visit(ControlFlowGraph cfg, string title) method WriteEdges (line 46) | protected virtual void WriteEdges(BasicBlock block) method BlockId (line 64) | protected string BlockId(BasicBlock block) => method VisitSubGraph (line 67) | private void VisitSubGraph(ControlFlowGraph cfg, string title) method VisitContent (line 74) | private void VisitContent(ControlFlowGraph cfg, string titlePrefix) method Visit (line 96) | private void Visit(ControlFlowGraph cfg, ControlFlowRegion region) method Visit (line 110) | private void Visit(BasicBlock block) method WriteNode (line 117) | private void WriteNode(BasicBlock block) method SerializeBranchValue (line 123) | private static IEnumerable SerializeBranchValue(IOperation o... method SerializeOperation (line 126) | private static IEnumerable SerializeOperation(IOperation ope... method SerializeOperation (line 129) | private static IEnumerable SerializeOperation(int level, str... method SerializeRegion (line 143) | private static string SerializeRegion(ControlFlowRegion region) method AnonymousFunctions (line 162) | private static IEnumerable A... class RoslynCfgIdProvider (line 171) | private sealed class RoslynCfgIdProvider method Next (line 175) | public int Next() => value++; FILE: analyzers/src/SonarAnalyzer.CFG/CfgSerializer/CfgSerializer.RoslynLvaWalker.cs class CfgSerializer (line 23) | public static partial class CfgSerializer class RoslynLvaWalker (line 25) | private sealed class RoslynLvaWalker : RoslynCfgWalker method RoslynLvaWalker (line 29) | public RoslynLvaWalker(RoslynLiveVariableAnalysis lva, DotWriter wri... method WriteEdges (line 34) | protected override void WriteEdges(BasicBlock block) FILE: analyzers/src/SonarAnalyzer.CFG/CfgSerializer/CfgSerializer.SonarCfgWalker.cs class CfgSerializer (line 23) | public static partial class CfgSerializer class SonarCfgWalker (line 25) | private sealed class SonarCfgWalker method SonarCfgWalker (line 30) | public SonarCfgWalker(DotWriter writer) => method Visit (line 33) | public void Visit(IControlFlowGraph cfg, string title) method Visit (line 43) | private void Visit(Block block) method WriteNode (line 84) | private void WriteNode(Block block, SyntaxNode terminator = null) method WriteEdges (line 94) | private void WriteEdges(Block block) FILE: analyzers/src/SonarAnalyzer.CFG/CfgSerializer/CfgSerializer.cs class CfgSerializer (line 24) | public static partial class CfgSerializer method Serialize (line 26) | public static string Serialize(IControlFlowGraph cfg, string title = "... method Serialize (line 33) | public static string Serialize(ControlFlowGraph cfg, string title = "R... method Serialize (line 40) | public static string Serialize(RoslynLiveVariableAnalysis lva, string ... FILE: analyzers/src/SonarAnalyzer.CFG/CfgSerializer/DotWriter.cs class DotWriter (line 22) | public class DotWriter method WriteGraphStart (line 28) | public void WriteGraphStart(string graphName) method WriteGraphEnd (line 38) | public void WriteGraphEnd() method WriteSubGraphStart (line 49) | public void WriteSubGraphStart(int id, string title) => method WriteSubGraphEnd (line 52) | public void WriteSubGraphEnd() => method WriteRecordNode (line 55) | public void WriteRecordNode(string id, string header, params string[] ... method WriteNode (line 69) | public void WriteNode(string id, string[] attributes) method WriteEdge (line 79) | public void WriteEdge(string startId, string endId, string label) method ToString (line 89) | public override string ToString() => method Encode (line 92) | private static string Encode(string s) => FILE: analyzers/src/SonarAnalyzer.CFG/Common/RoslynVersion.cs class RoslynVersion (line 20) | public static class RoslynVersion method IsRoslynCfgSupported (line 25) | public static bool IsRoslynCfgSupported(int minimalVersion = MinimalSu... method IsVersionLessThan (line 28) | public static bool IsVersionLessThan(int minimalVersion = MinimalSuppo... method IsVersionLessThan (line 31) | public static bool IsVersionLessThan(Version version) => method CurrentVersion (line 34) | private static Version CurrentVersion() => FILE: analyzers/src/SonarAnalyzer.CFG/Common/UniqueQueue.cs class UniqueQueue (line 22) | internal class UniqueQueue : IEnumerable method Enqueue (line 27) | public void Enqueue(T item) method Dequeue (line 36) | public T Dequeue() method GetEnumerator (line 43) | public IEnumerator GetEnumerator() => method GetEnumerator (line 46) | IEnumerator IEnumerable.GetEnumerator() => FILE: analyzers/src/SonarAnalyzer.CFG/Extensions/BasicBlockExtensions.cs class BasicBlockExtensions (line 22) | public static class BasicBlockExtensions method IsEnclosedIn (line 24) | public static bool IsEnclosedIn(this BasicBlock block, ControlFlowRegi... method EnclosingNonLocalLifetimeRegion (line 30) | public static ControlFlowRegion EnclosingNonLocalLifetimeRegion(this B... method EnclosingRegion (line 33) | public static ControlFlowRegion EnclosingRegion(this BasicBlock block,... FILE: analyzers/src/SonarAnalyzer.CFG/Extensions/ControlFlowGraphExtensions.cs class ControlFlowGraphExtensions (line 22) | public static class ControlFlowGraphExtensions method FlowAnonymousFunctionOperations (line 24) | public static IEnumerable Flow... method FindLocalFunctionCfgInScope (line 32) | public static ControlFlowGraph FindLocalFunctionCfgInScope(this Contro... method GetLocalFunctionControlFlowGraph (line 46) | public static ControlFlowGraph GetLocalFunctionControlFlowGraph(this C... FILE: analyzers/src/SonarAnalyzer.CFG/Extensions/ControlFlowRegionExtensions.cs class ControlFlowRegionExtensions (line 22) | public static class ControlFlowRegionExtensions method Blocks (line 24) | public static IEnumerable Blocks(this ControlFlowRegion re... method EnclosingNonLocalLifetimeRegion (line 27) | public static ControlFlowRegion EnclosingNonLocalLifetimeRegion(this C... method EnclosingRegionOrSelf (line 36) | public static ControlFlowRegion EnclosingRegionOrSelf(this ControlFlow... method EnclosingRegion (line 49) | public static ControlFlowRegion EnclosingRegion(this ControlFlowRegion... method NestedRegion (line 52) | public static ControlFlowRegion NestedRegion(this ControlFlowRegion re... method ReachableHandlers (line 58) | public static IEnumerable ReachableHandlers(this Co... FILE: analyzers/src/SonarAnalyzer.CFG/Extensions/DictionaryExtensions.cs class DictionaryExtensions (line 20) | internal static class DictionaryExtensions method GetOrAdd (line 22) | public static TValue GetOrAdd(this IDictionary ToHashSet(this IEnumerable enumerable, ... FILE: analyzers/src/SonarAnalyzer.CFG/Extensions/IOperationExtensions.cs class IOperationExtensions (line 22) | public static class IOperationExtensions method ToSonar (line 24) | [Obsolete("Use extension methods for IOperation properties instead.")]... method ToSonar (line 28) | [Obsolete("Use extension methods for IOperation properties instead.")]... method Parent (line 32) | public static IOperation Parent(this IOperation operation) => method Parent (line 35) | public static IOperation Parent(this IOperationWrapper operation) => method Children (line 38) | public static IEnumerable Children(this IOperation operati... method Children (line 41) | public static IEnumerable Children(this IOperationWrapper ... method Language (line 44) | public static string Language(this IOperation operation) => method Language (line 47) | public static string Language(this IOperationWrapper operation) => method IsImplicit (line 50) | public static bool IsImplicit(this IOperation operation) => method IsImplicit (line 53) | public static bool IsImplicit(this IOperationWrapper operation) => method SemanticModel (line 56) | public static SemanticModel SemanticModel(this IOperation operation) => method SemanticModel (line 59) | public static SemanticModel SemanticModel(this IOperationWrapper opera... method IsOutArgumentReference (line 62) | public static bool IsOutArgumentReference(this IOperation operation) => method IsAssignmentTarget (line 67) | public static bool IsAssignmentTarget(this IOperationWrapper operation... method IsCompoundAssignmentTarget (line 72) | public static bool IsCompoundAssignmentTarget(this IOperationWrapper o... method IsOutArgument (line 77) | public static bool IsOutArgument(this IOperationWrapper operation) => method IsAnyKind (line 82) | public static bool IsAnyKind(this IOperation operation, params Operati... method RootOperation (line 85) | public static IOperation RootOperation(this IOperation operation) method ArgumentValue (line 96) | public static IOperation ArgumentValue(this IInvocationOperationWrappe... method ArgumentValue (line 100) | public static IOperation ArgumentValue(this IObjectCreationOperationWr... method ArgumentValue (line 104) | public static IOperation ArgumentValue(this IPropertyReferenceOperatio... method ArgumentValue (line 108) | public static IOperation ArgumentValue(this IRaiseEventOperationWrappe... method ToExecutionOrder (line 111) | public static OperationExecutionOrder ToExecutionOrder(this IEnumerabl... method ToReversedExecutionOrder (line 114) | public static OperationExecutionOrder ToReversedExecutionOrder(this IE... method Serialize (line 117) | public static string Serialize(this IOperation operation) => method DescendantsAndSelf (line 121) | public static IEnumerable DescendantsAndSelf(this IOperati... method AsAnonymousFunction (line 124) | public static IAnonymousFunctionOperationWrapper? AsAnonymousFunction(... method AsArgument (line 127) | public static IArgumentOperationWrapper? AsArgument(this IOperation op... method AsAssignment (line 130) | public static IAssignmentOperationWrapper? AsAssignment(this IOperatio... method AsSimpleAssignment (line 133) | public static ISimpleAssignmentOperationWrapper? AsSimpleAssignment(th... method AsArrayCreation (line 136) | public static IArrayCreationOperationWrapper? AsArrayCreation(this IOp... method AsArrayElementReference (line 139) | public static IArrayElementReferenceOperationWrapper? AsArrayElementRe... method AsConversion (line 142) | public static IConversionOperationWrapper? AsConversion(this IOperatio... method AsDeclarationExpression (line 145) | public static IDeclarationExpressionOperationWrapper? AsDeclarationExp... method AsDeclarationPattern (line 148) | public static IDeclarationPatternOperationWrapper? AsDeclarationPatter... method AsFlowAnonymousFunction (line 151) | public static IFlowAnonymousFunctionOperationWrapper? AsFlowAnonymousF... method AsFlowCapture (line 154) | public static IFlowCaptureOperationWrapper? AsFlowCapture(this IOperat... method AsFlowCaptureReference (line 157) | public static IFlowCaptureReferenceOperationWrapper? AsFlowCaptureRefe... method AsForEachLoop (line 160) | public static IForEachLoopOperationWrapper? AsForEachLoop(this IOperat... method AsInvocation (line 170) | public static IInvocationOperationWrapper? AsInvocation(this IOperatio... method AsLocalFunction (line 173) | public static ILocalFunctionOperationWrapper? AsLocalFunction(this IOp... method AsLocalReference (line 176) | public static ILocalReferenceOperationWrapper? AsLocalReference(this I... method AsIsNull (line 179) | public static IIsNullOperationWrapper? AsIsNull(this IOperation operat... method AsIsPattern (line 182) | public static IIsPatternOperationWrapper? AsIsPattern(this IOperation ... method AsParameterReference (line 185) | public static IParameterReferenceOperationWrapper? AsParameterReferenc... method AsMethodReference (line 188) | public static IMethodReferenceOperationWrapper? AsMethodReference(this... method AsObjectCreation (line 191) | public static IObjectCreationOperationWrapper? AsObjectCreation(this I... method AsPropertyReference (line 194) | public static IPropertyReferenceOperationWrapper? AsPropertyReference(... method AsRecursivePattern (line 197) | public static IRecursivePatternOperationWrapper? AsRecursivePattern(th... method AsSpread (line 200) | public static ISpreadOperationWrapper? AsSpread(this IOperation operat... method AsTuple (line 203) | public static ITupleOperationWrapper? AsTuple(this IOperation operatio... method AsVariableDeclarator (line 206) | public static IVariableDeclaratorOperationWrapper? AsVariableDeclarato... method ToAddressOf (line 209) | public static IAddressOfOperationWrapper ToAddressOf(this IOperation o... method ToAwait (line 212) | public static IAwaitOperationWrapper ToAwait(this IOperation operation... method ToArgument (line 215) | public static IArgumentOperationWrapper ToArgument(this IOperation ope... method ToArrayCreation (line 218) | public static IArrayCreationOperationWrapper ToArrayCreation(this IOpe... method ToAssignment (line 221) | public static IAssignmentOperationWrapper ToAssignment(this IOperation... method ToArrayElementReference (line 224) | public static IArrayElementReferenceOperationWrapper ToArrayElementRef... method ToBinary (line 227) | public static IBinaryOperationWrapper ToBinary(this IOperation operati... method ToBinaryPattern (line 230) | public static IBinaryPatternOperationWrapper ToBinaryPattern(this IOpe... method ToCatchClause (line 233) | public static ICatchClauseOperationWrapper ToCatchClause(this IOperati... method ToCompoundAssignment (line 236) | public static ICompoundAssignmentOperationWrapper ToCompoundAssignment... method ToConstantPattern (line 239) | public static IConstantPatternOperationWrapper ToConstantPattern(this ... method ToConversion (line 242) | public static IConversionOperationWrapper ToConversion(this IOperation... method ToDeclarationPattern (line 245) | public static IDeclarationPatternOperationWrapper ToDeclarationPattern... method ToEventReference (line 248) | public static IEventReferenceOperationWrapper ToEventReference(this IO... method ToFieldReference (line 251) | public static IFieldReferenceOperationWrapper ToFieldReference(this IO... method ToFlowCapture (line 254) | public static IFlowCaptureOperationWrapper ToFlowCapture(this IOperati... method ToFlowCaptureReference (line 257) | public static IFlowCaptureReferenceOperationWrapper ToFlowCaptureRefer... method ToIncrementOrDecrement (line 260) | public static IIncrementOrDecrementOperationWrapper ToIncrementOrDecre... method ToInvocation (line 263) | public static IInvocationOperationWrapper ToInvocation(this IOperation... method ToIsType (line 266) | public static IIsTypeOperationWrapper ToIsType(this IOperation operati... method ToLocalFunction (line 269) | public static ILocalFunctionOperationWrapper ToLocalFunction(this IOpe... method ToLocalReference (line 272) | public static ILocalReferenceOperationWrapper ToLocalReference(this IO... method ToMemberReference (line 275) | public static IMemberReferenceOperationWrapper ToMemberReference(this ... method ToMethodReference (line 278) | public static IMethodReferenceOperationWrapper ToMethodReference(this ... method ToNegatedPattern (line 281) | public static INegatedPatternOperationWrapper ToNegatedPattern(this IO... method ToObjectCreation (line 284) | public static IObjectCreationOperationWrapper ToObjectCreation(this IO... method ToPattern (line 287) | public static IPatternOperationWrapper ToPattern(this IOperation opera... method ToParameterReference (line 290) | public static IParameterReferenceOperationWrapper ToParameterReference... method ToPropertyReference (line 293) | public static IPropertyReferenceOperationWrapper ToPropertyReference(t... method ToRecursivePattern (line 296) | public static IRecursivePatternOperationWrapper ToRecursivePattern(thi... method ToRelationalPattern (line 299) | public static IRelationalPatternOperationWrapper ToRelationalPattern(t... method ToTypePattern (line 302) | public static ITypePatternOperationWrapper ToTypePattern(this IOperati... method ToTuple (line 305) | public static ITupleOperationWrapper ToTuple(this IOperation operation... method ToUnary (line 308) | public static IUnaryOperationWrapper ToUnary(this IOperation operation... method ToVariableDeclaration (line 311) | public static IVariableDeclarationOperationWrapper ToVariableDeclarati... method ToVariableDeclarator (line 314) | public static IVariableDeclaratorOperationWrapper ToVariableDeclarator... method UnwrapConversion (line 317) | public static IOperation UnwrapConversion(this IOperation operation) method Descendants (line 327) | private static IEnumerable Descendants(IOperation operatio... method ArgumentValue (line 359) | private static IOperation ArgumentValue(ImmutableArray arg... method OperationPrefix (line 372) | private static string OperationPrefix(IOperation op) => method OperationSuffix (line 375) | private static string OperationSuffix(IOperation op) => method As (line 384) | private static T? As(this IOperation operation, OperationKind kind,... FILE: analyzers/src/SonarAnalyzer.CFG/Extensions/IsPatternExpressionSyntaxWrapperExtensions.cs class IsPatternExpressionSyntaxWrapperExtensions (line 20) | public static class IsPatternExpressionSyntaxWrapperExtensions method IsNull (line 22) | public static bool IsNull(this IsPatternExpressionSyntaxWrapper isPatt... method IsNot (line 25) | public static bool IsNot(this IsPatternExpressionSyntaxWrapper isPatte... method IsNotNull (line 31) | public static bool IsNotNull(this IsPatternExpressionSyntaxWrapper isP... FILE: analyzers/src/SonarAnalyzer.CFG/Extensions/PatternSyntaxWrapperExtensions.cs class PatternSyntaxWrapperExtensions (line 22) | public static class PatternSyntaxWrapperExtensions method IsNull (line 24) | public static bool IsNull(this PatternSyntaxWrapper patternSyntaxWrapp... method IsNot (line 30) | public static bool IsNot(this PatternSyntaxWrapper patternSyntaxWrappe... method RemoveParentheses (line 33) | public static SyntaxNode RemoveParentheses(this PatternSyntaxWrapper p... FILE: analyzers/src/SonarAnalyzer.CFG/Extensions/PropertyInfoExtensions.cs class PropertyInfoExtensions (line 23) | internal static class PropertyInfoExtensions method ReadCached (line 25) | public static T ReadCached(this PropertyInfo property, object insta... method ReadCached (line 28) | public static T ReadCached(this PropertyInfo property, object insta... method ReadCached (line 31) | public static T ReadCached(this PropertyInfo property, object insta... method ReadCached (line 34) | public static ImmutableArray ReadCached(this PropertyInfo proper... method ReadCached (line 37) | public static ImmutableArray ReadCached(this PropertyInfo proper... FILE: analyzers/src/SonarAnalyzer.CFG/Extensions/SemanticModelExtensions.cs class SemanticModelExtensions (line 20) | public static class SemanticModelExtensions method GetSymbolOrCandidateSymbol (line 32) | public static ISymbol GetSymbolOrCandidateSymbol(this SemanticModel mo... FILE: analyzers/src/SonarAnalyzer.CFG/Extensions/StringExtensions.cs class StringExtensions (line 22) | public static class StringExtensions method SplitCamelCaseToWords (line 41) | public static IEnumerable SplitCamelCaseToWords(this string name) FILE: analyzers/src/SonarAnalyzer.CFG/Extensions/SyntaxNodeExtensions.cs class SyntaxNodeExtensions (line 23) | internal static class SyntaxNodeExtensions method RemoveParentheses (line 27) | public static SyntaxNode RemoveParentheses(this SyntaxNode expression) FILE: analyzers/src/SonarAnalyzer.CFG/Extensions/UnaryPatternSyntaxWrapperExtensions.cs class UnaryPatternSyntaxWrapperExtensions (line 22) | public static class UnaryPatternSyntaxWrapperExtensions method IsNot (line 24) | public static bool IsNot(this UnaryPatternSyntaxWrapper unaryPatternSy... method IsNotNull (line 27) | public static bool IsNotNull(this UnaryPatternSyntaxWrapper unaryPatte... FILE: analyzers/src/SonarAnalyzer.CFG/LiveVariableAnalysis/LiveVariableAnalysisBase.cs class LiveVariableAnalysisBase (line 22) | public abstract class LiveVariableAnalysisBase method IsLocal (line 30) | public abstract bool IsLocal(ISymbol symbol); method ProcessBlock (line 32) | protected abstract State ProcessBlock(TBlock block); method ReversedBlocks (line 33) | protected abstract IEnumerable ReversedBlocks(); method Successors (line 34) | protected abstract IEnumerable Successors(TBlock block); method Predecessors (line 35) | protected abstract IEnumerable Predecessors(TBlock block); method LiveVariableAnalysisBase (line 40) | protected LiveVariableAnalysisBase(TCfg cfg, ISymbol originalDeclarati... method LiveIn (line 50) | public IEnumerable LiveIn(TBlock block) => method LiveOut (line 56) | public IEnumerable LiveOut(TBlock block) => method Analyze (line 59) | protected void Analyze() class State (line 101) | protected abstract class State FILE: analyzers/src/SonarAnalyzer.CFG/LiveVariableAnalysis/RoslynLiveVariableAnalysis.cs class RoslynLiveVariableAnalysis (line 23) | public sealed class RoslynLiveVariableAnalysis : LiveVariableAnalysisBas... method RoslynLiveVariableAnalysis (line 34) | public RoslynLiveVariableAnalysis(ControlFlowGraph cfg, SyntaxClassifi... method ParameterOrLocalSymbols (line 51) | public IEnumerable ParameterOrLocalSymbols(IOperation operation) method IsLocal (line 63) | public override bool IsLocal(ISymbol symbol) => method ReversedBlocks (line 66) | protected override IEnumerable ReversedBlocks() => method Predecessors (line 69) | protected override IEnumerable Predecessors(BasicBlock blo... method Successors (line 72) | protected override IEnumerable Successors(BasicBlock block... method ProcessBlock (line 75) | protected override State ProcessBlock(BasicBlock block) method ResolveCaptures (line 82) | private void ResolveCaptures(ControlFlowGraph cfg) => method ResolveCaptures (line 85) | private void ResolveCaptures(ControlFlowGraph cfg, HashSet pr... method ProcessFlowCapture (line 108) | private void ProcessFlowCapture(IFlowCaptureOperationWrapper flowCapture) method HandleLocalFunction (line 121) | private static IMethodSymbol HandleLocalFunction(ISet process... method AppendFlowCaptureReference (line 136) | private void AppendFlowCaptureReference(CaptureId id, IEnumerable TryRegionSuccessors(ControlFlow... method CatchOrFilterRegions (line 266) | private static IEnumerable CatchOrFilterRegions(Con... method IsCatchAllType (line 281) | private static bool IsCatchAllType(ITypeSymbol exceptionType) => method OriginalDeclaration (line 285) | private static ISymbol OriginalDeclaration(IOperation originalOperation) class RoslynState (line 303) | private sealed class RoslynState : State method RoslynState (line 308) | public RoslynState(RoslynLiveVariableAnalysis owner) => method ProcessBlock (line 311) | public void ProcessBlock(ControlFlowGraph cfg, BasicBlock block) method ProcessOperation (line 319) | private void ProcessOperation(ControlFlowGraph cfg, IOperation opera... method ProcessParameterOrLocalReference (line 361) | private void ProcessParameterOrLocalReference(IOperationWrapper refe... method ProcessParameterOrLocalSymbols (line 367) | private void ProcessParameterOrLocalSymbols(IEnumerable sym... method ProcessSimpleAssignment (line 380) | private void ProcessSimpleAssignment(ISimpleAssignmentOperationWrapp... method ProcessFlowAnonymousFunction (line 387) | private void ProcessFlowAnonymousFunction(ControlFlowGraph cfg, IFlo... method ProcessCaptured (line 395) | private void ProcessCaptured(ControlFlowGraph cfg) method ProcessCapturedLocalFunction (line 419) | private void ProcessCapturedLocalFunction(ControlFlowGraph cfg, IMet... method ProcessLocalFunction (line 427) | private void ProcessLocalFunction(ControlFlowGraph cfg, IMethodSymbo... FILE: analyzers/src/SonarAnalyzer.CFG/Operations/Utilities/OperationExecutionOrder.cs class OperationExecutionOrder (line 22) | public class OperationExecutionOrder : IEnumerable method OperationExecutionOrder (line 27) | public OperationExecutionOrder(IEnumerable operations, boo... method GetEnumerator (line 33) | public IEnumerator GetEnumerator() => method GetEnumerator (line 36) | IEnumerator IEnumerable.GetEnumerator() => class Enumerator (line 39) | private sealed class Enumerator : IEnumerator method Enumerator (line 47) | public Enumerator(OperationExecutionOrder owner) method MoveNext (line 53) | public bool MoveNext() method Reset (line 81) | public void Reset() method Dispose (line 87) | public void Dispose() method Init (line 95) | private void Init() class StackItem (line 105) | private sealed class StackItem : IDisposable method StackItem (line 110) | public StackItem(IOperation operation) method NextChild (line 116) | public IOperation NextChild() => method DisposeEnumeratorAndReturnOperation (line 119) | public IOperationWrapperSonar DisposeEnumeratorAndReturnOperation() method Dispose (line 125) | public void Dispose() => FILE: analyzers/src/SonarAnalyzer.CFG/Operations/Utilities/OperationFinder.cs class OperationFinder (line 22) | public abstract class OperationFinder method TryFindOperation (line 24) | protected abstract bool TryFindOperation(IOperationWrapperSonar operat... method TryFind (line 26) | public bool TryFind(BasicBlock block, out TResult result) => method TryFind (line 29) | protected bool TryFind(IEnumerable operations, out TResult... FILE: analyzers/src/SonarAnalyzer.CFG/Roslyn/BasicBlock.cs class BasicBlock (line 23) | public class BasicBlock method BasicBlock (line 66) | static BasicBlock() method BasicBlock (line 83) | private BasicBlock(object instance) method Wrap (line 103) | public static BasicBlock Wrap(object instance) => FILE: analyzers/src/SonarAnalyzer.CFG/Roslyn/CfgAllPathValidator.cs class CfgAllPathValidator (line 20) | public abstract class CfgAllPathValidator method IsValid (line 24) | protected abstract bool IsValid(BasicBlock block); method IsInvalid (line 25) | protected abstract bool IsInvalid(BasicBlock block); method CfgAllPathValidator (line 27) | protected CfgAllPathValidator(ControlFlowGraph cfg) => method CheckAllPaths (line 30) | public bool CheckAllPaths() FILE: analyzers/src/SonarAnalyzer.CFG/Roslyn/ControlFlowBranch.cs class ControlFlowBranch (line 23) | public class ControlFlowBranch method ControlFlowBranch (line 51) | static ControlFlowBranch() method ControlFlowBranch (line 65) | private ControlFlowBranch(object instance) => method Wrap (line 68) | public static ControlFlowBranch Wrap(object instance) => FILE: analyzers/src/SonarAnalyzer.CFG/Roslyn/ControlFlowGraph.cs class ControlFlowGraph (line 24) | public class ControlFlowGraph method ControlFlowGraph (line 52) | static ControlFlowGraph() method ControlFlowGraph (line 69) | private ControlFlowGraph(object instance) method Create (line 76) | public static ControlFlowGraph Create(SyntaxNode node, SemanticModel s... method GetAnonymousFunctionControlFlowGraph (line 81) | public ControlFlowGraph GetAnonymousFunctionControlFlowGraph(IFlowAnon... method GetLocalFunctionControlFlowGraph (line 86) | public ControlFlowGraph GetLocalFunctionControlFlowGraph(IMethodSymbol... method Wrap (line 91) | public static ControlFlowGraph Wrap(object instance) => FILE: analyzers/src/SonarAnalyzer.CFG/Roslyn/ControlFlowGraphCache.cs class ControlFlowGraphCacheBase (line 24) | public abstract class ControlFlowGraphCacheBase method HasNestedCfg (line 29) | protected abstract bool HasNestedCfg(SyntaxNode node); method IsLocalFunction (line 30) | protected abstract bool IsLocalFunction(SyntaxNode node); method FindOrCreate (line 32) | public ControlFlowGraph FindOrCreate(SyntaxNode declaration, SemanticM... class Wrapper (line 77) | private sealed class Wrapper method Wrapper (line 83) | public Wrapper(ControlFlowGraph cfg) => method FlowOperation (line 86) | public IFlowAnonymousFunctionOperationWrapper FlowOperation(SyntaxNo... FILE: analyzers/src/SonarAnalyzer.CFG/Roslyn/ControlFlowRegion.cs class ControlFlowRegion (line 23) | public class ControlFlowRegion method ControlFlowRegion (line 57) | static ControlFlowRegion() method ControlFlowRegion (line 73) | private ControlFlowRegion(object instance) => method Wrap (line 76) | public static ControlFlowRegion Wrap(object instance) => FILE: analyzers/src/SonarAnalyzer.CFG/Roslyn/TypeLoader.cs class TypeLoader (line 20) | internal static class TypeLoader method FlowAnalysisType (line 22) | public static Type FlowAnalysisType(string typeName) => FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/AbstractControlFlowGraphBuilder.cs class AbstractControlFlowGraphBuilder (line 20) | public abstract class AbstractControlFlowGraphBuilder class ControlFlowGraph (line 22) | private class ControlFlowGraph : IControlFlowGraph method ControlFlowGraph (line 30) | public ControlFlowGraph(List reversedBlocks, Block entryBlock... method RemoveEmptyBlocks (line 51) | private static Block RemoveEmptyBlocks(List reversedBlocks, B... method ComputePredecessors (line 86) | private void ComputePredecessors() method AbstractControlFlowGraphBuilder (line 103) | protected AbstractControlFlowGraphBuilder(SyntaxNode node, SemanticMod... method PostProcessGraph (line 111) | protected abstract void PostProcessGraph(); method Build (line 113) | public IControlFlowGraph Build() method Build (line 121) | protected abstract Block Build(SyntaxNode node, Block currentBlock); method CreateBinaryBranchBlock (line 125) | internal BinaryBranchBlock CreateBinaryBranchBlock(SyntaxNode branchin... method CreateBlock (line 128) | internal SimpleBlock CreateBlock(Block successor) => method CreateJumpBlock (line 131) | internal JumpBlock CreateJumpBlock(SyntaxNode jumpStatement, Block suc... method CreateBranchBlock (line 134) | internal BranchBlock CreateBranchBlock(SyntaxNode branchingNode, IEnum... method CreateExitBlock (line 137) | private ExitBlock CreateExitBlock() => AddBlock(new ExitBlock()); method CreateTemporaryBlock (line 139) | internal TemporaryBlock CreateTemporaryBlock() => AddBlock(new Tempora... method AddBlock (line 141) | internal T AddBlock(T block) FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/BlockIdProvider.cs class BlockIdProvider (line 20) | public class BlockIdProvider method Get (line 25) | public string Get(Block cfgBlock) => FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/Blocks/BinaryBranchBlock.cs class BinaryBranchBlock (line 20) | public class BinaryBranchBlock : BranchBlock method BinaryBranchBlock (line 22) | internal BinaryBranchBlock(SyntaxNode branchingNode, Block trueSuccess... FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/Blocks/BinaryBranchingSimpleBlock.cs class BinaryBranchingSimpleBlock (line 20) | public sealed class BinaryBranchingSimpleBlock : SimpleBlock method BinaryBranchingSimpleBlock (line 22) | internal BinaryBranchingSimpleBlock(SyntaxNode branchingInstruction, B... FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/Blocks/Block.cs class Block (line 24) | public class Block method Block (line 32) | protected Block() method GetPossibleNonEmptySuccessorBlock (line 50) | internal virtual Block GetPossibleNonEmptySuccessorBlock() method ReplaceSuccessors (line 55) | internal virtual void ReplaceSuccessors(Dictionary repla... method GetAll (line 63) | private static ISet GetAll(Block initial, Func repl... FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/Blocks/ExitBlock.cs class ExitBlock (line 20) | public sealed class ExitBlock : Block method ExitBlock (line 22) | internal ExitBlock() FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/Blocks/ForInitializerBlock.cs class ForInitializerBlock (line 22) | public sealed class ForInitializerBlock : SimpleBlock method ForInitializerBlock (line 24) | internal ForInitializerBlock(ForStatementSyntax forNode, Block successor) method GetPossibleNonEmptySuccessorBlock (line 32) | internal override Block GetPossibleNonEmptySuccessorBlock() FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/Blocks/ForeachCollectionProducerBlock.cs class ForeachCollectionProducerBlock (line 22) | public sealed class ForeachCollectionProducerBlock : SimpleBlock method ForeachCollectionProducerBlock (line 24) | internal ForeachCollectionProducerBlock(StatementSyntax foreachNode, B... method GetPossibleNonEmptySuccessorBlock (line 32) | internal override Block GetPossibleNonEmptySuccessorBlock() FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/Blocks/JumpBlock.cs class JumpBlock (line 20) | public sealed class JumpBlock : SimpleBlock method JumpBlock (line 22) | internal JumpBlock(SyntaxNode jumpNode, Block successor, Block wouldBe... method GetPossibleNonEmptySuccessorBlock (line 37) | internal override Block GetPossibleNonEmptySuccessorBlock() method ReplaceSuccessors (line 43) | internal override void ReplaceSuccessors(Dictionary repl... FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/Blocks/LockBlock.cs class LockBlock (line 22) | public class LockBlock : SimpleBlock method LockBlock (line 24) | public LockBlock(LockStatementSyntax lockNode, Block successor) method GetPossibleNonEmptySuccessorBlock (line 32) | internal override Block GetPossibleNonEmptySuccessorBlock() FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/Blocks/SimpleBlock.cs class SimpleBlock (line 20) | public class SimpleBlock : Block method SimpleBlock (line 22) | internal SimpleBlock(Block successor) method ReplaceSuccessors (line 31) | internal override void ReplaceSuccessors(Dictionary repl... method GetPossibleNonEmptySuccessorBlock (line 39) | internal override Block GetPossibleNonEmptySuccessorBlock() FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/Blocks/TemporaryBlock.cs class TemporaryBlock (line 20) | public sealed class TemporaryBlock : Block method GetPossibleNonEmptySuccessorBlock (line 26) | internal override Block GetPossibleNonEmptySuccessorBlock() FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/Blocks/UsingEndBlock.cs class UsingEndBlock (line 22) | public class UsingEndBlock : SimpleBlock method UsingEndBlock (line 27) | public UsingEndBlock(UsingStatementSyntax usingStatement, Block succes... method GetIdentifiers (line 37) | private static IEnumerable GetIdentifiers(VariableDeclara... method GetIdentifiers (line 44) | private static IEnumerable GetIdentifiers(ExpressionSynta... FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/CSharpControlFlowGraph.cs class CSharpControlFlowGraph (line 22) | public static class CSharpControlFlowGraph method TryGet (line 24) | public static bool TryGet(SyntaxNode node, SemanticModel semanticModel... method Create (line 65) | internal /* for testing */ static IControlFlowGraph Create(SyntaxNode ... FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/CSharpControlFlowGraphBuilder.cs class CSharpControlFlowGraphBuilder (line 23) | public sealed class CSharpControlFlowGraphBuilder : AbstractControlFlowG... method CSharpControlFlowGraphBuilder (line 35) | public CSharpControlFlowGraphBuilder(SyntaxNode node, SemanticModel se... method PostProcessGraph (line 42) | protected override void PostProcessGraph() method FixJumps (line 47) | private void FixJumps(Dictionary> jump... method Build (line 69) | protected override Block Build(SyntaxNode node, Block currentBlock) method BuildConstructorInitializer (line 99) | private Block BuildConstructorInitializer(ConstructorInitializerSyntax... method BuildStatement (line 110) | private Block BuildStatement(StatementSyntax statement, Block currentB... method BuildExpression (line 208) | private Block BuildExpression(ExpressionSyntax expression, Block curre... method IsTooComplex (line 491) | private static bool IsTooComplex(SyntaxNode node) method BuildStatements (line 507) | private Block BuildStatements(IEnumerable statements,... method BuildExpressions (line 517) | private Block BuildExpressions(IEnumerable expressio... method BuildLabeledStatement (line 529) | private Block BuildLabeledStatement(LabeledStatementSyntax labeledStat... method BuildTryStatement (line 539) | private Block BuildTryStatement(TryStatementSyntax tryStatement, Block... method IsCatchingAllExceptions (line 624) | private static bool IsCatchingAllExceptions(CatchClauseSyntax catchCla... method BuildGotoDefaultStatement (line 637) | private Block BuildGotoDefaultStatement(GotoStatementSyntax statement,... method BuildGotoCaseStatement (line 657) | private Block BuildGotoCaseStatement(GotoStatementSyntax statement, Bl... method BuildGotoStatement (line 678) | private Block BuildGotoStatement(GotoStatementSyntax statement, Block ... method BuildSwitchStatement (line 701) | private Block BuildSwitchStatement(SwitchStatementSyntax switchStateme... method BuildSwitchExpression (line 763) | private Block BuildSwitchExpression(SwitchExpressionSyntaxWrapper swit... method BuildArmBranch (line 785) | private Block BuildArmBranch(SwitchExpressionArmSyntaxWrapper switchEx... method CreateCurrentBlock (line 796) | private Block CreateCurrentBlock(SwitchExpressionArmSyntaxWrapper swit... method BuildCasePattern (line 801) | private Block BuildCasePattern(CasePatternSwitchLabelSyntaxWrapper cas... method CreateWhenCloseNewTrueSuccessor (line 813) | private Block CreateWhenCloseNewTrueSuccessor(WhenClauseSyntaxWrapper ... method GetCaseIndexer (line 818) | private object GetCaseIndexer(ExpressionSyntax expression) method BuildBreakStatement (line 839) | private Block BuildBreakStatement(BreakStatementSyntax breakStatement,... method BuildContinueStatement (line 858) | private Block BuildContinueStatement(ContinueStatementSyntax continueS... method BuildReturnStatement (line 869) | private Block BuildReturnStatement(ReturnStatementSyntax returnStateme... method BuildThrowStatement (line 874) | private Block BuildThrowStatement(ThrowStatementSyntax throwStatement,... method BuildYieldBreakStatement (line 879) | private Block BuildYieldBreakStatement(YieldStatementSyntax yieldBreak... method BuildYieldReturnStatement (line 884) | private Block BuildYieldReturnStatement(YieldStatementSyntax yieldRetu... method BuildJumpToExitStatement (line 889) | private Block BuildJumpToExitStatement(StatementSyntax statement, Bloc... method BuildJumpToExitStatement (line 901) | private Block BuildJumpToExitStatement(ExpressionSyntax expression, Bl... method BuildLockStatement (line 910) | private Block BuildLockStatement(LockStatementSyntax lockStatement, Bl... method BuildUsingStatement (line 917) | private Block BuildUsingStatement(UsingStatementSyntax usingStatement,... method BuildFixedStatement (line 927) | private Block BuildFixedStatement(FixedStatementSyntax fixedStatement,... method BuildUnsafeStatement (line 933) | private Block BuildUnsafeStatement(UnsafeStatementSyntax statement, Bl... method BuildCheckedStatement (line 939) | private Block BuildCheckedStatement(CheckedStatementSyntax statement, ... method BuildDoStatement (line 949) | private Block BuildDoStatement(DoStatementSyntax doStatement, Block cu... method BuildForStatement (line 968) | private Block BuildForStatement(ForStatementSyntax forStatement, Block... method BuildForEachVariableStatement (line 999) | private Block BuildForEachVariableStatement(ForEachVariableStatementSy... method BuildForEachStatement (line 1002) | private Block BuildForEachStatement(ForEachStatementSyntax foreachStat... method BuildForEachStatement (line 1005) | private Block BuildForEachStatement(StatementSyntax foreachStatement, ... method BuildWhileStatement (line 1023) | private Block BuildWhileStatement(WhileStatementSyntax whileStatement,... method BuildIfStatement (line 1046) | private Block BuildIfStatement(IfStatementSyntax ifStatement, Block cu... method BuildBlock (line 1062) | private Block BuildBlock(BlockSyntax block, Block currentBlock) method BuildConditionalAccessExpression (line 1073) | private Block BuildConditionalAccessExpression(ConditionalAccessExpres... method BuildConditionalExpression (line 1082) | private Block BuildConditionalExpression(ConditionalExpressionSyntax c... method BuildCoalesceExpression (line 1090) | private Block BuildCoalesceExpression(BinaryExpressionSyntax expressio... method BuildLogicalAndExpression (line 1097) | private Block BuildLogicalAndExpression(BinaryExpressionSyntax express... method BuildLogicalOrExpression (line 1105) | private Block BuildLogicalOrExpression(BinaryExpressionSyntax expressi... method BuildArrayCreationExpression (line 1113) | private Block BuildArrayCreationExpression(ArrayCreationExpressionSynt... method BuildElementAccessExpression (line 1121) | private Block BuildElementAccessExpression(ElementAccessExpressionSynt... method BuildImplicitElementAccessExpression (line 1127) | private Block BuildImplicitElementAccessExpression(ImplicitElementAcce... method BuildInvocationLikeExpression (line 1132) | private Block BuildInvocationLikeExpression(ExpressionSyntax parent, B... method BuildObjectCreationExpression (line 1165) | private Block BuildObjectCreationExpression(ObjectCreationExpressionSy... method BuildAnonymousObjectCreationExpression (line 1177) | private Block BuildAnonymousObjectCreationExpression(AnonymousObjectCr... method BuildInvocationExpression (line 1184) | private Block BuildInvocationExpression(InvocationExpressionSyntax exp... method BuildInterpolatedStringExpression (line 1190) | private Block BuildInterpolatedStringExpression(InterpolatedStringExpr... method BuildSimpleNestedExpression (line 1197) | private Block BuildSimpleNestedExpression(ExpressionSyntax parent, Blo... method BuildSimpleNestedExpression (line 1203) | private Block BuildSimpleNestedExpression(ExpressionSyntax parent, Blo... method BuildBinaryExpression (line 1217) | private Block BuildBinaryExpression(BinaryExpressionSyntax expression,... method BuildAssignmentExpression (line 1224) | private Block BuildAssignmentExpression(AssignmentExpressionSyntax exp... method BuildCoalesceAssignmentExpression (line 1231) | private Block BuildCoalesceAssignmentExpression(AssignmentExpressionSy... method BuildSimpleAssignmentExpression (line 1238) | private Block BuildSimpleAssignmentExpression(AssignmentExpressionSynt... method IsAssignmentWithSimpleLeftSide (line 1250) | public static bool IsAssignmentWithSimpleLeftSide(AssignmentExpression... method BuildArrayType (line 1255) | private Block BuildArrayType(ArrayTypeSyntax arrayType, Block currentB... method BuildIsPatternExpression (line 1263) | private Block BuildIsPatternExpression(IsPatternExpressionSyntaxWrappe... method BuildPatternExpression (line 1270) | private Block BuildPatternExpression(PatternSyntaxWrapper patternSynta... method BuildTupleExpression (line 1300) | private Block BuildTupleExpression(TupleExpressionSyntaxWrapper tuple,... method BuildVariableDeclaration (line 1314) | private Block BuildVariableDeclaration(VariableDeclarationSyntax decla... method BuildVariableDeclarator (line 1330) | private Block BuildVariableDeclarator(VariableDeclaratorSyntax variabl... method CreateLockBlock (line 1345) | internal LockBlock CreateLockBlock(LockStatementSyntax lockStatement, ... method CreateUsingFinalizerBlock (line 1348) | internal UsingEndBlock CreateUsingFinalizerBlock(UsingStatementSyntax ... method BuildCondition (line 1359) | private Block BuildCondition(ExpressionSyntax expression, Block trueSu... method IsNameof (line 1396) | private bool IsNameof(InvocationExpressionSyntax expression) => FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/CfgAllPathValidator.cs class CfgAllPathValidator (line 20) | public class CfgAllPathValidator method CfgAllPathValidator (line 26) | protected CfgAllPathValidator(IControlFlowGraph cfg) method CheckAllPaths (line 31) | public bool CheckAllPaths() method IsBlockValidWithSuccessors (line 36) | private bool IsBlockValidWithSuccessors(Block block) method AreAllSuccessorsValid (line 41) | private bool AreAllSuccessorsValid(Block block) method IsBlockValid (line 56) | protected virtual bool IsBlockValid(Block block) method IsBlockInvalid (line 61) | protected virtual bool IsBlockInvalid(Block block) FILE: analyzers/src/SonarAnalyzer.CFG/Sonar/IControlFlowGraph.cs type IControlFlowGraph (line 24) | public interface IControlFlowGraph FILE: analyzers/src/SonarAnalyzer.CFG/Syntax/Utilities/SyntaxClassifierBase.cs class SyntaxClassifierBase (line 25) | public abstract class SyntaxClassifierBase method MemberAccessExpression (line 27) | public abstract SyntaxNode MemberAccessExpression(SyntaxNode node); method IsCfgBoundary (line 28) | protected abstract bool IsCfgBoundary(SyntaxNode node); method IsStatement (line 29) | protected abstract bool IsStatement(SyntaxNode node); method ParentLoopCondition (line 30) | protected abstract SyntaxNode ParentLoopCondition(SyntaxNode node); method IsInLoopCondition (line 33) | public bool IsInLoopCondition(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Common/DescriptorFactory.cs class DescriptorFactory (line 22) | public static class DescriptorFactory method Create (line 24) | public static DiagnosticDescriptor Create(string id, string messageFor... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Common/SyntaxConstants.cs class SyntaxConstants (line 20) | public static class SyntaxConstants FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Extensions/CSharpCompilationExtensions.cs class CSharpCompilationExtensions (line 20) | public static class CSharpCompilationExtensions method IsCoalesceAssignmentSupported (line 22) | public static bool IsCoalesceAssignmentSupported(this Compilation comp... method IsTargetTypeConditionalSupported (line 25) | public static bool IsTargetTypeConditionalSupported(this Compilation c... method IsLambdaDiscardParameterSupported (line 28) | public static bool IsLambdaDiscardParameterSupported(this Compilation ... method IsAtLeastLanguageVersion (line 31) | public static bool IsAtLeastLanguageVersion(this Compilation compilati... method GetLanguageVersion (line 34) | public static LanguageVersion GetLanguageVersion(this Compilation comp... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Extensions/IAnalyzerConfigurationExtensions.cs class IAnalyzerConfigurationExtensions (line 20) | public static class IAnalyzerConfigurationExtensions method UseSonarCfg (line 22) | public static bool UseSonarCfg(this IAnalyzerConfiguration configurati... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Extensions/ICompilationReportExtensions.cs class ICompilationReportExtensions (line 21) | public static class ICompilationReportExtensions method ReportIssue (line 25) | public void ReportIssue(DiagnosticDescriptor rule, SyntaxNode location... method ReportIssue (line 28) | public void ReportIssue(DiagnosticDescriptor rule, SyntaxToken locatio... method ReportIssue (line 31) | public void ReportIssue(DiagnosticDescriptor rule, Location location, ... method ReportIssue (line 34) | public void ReportIssue(DiagnosticDescriptor rule, Location primaryLoc... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Extensions/IFieldSymbolExtensions.cs class IFieldSymbolExtensions (line 20) | public static class IFieldSymbolExtensions method IsNonStaticNonPublicDisposableField (line 22) | public static bool IsNonStaticNonPublicDisposableField(this IFieldSymb... method IsDisposable (line 28) | private static bool IsDisposable(this IFieldSymbol fieldSymbol, Langua... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Extensions/ILocalSymbolExtensions.cs class ILocalSymbolExtensions (line 20) | public static class ILocalSymbolExtensions method RefKind (line 24) | public static RefKind RefKind(this ILocalSymbol symbol) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Extensions/IMethodSymbolExtensions.cs class IMethodSymbolExtensions (line 20) | public static class IMethodSymbolExtensions method IsModuleInitializer (line 22) | public static bool IsModuleInitializer(this IMethodSymbol methodSymbol... method IsGetTypeCall (line 25) | public static bool IsGetTypeCall(this IMethodSymbol invokedMethod) => method ImplementationSyntax (line 31) | public static SyntaxNode ImplementationSyntax(this IMethodSymbol metho... method IsObjectOrType (line 34) | private static bool IsObjectOrType(ITypeSymbol namedType) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Extensions/ISymbolExtensions.cs class ISymbolExtensions (line 20) | public static class ISymbolExtensions method extension (line 30) | extension(ISymbol symbol) method LocationNodes (line 46) | public IEnumerable LocationNodes(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Extensions/ITupleOperationWrapperExtensions.cs class ITupleOperationWrapperExtensions (line 20) | public static class ITupleOperationWrapperExtensions method AllElements (line 22) | public static ImmutableArray AllElements(this ITupleOperat... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Extensions/ITypeSymbolExtensions.cs class ITypeSymbolExtensions (line 20) | public static class ITypeSymbolExtensions method IsDisposableRefStruct (line 22) | public static bool IsDisposableRefStruct(this ITypeSymbol symbol, Lang... method IsRefStruct (line 27) | public static bool IsRefStruct(this ITypeSymbol symbol) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Extensions/LanguageVersionExtensions.cs class LanguageVersionExtensions (line 20) | internal static class LanguageVersionExtensions method IsAtLeast (line 22) | internal static bool IsAtLeast(this LanguageVersion left, LanguageVers... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Extensions/SonarAnalysisContextExtensions.cs class SonarAnalysisContextExtensions (line 20) | public static class SonarAnalysisContextExtensions method extension (line 22) | extension(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Extensions/SonarCompilationStartAnalysisContextExtensions.cs class SonarCompilationStartAnalysisContextExtensions (line 20) | public static class SonarCompilationStartAnalysisContextExtensions method extension (line 22) | extension(SonarCompilationStartAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Extensions/SonarParametrizedAnalysisContextExtensions.cs class SonarParametrizedAnalysisContextExtensions (line 20) | public static class SonarParametrizedAnalysisContextExtensions method extension (line 22) | extension(SonarParametrizedAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Extensions/SonarSyntaxNodeReportingContextExtensions.cs class SonarSyntaxNodeReportingContextExtensions (line 20) | public static class SonarSyntaxNodeReportingContextExtensions method extension (line 22) | extension(SonarSyntaxNodeReportingContext context) method IsInExpressionTree (line 29) | public bool IsInExpressionTree() => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Facade/CSharpFacade.cs class CSharpFacade (line 24) | public sealed class CSharpFacade : ILanguageFacade method CSharpFacade (line 44) | private CSharpFacade() { } method CreateDescriptor (line 46) | public DiagnosticDescriptor CreateDescriptor(string id, string message... method FindConstantValue (line 49) | public object FindConstantValue(SemanticModel model, SyntaxNode node) => method MethodParameterLookup (line 52) | public IMethodParameterLookup MethodParameterLookup(SyntaxNode invocat... method MethodParameterLookup (line 60) | public IMethodParameterLookup MethodParameterLookup(SyntaxNode invocat... method GetName (line 65) | public string GetName(SyntaxNode expression) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Facade/Implementation/CSharpSyntaxFacade.cs class CSharpSyntaxFacade (line 22) | internal sealed class CSharpSyntaxFacade : SyntaxFacade method AreEquivalent (line 24) | public override bool AreEquivalent(SyntaxNode firstNode, SyntaxNode se... method ArgumentExpressions (line 27) | public override IEnumerable ArgumentExpressions(SyntaxNode... method ArgumentList (line 30) | public override IReadOnlyList ArgumentList(SyntaxNode node... method ArgumentIndex (line 33) | public override int? ArgumentIndex(SyntaxNode argument) => method ArgumentNameColon (line 36) | public override SyntaxToken? ArgumentNameColon(SyntaxNode argument) => method AssignmentLeft (line 39) | public override SyntaxNode AssignmentLeft(SyntaxNode assignment) => method AssignmentRight (line 42) | public override SyntaxNode AssignmentRight(SyntaxNode assignment) => method AssignmentTargets (line 45) | public override ImmutableArray AssignmentTargets(SyntaxNod... method BinaryExpressionLeft (line 48) | public override SyntaxNode BinaryExpressionLeft(SyntaxNode binary) => method BinaryExpressionRight (line 51) | public override SyntaxNode BinaryExpressionRight(SyntaxNode binary) => method CastType (line 54) | public override SyntaxNode CastType(SyntaxNode cast) => method CastExpression (line 57) | public override SyntaxNode CastExpression(SyntaxNode cast) => method ComparisonKind (line 60) | public override ComparisonKind ComparisonKind(SyntaxNode node) => method EnumMembers (line 65) | public override IEnumerable EnumMembers(SyntaxNode @enum) => method FieldDeclarationIdentifiers (line 68) | public override ImmutableArray FieldDeclarationIdentifier... method HasExactlyNArguments (line 71) | public override bool HasExactlyNArguments(SyntaxNode invocation, int c... method InvocationIdentifier (line 74) | public override SyntaxToken? InvocationIdentifier(SyntaxNode invocatio... method IsAnyKind (line 77) | public override bool IsAnyKind(SyntaxNode node, ISet synta... method IsAnyKind (line 79) | [Obsolete("Either use '.Kind() is A or B' or the overload with the ISe... method IsAnyKind (line 82) | public override bool IsAnyKind(SyntaxTrivia trivia, ISet s... method IsInExpressionTree (line 84) | public override bool IsInExpressionTree(SemanticModel model, SyntaxNod... method IsKind (line 87) | public override bool IsKind(SyntaxNode node, SyntaxKind kind) => node.... method IsKind (line 89) | public override bool IsKind(SyntaxToken token, SyntaxKind kind) => tok... method IsKind (line 91) | public override bool IsKind(SyntaxTrivia trivia, SyntaxKind kind) => t... method IsKnownAttributeType (line 93) | public override bool IsKnownAttributeType(SemanticModel model, SyntaxN... method IsMemberAccessOnKnownType (line 96) | public override bool IsMemberAccessOnKnownType(SyntaxNode memberAccess... method IsNullLiteral (line 99) | public override bool IsNullLiteral(SyntaxNode node) => method IsPartOfBinaryNegationOrCondition (line 102) | public override bool IsPartOfBinaryNegationOrCondition(SyntaxNode node... method IsStatic (line 105) | public override bool IsStatic(SyntaxNode node) => method IsWrittenTo (line 109) | public override bool IsWrittenTo(SyntaxNode expression, SemanticModel ... method Kind (line 112) | public override SyntaxKind Kind(SyntaxNode node) => node.Kind(); method LiteralText (line 114) | public override string LiteralText(SyntaxNode literal) => method LocalDeclarationIdentifiers (line 117) | public override ImmutableArray LocalDeclarationIdentifier... method ModifierKinds (line 120) | public override SyntaxKind[] ModifierKinds(SyntaxNode node) => method NodeExpression (line 128) | public override SyntaxNode NodeExpression(SyntaxNode node) => method NodeIdentifier (line 143) | public override SyntaxToken? NodeIdentifier(SyntaxNode node) => method ObjectCreationTypeIdentifier (line 146) | public override SyntaxToken? ObjectCreationTypeIdentifier(SyntaxNode o... method RemoveConditionalAccess (line 149) | public override SyntaxNode RemoveConditionalAccess(SyntaxNode node) => method RemoveParentheses (line 154) | public override SyntaxNode RemoveParentheses(SyntaxNode node) => method StringValue (line 157) | public override string StringValue(SyntaxNode node, SemanticModel mode... method InterpolatedTextValue (line 160) | public override string InterpolatedTextValue(SyntaxNode node, Semantic... method Operands (line 163) | public override Pair Operands(SyntaxNode invoc... method ParseExpression (line 166) | public override SyntaxNode ParseExpression(string expression) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Facade/Implementation/CSharpSyntaxKindFacade.cs class CSharpSyntaxKindFacade (line 20) | internal sealed class CSharpSyntaxKindFacade : ISyntaxKindFacade FILE: analyzers/src/SonarAnalyzer.CSharp.Core/LiveVariableAnalysis/SonarCSharpLiveVariableAnalysis.cs class SonarCSharpLiveVariableAnalysis (line 23) | public sealed class SonarCSharpLiveVariableAnalysis : LiveVariableAnalys... method SonarCSharpLiveVariableAnalysis (line 29) | public SonarCSharpLiveVariableAnalysis(IControlFlowGraph controlFlowGr... method IsLocal (line 36) | public override bool IsLocal(ISymbol symbol) method IsOutArgument (line 47) | public static bool IsOutArgument(IdentifierNameSyntax identifier) => method ReversedBlocks (line 50) | protected override IEnumerable ReversedBlocks() => method Successors (line 53) | protected override IEnumerable Successors(Block block) => method Predecessors (line 56) | protected override IEnumerable Predecessors(Block block) => method ProcessBlock (line 59) | protected override State ProcessBlock(Block block) class SonarState (line 66) | private sealed class SonarState : State method SonarState (line 73) | public SonarState(SonarCSharpLiveVariableAnalysis owner, SemanticMod... method ProcessBlock (line 79) | public void ProcessBlock(Block block) method ProcessVariableInForeach (line 134) | private void ProcessVariableInForeach(ForEachStatementSyntax foreach... method ProcessVariableDeclarator (line 143) | private void ProcessVariableDeclarator(VariableDeclaratorSyntax inst... method ProcessSimpleAssignment (line 152) | private void ProcessSimpleAssignment(AssignmentExpressionSyntax assi... method ProcessIdentifier (line 165) | private void ProcessIdentifier(IdentifierNameSyntax identifier) method ProcessGenericName (line 190) | private void ProcessGenericName(GenericNameSyntax genericName) method ProcessLocalFunction (line 199) | private void ProcessLocalFunction(ISymbol symbol) method CollectAllCapturedLocal (line 215) | private void CollectAllCapturedLocal(SyntaxNode instruction) FILE: analyzers/src/SonarAnalyzer.CSharp.Core/RegularExpressions/MessageTemplatesParser.cs class MessageTemplatesParser (line 25) | public static class MessageTemplatesParser method Parse (line 43) | public static ParseResult Parse(ExpressionSyntax template) method Parse (line 72) | public static ParseResult Parse(string template, Regex regex) type ParseResult (line 88) | public record ParseResult(bool Success, Placeholder[] Placeholders = n... type Placeholder (line 90) | public record Placeholder(string Name, int Start, int Length); FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/AccessorDeclarationSyntaxExtensions.cs class AccessorDeclarationSyntaxExtensions (line 20) | public static class AccessorDeclarationSyntaxExtensions method HasBodyOrExpressionBody (line 22) | public static bool HasBodyOrExpressionBody(this AccessorDeclarationSyn... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/ArgumentListSyntaxExtensions.cs class ArgumentListSyntaxExtensions (line 20) | public static class ArgumentListSyntaxExtensions method Get (line 22) | public static ExpressionSyntax Get(this ArgumentListSyntax argumentLis... method ArgumentValuesForParameter (line 32) | public static ImmutableArray ArgumentValuesForParameter(th... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/ArgumentSyntaxExtensions.cs class ArgumentSyntaxExtensions (line 20) | public static class ArgumentSyntaxExtensions method GetArgumentIndex (line 22) | public static int? GetArgumentIndex(this ArgumentSyntax argument) => method GetArgumentsOfKnownType (line 25) | public static IEnumerable GetArgumentsOfKnownType(this... method GetSymbolsOfKnownType (line 29) | public static IEnumerable GetSymbolsOfKnownType(this Separate... method NameIs (line 34) | public static bool NameIs(this ArgumentSyntax argument, string name) => method IsInTupleAssignmentTarget (line 38) | public static bool IsInTupleAssignmentTarget(this ArgumentSyntax argum... method OutermostTuple (line 43) | public static TupleExpressionSyntaxWrapper? OutermostTuple(this Argume... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/AssignmentExpressionSyntaxExtensions.cs class AssignmentExpressionSyntaxExtensions (line 20) | public static class AssignmentExpressionSyntaxExtensions type AssignmentMapping (line 22) | public readonly record struct AssignmentMapping(SyntaxNode Left, Synta... method MapAssignmentArguments (line 34) | public static ImmutableArray MapAssignmentArguments... method AssignmentTargets (line 78) | public static ImmutableArray AssignmentTargets(this Assign... method MapTupleElements (line 101) | private static NestingMatch MapTupleElements(ImmutableArray GetAttributes(this SyntaxLi... method GetAttributes (line 25) | public static IEnumerable GetAttributes(this SyntaxLi... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/AttributeSyntaxExtensions.cs class AttributeSyntaxExtensions (line 20) | internal static class AttributeSyntaxExtensions method IsKnownType (line 24) | public static bool IsKnownType(this AttributeSyntax attribute, Immutab... method IsKnownType (line 36) | public static bool IsKnownType(this AttributeSyntax attribute, KnownTy... method GetShortNameWithoutAttributeSuffix (line 40) | private static string GetShortNameWithoutAttributeSuffix(KnownType kno... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/AwaitExpressionSyntaxExtensions.cs class AwaitExpressionSyntaxExtensions (line 20) | public static class AwaitExpressionSyntaxExtensions method AwaitedExpressionWithoutConfigureAwait (line 22) | public static ExpressionSyntax AwaitedExpressionWithoutConfigureAwait(... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/BaseArgumentListSyntaxExtensions.cs class BaseArgumentListSyntaxExtensions (line 20) | public static class BaseArgumentListSyntaxExtensions method GetArgumentByName (line 22) | public static ArgumentSyntax GetArgumentByName(this BaseArgumentListSy... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/BaseMethodDeclarationSyntaxExtensions.cs class BaseMethodDeclarationSyntaxExtensions (line 20) | public static class BaseMethodDeclarationSyntaxExtensions method GetBodyDescendantNodes (line 22) | public static IEnumerable GetBodyDescendantNodes(this Base... method IsStatic (line 27) | public static bool IsStatic(this BaseMethodDeclarationSyntax methodDec... method IsExtern (line 30) | public static bool IsExtern(this BaseMethodDeclarationSyntax methodDec... method HasBodyOrExpressionBody (line 33) | public static bool HasBodyOrExpressionBody(this BaseMethodDeclarationS... method GetBodyOrExpressionBody (line 36) | public static SyntaxNode GetBodyOrExpressionBody(this BaseMethodDeclar... method ContainsMethodInvocation (line 39) | public static bool ContainsMethodInvocation(this BaseMethodDeclaration... method GetIdentifierOrDefault (line 57) | public static SyntaxToken? GetIdentifierOrDefault(this BaseMethodDecla... method FindIdentifierLocation (line 66) | public static Location FindIdentifierLocation(this BaseMethodDeclarati... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/BlockSyntaxExtensions.cs class BlockSyntaxExtensions (line 20) | public static class BlockSyntaxExtensions method IsEmpty (line 22) | public static bool IsEmpty(this BlockSyntax block, bool treatCommentsA... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/CompilationUnitSyntaxExtensions.cs class CompilationUnitSyntaxExtensions (line 20) | public static class CompilationUnitSyntaxExtensions method GetTopLevelMainBody (line 22) | public static IEnumerable GetTopLevelMainBody(this Compila... method GetMethodDeclarations (line 27) | public static IEnumerable GetMethodDeclarations(th... method IsTopLevelMain (line 33) | public static bool IsTopLevelMain(this CompilationUnitSyntax compilati... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/ExpressionSyntaxExtensions.Roslyn.cs class ExpressionSyntaxExtensions (line 11) | [ExcludeFromCodeCoverage] method IsWrittenTo (line 22) | public static bool IsWrittenTo( method GetExpressionToAnalyzeForWrites (line 88) | private static ExpressionSyntax GetExpressionToAnalyzeForWrites(Expres... method IsRightSideOfDotOrArrow (line 102) | public static bool IsRightSideOfDotOrArrow(this ExpressionSyntax name) method IsAnyMemberAccessExpressionName (line 107) | public static bool IsAnyMemberAccessExpressionName(this ExpressionSynt... method IsMemberBindingExpressionName (line 118) | public static bool IsMemberBindingExpressionName(this ExpressionSyntax... method IsRightSideOfQualifiedName (line 124) | public static bool IsRightSideOfQualifiedName(this ExpressionSyntax ex... method IsOnlyWrittenTo (line 129) | public static bool IsOnlyWrittenTo(this ExpressionSyntax expression) method IsExpressionOfArgumentInDeconstruction (line 172) | private static bool IsExpressionOfArgumentInDeconstruction(ExpressionS... method IsInOutContext (line 219) | public static bool IsInOutContext(this ExpressionSyntax expression) method IsAttributeNamedArgumentIdentifier (line 224) | public static bool IsAttributeNamedArgumentIdentifier(this ExpressionS... method IsInRefContext (line 231) | public static bool IsInRefContext(this ExpressionSyntax expression) method IsInRefContext (line 241) | public static bool IsInRefContext(this ExpressionSyntax expression, ou... method IsOperandOfIncrementOrDecrementExpression (line 262) | public static bool IsOperandOfIncrementOrDecrementExpression(this Expr... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/ExpressionSyntaxExtensions.cs class ExpressionSyntaxExtensions (line 22) | public static class ExpressionSyntaxExtensions method RemoveParentheses (line 40) | public static ExpressionSyntax RemoveParentheses(this ExpressionSyntax... method CanBeNull (line 43) | public static bool CanBeNull(this ExpressionSyntax expression, Semanti... method RemoveConditionalAccess (line 47) | public static ExpressionSyntax RemoveConditionalAccess(this Expression... method TryGetExpressionComparedToNull (line 69) | public static bool TryGetExpressionComparedToNull(this ExpressionSynta... method GetLeftOfDot (line 117) | public static ExpressionSyntax GetLeftOfDot(this ExpressionSyntax expr... method GetSelfOrTopParenthesizedExpression (line 125) | public static ExpressionSyntax GetSelfOrTopParenthesizedExpression(thi... method IsOnThis (line 128) | public static bool IsOnThis(this ExpressionSyntax expression) => method IsInNameOfArgument (line 131) | public static bool IsInNameOfArgument(this ExpressionSyntax expression... method IsStringEmpty (line 137) | public static bool IsStringEmpty(this ExpressionSyntax expression, Sem... method HasConstantValue (line 152) | public static bool HasConstantValue(this ExpressionSyntax expression, ... method IsLeftSideOfAssignment (line 155) | public static bool IsLeftSideOfAssignment(this ExpressionSyntax expres... method ExtractMemberIdentifier (line 174) | public static IReadOnlyCollection ExtractMemberIdent... method LeftMostInMemberAccess (line 207) | public static ExpressionSyntax LeftMostInMemberAccess(this ExpressionS... method IsDefaultLiteral (line 231) | public static bool IsDefaultLiteral(this ExpressionSyntax expression) => method IsOn (line 237) | private static bool IsOn(this ExpressionSyntax expression, SyntaxKind ... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/InterpolatedStringExpressionSyntaxExtensions.cs class InterpolatedStringExpressionSyntaxExtensions (line 20) | public static class InterpolatedStringExpressionSyntaxExtensions method ContentsText (line 22) | public static string ContentsText(this InterpolatedStringExpressionSyn... method InterpolatedTextValue (line 25) | public static string InterpolatedTextValue(this InterpolatedStringExpr... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/InvocationExpressionSyntaxExtensions.cs class InvocationExpressionSyntaxExtensions (line 20) | public static class InvocationExpressionSyntaxExtensions method IsMemberAccessOnKnownType (line 22) | public static bool IsMemberAccessOnKnownType(this InvocationExpression... method GetArgumentSymbolsOfKnownType (line 26) | public static IEnumerable GetArgumentSymbolsOfKnownType(this ... method HasExactlyNArguments (line 29) | public static bool HasExactlyNArguments(this InvocationExpressionSynta... method IsGetTypeCall (line 32) | public static bool IsGetTypeCall(this InvocationExpressionSyntax invoc... method IsOnBase (line 36) | public static bool IsOnBase(this InvocationExpressionSyntax invocation... method IsEqualTo (line 39) | public static bool IsEqualTo(this InvocationExpressionSyntax first, In... method Operands (line 48) | public static Pair Operands(this InvocationExp... method GetMethodCallIdentifier (line 56) | public static SyntaxToken? GetMethodCallIdentifier(this InvocationExpr... method IsNameof (line 59) | public static bool IsNameof(this InvocationExpressionSyntax expression... method IsMethodInvocation (line 65) | public static bool IsMethodInvocation(this InvocationExpressionSyntax ... method IsMethodInvocation (line 70) | public static bool IsMethodInvocation(this InvocationExpressionSyntax ... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/LocalFunctionStatementSyntaxWrapperExtensions.cs class LocalFunctionStatementSyntaxWrapperExtensions (line 20) | public static class LocalFunctionStatementSyntaxWrapperExtensions method IsTopLevel (line 22) | public static bool IsTopLevel(this LocalFunctionStatementSyntaxWrapper... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/MemberAccessExpressionSyntaxExtensions.cs class MemberAccessExpressionSyntaxExtensions (line 20) | public static class MemberAccessExpressionSyntaxExtensions method IsMemberAccessOnKnownType (line 22) | public static bool IsMemberAccessOnKnownType(this MemberAccessExpressi... method IsPropertyInvocation (line 27) | public static bool IsPropertyInvocation(this MemberAccessExpressionSyn... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/MethodDeclarationSyntaxExtensions.cs class MethodDeclarationSyntaxExtensions (line 20) | public static class MethodDeclarationSyntaxExtensions method ThrowsOrReturnsNull (line 25) | public static bool ThrowsOrReturnsNull(this MethodDeclarationSyntax sy... method IsExtensionMethod (line 32) | public static bool IsExtensionMethod(this BaseMethodDeclarationSyntax ... method HasReturnTypeVoid (line 36) | public static bool HasReturnTypeVoid(this MethodDeclarationSyntax meth... method IsDeconstructor (line 39) | public static bool IsDeconstructor(this MethodDeclarationSyntax method... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/ObjectCreationExpressionSyntaxExtensions.cs class ObjectCreationExpressionSyntaxExtensions (line 20) | public static class ObjectCreationExpressionSyntaxExtensions method IsKnownType (line 22) | public static bool IsKnownType(this ObjectCreationExpressionSyntax obj... method GetObjectCreationTypeIdentifier (line 26) | public static SyntaxToken? GetObjectCreationTypeIdentifier(this Object... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/ParameterSyntaxExtensions.cs class ParameterSyntaxExtensions (line 20) | public static class ParameterSyntaxExtensions method IsString (line 25) | public static bool IsString(this ParameterSyntax parameterSyntax) => method IsString (line 28) | private static bool IsString(string parameterTypeName) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/PropertyDeclarationSyntaxExtensions.cs class PropertyDeclarationSyntaxExtensions (line 20) | public static class PropertyDeclarationSyntaxExtensions method IsAutoProperty (line 22) | public static bool IsAutoProperty(this PropertyDeclarationSyntax prope... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/StatementSyntaxExtensions.cs class StatementSyntaxExtensions (line 20) | public static class StatementSyntaxExtensions method extension (line 22) | extension(StatementSyntax statement) method SiblingStatements (line 56) | private IEnumerable SiblingStatements() => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/SwitchExpressionSyntaxWrapperExtensions.cs class SwitchExpressionSyntaxWrapperExtensions (line 20) | public static class SwitchExpressionSyntaxWrapperExtensions method HasDiscardPattern (line 22) | public static bool HasDiscardPattern(this SwitchExpressionSyntaxWrappe... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/SwitchStatementSyntaxExtensions.cs class SwitchStatementSyntaxExtensions (line 20) | public static class SwitchStatementSyntaxExtensions method HasDefaultLabel (line 22) | public static bool HasDefaultLabel(this SwitchStatementSyntax node) => method GetDefaultLabelSectionIndex (line 25) | public static int GetDefaultLabelSectionIndex(this SwitchStatementSynt... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/SyntaxNodeExtensions.Roslyn.cs class SyntaxNodeExtensions (line 9) | [ExcludeFromCodeCoverage] method GetParentConditionalAccessExpression (line 17) | public static ConditionalAccessExpressionSyntax GetParentConditionalAc... method GetRootConditionalAccessExpression (line 100) | public static ConditionalAccessExpressionSyntax GetRootConditionalAcce... method IsLeftSideOfAssignExpression (line 118) | public static bool IsLeftSideOfAssignExpression(this SyntaxNode node) method IsParentKind (line 124) | public static bool IsParentKind(this SyntaxNode node, SyntaxKind kind) method IsParentKind (line 129) | public static bool IsParentKind(this SyntaxNode node, SyntaxKind ki... method IsLeftSideOfAnyAssignExpression (line 142) | public static bool IsLeftSideOfAnyAssignExpression(this SyntaxNode node) method IsAnyAssignExpression (line 151) | public static bool IsAnyAssignExpression(this SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/SyntaxNodeExtensionsCSharp.cs class SyntaxNodeExtensionsCSharp (line 25) | public static class SyntaxNodeExtensionsCSharp method CreateCfg (line 81) | public static ControlFlowGraph CreateCfg(this SyntaxNode node, Semanti... method ContainsConditionalConstructs (line 84) | public static bool ContainsConditionalConstructs(this SyntaxNode node) => method FindConstantValue (line 92) | public static object FindConstantValue(this SyntaxNode node, SemanticM... method FindStringConstant (line 95) | public static string FindStringConstant(this SyntaxNode node, Semantic... method IsPartOfBinaryNegationOrCondition (line 98) | public static bool IsPartOfBinaryNegationOrCondition(this SyntaxNode n... method GetDeclarationTypeName (line 126) | public static string GetDeclarationTypeName(this SyntaxNode node) => method TypeSyntax (line 159) | public static TypeSyntax TypeSyntax(this SyntaxNode node) => method ArrowExpressionBody (line 215) | public static ArrowExpressionClauseSyntax ArrowExpressionBody(this Syn... method RemoveParentheses (line 228) | public static SyntaxNode RemoveParentheses(this SyntaxNode expression) method WalkUpParentheses (line 240) | public static SyntaxNode WalkUpParentheses(this SyntaxNode node) method GetIdentifier (line 249) | public static SyntaxToken? GetIdentifier(this SyntaxNode node) => method FindAssignmentComplement (line 329) | public static SyntaxNode FindAssignmentComplement(this SyntaxNode node) method IsInExpressionTree (line 440) | public static bool IsInExpressionTree(this SyntaxNode node, SemanticMo... method ArgumentList (line 463) | public static BaseArgumentListSyntax ArgumentList(this SyntaxNode node... method ParameterList (line 477) | public static ParameterListSyntax ParameterList(this SyntaxNode node) => method GetBody (line 489) | public static BlockSyntax GetBody(this SyntaxNode node) => method GetInitializer (line 498) | public static SyntaxNode GetInitializer(this SyntaxNode node) => method GetModifiers (line 506) | public static SyntaxTokenList GetModifiers(this SyntaxNode node) => method IsTrue (line 514) | public static bool IsTrue(this SyntaxNode node) => method IsFalse (line 527) | public static bool IsFalse(this SyntaxNode node) => method IsDynamic (line 540) | public static bool IsDynamic(this SyntaxNode node, SemanticModel model... method EnclosingScope (line 543) | public static SyntaxNode EnclosingScope(this SyntaxNode node) => method GetTopMostContainingMethod (line 546) | public static SyntaxNode GetTopMostContainingMethod(this SyntaxNode no... method GetSelfOrTopParenthesizedExpression (line 549) | public static SyntaxNode GetSelfOrTopParenthesizedExpression(this Synt... method GetFirstNonParenthesizedParent (line 559) | public static SyntaxNode GetFirstNonParenthesizedParent(this SyntaxNod... method HasAncestor (line 562) | public static bool HasAncestor(this SyntaxNode node, SyntaxKind syntax... method HasAncestor (line 565) | public static bool HasAncestor(this SyntaxNode node, SyntaxKind kind1,... method HasAncestor (line 568) | public static bool HasAncestor(this SyntaxNode node, ISet ... method IsNullLiteral (line 571) | public static bool IsNullLiteral(this SyntaxNode node) => method IsAnyKind (line 574) | [Obsolete("Either use '.Kind() is A or B' or the overload with the ISe... method IsAnyKind (line 578) | public static bool IsAnyKind(this SyntaxNode node, ISet sy... method GetName (line 581) | public static string GetName(this SyntaxNode node) => method NameIs (line 584) | public static bool NameIs(this SyntaxNode node, string name) => method NameIs (line 587) | public static bool NameIs(this SyntaxNode node, string name, params st... method StringValue (line 592) | public static string StringValue(this SyntaxNode node, SemanticModel m... method AnyOfKind (line 600) | public static bool AnyOfKind(this IEnumerable nodes, Synta... method PerformanceSensitiveAttribute (line 603) | public static AttributeData PerformanceSensitiveAttribute(this SyntaxN... method ChangeSyntaxElement (line 622) | public static T ChangeSyntaxElement(this T originalNode, T newNode,... type PathPosition (line 655) | private readonly record struct PathPosition(int Index, int TupleLength); class ControlFlowGraphCache (line 657) | private sealed class ControlFlowGraphCache : ControlFlowGraphCacheBase method IsLocalFunction (line 659) | protected override bool IsLocalFunction(SyntaxNode node) => method HasNestedCfg (line 662) | protected override bool HasNestedCfg(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/SyntaxTokenExtensions.cs class SyntaxTokenExtensions (line 20) | public static class SyntaxTokenExtensions method IsAnyKind (line 22) | [Obsolete("Either use '.Kind() is A or B' or the overload with the ISe... method IsAnyKind (line 26) | public static bool IsAnyKind(this SyntaxToken token, ISet ... method AnyOfKind (line 29) | public static bool AnyOfKind(this IEnumerable tokens, Syn... method ToComparisonKind (line 32) | public static ComparisonKind ToComparisonKind(this SyntaxToken token) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/SyntaxTokenListExtensions.cs class SyntaxTokenListExtensions (line 20) | public static class SyntaxTokenListExtensions method Find (line 22) | public static SyntaxToken? Find(this SyntaxTokenList tokenList, Syntax... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/SyntaxTriviaExtensions.cs class SyntaxTriviaExtensions (line 20) | public static class SyntaxTriviaExtensions method IsAnyKind (line 30) | public static bool IsAnyKind(this SyntaxTrivia syntaxTravia, ISet FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/TupleExpressionSyntaxExtensions.cs class TupleExpressionSyntaxExtensions (line 20) | public static class TupleExpressionSyntaxExtensions method AllArguments (line 22) | public static ImmutableArray AllArguments(this TupleEx... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/TypeDeclarationSyntaxExtensions.cs class TypeDeclarationSyntaxExtensions (line 20) | public static class TypeDeclarationSyntaxExtensions method GetMethodDeclarations (line 25) | public static IEnumerable GetMethodDeclarations(th... method GetLocalFunctions (line 30) | private static IEnumerable GetLocalFunctions(Metho... method PrimaryConstructor (line 35) | public static IMethodSymbol PrimaryConstructor(this TypeDeclarationSyn... method ParameterList (line 51) | public static ParameterListSyntax ParameterList(this TypeDeclarationSy... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/TypeSyntaxExtensions.cs class TypeSyntaxExtensions (line 20) | public static class TypeSyntaxExtensions method Unwrap (line 29) | public static TypeSyntax Unwrap(this TypeSyntax type) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Extensions/VariableDesignationSyntaxWrapperExtensions.cs class VariableDesignationSyntaxWrapperExtensions (line 20) | public static class VariableDesignationSyntaxWrapperExtensions method AllVariables (line 27) | public static ImmutableArray A... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Utilities/CSharpAttributeParameterLookup.cs class CSharpAttributeParameterLookup (line 20) | internal class CSharpAttributeParameterLookup(AttributeSyntax attribute,... method Expression (line 23) | protected override SyntaxNode Expression(AttributeArgumentSyntax argum... method GetNameColonIdentifier (line 26) | protected override SyntaxToken? GetNameColonIdentifier(AttributeArgume... method GetNameEqualsIdentifier (line 29) | protected override SyntaxToken? GetNameEqualsIdentifier(AttributeArgum... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Utilities/CSharpEquivalenceChecker.cs class CSharpEquivalenceChecker (line 20) | public static class CSharpEquivalenceChecker method AreEquivalent (line 22) | public static bool AreEquivalent(SyntaxNode node1, SyntaxNode node2) => method AreEquivalent (line 25) | public static bool AreEquivalent(SyntaxList nodeList1, Syn... method NodeComparator (line 28) | private static bool NodeComparator(SyntaxNode node1, SyntaxNode node2) => method NullCheckState (line 36) | private static NullCheck NullCheckState(SyntaxNode node, bool isPositive) method NullCheckExpression (line 61) | private static SyntaxNode NullCheckExpression(BinaryExpressionSyntax b... method NullCheckPattern (line 78) | private static NullCheck NullCheckPattern(SyntaxNode expression, Synta... class NullCheck (line 94) | private class NullCheck method NullCheck (line 99) | public NullCheck(SyntaxNode expression, bool isPositive) class CSharpSyntaxNodeEqualityComparer (line 107) | public class CSharpSyntaxNodeEqualityComparer : IEqualityComparer,... method Equals (line 110) | public bool Equals(T x, T y) => method Equals (line 113) | public bool Equals(SyntaxList x, SyntaxList y) => method GetHashCode (line 116) | public int GetHashCode(T obj) => method GetHashCode (line 119) | public int GetHashCode(SyntaxList obj) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Utilities/CSharpExpressionNumericConverter.cs class CSharpExpressionNumericConverter (line 20) | public class CSharpExpressionNumericConverter : ExpressionNumericConvert... method TokenValue (line 28) | protected override object TokenValue(LiteralExpressionSyntax literalEx... method Operand (line 31) | protected override SyntaxNode Operand(PrefixUnaryExpressionSyntax unar... method IsSupportedOperator (line 34) | protected override bool IsSupportedOperator(PrefixUnaryExpressionSynta... method IsMinusOperator (line 37) | protected override bool IsMinusOperator(PrefixUnaryExpressionSyntax un... method RemoveParentheses (line 40) | protected override SyntaxNode RemoveParentheses(SyntaxNode expression) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Utilities/CSharpGeneratedCodeRecognizer.cs class CSharpGeneratedCodeRecognizer (line 20) | public class CSharpGeneratedCodeRecognizer : GeneratedCodeRecognizer method CSharpGeneratedCodeRecognizer (line 24) | private CSharpGeneratedCodeRecognizer() method IsTriviaComment (line 35) | protected override bool IsTriviaComment(SyntaxTrivia trivia) => method GetAttributeName (line 39) | protected override string GetAttributeName(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Utilities/CSharpMethodParameterLookup.cs class CSharpMethodParameterLookup (line 20) | public class CSharpMethodParameterLookup : MethodParameterLookupBase method GetNameColonIdentifier (line 37) | protected override SyntaxToken? GetNameColonIdentifier(ArgumentSyntax ... method GetNameEqualsIdentifier (line 40) | protected override SyntaxToken? GetNameEqualsIdentifier(ArgumentSyntax... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Utilities/CSharpRemovableDeclarationCollector.cs class CSharpRemovableDeclarationCollector (line 20) | public class CSharpRemovableDeclarationCollector : RemovableDeclarationC... method CSharpRemovableDeclarationCollector (line 22) | public CSharpRemovableDeclarationCollector(INamedTypeSymbol namedType,... method RemovableFieldLikeDeclarations (line 24) | public override IEnumerable> R... method OwnerOfSubnodes (line 30) | public override BaseTypeDeclarationSyntax OwnerOfSubnodes(BaseTypeDecl... method IsNodeContainerTypeDeclaration (line 33) | public static bool IsNodeContainerTypeDeclaration(SyntaxNode node) => method MatchingDeclarations (line 36) | protected override IEnumerable MatchingDeclarations(NodeAn... method IsNodeStructOrClassOrRecordDeclaration (line 39) | private static bool IsNodeStructOrClassOrRecordDeclaration(SyntaxNode ... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Utilities/CSharpStringInterpolationConstantValueResolver.cs class CSharpStringInterpolationConstantValueResolver (line 20) | public class CSharpStringInterpolationConstantValueResolver : StringInte... method Contents (line 32) | protected override IEnumerable Conten... method TextToken (line 35) | protected override SyntaxToken TextToken(InterpolatedStringTextSyntax ... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Utilities/CSharpSyntaxClassifier.cs class CSharpSyntaxClassifier (line 22) | public sealed class CSharpSyntaxClassifier : SyntaxClassifierBase method CSharpSyntaxClassifier (line 28) | private CSharpSyntaxClassifier() { } method MemberAccessExpression (line 30) | public override SyntaxNode MemberAccessExpression(SyntaxNode node) => method IsStatement (line 33) | protected override bool IsStatement(SyntaxNode node) => method ParentLoopCondition (line 36) | protected override SyntaxNode ParentLoopCondition(SyntaxNode node) => method IsCfgBoundary (line 47) | protected override bool IsCfgBoundary(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Utilities/MutedSyntaxWalker.cs class MutedSyntaxWalker (line 23) | public class MutedSyntaxWalker : CSharpSyntaxWalker method MutedSyntaxWalker (line 49) | public MutedSyntaxWalker(SemanticModel model, SyntaxNode node) method MutedSyntaxWalker (line 52) | public MutedSyntaxWalker(SemanticModel model, SyntaxNode node, params ... method IsMuted (line 59) | public bool IsMuted() method Visit (line 68) | public override void Visit(SyntaxNode node) method VisitIdentifierName (line 76) | public override void VisitIdentifierName(IdentifierNameSyntax node) FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Syntax/Utilities/SafeCSharpSyntaxWalker.cs class SafeCSharpSyntaxWalker (line 20) | public class SafeCSharpSyntaxWalker : CSharpSyntaxWalker, ISafeSyntaxWalker method SafeCSharpSyntaxWalker (line 22) | protected SafeCSharpSyntaxWalker() { } method SafeCSharpSyntaxWalker (line 24) | protected SafeCSharpSyntaxWalker(SyntaxWalkerDepth depth) : base(depth... method SafeVisit (line 26) | public bool SafeVisit(SyntaxNode syntaxNode) FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Trackers/CSharpArgumentTracker.cs class CSharpArgumentTracker (line 22) | internal sealed class CSharpArgumentTracker : ArgumentTracker method ArgumentList (line 32) | protected override IReadOnlyCollection ArgumentList(Syntax... method Position (line 40) | protected override int? Position(SyntaxNode argumentNode) => method ArgumentRefKind (line 47) | protected override RefKind? ArgumentRefKind(SyntaxNode argumentNode) => method InvocationMatchesMemberKind (line 61) | protected override bool InvocationMatchesMemberKind(SyntaxNode invoked... method InvokedMemberMatches (line 73) | protected override bool InvokedMemberMatches(SemanticModel model, Synt... method FindClassNameFromConstructorInitializerSyntax (line 95) | private static string FindClassNameFromConstructorInitializerSyntax(Co... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Trackers/CSharpAssignmentFinder.cs class CSharpAssignmentFinder (line 22) | public class CSharpAssignmentFinder : AssignmentFinder method GetTopMostContainingMethod (line 24) | protected override SyntaxNode GetTopMostContainingMethod(SyntaxNode no... method IsAssignmentToIdentifier (line 28) | protected override bool IsAssignmentToIdentifier(SyntaxNode node, stri... method IsIdentifierDeclaration (line 49) | protected override bool IsIdentifierDeclaration(SyntaxNode node, strin... method IsLoop (line 67) | protected override bool IsLoop(SyntaxNode node) => method IdentifierMutation (line 75) | private static SyntaxNode IdentifierMutation(SyntaxNode mutation, stri... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Trackers/CSharpBaseTypeTracker.cs class CSharpBaseTypeTracker (line 22) | public class CSharpBaseTypeTracker : BaseTypeTracker method GetBaseTypeNodes (line 27) | protected override IEnumerable GetBaseTypeNodes(SyntaxNode... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Trackers/CSharpBuilderPatternCondition.cs class CSharpBuilderPatternCondition (line 22) | public class CSharpBuilderPatternCondition : BuilderPatternCondition method IsIdentifier (line 49) | protected override bool IsIdentifier(SyntaxNode node, out string ident... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Trackers/CSharpConstantValueFinder.cs class CSharpConstantValueFinder (line 22) | public class CSharpConstantValueFinder : ConstantValueFinder method InitializerValue (line 29) | protected override SyntaxNode InitializerValue(VariableDeclaratorSynta... method VariableDeclarator (line 32) | protected override VariableDeclaratorSyntax VariableDeclarator(SyntaxN... method IsPtrZero (line 35) | protected override bool IsPtrZero(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Trackers/CSharpElementAccessTracker.cs class CSharpElementAccessTracker (line 22) | public class CSharpElementAccessTracker : ElementAccessTracker method AssignedValue (line 27) | public override object AssignedValue(ElementAccessContext context) => method ArgumentAtIndexEquals (line 32) | public override Condition ArgumentAtIndexEquals(int index, string value) method MatchSetter (line 46) | public override Condition MatchSetter() => method MatchProperty (line 49) | public override Condition MatchProperty(MemberDescriptor member) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Trackers/CSharpFieldAccessTracker.cs class CSharpFieldAccessTracker (line 22) | public class CSharpFieldAccessTracker : FieldAccessTracker method WhenRead (line 33) | public override Condition WhenRead() => method MatchSet (line 36) | public override Condition MatchSet() => method AssignedValueIsConstant (line 39) | public override Condition AssignedValueIsConstant() => method IsIdentifierWithinMemberAccess (line 46) | protected override bool IsIdentifierWithinMemberAccess(SyntaxNode expr... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Trackers/CSharpInvocationTracker.cs class CSharpInvocationTracker (line 22) | public class CSharpInvocationTracker : InvocationTracker method ArgumentAtIndexIsStringConstant (line 27) | public override Condition ArgumentAtIndexIsStringConstant(int index) => method ArgumentAtIndexIsAny (line 31) | public override Condition ArgumentAtIndexIsAny(int index, params strin... method ArgumentAtIndexIs (line 35) | public override Condition ArgumentAtIndexIs(int index, Func method ConstArgumentForParameter (line 47) | public override object ConstArgumentForParameter(InvocationContext con... method ExpectedExpressionIdentifier (line 56) | protected override SyntaxToken? ExpectedExpressionIdentifier(SyntaxNod... method ArgumentAtIndexConformsTo (line 59) | private static Condition ArgumentAtIndexConformsTo(int index, Func method GetMethodInfo (line 48) | private static MethodInfo GetMethodInfo(MethodDeclarationContext context) method GetMethodIdentifier (line 78) | protected override SyntaxToken? GetMethodIdentifier(SyntaxNode methodD... class MethodInfo (line 94) | private sealed class MethodInfo method MethodInfo (line 100) | public MethodInfo(SemanticModel model, IEnumerable desce... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Trackers/CSharpObjectCreationTracker.cs class CSharpObjectCreationTracker (line 22) | public class CSharpObjectCreationTracker : ObjectCreationTracker method ConstArgumentForParameter (line 31) | public override object ConstArgumentForParameter(ObjectCreationContext... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Trackers/CSharpObjectInitializationTracker.cs class CSharpObjectInitializationTracker (line 26) | public class CSharpObjectInitializationTracker method CSharpObjectInitializationTracker (line 60) | public CSharpObjectInitializationTracker(Predicate isAllowedCo... method ShouldBeReported (line 73) | public bool ShouldBeReported(IObjectCreation objectCreation, SemanticM... method ShouldBeReported (line 78) | public bool ShouldBeReported(AssignmentExpressionSyntax assignment, Se... method IsAllowedConstantValue (line 92) | private bool IsAllowedConstantValue(object constantValue) => method IsTrackedType (line 95) | private bool IsTrackedType(ExpressionSyntax expression, SemanticModel ... method IsAllowedValue (line 102) | private bool IsAllowedValue(SyntaxNode expression, SemanticModel model) method ObjectCreatedWithAllowedValue (line 136) | private bool ObjectCreatedWithAllowedValue(IObjectCreation objectCreat... method IsTrackedPropertyName (line 163) | private bool IsTrackedPropertyName(string propertyName) => method IsTrackedPropertyName (line 169) | private bool IsTrackedPropertyName(SyntaxNode expression) method IsPropertyOnTrackedType (line 180) | private bool IsPropertyOnTrackedType(SyntaxNode expression, SemanticMo... method IsLaterAssignedWithAllowedValue (line 192) | private bool IsLaterAssignedWithAllowedValue(IObjectCreation objectCre... method InitializerExpressions (line 220) | private static IEnumerable InitializerExpressions(In... method AssignedVariableSymbol (line 223) | private static ISymbol AssignedVariableSymbol(IObjectCreation objectCr... method AssignedVariableSymbol (line 235) | private static ISymbol AssignedVariableSymbol(SyntaxNode node, Semanti... method NextStatements (line 241) | private static IEnumerable NextStatements(StatementSy... method InnerStatements (line 244) | private static IEnumerable InnerStatements(StatementS... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Trackers/CSharpPropertyAccessTracker.cs class CSharpPropertyAccessTracker (line 22) | public class CSharpPropertyAccessTracker : PropertyAccessTracker method MatchGetter (line 38) | public override Condition MatchGetter() => method MatchSetter (line 41) | public override Condition MatchSetter() => method AssignedValueIsConstant (line 44) | public override Condition AssignedValueIsConstant() => method IsIdentifierWithinMemberAccess (line 47) | protected override bool IsIdentifierWithinMemberAccess(SyntaxNode expr... method IsSimpleMemberWithinMemberAccess (line 50) | private static bool IsSimpleMemberWithinMemberAccess(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Wrappers/IMethodDeclaration.cs type IMethodDeclaration (line 20) | public interface IMethodDeclaration FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Wrappers/MethodDeclarationFactory.cs class MethodDeclarationFactory (line 20) | public static class MethodDeclarationFactory method Create (line 22) | public static IMethodDeclaration Create(SyntaxNode node) class LocalFunctionStatementAdapter (line 42) | private sealed class LocalFunctionStatementAdapter : IMethodDeclaration method LocalFunctionStatementAdapter (line 55) | public LocalFunctionStatementAdapter(LocalFunctionStatementSyntaxWra... class MethodDeclarationSyntaxAdapter (line 59) | private sealed class MethodDeclarationSyntaxAdapter : IMethodDeclaration method MethodDeclarationSyntaxAdapter (line 72) | public MethodDeclarationSyntaxAdapter(MethodDeclarationSyntax declar... FILE: analyzers/src/SonarAnalyzer.CSharp.Core/Wrappers/ObjectCreationFactory.cs type IObjectCreation (line 20) | public interface IObjectCreation method IsKnownType (line 27) | bool IsKnownType(KnownType knownType, SemanticModel semanticModel); method TypeAsString (line 28) | string TypeAsString(SemanticModel semanticModel); method TypeSymbol (line 29) | ITypeSymbol TypeSymbol(SemanticModel semanticModel); method MethodSymbol (line 30) | IMethodSymbol MethodSymbol(SemanticModel semanticModel); class ObjectCreationFactory (line 33) | public class ObjectCreationFactory method Create (line 35) | public static IObjectCreation Create(SyntaxNode node) => method TryCreate (line 44) | public static IObjectCreation TryCreate(SyntaxNode node) => method TryCreate (line 49) | public static bool TryCreate(SyntaxNode node, out IObjectCreation obje... class ObjectCreation (line 55) | private sealed class ObjectCreation : IObjectCreation method ObjectCreation (line 64) | public ObjectCreation(ObjectCreationExpressionSyntax objectCreationE... method IsKnownType (line 67) | public bool IsKnownType(KnownType knownType, SemanticModel semanticM... method TypeAsString (line 70) | public string TypeAsString(SemanticModel semanticModel) => method TypeSymbol (line 73) | public ITypeSymbol TypeSymbol(SemanticModel semanticModel) => method MethodSymbol (line 76) | public IMethodSymbol MethodSymbol(SemanticModel semanticModel) => class ImplicitObjectCreation (line 80) | private sealed class ImplicitObjectCreation : IObjectCreation method ImplicitObjectCreation (line 89) | public ImplicitObjectCreation(ImplicitObjectCreationExpressionSyntax... method IsKnownType (line 92) | public bool IsKnownType(KnownType knownType, SemanticModel semanticM... method TypeAsString (line 96) | public string TypeAsString(SemanticModel semanticModel) method TypeSymbol (line 104) | public ITypeSymbol TypeSymbol(SemanticModel semanticModel) => method MethodSymbol (line 107) | public IMethodSymbol MethodSymbol(SemanticModel semanticModel) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Common/DescriptorFactory.cs class DescriptorFactory (line 22) | internal static class DescriptorFactory method Create (line 24) | public static DiagnosticDescriptor Create(string id, string messageFor... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Common/OrderDescriptor.cs type OrderDescriptor (line 20) | internal sealed record OrderDescriptor(int Value, string Description); FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Common/StylingAnalyzer.cs class StylingAnalyzer (line 22) | public abstract class StylingAnalyzer : SonarDiagnosticAnalyzer method StylingAnalyzer (line 28) | protected StylingAnalyzer(string id, string messageFormat, SourceScope... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Extensions/LambdaExpressionSyntaxExtensions.cs class LambdaExpressionSyntaxExtensions (line 20) | public static class LambdaExpressionSyntaxExtensions method IsAnalysisContextAction (line 22) | public static bool IsAnalysisContextAction(this LambdaExpressionSyntax... method IsAnalysisContextName (line 26) | private static bool IsAnalysisContextName(string name) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Extensions/MemberDeclarationSyntaxExtensions.cs class MemberDeclarationSyntaxExtensions (line 20) | internal static class MemberDeclarationSyntaxExtensions method ComputeOrder (line 22) | public static OrderDescriptor ComputeOrder(this MemberDeclarationSynta... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Extensions/SyntaxNodeExtensions.cs class SyntaxNodeExtensions (line 20) | internal static class SyntaxNodeExtensions method HasSameStartLineAs (line 22) | public static bool HasSameStartLineAs(this SyntaxNode first, SyntaxNod... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/AllArgumentsOnSameLine.cs class AllArgumentsOnSameLine (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method AllArgumentsOnSameLine (line 23) | public AllArgumentsOnSameLine() : base("T0028", "All arguments should ... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) method Verify (line 33) | private void Verify(SonarSyntaxNodeReportingContext context, IEnumerab... method IsOnNewLine (line 50) | private static bool IsOnNewLine(SyntaxNode node) => method IsIgnored (line 53) | private static bool IsIgnored(SemanticModel model, SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/AllParametersBase.cs class AllParametersBase (line 20) | public abstract class AllParametersBase : StylingAnalyzer method Verify (line 22) | protected abstract void Verify(SonarSyntaxNodeReportingContext context... method AllParametersBase (line 24) | protected AllParametersBase(string id, string messageFormat) : base(id... method Initialize (line 26) | protected override void Initialize(SonarAnalysisContext context) => method Parameters (line 34) | private static IEnumerable Parameters(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/AllParametersOnSameColumn.cs class AllParametersOnSameColumn (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method AllParametersOnSameColumn (line 23) | public AllParametersOnSameColumn() : base("T0022", "Parameters should ... method Verify (line 25) | protected override void Verify(SonarSyntaxNodeReportingContext context... method IsSameColumn (line 36) | private static bool IsSameColumn(SyntaxNode first, SyntaxNode second) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/AllParametersOnSameLine.cs class AllParametersOnSameLine (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method AllParametersOnSameLine (line 23) | public AllParametersOnSameLine() : base("T0023", "Parameters should be... method Verify (line 25) | protected override void Verify(SonarSyntaxNodeReportingContext context... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/ArrowLocation.cs class ArrowLocation (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method ArrowLocation (line 23) | public ArrowLocation() : base("T0002", "Place the arrow at the end of ... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) method Verify (line 33) | private void Verify(SonarSyntaxNodeReportingContext context, SyntaxTok... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/AvoidArrangeActAssertComment.cs class AvoidArrangeActAssertComment (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method AvoidArrangeActAssertComment (line 28) | public AvoidArrangeActAssertComment() : base("T0044", "Remove this Arr... method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method ExtractWords (line 44) | private static string[] ExtractWords(SyntaxTrivia comment) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/AvoidDeconstruction.cs class AvoidDeconstruction (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method AvoidDeconstruction (line 28) | public AvoidDeconstruction() : base("T0035", "Don't use this deconstru... method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method IsUsedEnough (line 48) | private static bool IsUsedEnough(SonarSyntaxNodeReportingContext conte... class IdentifierWalker (line 64) | file sealed class IdentifierWalker : SafeCSharpSyntaxWalker method IdentifierWalker (line 74) | public IdentifierWalker(SemanticModel model, ISymbol symbol) method Visit (line 80) | public override void Visit(SyntaxNode node) method VisitIdentifierName (line 88) | public override void VisitIdentifierName(IdentifierNameSyntax node) FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/AvoidGet.cs class AvoidGet (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method AvoidGet (line 23) | public AvoidGet() : base("T0000", "Do not use 'Get' prefix. Just don't... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) method Process (line 31) | private void Process(SonarSyntaxNodeReportingContext context, SyntaxTo... method HasGetPrefix (line 39) | private static bool HasGetPrefix(string name) => method IgnoreMethod (line 42) | private static bool IgnoreMethod(IMethodSymbol method) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/AvoidListForEach.cs class AvoidListForEach (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method AvoidListForEach (line 23) | public AvoidListForEach() : base("T0011", "Use 'foreach' iteration ins... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/AvoidNullable.cs class AvoidNullable (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method AvoidNullable (line 23) | public AvoidNullable() : base("T0036", "Do not use nullable context.")... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/AvoidPrimaryConstructor.cs class AvoidPrimaryConstructor (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method AvoidPrimaryConstructor (line 23) | public AvoidPrimaryConstructor() : base("T0043", "Do not use primary c... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/AvoidUnusedInterpolation.cs class AvoidUnusedInterpolation (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method AvoidUnusedInterpolation (line 26) | public AvoidUnusedInterpolation() : base("T0040", "{0}") { } method Initialize (line 28) | protected override void Initialize(SonarAnalysisContext context) => method DollarCount (line 42) | private static int DollarCount(InterpolatedStringExpressionSyntax inte... method CurlyBraceCount (line 45) | private static int CurlyBraceCount(InterpolatedStringExpressionSyntax ... method CurlyBraceCount (line 55) | private static int CurlyBraceCount(string text) FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/AvoidValueTuple.cs class AvoidValueTuple (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method AvoidValueTuple (line 23) | public AvoidValueTuple() : base("T0003", "Do not use ValueTuple in the... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/AvoidVarPattern.cs class AvoidVarPattern (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method AvoidVarPattern (line 23) | public AvoidVarPattern() : base("T0034", "Avoid embedding this var pat... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => method CanBeExtracted (line 35) | private static bool CanBeExtracted(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/FieldOrdering.cs class FieldOrdering (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method FieldOrdering (line 23) | public FieldOrdering() : base("T0013", "Move this static field above t... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => method ValidateMembers (line 33) | private void ValidateMembers(SonarSyntaxNodeReportingContext context) method ValidateMembers (line 42) | private void ValidateMembers(SonarSyntaxNodeReportingContext context, ... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/FileScopeNamespace.cs class FileScopeNamespace (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method FileScopeNamespace (line 23) | public FileScopeNamespace() : base("T0001", "Use file-scoped namespace... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/HelperInTypeName.cs class HelperInTypeName (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method HelperInTypeName (line 23) | public HelperInTypeName() : base("T0006", "Do not use 'Helper' in type... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/IndentArgument.cs class IndentArgument (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IndentArgument (line 23) | public IndentArgument() : base("T0029", "argument") { } method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => method NodeRoot (line 42) | protected override SyntaxNode NodeRoot(SyntaxNode node, SyntaxNode cur... method FirstMemberOnLine (line 53) | private static SyntaxNode FirstMemberOnLine(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/IndentBase.cs class IndentBase (line 22) | public abstract class IndentBase : StylingAnalyzer method IndentBase (line 24) | protected IndentBase(string id, string expressionName) : base(id, $$""... method Verify (line 26) | protected void Verify(SonarSyntaxNodeReportingContext context, int exp... method Offset (line 35) | protected virtual int Offset(SyntaxNode node, SyntaxNode root) => method ExpectedPosition (line 38) | protected int? ExpectedPosition(SyntaxNode node) => method ExpectedPosition (line 43) | protected static int ExpectedPosition(int character, int offset) => method NodeRoot (line 46) | protected virtual SyntaxNode NodeRoot(SyntaxNode node, SyntaxNode curr... method IsIgnored (line 65) | protected virtual bool IsIgnored(SyntaxNode node) => method StatementRoot (line 68) | private SyntaxNode StatementRoot(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/IndentInvocation.cs class IndentInvocation (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IndentInvocation (line 23) | public IndentInvocation() : base("T0026", "member access") { } method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) method NodeRoot (line 47) | protected override SyntaxNode NodeRoot(SyntaxNode node, SyntaxNode cur... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/IndentOperator.cs class IndentOperator (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IndentOperator (line 23) | public IndentOperator() : base("T0019", "operator") { } method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) method Offset (line 87) | protected override int Offset(SyntaxNode node, SyntaxNode root) => method NodeRoot (line 92) | protected override SyntaxNode NodeRoot(SyntaxNode node, SyntaxNode cur... method CoalesceRoot (line 125) | private static SyntaxNode CoalesceRoot(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/IndentRawString.cs class IndentRawString (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IndentRawString (line 25) | public IndentRawString() : base("T0042", "raw string literal") { } method Initialize (line 27) | protected override void Initialize(SonarAnalysisContext context) => method IsIgnored (line 49) | protected override bool IsIgnored(SyntaxNode node) => method NodeRoot (line 52) | protected override SyntaxNode NodeRoot(SyntaxNode node, SyntaxNode cur... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/IndentTernary.cs class IndentTernary (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IndentTernary (line 23) | public IndentTernary() : base("T0025", "ternary") { } method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => method NodeRoot (line 37) | protected override SyntaxNode NodeRoot(SyntaxNode node, SyntaxNode cur... method ExpectedPosition (line 42) | private int? ExpectedPosition(ConditionalExpressionSyntax ternary) FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/InitializerLine.cs class InitializerLine (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method InitializerLine (line 27) | public InitializerLine() : base("T0030", "Move this {0} to the previou... method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) method Verify (line 67) | private void Verify(SonarSyntaxNodeReportingContext context, Expressio... method MissplacedLocation (line 76) | private static Location MissplacedLocation(ExpressionSyntax value, int... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/LambdaParameterName.cs class LambdaParameterName (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method LambdaParameterName (line 23) | public LambdaParameterName() : base("T0010", "Use 'x' for the lambda p... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => method MatchesDelegateParameterName (line 38) | private static bool MatchesDelegateParameterName(SemanticModel model, ... method IsFuncOrAction (line 48) | private static bool IsFuncOrAction(INamedTypeSymbol delegateType) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/LocalFunctionLocation.cs class LocalFunctionLocation (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method LocalFunctionLocation (line 23) | public LocalFunctionLocation() : base("T0015", "This local function sh... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => method IsInTopLevelBlock (line 36) | private static bool IsInTopLevelBlock(LocalFunctionStatementSyntax fun... method IsLastStatement (line 44) | private static bool IsLastStatement(LocalFunctionStatementSyntax funct... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/MemberAccessLine.cs class MemberAccessLine (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method MemberAccessLine (line 25) | public MemberAccessLine() : base("T0027", "Move this member access to ... method Initialize (line 27) | protected override void Initialize(SonarAnalysisContext context) => method FindStartLineMemberAccess (line 41) | private static MemberAccessExpressionSyntax FindStartLineMemberAccess(... method IsIgnored (line 51) | private static bool IsIgnored(MemberAccessExpressionSyntax startLine, ... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/MemberVisibilityOrdering.cs class MemberVisibilityOrdering (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method MemberVisibilityOrdering (line 23) | public MemberVisibilityOrdering() : base("T0009", "Move this {0} {1} a... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => method ValidateMembers (line 34) | private void ValidateMembers(SonarSyntaxNodeReportingContext context) method Category (line 64) | private static string Category(MemberDeclarationSyntax member) => method ReportingLocation (line 80) | private static Location ReportingLocation(SyntaxNode node) => type MemberInfo (line 88) | private sealed record MemberInfo(Location Location, OrderDescriptor Or... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/MethodExpressionBodyLine.cs class MethodExpressionBodyLine (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method MethodExpressionBodyLine (line 23) | public MethodExpressionBodyLine() : base("T0032", "Move this expressio... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => method IsStubThrow (line 43) | private static bool IsStubThrow(IMethodSymbol method, ExpressionSyntax... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/MoveMethodToDedicatedExtensionClass.cs class MoveMethodToDedicatedExtensionClass (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method MoveMethodToDedicatedExtensionClass (line 23) | public MoveMethodToDedicatedExtensionClass() : base("T0046", "Move thi... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => method ExpectedContainingType (line 36) | private static string ExpectedContainingType(IMethodSymbol method) method ValidTypeArguments (line 67) | private static IEnumerable ValidTypeArguments(INamed... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/NamespaceName.cs class NamespaceName (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method NamespaceName (line 23) | public NamespaceName() : base("T0037", "Use {0} namespace.", SourceSco... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/NullPatternMatching.cs class NullPatternMatching (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method NullPatternMatching (line 23) | public NullPatternMatching() : base("T0007", "Use 'is {0}null' pattern... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) method Validate (line 39) | private void Validate(SonarSyntaxNodeReportingContext context, string ... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/OperatorLocation.cs class OperatorLocation (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method OperatorLocation (line 23) | public OperatorLocation() : base("T0018", "The '{0}' operator should n... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) method Validate (line 72) | private void Validate(SonarSyntaxNodeReportingContext context, SyntaxT... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/PropertyOrdering.cs class PropertyOrdering (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method PropertyOrdering (line 23) | public PropertyOrdering() : base("T0014", "Move this static property a... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => method ValidateMembers (line 33) | private void ValidateMembers(SonarSyntaxNodeReportingContext context) method ValidateMembers (line 41) | private void ValidateMembers(SonarSyntaxNodeReportingContext context, ... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/ProtectedFieldsCase.cs class ProtectedFieldsCase (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method ProtectedFieldsCase (line 23) | public ProtectedFieldsCase() : base("T0039", "Protected field should s... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/SeparateDeclarations.cs class SeparateDeclarations (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method SeparateDeclarations (line 23) | public SeparateDeclarations() : base("T0016", "Add an empty line befor... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) method ValidatePossibleSingleLineMember (line 50) | private void ValidatePossibleSingleLineMember(SonarSyntaxNodeReporting... method ValidateSeparatedMember (line 69) | private void ValidateSeparatedMember(SonarSyntaxNodeReportingContext c... method ContainsEmptyLine (line 82) | private static bool ContainsEmptyLine(SyntaxTriviaList trivia) FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/TermaryLine.cs class TernaryLine (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method TernaryLine (line 25) | public TernaryLine() : base("T0024", "Place branches of the multiline ... method Initialize (line 27) | protected override void Initialize(SonarAnalysisContext context) => method Verify (line 40) | private void Verify(SonarSyntaxNodeReportingContext context, SyntaxTok... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/TypeMemberOrdering.cs class TypeMemberOrdering (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method TypeMemberOrdering (line 51) | public TypeMemberOrdering() : base("T0008", "Move {0} {1}.") { } method Initialize (line 53) | protected override void Initialize(SonarAnalysisContext context) => method ValidateMembers (line 63) | private void ValidateMembers(SonarSyntaxNodeReportingContext context) method Kind (line 92) | private static MemberKind Kind(MemberDeclarationSyntax member) method ReportingLocation (line 112) | private static Location ReportingLocation(SyntaxNode node) => method ExpectedLocation (line 120) | private static string ExpectedLocation(MemberKind[] availableKinds, in... type MemberInfo (line 126) | private sealed record MemberInfo(MemberDeclarationSyntax Member, Locat... type MemberKind (line 128) | private sealed record MemberKind(int Order, string Description); FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/UseDifferentMember.cs class UseDifferentMember (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method UseDifferentMember (line 23) | public UseDifferentMember() : base("T0047", "Use '{0}' instead of '{1}... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/UseField.cs class UseField (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method UseField (line 25) | public UseField() : base("T0038", "Use field instead of this {0} auto-... method Initialize (line 27) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/UseInnermostRegistrationContext.cs class UseInnermostRegistrationContext (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method UseInnermostRegistrationContext (line 23) | public UseInnermostRegistrationContext() : base("T0005", "Use inner-mo... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => method ViolationsInInnerScopes (line 67) | private static IEnumerable ViolationsInInnerScopes(Sema... method RegistrationContextParameterSymbol (line 87) | private static IParameterSymbol RegistrationContextParameterSymbol(Sem... method IsRegistrationParameter (line 102) | private static bool IsRegistrationParameter(ImmutableArray FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/UseNullInsteadOfDefault.cs class UseNullInsteadOfDefault (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method UseNullInsteadOfDefault (line 23) | public UseNullInsteadOfDefault() : base("T0012", "Use 'null' instead o... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => method IsReferenceType (line 35) | private static bool IsReferenceType(SyntaxNode node, SemanticModel model) FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/UsePositiveLogic.cs class UsePositiveLogic (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method UsePositiveLogic (line 23) | public UsePositiveLogic() : base("T0033", "Swap the branches and use p... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) method Validate (line 42) | private void Validate(SonarSyntaxNodeReportingContext context, Express... method IsNegative (line 50) | private static bool IsNegative(ExpressionSyntax expression, Operator o... method IsNegative (line 60) | private static bool IsNegative(BinaryExpressionSyntax binary, Operator... method IsNegative (line 64) | private static bool IsNegative(PatternSyntax pattern, Operator outerAn... method CheckAndOr (line 68) | private static Operator CheckAndOr(SyntaxNode node, Operator outerAndO... class Operator (line 73) | private sealed class Operator method Operator (line 81) | private Operator(SyntaxKind logical, SyntaxKind pattern) method From (line 87) | public static Operator From(SyntaxKind kind) method IsMatch (line 103) | public bool IsMatch(SyntaxKind kind) => FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/UseRawString.cs class UseRawString (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method UseRawString (line 23) | public UseRawString() : base("T0041", "Use raw string literal for mult... method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/UseRegexSafeIsMatch.cs class UseRegexSafeIsMatch (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method UseRegexSafeIsMatch (line 23) | public UseRegexSafeIsMatch() : base("T0004", "Use '{0}{1}' instead.") { } method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => method Verify (line 34) | private void Verify( FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/UseShortName.cs class UseShortName (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method UseShortName (line 41) | public UseShortName() : base("T0017", "Use short name '{0}'.") { } method Initialize (line 43) | protected override void Initialize(SonarAnalysisContext context) method ValidateDeclaration (line 57) | private void ValidateDeclaration(SonarSyntaxNodeReportingContext conte... method FindRename (line 67) | private static RenameInfo FindRename(string name) => method FollowsPredefinedName (line 70) | private static bool FollowsPredefinedName(ISymbol symbol) => type RenameInfo (line 74) | private sealed record RenameInfo(string TypeName, string UsedName, str... FILE: analyzers/src/SonarAnalyzer.CSharp.Styling/Rules/UseVar.cs class UseVar (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method UseVar (line 23) | public UseVar() : base("T0045", "Use var.") { } method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Metrics/CSharpCognitiveComplexityMetric.cs class CSharpCognitiveComplexityMetric (line 22) | public static class CSharpCognitiveComplexityMetric method GetComplexity (line 24) | public static CognitiveComplexity GetComplexity(SyntaxNode node) => method GetComplexity (line 27) | public static CognitiveComplexity GetComplexity(SyntaxNode node, bool ... class CognitiveWalker (line 42) | private sealed class CognitiveWalker : SafeCSharpSyntaxWalker method CognitiveWalker (line 48) | public CognitiveWalker(bool onlyGlobalStatements) => method Visit (line 51) | public override void Visit(SyntaxNode node) method VisitCompilationUnit (line 92) | public override void VisitCompilationUnit(CompilationUnitSyntax node) method VisitMethodDeclaration (line 105) | public override void VisitMethodDeclaration(MethodDeclarationSyntax ... method VisitIfStatement (line 117) | public override void VisitIfStatement(IfStatementSyntax node) method VisitElseClause (line 130) | public override void VisitElseClause(ElseClauseSyntax node) method VisitConditionalExpression (line 136) | public override void VisitConditionalExpression(ConditionalExpressio... method VisitSwitchStatement (line 142) | public override void VisitSwitchStatement(SwitchStatementSyntax node) method VisitForStatement (line 148) | public override void VisitForStatement(ForStatementSyntax node) method VisitWhileStatement (line 154) | public override void VisitWhileStatement(WhileStatementSyntax node) method VisitDoStatement (line 160) | public override void VisitDoStatement(DoStatementSyntax node) method VisitForEachStatement (line 166) | public override void VisitForEachStatement(ForEachStatementSyntax node) method VisitCatchClause (line 172) | public override void VisitCatchClause(CatchClauseSyntax node) method VisitInvocationExpression (line 178) | public override void VisitInvocationExpression(InvocationExpressionS... method VisitBinaryExpression (line 191) | public override void VisitBinaryExpression(BinaryExpressionSyntax node) method VisitGotoStatement (line 213) | public override void VisitGotoStatement(GotoStatementSyntax node) method VisitSimpleLambdaExpression (line 219) | public override void VisitSimpleLambdaExpression(SimpleLambdaExpress... method VisitParenthesizedLambdaExpression (line 222) | public override void VisitParenthesizedLambdaExpression(Parenthesize... method VisitLocalFunction (line 225) | public void VisitLocalFunction(LocalFunctionStatementSyntaxWrapper l... FILE: analyzers/src/SonarAnalyzer.CSharp/Metrics/CSharpCyclomaticComplexityMetric.cs class CSharpCyclomaticComplexityMetric (line 20) | public static class CSharpCyclomaticComplexityMetric class CyclomaticComplexity (line 22) | public class CyclomaticComplexity method CyclomaticComplexity (line 24) | public CyclomaticComplexity(ImmutableArray locati... method GetComplexity (line 33) | public static CyclomaticComplexity GetComplexity(SyntaxNode syntaxNode... method GetComplexity (line 36) | public static CyclomaticComplexity GetComplexity(SyntaxNode syntaxNode... class CyclomaticWalker (line 51) | private sealed class CyclomaticWalker : SafeCSharpSyntaxWalker method CyclomaticWalker (line 57) | public CyclomaticWalker(bool onlyGlobalStatements) => method VisitCompilationUnit (line 60) | public override void VisitCompilationUnit(CompilationUnitSyntax node) method VisitMethodDeclaration (line 76) | public override void VisitMethodDeclaration(MethodDeclarationSyntax ... method VisitPropertyDeclaration (line 85) | public override void VisitPropertyDeclaration(PropertyDeclarationSyn... method VisitOperatorDeclaration (line 94) | public override void VisitOperatorDeclaration(OperatorDeclarationSyn... method VisitConstructorDeclaration (line 100) | public override void VisitConstructorDeclaration(ConstructorDeclarat... method VisitDestructorDeclaration (line 106) | public override void VisitDestructorDeclaration(DestructorDeclaratio... method VisitAccessorDeclaration (line 112) | public override void VisitAccessorDeclaration(AccessorDeclarationSyn... method VisitIfStatement (line 118) | public override void VisitIfStatement(IfStatementSyntax node) method VisitConditionalExpression (line 124) | public override void VisitConditionalExpression(ConditionalExpressio... method VisitConditionalAccessExpression (line 130) | public override void VisitConditionalAccessExpression(ConditionalAcc... method VisitWhileStatement (line 136) | public override void VisitWhileStatement(WhileStatementSyntax node) method VisitDoStatement (line 142) | public override void VisitDoStatement(DoStatementSyntax node) method VisitForStatement (line 148) | public override void VisitForStatement(ForStatementSyntax node) method VisitForEachStatement (line 154) | public override void VisitForEachStatement(ForEachStatementSyntax node) method VisitBinaryExpression (line 160) | public override void VisitBinaryExpression(BinaryExpressionSyntax node) method VisitAssignmentExpression (line 172) | public override void VisitAssignmentExpression(AssignmentExpressionS... method VisitCaseSwitchLabel (line 182) | public override void VisitCaseSwitchLabel(CaseSwitchLabelSyntax node) method VisitLocalFunction (line 188) | public void VisitLocalFunction(LocalFunctionStatementSyntaxWrapper n... method Visit (line 194) | public override void Visit(SyntaxNode node) method AddLocation (line 213) | private void AddLocation(SyntaxToken node) => IncrementLocations.Add... method HasBody (line 215) | private static bool HasBody(SyntaxNode node) => node.ChildNodes().An... method IsStaticLocalFunction (line 217) | private static bool IsStaticLocalFunction(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Metrics/CSharpExecutableLinesMetric.cs class CSharpExecutableLinesMetric (line 20) | public static class CSharpExecutableLinesMetric method GetLineNumbers (line 22) | public static ImmutableArray GetLineNumbers(SyntaxTree syntaxTree... method GetWalker (line 29) | private static ExecutableLinesWalker GetWalker(SyntaxTree syntaxTree, ... class ExecutableLinesWalker (line 34) | private class ExecutableLinesWalker : SafeCSharpSyntaxWalker method AddExecutableLineNumbers (line 40) | protected virtual bool AddExecutableLineNumbers(Location location) method ExecutableLinesWalker (line 46) | public ExecutableLinesWalker(SemanticModel model) => method DefaultVisit (line 49) | public override void DefaultVisit(SyntaxNode node) method FindExecutableLines (line 57) | private bool FindExecutableLines(SyntaxNode node) method HasExcludedCodeAttribute (line 132) | private bool HasExcludedCodeAttribute(SyntaxNode node, SyntaxList class RazorExecutableLinesWalker (line 145) | private sealed class RazorExecutableLinesWalker : ExecutableLinesWalker method RazorExecutableLinesWalker (line 147) | public RazorExecutableLinesWalker(SemanticModel model) : base(model)... method AddExecutableLineNumbers (line 149) | protected override bool AddExecutableLineNumbers(Location location) FILE: analyzers/src/SonarAnalyzer.CSharp/Metrics/CSharpMetrics.cs class CSharpMetrics (line 22) | public class CSharpMetrics : MetricsBase method CSharpMetrics (line 29) | public CSharpMetrics(SyntaxTree tree, SemanticModel semanticModel) : b... method ComputeCognitiveComplexity (line 40) | protected override int ComputeCognitiveComplexity(SyntaxNode node) => method ComputeCyclomaticComplexity (line 43) | public override int ComputeCyclomaticComplexity(SyntaxNode node) => method IsClass (line 46) | protected override bool IsClass(SyntaxNode node) method IsCommentTrivia (line 62) | protected override bool IsCommentTrivia(SyntaxTrivia trivia) => method IsEndOfFile (line 65) | protected override bool IsEndOfFile(SyntaxToken token) => method IsFunction (line 68) | protected override bool IsFunction(SyntaxNode node) method IsNoneToken (line 111) | protected override bool IsNoneToken(SyntaxToken token) => method IsStatement (line 114) | protected override bool IsStatement(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AbstractClassToInterface.cs class AbstractClassToInterface (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method AbstractClassToInterface (line 28) | public AbstractClassToInterface() : base(DiagnosticId) { } method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method IsRecordWithParameters (line 60) | private static bool IsRecordWithParameters(ISymbol symbol) => method AllMethodsAreAbstract (line 65) | private static bool AllMethodsAreAbstract(INamedTypeSymbol symbol) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AbstractTypesShouldNotHaveConstructors.cs class AbstractTypesShouldNotHaveConstructors (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method IsPublicOrInternal (line 45) | private static bool IsPublicOrInternal(SyntaxToken token) => method SuggestModifier (line 48) | private static string SuggestModifier(SyntaxToken token) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AllBranchesShouldNotHaveSameImplementation.cs class AllBranchesShouldNotHaveSameImplementation (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) method Analyze (line 48) | private static void Analyze(SonarSyntaxNodeReportingContext context, S... class IfStatementAnalyzer (line 63) | private class IfStatementAnalyzer : IfStatementAnalyzerBase GetStatements(ElseClauseS... method GetIfBlocksStatements (line 71) | protected override IEnumerable> GetIfBlocksS... method GetLocation (line 90) | protected override Location GetLocation(IfStatementSyntax topLevelIf... class TernaryStatementAnalyzer (line 93) | private class TernaryStatementAnalyzer : TernaryStatementAnalyzerBase<... method GetWhenFalse (line 95) | protected override SyntaxNode GetWhenFalse(ConditionalExpressionSynt... method GetWhenTrue (line 98) | protected override SyntaxNode GetWhenTrue(ConditionalExpressionSynta... method GetLocation (line 101) | protected override Location GetLocation(ConditionalExpressionSyntax ... class SwitchStatementAnalyzer (line 105) | private class SwitchStatementAnalyzer : SwitchStatementAnalyzerBase GetSections(Swit... method HasDefaultLabel (line 113) | protected override bool HasDefaultLabel(SwitchStatementSyntax switch... method GetLocation (line 116) | protected override Location GetLocation(SwitchStatementSyntax switch... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AlwaysSetDateTimeKind.cs class AlwaysSetDateTimeKind (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AnonymousDelegateEventUnsubscribe.cs class AnonymousDelegateEventUnsubscribe (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ArgumentSpecifiedForCallerInfoParameter.cs class ArgumentSpecifiedForCallerInfoParameter (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 36) | protected override void Initialize(SonarAnalysisContext context) => method IsArgumentPassthroughOfParameter (line 52) | private static bool IsArgumentPassthroughOfParameter(SemanticModel mod... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ArrayCovariance.cs class ArrayCovariance (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) method RaiseOnArrayCovarianceInSimpleAssignmentExpression (line 37) | private static void RaiseOnArrayCovarianceInSimpleAssignmentExpression... method RaiseOnArrayCovarianceInVariableDeclaration (line 43) | private static void RaiseOnArrayCovarianceInVariableDeclaration(SonarS... method RaiseOnArrayCovarianceInInvocationExpression (line 54) | private static void RaiseOnArrayCovarianceInInvocationExpression(Sonar... method RaiseOnArrayCovarianceInCastExpression (line 70) | private static void RaiseOnArrayCovarianceInCastExpression(SonarSyntax... method VerifyExpression (line 78) | private static void VerifyExpression(SyntaxNode node, ITypeSymbol base... method AreCovariantArrayTypes (line 86) | private static bool AreCovariantArrayTypes(ITypeSymbol typeDerivedArra... method GetPossibleTypes (line 101) | private static IEnumerable GetPossibleTypes(SyntaxNode s... type NodeTypePair (line 125) | private readonly struct NodeTypePair method NodeTypePair (line 131) | public NodeTypePair(SyntaxNode node, SemanticModel model) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ArrayPassedAsParams.cs class ArrayPassedAsParams (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method LastArgumentIfArrayCreation (line 33) | protected override CSharpSyntaxNode LastArgumentIfArrayCreation(Syntax... method ArrayElementType (line 47) | protected override ITypeSymbol ArrayElementType(CSharpSyntaxNode argum... method ArgumentList (line 55) | private static BaseArgumentListSyntax ArgumentList(SyntaxNode expressi... method IsArrayCreation (line 65) | private static bool IsArrayCreation(CSharpSyntaxNode argument) method ContainsSpread (line 78) | private static bool ContainsSpread(CollectionExpressionSyntaxWrapper e... method ArgumentExpression (line 81) | private static ExpressionSyntax ArgumentExpression(CSharpSyntaxNode no... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AspNet/AnnotateApiActionsWithHttpVerb.cs class AnnotateApiActionsWithHttpVerb (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) => method IgnoresApiExplorer (line 71) | private static bool IgnoresApiExplorer(IEnumerable attr... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AspNet/ApiControllersShouldNotDeriveDirectlyFromController.cs class ApiControllersShouldNotDeriveDirectlyFromController (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 45) | protected override void Initialize(SonarAnalysisContext context) => method CheckController (line 58) | private static void CheckController(SonarSymbolStartAnalysisContext co... method ReportIssue (line 85) | private static void ReportIssue(SonarSymbolReportingContext context, I... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AspNet/ApiControllersShouldNotDeriveDirectlyFromControllerCodeFix.cs class ApiControllersShouldNotDeriveDirectlyFromControllerCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 29) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AspNet/AvoidUnderPosting.cs class AvoidUnderPosting (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 46) | protected override void Initialize(SonarAnalysisContext context) => method ProcessControllerMethods (line 66) | private static void ProcessControllerMethods(SonarSyntaxNodeReportingC... method CheckInvalidProperties (line 82) | private static void CheckInvalidProperties(INamedTypeSymbol parameterT... method IgnoreType (line 107) | private static bool IgnoreType(ITypeSymbol type) => method CanBeUsedInModelBinding (line 112) | private static bool CanBeUsedInModelBinding(INamedTypeSymbol type) => method CanBeNull (line 120) | private static bool CanBeNull(ITypeSymbol type) => method GetAllDeclaredProperties (line 125) | private static void GetAllDeclaredProperties(ITypeSymbol type, Concurr... method RelatedTypesToExamine (line 156) | private static IEnumerable RelatedTypesToExamine(ITy... method HasValidateNeverAttribute (line 167) | private static bool HasValidateNeverAttribute(ISymbol symbol) => method IsInitialized (line 170) | private static bool IsInitialized(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AspNet/BackslashShouldBeAvoidedInAspNetRoutes.cs class BackslashShouldBeAvoidedInAspNetRoutes (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsNamedAttributeArgument (line 27) | protected override bool IsNamedAttributeArgument(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AspNet/CallModelStateIsValid.cs class CallModelStateIsValid (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 40) | protected override void Initialize(SonarAnalysisContext context) => method ProcessCodeBlock (line 66) | private static void ProcessCodeBlock(SonarCodeBlockStartAnalysisContex... method IgnoreParameter (line 99) | private static bool IgnoreParameter(IParameterSymbol parameter) => method HasApiControllerAttribute (line 103) | private static bool HasApiControllerAttribute(ITypeSymbol type) => method HasActionFilterAttribute (line 106) | private static bool HasActionFilterAttribute(ISymbol symbol) => method IsCheckingValidityProperty (line 109) | private static bool IsCheckingValidityProperty(SyntaxNode node, Semant... method IsTryValidateInvocation (line 114) | private static bool IsTryValidateInvocation(SyntaxNode node, SemanticM... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AspNet/ControllersHaveMixedResponsibilities.cs class ControllersHaveMixedResponsibilities (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] type MemberType (line 29) | public enum MemberType method Initialize (line 50) | protected override void Initialize(SonarAnalysisContext context) => method PopulateDependencies (line 79) | private static Action> ... method CalculateAndReportOnResponsibilities (line 96) | private static Action CalculateAndReportO... method ResponsibilityGroups (line 112) | private static List> ResponsibilityGroups( method BlockName (line 129) | private static string BlockName(SyntaxNode block) => method RelevantMembers (line 141) | private static ImmutableDictionary RelevantMembers... method IsService (line 174) | private static bool IsService(ISymbol symbol) => method SecondaryLocations (line 177) | private static IEnumerable SecondaryLocations(IName... method IdentifierLocations (line 191) | private static IEnumerable IdentifierLocations(ISymbol sy... type Dependency (line 194) | private record struct Dependency(string From, string To); FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AspNet/ControllersReuseClient.cs class ControllersReuseClient (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => method IsInPublicMethod (line 61) | public static bool IsInPublicMethod(SyntaxNode node) => method IsInsideConstructor (line 66) | private static bool IsInsideConstructor(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AspNet/RouteTemplateShouldNotStartWithSlash.cs class RouteTemplateShouldNotStartWithSlash (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AspNet/SpecifyRouteAttribute.cs class SpecifyRouteAttribute (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => method ReportIssues (line 61) | private void ReportIssues(SonarSymbolReportingContext context, ISymbol... method UsesAttributeRouting (line 77) | private static bool UsesAttributeRouting(Compilation compilation) => method CanBeIgnored (line 80) | private static bool CanBeIgnored(string template) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AspNet/UseAspNetModelBinding.cs class UseAspNetModelBinding (line 23) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method UseAspNetModelBinding (line 37) | public UseAspNetModelBinding() : base(DiagnosticId) { } method Initialize (line 39) | protected override void Initialize(SonarAnalysisContext context) => method RegisterForSymbols (line 49) | private void RegisterForSymbols(SonarCompilationStartAnalysisContext c... method RegisterCodeBlockActions (line 83) | private void RegisterCodeBlockActions( method AddMatchingArgumentToCandidates (line 133) | private bool AddMatchingArgumentToCandidates( method GetDescriptors (line 148) | private static Descriptors GetDescriptors(Compilation compilation) method AddAspNetCoreDescriptors (line 160) | private static void AddAspNetCoreDescriptors(List ... method IsAccessedViaHeaderDictionary (line 224) | private static bool IsAccessedViaHeaderDictionary(SemanticModel model,... method IsOverridingFilterMethods (line 230) | private static bool IsOverridingFilterMethods(ISymbol owningSymbol) => method IsOriginatingFromParameter (line 235) | private static bool IsOriginatingFromParameter(SemanticModel semanticM... method IsOriginatingFromParameter (line 238) | private static bool IsOriginatingFromParameter(SemanticModel semanticM... method MostLeftOfDottedChain (line 241) | private static ExpressionSyntax MostLeftOfDottedChain(ExpressionSyntax... method GetExpressionOfArgumentParent (line 256) | private static ExpressionSyntax GetExpressionOfArgumentParent(Argument... method GetPrimaryLocation (line 265) | private static Location GetPrimaryLocation(ArgumentSyntax argument) => method IsGetterParameter (line 268) | private static bool IsGetterParameter(IParameterSymbol parameter) => method IsIDictionaryStringStringValuesInvocation (line 271) | private static bool IsIDictionaryStringStringValuesInvocation(IMethodS... type ReportCandidate (line 277) | private readonly record struct ReportCandidate(string Message, Locatio... type Descriptors (line 278) | private readonly record struct Descriptors(ArgumentDescriptor[] Argume... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AssertionArgsShouldBePassedInCorrectOrder.cs class AssertionArgsShouldBePassedInCorrectOrder (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 44) | protected override void Initialize(SonarAnalysisContext context) => method Parameters (line 61) | private static KnownAssertParameters[] Parameters(string name) => method FindWrongArguments (line 103) | private static WrongArguments? FindWrongArguments(SemanticModel model, method CreateLocation (line 119) | private static Location CreateLocation(SyntaxNode argument1, SyntaxNod... type KnownAssertParameters (line 124) | private readonly record struct KnownAssertParameters(KnownType AssertC... type WrongArguments (line 126) | private readonly record struct WrongArguments(SyntaxNode ExpectedArgs,... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AssertionsShouldBeComplete.cs class AssertionsShouldBeComplete (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method CheckInvocation (line 87) | private static void CheckInvocation(SonarSyntaxNodeReportingContext c,... method HasContinuation (line 97) | private static bool HasContinuation(InvocationExpressionSyntax invocat... method IsVoid (line 126) | private static bool IsVoid(TypeSyntax type) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AssignmentInsideSubExpression.cs class AssignmentInsideSubExpression (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 49) | protected override void Initialize(SonarAnalysisContext context) => method IsNonCompliantSubExpression (line 73) | private static bool IsNonCompliantSubExpression(AssignmentExpressionSy... method IsInInitializerExpression (line 78) | private static bool IsInInitializerExpression(ExpressionSyntax express... method IsCompliantAssignmentInsideExpression (line 81) | private static bool IsCompliantAssignmentInsideExpression(AssignmentEx... method IsCompliantNullConditionalAssignment (line 87) | private static bool IsCompliantNullConditionalAssignment(AssignmentExp... method IsCompliantCoalesceExpression (line 92) | private static bool IsCompliantCoalesceExpression(ExpressionSyntax par... method CoalesceExpressionParent (line 97) | private static BinaryExpressionSyntax CoalesceExpressionParent(Express... method IsDirectlyInStatementCondition (line 103) | private static bool IsDirectlyInStatementCondition(ExpressionSyntax ex... method IsInStatementCondition (line 114) | private static bool IsInStatementCondition(ExpressionSyntax expression) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AsyncAwaitIdentifier.cs class AsyncAwaitIdentifier (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) method GetAsyncOrAwaitTokens (line 46) | private static IEnumerable GetAsyncOrAwaitTokens(SyntaxNo... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AsyncVoidMethod.cs class AsyncVoidMethod (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 49) | protected override void Initialize(SonarAnalysisContext context) => method IsViolatingRule (line 63) | private static bool IsViolatingRule(IMethodSymbol methodSymbol) => method IsExceptionToTheRule (line 67) | private static bool IsExceptionToTheRule(MethodDeclarationSyntax metho... method IsAcceptedUsage (line 73) | private static bool IsAcceptedUsage(MethodDeclarationSyntax methodDecl... method GetIdentifierArguments (line 86) | private static IEnumerable GetIdentifierArgument... method GetIdentifierArguments (line 89) | private static IEnumerable GetIdentifierArgument... method GetIdentifierRightHandSide (line 92) | private static IEnumerable GetIdentifierRightHan... method GetParentDeclaration (line 97) | private static SyntaxNode GetParentDeclaration(SyntaxNode syntaxNode) => method IsNamedAsEventHandler (line 100) | private static bool IsNamedAsEventHandler(ISymbol symbol) => method HasAnyMsTestV1AllowedAttribute (line 105) | private static bool HasAnyMsTestV1AllowedAttribute(IMethodSymbol metho... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AvoidDateTimeNowForBenchmarking.cs class AvoidDateTimeNowForBenchmarking (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method ContainsDateTimeArgument (line 25) | protected override bool ContainsDateTimeArgument(InvocationExpressionS... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AvoidExcessiveClassCoupling.cs class AvoidExcessiveClassCoupling (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 68) | protected override void Initialize(SonarParametrizedAnalysisContext co... method IsTrackedType (line 98) | private static bool IsTrackedType(INamedTypeSymbol namedType) => method ExpandGenericTypes (line 110) | private static IEnumerable ExpandGenericTypes(INamed... class TypeDependencyCollector (line 138) | private sealed class TypeDependencyCollector : SafeCSharpSyntaxWalker method TypeDependencyCollector (line 145) | public TypeDependencyCollector(SemanticModel model, TypeDeclarationS... method Visit (line 157) | public override void Visit(SyntaxNode node) method VisitVariableDeclarator (line 177) | public override void VisitVariableDeclarator(VariableDeclaratorSynta... method VisitMemberAccessExpression (line 186) | public override void VisitMemberAccessExpression(MemberAccessExpress... method VisitInvocationExpression (line 205) | public override void VisitInvocationExpression(InvocationExpressionS... method IsSimpleNameChain (line 231) | private static bool IsSimpleNameChain(ExpressionSyntax expression) method AddDependentType (line 241) | private void AddDependentType(TypeSyntax typeSyntax) method AddDependentType (line 249) | private void AddDependentType(TypeInfo typeInfo) method AddDependentType (line 255) | private bool AddDependentType(ISymbol symbol) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AvoidExcessiveInheritance.cs class AvoidExcessiveInheritance (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 54) | protected override void Initialize(SonarParametrizedAnalysisContext co... method GetRootNamespace (line 81) | private static string GetRootNamespace(ISymbol symbol) method WildcardPatternToRegularExpression (line 91) | private static Regex WildcardPatternToRegularExpression(string pattern) type ObjectTypeInfo (line 97) | private readonly struct ObjectTypeInfo method ObjectTypeInfo (line 105) | public ObjectTypeInfo(SyntaxNode node, SemanticModel model) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AvoidLambdaExpressionInLoopsInBlazor.cs class AvoidLambdaExpressionInLoopsInBlazor (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => method IsWithinRenderTreeBuilderInvocation (line 55) | private static bool IsWithinRenderTreeBuilderInvocation(SyntaxNode nod... method IsWithinLoopBody (line 61) | private static bool IsWithinLoopBody(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/AvoidUnsealedAttributes.cs class AvoidUnsealedAttributes (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/BeginInvokePairedWithEndInvoke.cs class BeginInvokePairedWithEndInvoke (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method VisitInvocation (line 42) | protected override void VisitInvocation(EndInvokeContext context) => method IsInvalidCallback (line 45) | protected override bool IsInvalidCallback(SyntaxNode callbackArg, Sema... method FindCallback (line 65) | private static SyntaxNode FindCallback(SyntaxNode callbackArg, Semanti... method LookupIdentifierInitializer (line 85) | private static SyntaxNode LookupIdentifierInitializer(IdentifierNameSy... class InvocationWalker (line 91) | private class InvocationWalker : SafeCSharpSyntaxWalker method InvocationWalker (line 95) | public InvocationWalker(EndInvokeContext context) => method Visit (line 98) | public override void Visit(SyntaxNode node) method VisitInvocationExpression (line 106) | public override void VisitInvocationExpression(InvocationExpressionS... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/BinaryOperationWithIdenticalExpressions.cs class BinaryOperationWithIdenticalExpressions (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 45) | protected override void Initialize(SonarAnalysisContext context) method ReportOnObjectEqualsMatches (line 68) | private static void ReportOnObjectEqualsMatches(SonarSyntaxNodeReporti... method GetOperands (line 80) | private static Tuple GetOperands(InvocationExp... method RemoveParentheses (line 104) | private static SyntaxNode RemoveParentheses(SyntaxNode node) => method ReportIfOperatorExpressionsMatch (line 107) | private static void ReportIfOperatorExpressionsMatch(SonarSyntaxNodeRe... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/BlazorQueryParameterRoutableComponent.cs class BlazorQueryParameterRoutableComponent (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 48) | protected override void Initialize(SonarAnalysisContext context) => method CheckQueryProperties (line 57) | private static void CheckQueryProperties(SonarSymbolReportingContext c) method IsSupportedType (line 80) | private static bool IsSupportedType(ITypeSymbol type, KnownType suppor... method GetTypeName (line 95) | private static string GetTypeName(TypeSyntax propertyType) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/BooleanCheckInverted.cs class BooleanCheckInverted (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 45) | protected override void Initialize(SonarAnalysisContext context) => method IsUnsafeInversionOperation (line 55) | protected override bool IsUnsafeInversionOperation(BinaryExpressionSyn... method LogicalNotNode (line 64) | protected override SyntaxNode LogicalNotNode(BinaryExpressionSyntax ex... method SuggestedReplacement (line 70) | protected override string SuggestedReplacement(BinaryExpressionSyntax ... method IsConditionalAccessExpression (line 73) | private static bool IsConditionalAccessExpression(ExpressionSyntax exp... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/BooleanCheckInvertedCodeFix.cs class BooleanCheckInvertedCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 34) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method ChangeOperator (line 68) | private static ExpressionSyntax ChangeOperator(BinaryExpressionSyntax ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/BooleanLiteralUnnecessary.cs class BooleanLiteralUnnecessary (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetOperatorToken (line 25) | protected override SyntaxToken? GetOperatorToken(SyntaxNode node) => method IsTrue (line 33) | protected override bool IsTrue(SyntaxNode syntaxNode) => syntaxNode.Is... method IsFalse (line 35) | protected override bool IsFalse(SyntaxNode syntaxNode) => syntaxNode.I... method IsInsideTernaryWithThrowExpression (line 37) | protected override bool IsInsideTernaryWithThrowExpression(SyntaxNode ... method GetLeftNode (line 41) | protected override SyntaxNode GetLeftNode(SyntaxNode node) => method GetRightNode (line 49) | protected override SyntaxNode GetRightNode(SyntaxNode node) => method Initialize (line 57) | protected override void Initialize(SonarAnalysisContext context) method CheckForLoopCondition (line 69) | private void CheckForLoopCondition(SonarSyntaxNodeReportingContext con... method CheckLogicalNot (line 80) | private void CheckLogicalNot(SonarSyntaxNodeReportingContext context) method CheckConditional (line 90) | private void CheckConditional(SonarSyntaxNodeReportingContext context) method IsThrowExpression (line 111) | private static bool IsThrowExpression(ExpressionSyntax expressionSynta... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/BooleanLiteralUnnecessaryCodeFix.cs class BooleanLiteralUnnecessaryCodeFix (line 23) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 30) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method RegisterPatternExpressionReplacement (line 91) | private static void RegisterPatternExpressionReplacement(SonarCodeFixC... method RegisterForStatementConditionRemoval (line 116) | private static void RegisterForStatementConditionRemoval(SonarCodeFixC... method RegisterBinaryExpressionRemoval (line 129) | private static void RegisterBinaryExpressionRemoval(SonarCodeFixContex... method RegisterConditionalExpressionRewrite (line 148) | private static void RegisterConditionalExpressionRewrite(SonarCodeFixC... method RegisterBooleanInversion (line 154) | private static void RegisterBooleanInversion(SonarCodeFixContext conte... method RegisterConditionalExpressionRemoval (line 160) | private static void RegisterConditionalExpressionRemoval(SonarCodeFixC... method RegisterBinaryExpressionReplacement (line 166) | private static void RegisterBinaryExpressionReplacement(SonarCodeFixCo... method FindNodeToKeep (line 178) | private static SyntaxNode FindNodeToKeep(BinaryExpressionSyntax binary) method TwoSidesAreDifferentBooleans (line 237) | private static bool TwoSidesAreDifferentBooleans(BinaryExpressionSynta... method TwoSidesAreSameBooleans (line 243) | private static bool TwoSidesAreSameBooleans(BinaryExpressionSyntax bin... method RemovePrefixUnary (line 249) | private static Document RemovePrefixUnary(Document document, SyntaxNod... method RemoveConditional (line 263) | private static Document RemoveConditional(Document document, SyntaxNod... method ReplaceExpressionWithBinary (line 281) | private static SyntaxNode ReplaceExpressionWithBinary(SyntaxNode nodeT... method RewriteConditional (line 286) | private static Document RewriteConditional(Document document, SyntaxNo... method GetNegatedExpression (line 342) | private static ExpressionSyntax GetNegatedExpression(ExpressionSyntax ... method AddParenthesis (line 345) | private static ExpressionSyntax AddParenthesis(ExpressionSyntax expres... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/BreakOutsideSwitch.cs class BreakOutsideSwitch (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method IsInSwitch (line 45) | private static bool IsInSwitch(BreakStatementSyntax node) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/BypassingAccessibility.cs class BypassingAccessibility (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method BypassingAccessibility (line 25) | public BypassingAccessibility() : base(AnalyzerConfiguration.AlwaysEna... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CallToAsyncMethodShouldNotBeBlocking.cs class CallToAsyncMethodShouldNotBeBlocking (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 72) | protected override void Initialize(SonarAnalysisContext context) => method ReportOnViolation (line 75) | private static void ReportOnViolation(SonarSyntaxNodeReportingContext ... method IsAwaited (line 114) | private static bool IsAwaited(SonarSyntaxNodeReportingContext context,... method IsAwaitForMultipleTasksExecutionCall (line 128) | private static bool IsAwaitForMultipleTasksExecutionCall(SemanticModel... method IsAwaitForSingleTaskExecutionCall (line 132) | private static bool IsAwaitForSingleTaskExecutionCall(SemanticModel mo... method IsResultInContinueWithCall (line 136) | private static bool IsResultInContinueWithCall(string memberAccessName... method IsContinueWithCallWithArgumentName (line 142) | private static bool IsContinueWithCallWithArgumentName(InvocationExpre... method IsLambdaExpressionWithArgumentName (line 146) | private static bool IsLambdaExpressionWithArgumentName(ExpressionSynta... method IsChainedAfterThreadPoolCall (line 154) | private static bool IsChainedAfterThreadPoolCall(SemanticModel model, ... method IsNamedSymbolOfExpectedType (line 157) | private static bool IsNamedSymbolOfExpectedType(SemanticModel model, M... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CallerInformationParametersShouldBeLast.cs class CallerInformationParametersShouldBeLast (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method ReportOnViolation (line 41) | private static void ReportOnViolation(SonarSyntaxNodeReportingContext ... method HasIdentifier (line 75) | private static bool HasIdentifier(ParameterSyntax parameter) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CastConcreteTypeToInterface.cs class CastConcreteTypeToInterface (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method CheckForIssue (line 49) | private static void CheckForIssue(SonarSyntaxNodeReportingContext cont... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CastShouldNotBeDuplicated.cs class CastShouldNotBeDuplicated (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) method CasePatternSwitchLabel (line 41) | private static void CasePatternSwitchLabel(SonarSyntaxNodeReportingCon... method SwitchExpressionArm (line 50) | private static void SwitchExpressionArm(SonarSyntaxNodeReportingContex... method IsPatternExpression (line 61) | private static void IsPatternExpression(SonarSyntaxNodeReportingContex... method IsExpression (line 70) | private static void IsExpression(SonarSyntaxNodeReportingContext analy... method DuplicatedCastLocations (line 80) | private static Location[] DuplicatedCastLocations(SonarSyntaxNodeRepor... method ProcessPatternExpression (line 111) | private static void ProcessPatternExpression(SonarSyntaxNodeReportingC... method GetTypesFromPattern (line 146) | private static IEnumerable GetTypesFromPattern(SyntaxNode ... method GetType (line 183) | private static TypeSyntax GetType(SyntaxNode pattern) method ReportPatternAtMainVariable (line 200) | private static void ReportPatternAtMainVariable(SonarSyntaxNodeReporti... method ReportPatternAtCastLocation (line 214) | private static void ReportPatternAtCastLocation(SonarSyntaxNodeReporti... method IsEquivalentVariable (line 228) | private static bool IsEquivalentVariable(ExpressionSyntax expression, ... method CleanupExpression (line 245) | private static SyntaxNode CleanupExpression(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CatchEmpty.cs class CatchEmpty (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method IsGenericCatch (line 48) | private static bool IsGenericCatch(CatchClauseSyntax catchClause, Sema... method HasComments (line 64) | private static bool HasComments(CatchClauseSyntax catchClause) method IsCommentTrivia (line 70) | private static bool IsCommentTrivia(SyntaxTrivia trivia) method HasStatements (line 75) | private static bool HasStatements(CatchClauseSyntax catchClause) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CatchRethrow.cs class CatchRethrow (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method ContainsOnlyThrow (line 27) | protected override bool ContainsOnlyThrow(CatchClauseSyntax currentCat... method AllCatches (line 30) | protected override CatchClauseSyntax[] AllCatches(SyntaxNode node) => method DeclarationType (line 33) | protected override SyntaxNode DeclarationType(CatchClauseSyntax catchC... method HasFilter (line 36) | protected override bool HasFilter(CatchClauseSyntax catchClause) => method Initialize (line 39) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CatchRethrowCodeFix.cs class CatchRethrowCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 28) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method CalculateNewRoot (line 51) | private static SyntaxNode CalculateNewRoot(SyntaxNode root, SyntaxNode... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CertificateValidationCheck.cs class CertificateValidationCheck (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method CreateParameterLookup (line 37) | internal override MethodParameterLookupBase CreatePara... method Initialize (line 45) | protected override void Initialize(SonarAnalysisContext context) method FindRootTypeDeclaration (line 57) | protected override SyntaxNode FindRootTypeDeclaration(SyntaxNode node) => method ExpressionLocation (line 60) | protected override Location ExpressionLocation(SyntaxNode expression) => method SplitAssignment (line 64) | protected override void SplitAssignment(AssignmentExpressionSyntax ass... method CreateNodeEqualityComparer (line 70) | protected override IEqualityComparer CreateNodeEqual... method FindReturnAndThrowExpressions (line 73) | protected override ExpressionSyntax[] FindReturnAndThrowExpressions(In... method IsTrueLiteral (line 79) | protected override bool IsTrueLiteral(ExpressionSyntax expression) => method VariableInitializer (line 82) | protected override ExpressionSyntax VariableInitializer(VariableDeclar... method LambdaLocations (line 85) | protected override ImmutableArray LambdaLocations(Inspection... method LocalVariableScope (line 98) | protected override SyntaxNode LocalVariableScope(VariableDeclaratorSyn... method ExtractArgumentExpressionNode (line 101) | protected override SyntaxNode ExtractArgumentExpressionNode(SyntaxNode... method SyntaxFromReference (line 104) | protected override SyntaxNode SyntaxFromReference(SyntaxReference refe... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CheckArgumentException.cs class CheckArgumentException (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 40) | protected override void Initialize(SonarAnalysisContext context) => method CheckForIssue (line 43) | private static void CheckForIssue(SonarSyntaxNodeReportingContext anal... method RetrieveParameterAndMessageArgumentValue (line 79) | private static Tuple, Optional> RetrieveParam... method GetMethodArgumentNames (line 104) | private static IEnumerable GetMethodArgumentNames(SyntaxNode c... method TakeOnlyBeforeDot (line 161) | private static string TakeOnlyBeforeDot(Optional value) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CheckFileLicense.cs class CheckFileLicense (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CheckFileLicenseCodeFix.cs class CheckFileLicenseCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 26) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method CreateFileHeaderTrivias (line 57) | private static IEnumerable CreateFileHeaderTrivias(strin... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ClassAndMethodName.cs class ClassAndMethodName (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method SplitToParts (line 42) | internal static IEnumerable SplitToParts(string name) method Initialize (line 88) | protected override void Initialize(SonarAnalysisContext context) method CheckTypeName (line 114) | private static void CheckTypeName(SonarSyntaxNodeReportingContext cont... method CheckMemberName (line 156) | private static void CheckMemberName(SonarSyntaxNodeReportingContext co... method IsMemberNameValid (line 192) | private static bool IsMemberNameValid(string identifierName, out strin... method IsTypeNameValid (line 219) | private static bool IsTypeNameValid(string identifierName, bool requir... method HandleFirstPartOfTypeName (line 258) | private static string HandleFirstPartOfTypeName(string input, bool req... method SuggestCapitalLetterAfterNonLetter (line 281) | private static string SuggestCapitalLetterAfterNonLetter(StringBuilder... method SuggestFixedCaseName (line 295) | private static string SuggestFixedCaseName(string input, int maxUpperc... method FirstCharToUpper (line 303) | private static string FirstCharToUpper(string input) => method IsCharUpper (line 308) | private static bool IsCharUpper(string input, int idx) => method GetDeclarationIdentifier (line 313) | private static SyntaxToken GetDeclarationIdentifier(SyntaxNode declara... method IsTestClassName (line 322) | private static bool IsTestClassName(string className) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ClassNamedException.cs class ClassNamedException (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ClassNotInstantiatable.cs class ClassNotInstantiatable (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method CollectRemovableDeclarations (line 25) | protected override IEnumerable CollectRemovableDec... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ClassShouldNotBeEmpty.cs class ClassShouldNotBeEmpty (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsEmptyAndNotPartial (line 25) | protected override bool IsEmptyAndNotPartial(SyntaxNode node) => method GetIfHasDeclaredBaseClassOrInterface (line 30) | protected override BaseTypeDeclarationSyntax GetIfHasDeclaredBaseClass... method HasInterfaceOrGenericBaseClass (line 37) | protected override bool HasInterfaceOrGenericBaseClass(BaseTypeDeclara... method HasAnyAttribute (line 41) | protected override bool HasAnyAttribute(SyntaxNode node) => method DeclarationTypeKeyword (line 44) | protected override string DeclarationTypeKeyword(SyntaxNode node) => method HasConditionalCompilationDirectives (line 47) | protected override bool HasConditionalCompilationDirectives(SyntaxNode... method LacksParameterizedPrimaryConstructor (line 55) | private static bool LacksParameterizedPrimaryConstructor(SyntaxNode no... method IsParameterlessClass (line 59) | private static bool IsParameterlessClass(SyntaxNode node) => method IsParameterlessRecord (line 63) | private static bool IsParameterlessRecord(SyntaxNode node) => method LacksParameters (line 67) | private static bool LacksParameters(ParameterListSyntax parameterList,... method RecordDeclarationSyntax (line 71) | private static RecordDeclarationSyntaxWrapper? RecordDeclarationSyntax... method BaseTypeSyntax (line 76) | private static PrimaryConstructorBaseTypeSyntaxWrapper? BaseTypeSyntax... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ClassWithEqualityShouldImplementIEquatable.cs class ClassWithEqualityShouldImplementIEquatable (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) method ImplementsIEquatableInterface (line 54) | private bool ImplementsIEquatableInterface(ITypeSymbol classSymbol) => method IsIEquatableEqualsMethodCandidate (line 60) | private static bool IsIEquatableEqualsMethodCandidate(IMethodSymbol me... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ClassWithOnlyStaticMember.cs class ClassWithOnlyStaticMember (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 38) | protected override void Initialize(SonarAnalysisContext context) => method CheckClasses (line 53) | private static void CheckClasses(SonarSymbolReportingContext context, ... method CheckConstructors (line 71) | private static void CheckConstructors(SonarSymbolReportingContext cont... method ClassIsRelevant (line 101) | private static bool ClassIsRelevant(INamedTypeSymbol @class) => method ClassQualifiesForIssue (line 105) | private static bool ClassQualifiesForIssue(INamedTypeSymbol @class) => method HasOnlyQualifyingMembers (line 111) | private static bool HasOnlyQualifyingMembers(INamedTypeSymbol @class, ... method ClassUsedAsInstanceInMembers (line 116) | private static bool ClassUsedAsInstanceInMembers(INamedTypeSymbol @cla... method HasMembersAndAllAreStaticExceptConstructors (line 121) | private static bool HasMembersAndAllAreStaticExceptConstructors(INamed... method IsConstructor (line 130) | private static bool IsConstructor(ISymbol member) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CloudNative/AzureFunctionsCatchExceptions.cs class AzureFunctionsCatchExceptions (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => class Walker (line 45) | private sealed class Walker : SafeCSharpSyntaxWalker method Walker (line 49) | public Walker(SemanticModel semanticModel) => method Visit (line 54) | public override void Visit(SyntaxNode node) method VisitInvocationExpression (line 68) | public override void VisitInvocationExpression(InvocationExpressionS... method VisitTryStatement (line 76) | public override void VisitTryStatement(TryStatementSyntax node) method CatchesAllExceptions (line 84) | private static bool CatchesAllExceptions(CatchClauseSyntax catchClau... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CloudNative/AzureFunctionsLogFailures.cs class AzureFunctionsLogFailures (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 37) | protected override void Initialize(SonarAnalysisContext context) => method HasLoggerInScope (line 57) | private static bool HasLoggerInScope(IMethodSymbol entryPoint) => method HasLoggerMember (line 64) | internal static bool HasLoggerMember(ITypeSymbol typeSymbol) class LoggerCallWalker (line 80) | private sealed class LoggerCallWalker : SafeCSharpSyntaxWalker method LoggerCallWalker (line 89) | public LoggerCallWalker(SemanticModel model, CancellationToken cancel) method Visit (line 95) | public override void Visit(SyntaxNode node) method VisitInvocationExpression (line 104) | public override void VisitInvocationExpression(InvocationExpressionS... method VisitArgument (line 122) | public override void VisitArgument(ArgumentSyntax node) method IsValidLogCall (line 128) | private bool IsValidLogCall(InvocationExpressionSyntax invocation, I... method IsPassingValidLogLevel (line 150) | private bool IsPassingValidLogLevel(InvocationExpressionSyntax invoc... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CloudNative/AzureFunctionsReuseClients.cs class AzureFunctionsReuseClients (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 52) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CloudNative/AzureFunctionsStateless.cs class AzureFunctionsStateless (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method CheckTarget (line 69) | private static void CheckTarget(SonarSyntaxNodeReportingContext contex... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CloudNative/DurableEntityInterfaceRestrictions.cs method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) => method IsRestrictedMethod (line 49) | private static bool IsRestrictedMethod(IMethodSymbol method) => method InterfaceErrorMessage (line 54) | private static string InterfaceErrorMessage(INamedTypeSymbol entityInter... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CognitiveComplexity.cs class CognitiveComplexity (line 23) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 28) | protected override void Initialize(SonarParametrizedAnalysisContext co... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CollectionEmptinessChecking.cs class CollectionEmptinessChecking (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CollectionEmptinessCheckingCodeFix.cs class CollectionEmptinessCheckingCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 31) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method Simplify (line 50) | private static void Simplify(SyntaxNode root, ExpressionSyntax express... method Replacement (line 56) | private static Task Replacement(SyntaxNode root, ExpressionS... method AnyFromExtension (line 69) | private static InvocationExpressionSyntax AnyFromExtension(InvocationE... method AnyFromStaticMethod (line 76) | private static InvocationExpressionSyntax AnyFromStaticMethod(Invocati... method IsExtension (line 84) | private static bool IsExtension(InvocationExpressionSyntax count) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CollectionPropertiesShouldBeReadOnly.cs class CollectionPropertiesShouldBeReadOnly (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 46) | protected override void Initialize(SonarAnalysisContext context) => method IsObservedCollectionType (line 64) | private static bool IsObservedCollectionType(IPropertySymbol propertyS... method HasPublicSetter (line 73) | private static bool HasPublicSetter(IPropertySymbol propertySymbol) => method IsInterfaceImplementation (line 78) | private static bool IsInterfaceImplementation(IPropertySymbol property... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CollectionQuerySimplification.cs class CollectionQuerySimplification (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 70) | protected override void Initialize(SonarAnalysisContext context) method CheckCountCall (line 77) | private static void CheckCountCall(SonarSyntaxNodeReportingContext con... method CheckToCollectionCalls (line 102) | private static void CheckToCollectionCalls(SonarSyntaxNodeReportingCon... method MethodExistsOnIEnumerable (line 124) | private static bool MethodExistsOnIEnumerable(IMethodSymbol methodSymb... method ParametersMatch (line 146) | private static bool ParametersMatch(IMethodSymbol originalDefinition, ... method IsToCollectionCall (line 166) | private static bool IsToCollectionCall(IMethodSymbol methodSymbol) => method GetToCollectionCallsMessage (line 171) | private static string GetToCollectionCallsMessage(SonarSyntaxNodeRepor... method IsLinqDatabaseQuery (line 176) | private static bool IsLinqDatabaseQuery(InvocationExpressionSyntax nod... method GetNodeTypeSymbol (line 191) | private static ITypeSymbol GetNodeTypeSymbol(SyntaxNode node, Semantic... method CheckExtensionMethodsOnIEnumerable (line 198) | private static void CheckExtensionMethodsOnIEnumerable(SonarSyntaxNode... method GetInnerInvocation (line 227) | private static InvocationExpressionSyntax GetInnerInvocation(Invocatio... method GetReducedArguments (line 254) | private static List GetReducedArguments(IMethodSymbol ... method CheckForCastSimplification (line 259) | private static void CheckForCastSimplification(SonarSyntaxNodeReportin... method GetReportLocation (line 283) | private static Location GetReportLocation(InvocationExpressionSyntax i... method IsExpressionInLambdaIsCast (line 288) | private static bool IsExpressionInLambdaIsCast(IMethodSymbol methodSym... method IsFirstExpressionInLambdaIsNullChecking (line 292) | private static bool IsFirstExpressionInLambdaIsNullChecking(IMethodSym... method IsNullChecking (line 316) | private static bool IsNullChecking(BinaryExpressionSyntax binaryExpres... method GetExpressionFromLambda (line 333) | private static ExpressionSyntax GetExpressionFromLambda(ExpressionSynt... method GetLambdaParameter (line 344) | private static string GetLambdaParameter(ExpressionSyntax expression) method TryGetCastInLambda (line 359) | private static bool TryGetCastInLambda(SyntaxKind asOrIs, IMethodSymbo... method TryGetCastInLambda (line 392) | private static bool TryGetCastInLambda(IMethodSymbol methodSymbol, Inv... method CheckForSimplifiable (line 419) | private static bool CheckForSimplifiable(SonarSyntaxNodeReportingConte... method MethodIsNotUsingPredicate (line 436) | private static bool MethodIsNotUsingPredicate(IMethodSymbol methodSymb... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CollectionsShouldImplementGenericInterface.cs class CollectionsShouldImplementGenericInterface (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 44) | protected override void Initialize(SonarAnalysisContext context) => method SuggestGenericCollectionType (line 73) | private static string SuggestGenericCollectionType(ITypeSymbol typeSym... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CommentKeyword.cs class CommentKeyword (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsComment (line 25) | protected override bool IsComment(SyntaxTrivia trivia) => trivia.IsCom... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CommentedOutCode.cs class CommentedOutCode (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsCode (line 58) | internal static bool IsCode(string line) method Initialize (line 73) | protected override void Initialize(SonarAnalysisContext context) => method CheckTrivia (line 83) | private static void CheckTrivia(SonarSyntaxTreeReportingContext contex... method CheckMultilineComment (line 105) | private static void CheckMultilineComment(SonarSyntaxTreeReportingCont... method ContainsMultipleLogicalOperators (line 130) | private static bool ContainsMultipleLogicalOperators(string checkedLine) method ContainsCodeParts (line 139) | private static bool ContainsCodeParts(string checkedLine) => method ContainsCodePartsWithRelationalOperator (line 142) | private static bool ContainsCodePartsWithRelationalOperator(string che... method EndsWithCode (line 153) | private static bool EndsWithCode(string checkedLine, string originalLi... method LooksLikeSentence (line 158) | private static bool LooksLikeSentence(string trimmedLine) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CommentedOutCodeCodeFix.cs class CommentedOutCodeCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method GetFixAllProvider (line 25) | public override FixAllProvider GetFixAllProvider() => null; method RegisterCodeFixesAsync (line 27) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method IsCode (line 42) | private static bool IsCode(SyntaxTrivia trivia) => method IsCode (line 46) | private static bool IsCode(string line) method Lines (line 56) | private static string[] Lines(SyntaxTrivia trivia) => class Context (line 59) | private sealed class Context method Context (line 67) | public Context(SyntaxTrivia comment) method ChangeDocument (line 80) | public Task ChangeDocument(Document document, SyntaxNode r... method NewToken (line 83) | private SyntaxToken NewToken() => method NewTrailing (line 86) | private SyntaxToken NewTrailing() method KeepTrailing (line 104) | private bool KeepTrailing(SyntaxTrivia trivia) => method NewLeading (line 107) | private SyntaxToken NewLeading() => method ShareLine (line 112) | private static bool ShareLine(SyntaxToken token, SyntaxTrivia trivia... method ShareLine (line 115) | private static bool ShareLine(SyntaxTrivia l, SyntaxTrivia r) => method ShareLine (line 118) | private static bool ShareLine(IEnumerable l, IEnumerable r... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CommentsShouldNotBeEmpty.cs class CommentsShouldNotBeEmpty (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsValidTriviaType (line 27) | protected override bool IsValidTriviaType(SyntaxTrivia trivia) => method GetCommentText (line 30) | protected override string GetCommentText(SyntaxTrivia trivia) => method GetSingleLineText (line 40) | private static string GetSingleLineText(SyntaxTrivia trivia) => method GetSingleLineDocumentationText (line 44) | private static string GetSingleLineDocumentationText(SyntaxTrivia trivia) method GetMultiLineText (line 59) | private static string GetMultiLineText(SyntaxTrivia trivia) => method GetMultiLineDocumentationText (line 63) | private static string GetMultiLineDocumentationText(SyntaxTrivia trivi... method ParseMultiLine (line 66) | private static string ParseMultiLine(string commentText, int initialTr... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ComparableInterfaceImplementation.cs class ComparableInterfaceImplementation (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 42) | protected override void Initialize(SonarAnalysisContext context) => method ImplementedComparableInterfaces (line 67) | private static IEnumerable ImplementedComparableInterfaces(INa... method MembersToOverride (line 73) | private static IEnumerable MembersToOverride(IEnumerable method TryGetFloatingPointType (line 63) | private static bool TryGetFloatingPointType(SyntaxNode expression, Sem... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ConditionalSimplification.cs class ConditionalSimplification (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsCoalesceAssignmentCandidate (line 37) | internal static bool IsCoalesceAssignmentCandidate(SyntaxNode conditio... method ExtractSingleStatement (line 41) | internal static StatementSyntax ExtractSingleStatement(StatementSyntax... method Initialize (line 50) | protected override void Initialize(SonarAnalysisContext context) method CheckNotPattern (line 58) | private static void CheckNotPattern(SonarSyntaxNodeReportingContext co... method CheckCoalesceExpression (line 78) | private static void CheckCoalesceExpression(SonarSyntaxNodeReportingCo... method CheckIfStatement (line 92) | private static void CheckIfStatement(SonarSyntaxNodeReportingContext c... method CheckConditionalExpression (line 119) | private static void CheckConditionalExpression(SonarSyntaxNodeReportin... method AreTypesCompatible (line 147) | private static bool AreTypesCompatible(ExpressionSyntax first, Express... method IsNullAndValueType (line 180) | private static bool IsNullAndValueType(ITypeSymbol typeNull, ITypeSymb... method CanBeSimplified (line 183) | private static bool CanBeSimplified(SonarSyntaxNodeReportingContext co... method AreCandidateAssignments (line 248) | private static bool AreCandidateAssignments(ExpressionSyntax expression1, method AreCandidateInvocations (line 276) | private static bool AreCandidateInvocations(ExpressionSyntax firstExpr... method CanExpressionBeCoalescing (line 331) | private static bool CanExpressionBeCoalescing(ExpressionSyntax whenTru... method BuildCodeFixProperties (line 347) | private static ImmutableDictionary BuildCodeFixPropert... method IsConditionalStructure (line 357) | private static bool IsConditionalStructure(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ConditionalSimplificationCodeFix.cs class ConditionalSimplificationCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 29) | protected override async Task RegisterCodeFixesAsync(SyntaxNode root, ... method Simplify (line 56) | private static SyntaxNode Simplify(Diagnostic diagnostic, SemanticMode... method ReduceDoubleNegation (line 100) | private static SyntaxNode ReduceDoubleNegation(SyntaxNode node) method SimplifyIfStatement (line 116) | private static StatementSyntax SimplifyIfStatement(ComparedContext con... method SimplifyIfExpression (line 134) | private static ExpressionSyntax SimplifyIfExpression(ComparedContext c... method SimplifyAssignmentExpression (line 160) | private static ExpressionSyntax SimplifyAssignmentExpression(ComparedC... method SimplifyCoalesceExpression (line 175) | private static ExpressionSyntax SimplifyCoalesceExpression(ComparedCon... method CoalesceAssignmentExpression (line 188) | private static ExpressionSyntax CoalesceAssignmentExpression(ComparedC... method CoalesceAssignmentExpression (line 193) | private static ExpressionSyntax CoalesceAssignmentExpression(ComparedC... method CoalesceExpression (line 202) | private static ExpressionSyntax CoalesceExpression(ExpressionSyntax le... method ConditionalExpression (line 205) | private static ConditionalExpressionSyntax ConditionalExpression(Expre... method SimplifyInvocationExpression (line 208) | private static ExpressionSyntax SimplifyInvocationExpression(ComparedC... method SimplifyInvocationArguments (line 221) | private static ArgumentListSyntax SimplifyInvocationArguments(Compared... class ComparedContext (line 252) | private class ComparedContext method ComparedContext (line 263) | public ComparedContext(Diagnostic diagnostic, SemanticModel semantic... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ConditionalStructureSameCondition.cs class ConditionalStructureSameCondition (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ConditionalStructureSameImplementation.cs class ConditionalStructureSameImplementation (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) method HasDefaultClause (line 63) | private static bool HasDefaultClause(SwitchStatementSyntax switchState... method HasLeafElseClause (line 66) | private static bool HasLeafElseClause(IfStatementSyntax ifStatement) method CheckStatement (line 75) | private static void CheckStatement(SonarSyntaxNodeReportingContext con... method AreEquivalentStatements (line 91) | private static bool AreEquivalentStatements(SyntaxNode node, SyntaxNod... method StatementsCount (line 101) | private static int StatementsCount(SyntaxNode node) method ReportSyntaxNode (line 112) | private static void ReportSyntaxNode(SonarSyntaxNodeReportingContext c... method IsApprovedStatement (line 115) | private static bool IsApprovedStatement(SyntaxNode statement) => method HaveTheSameInvocations (line 118) | private static bool HaveTheSameInvocations(SyntaxList firs... method HaveTheSameInvocations (line 125) | private static bool HaveTheSameInvocations(SyntaxNode first, SyntaxNod... method HaveTheSameInvocations (line 132) | private static bool HaveTheSameInvocations(InvocationExpressionSyntax[... type EquivalentNodeCompare (line 149) | private readonly record struct EquivalentNodeCompare(SyntaxNode RefNod... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ConditionalsShouldStartOnNewLine.cs class ConditionalsShouldStartOnNewLine (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method TryGetPreviousTokenInSameLine (line 45) | private static bool TryGetPreviousTokenInSameLine(SyntaxToken token, o... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ConditionalsWithSameCondition.cs class ConditionalsWithSameCondition (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method CheckMatchingExpressionsInSucceedingStatements (line 41) | private static void CheckMatchingExpressionsInSucceedingStatements(... method ContainsPossibleUpdate (line 56) | private static bool ContainsPossibleUpdate(StatementSyntax statement, ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ConstructorArgumentValueShouldExist.cs class ConstructorArgumentValueShouldExist (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetFirstAttributeArgument (line 25) | protected override SyntaxNode GetFirstAttributeArgument(AttributeSynta... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ConstructorOverridableCall.cs class ConstructorOverridableCall (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => method CheckOverridableCallInConstructor (line 41) | private static void CheckOverridableCallInConstructor(SonarSyntaxNodeR... method IsMethodOverridable (line 55) | private static bool IsMethodOverridable(IMethodSymbol methodSymbol) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ConsumeValueTaskCorrectly.cs class ConsumeValueTaskCorrectly (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 45) | protected override void Initialize(SonarAnalysisContext context) => class ConsumeValueTaskWalker (line 72) | private sealed class ConsumeValueTaskWalker : SafeCSharpSyntaxWalker method ConsumeValueTaskWalker (line 85) | public ConsumeValueTaskWalker(SemanticModel model) method VisitAwaitExpression (line 96) | public override void VisitAwaitExpression(AwaitExpressionSyntax node) method VisitInvocationExpression (line 113) | public override void VisitInvocationExpression(InvocationExpressionS... method VisitMemberAccessExpression (line 140) | public override void VisitMemberAccessExpression(MemberAccessExpress... method VisitIfStatement (line 154) | public override void VisitIfStatement(IfStatementSyntax node) method GetLeftMostIdentifier (line 169) | private SyntaxNode GetLeftMostIdentifier(MemberAccessExpressionSynta... method AddToSymbolUsages (line 190) | private void AddToSymbolUsages(ISymbol symbol, SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ControlCharacterInString.cs class ControlCharacterInString (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 89) | protected override void Initialize(SonarAnalysisContext context) method CheckControlCharacter (line 101) | private static void CheckControlCharacter(SonarSyntaxNodeReportingCont... method IsInescapableString (line 118) | private static bool IsInescapableString(SyntaxNode node) => method IsInescepableInterpolatedString (line 123) | private static bool IsInescepableInterpolatedString(SyntaxNode node) => method IsInescapableUtf8String (line 128) | private static bool IsInescapableUtf8String(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/CryptographicKeyShouldNotBeTooShort.cs class CryptographicKeyShouldNotBeTooShort (line 23) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 58) | protected override void Initialize(SonarAnalysisContext context) method CheckAlgorithmCreation (line 122) | private void CheckAlgorithmCreation(SonarSyntaxNodeReportingContext c,... method CheckBouncyCastleEllipticCurve (line 140) | private void CheckBouncyCastleEllipticCurve(SonarSyntaxNodeReportingCo... method CheckSystemSecurityEllipticCurve (line 154) | private void CheckSystemSecurityEllipticCurve(SonarSyntaxNodeReporting... method CheckCurveNameKeyLength (line 168) | private void CheckCurveNameKeyLength(SonarSyntaxNodeReportingContext c... method CheckSystemSecurityCryptographyAlgorithms (line 177) | private static void CheckSystemSecurityCryptographyAlgorithms(SonarSyn... method HasDefaultSize (line 193) | private static bool HasDefaultSize(SonarSyntaxNodeReportingContext c, ... method CheckGenericDsaRsaCryptographyAlgorithms (line 200) | private static void CheckGenericDsaRsaCryptographyAlgorithms(SonarSynt... method CheckBouncyCastleParametersGenerators (line 208) | private static void CheckBouncyCastleParametersGenerators(SonarSyntaxN... method CheckBouncyCastleKeyGenerationParameters (line 220) | private static void CheckBouncyCastleKeyGenerationParameters(SonarSynt... method IsInvalidCommonKeyLength (line 230) | private static bool IsInvalidCommonKeyLength(SonarSyntaxNodeReportingC... method GetMethodName (line 233) | private static string GetMethodName(InvocationExpressionSyntax invocat... method GetPropertyName (line 236) | private static string GetPropertyName(ExpressionSyntax expression) => method CipherName (line 239) | private static string CipherName(ITypeSymbol containingType) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DangerousGetHandleShouldNotBeCalled.cs class DangerousGetHandleShouldNotBeCalled (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DatabasePasswordsShouldBeSecure.cs class DatabasePasswordsShouldBeSecure (line 28) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method DatabasePasswordsShouldBeSecure (line 55) | public DatabasePasswordsShouldBeSecure() method Initialize (line 58) | protected override void Initialize(TrackerInput input) method Initialize (line 64) | protected override void Initialize(SonarAnalysisContext context) method CheckWebConfig (line 71) | private void CheckWebConfig(SonarCompilationReportingContext c) method CheckAppSettings (line 83) | private void CheckAppSettings(SonarCompilationReportingContext c) method CheckAppSettingJson (line 91) | private void CheckAppSettingJson(SonarCompilationReportingContext c, s... method ReportEmptyPassword (line 100) | private void ReportEmptyPassword(SonarCompilationReportingContext c, X... method ReportEmptyPassword (line 114) | private void ReportEmptyPassword(SonarCompilationReportingContext c, J... method HasEmptyPasswordArgument (line 128) | private static TrackerBase.Condition Ha... method ConnectionStringArgument (line 143) | private static ArgumentSyntax ConnectionStringArgument(SeparatedSyntax... method HasEmptyPasswordAndNoSanitizers (line 153) | private static bool HasEmptyPasswordAndNoSanitizers(ExpressionSyntax e... method IsVulnerable (line 159) | private static bool IsVulnerable(string connectionString) => method HasSanitizers (line 168) | private static bool HasSanitizers(string connectionString) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DateAndTimeShouldNotBeUsedasTypeForPrimaryKey.cs class DateAndTimeShouldNotBeUsedAsTypeForPrimaryKey (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method TypeNodesOfTemporalKeyProperties (line 25) | protected override IEnumerable TypeNodesOfTemporalKeyPrope... method IsCandidateProperty (line 42) | private static bool IsCandidateProperty(PropertyDeclarationSyntax prop... method IsKeyProperty (line 49) | private bool IsKeyProperty(PropertyDeclarationSyntax property, string ... method HasKeyAttribute (line 56) | private bool HasKeyAttribute(PropertyDeclarationSyntax property) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DateTimeFormatShouldNotBeHardcoded.cs class DateTimeFormatShouldNotBeHardcoded (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method HardCodedArgumentLocation (line 25) | protected override Location HardCodedArgumentLocation(InvocationExpres... method HasInvalidFirstArgument (line 28) | protected override bool HasInvalidFirstArgument(InvocationExpressionSy... method GetFormatArgumentExpression (line 34) | private static ExpressionSyntax GetFormatArgumentExpression(ArgumentLi... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DeadStores.RoslynCfg.cs class DeadStores (line 23) | public partial class DeadStores : SonarDiagnosticAnalyzer class RoslynChecker (line 25) | private class RoslynChecker : CheckerBase method RoslynChecker (line 29) | public RoslynChecker(SonarSyntaxNodeReportingContext context, Roslyn... method CreateState (line 32) | protected override State CreateState(BasicBlock block) => class RoslynState (line 35) | private class RoslynState : State method RoslynState (line 39) | public RoslynState(RoslynChecker owner, BasicBlock block) : base(o... method AnalyzeBlock (line 42) | public override void AnalyzeBlock() method ProcessParameterOrLocalReference (line 71) | private void ProcessParameterOrLocalReference(IOperationWrapper re... method ProcessSimpleAssignment (line 84) | private void ProcessSimpleAssignment(ISimpleAssignmentOperationWra... method ProcessCompoundAssignment (line 90) | private void ProcessCompoundAssignment(ICompoundAssignmentOperatio... method ProcessIncrementOrDecrement (line 93) | private void ProcessIncrementOrDecrement(IIncrementOrDecrementOper... method ProcessDeconstructionAssignment (line 96) | private void ProcessDeconstructionAssignment(IDeconstructionAssign... method ProcessAssignment (line 108) | private ISymbol[] ProcessAssignment(IOperationWrapper operation, I... method IsUnusedInCurrentCfg (line 140) | private bool IsUnusedInCurrentCfg(ISymbol symbol, IOperation excep... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DeadStores.SonarCfg.cs class DeadStores (line 24) | public partial class DeadStores : SonarDiagnosticAnalyzer class SonarChecker (line 26) | private class SonarChecker : CheckerBase method SonarChecker (line 30) | public SonarChecker(SonarSyntaxNodeReportingContext context, SonarCS... method CreateState (line 33) | protected override State CreateState(Block block) => class SonarState (line 36) | private class SonarState : State method SonarState (line 41) | public SonarState(SonarChecker owner, Block block, SyntaxNode node... method AnalyzeBlock (line 44) | public override void AnalyzeBlock() method ProcessIdentifier (line 89) | private void ProcessIdentifier(SyntaxNode instruction) method ProcessOpAssignment (line 108) | private void ProcessOpAssignment(SyntaxNode instruction) method ProcessSimpleAssignment (line 118) | private void ProcessSimpleAssignment(SyntaxNode instruction) method ProcessVariableDeclarator (line 129) | private void ProcessVariableDeclarator(SyntaxNode instruction) method IsUnusedLocal (line 149) | private bool IsUnusedLocal(ISymbol declaredSymbol) => method ProcessPrefixExpression (line 155) | private void ProcessPrefixExpression(SyntaxNode instruction) method ProcessPostfixExpression (line 170) | private void ProcessPostfixExpression(SyntaxNode instruction) method ReportOnAssignment (line 183) | private void ReportOnAssignment(AssignmentExpressionSyntax assignm... method IsMuted (line 196) | private bool IsMuted(SyntaxNode node) => method GetFirstLineLocationFromToken (line 199) | private static Location GetFirstLineLocationFromToken(SyntaxToken ... method IdentifierRelevantSymbol (line 206) | private ISymbol IdentifierRelevantSymbol(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DeadStores.cs class DeadStores (line 24) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method DeadStores (line 44) | public DeadStores() : this(AnalyzerConfiguration.AlwaysEnabled) { } method DeadStores (line 46) | internal /* for testing */ DeadStores(IAnalyzerConfiguration configura... method Initialize (line 49) | protected override void Initialize(SonarAnalysisContext context) method CheckForDeadStores (line 74) | private void CheckForDeadStores(SonarSyntaxNodeReportingContext contex... class CheckerBase (line 97) | private abstract class CheckerBase method CreateState (line 103) | protected abstract State CreateState(TBlock block); method CheckerBase (line 105) | protected CheckerBase(SonarSyntaxNodeReportingContext context, LiveV... method Analyze (line 112) | public void Analyze(IEnumerable blocks) method IsLocal (line 121) | protected bool IsLocal(ISymbol symbol) => class State (line 124) | protected abstract class State method AnalyzeBlock (line 130) | public abstract void AnalyzeBlock(); method State (line 134) | protected State(CheckerBase owner, TBlock block) method ReportIssue (line 141) | protected void ReportIssue(Location location, ISymbol symbol) => method IsSymbolRelevant (line 144) | protected bool IsSymbolRelevant(ISymbol symbol) => method IsLocal (line 147) | protected bool IsLocal(ISymbol symbol) => method IsAllowedInitializationValue (line 150) | protected bool IsAllowedInitializationValue(ExpressionSyntax value... method IsMuted (line 160) | protected bool IsMuted(SyntaxNode node, ISymbol symbol) => method IsAllowedInitializationConstant (line 163) | private static bool IsAllowedInitializationConstant(object constan... method IsAllowedInitializationConstantIdentifier (line 166) | private static bool IsAllowedInitializationConstantIdentifier(obje... method IsAllowedNumericInitialization (line 169) | private static bool IsAllowedNumericInitialization(ExpressionSynta... method IsAllowedUnaryNumericInitialization (line 172) | private static bool IsAllowedUnaryNumericInitialization(Expression... method IsAllowedStringInitialization (line 176) | private bool IsAllowedStringInitialization(ExpressionSyntax expres... method IsTypeSpecificDefaultValue (line 181) | private bool IsTypeSpecificDefaultValue(ExpressionSyntax expressio... type TypeSpecificDefaultValue (line 188) | private sealed record TypeSpecificDefaultValue(KnownType Type, string ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DebugAssertHasNoSideEffects.cs class DebugAssertHasNoSideEffects (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 36) | protected override void Initialize(SonarAnalysisContext context) => method GetIdentifierName (line 49) | private static string GetIdentifierName(InvocationExpressionSyntax inv... method IsDebugAssert (line 61) | private static bool IsDebugAssert(SonarSyntaxNodeReportingContext cont... method ContainsCallsWithSideEffects (line 67) | private static bool ContainsCallsWithSideEffects(InvocationExpressionS... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DebuggerDisplayUsesExistingMembers.cs class DebuggerDisplayUsesExistingMembers (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method AttributeTarget (line 27) | protected override SyntaxNode AttributeTarget(AttributeArgumentSyntax ... method ResolvableIdentifiers (line 30) | protected override ImmutableArray ResolvableIdentifiers(Sy... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DeclareEventHandlersCorrectly.cs class DeclareEventHandlersCorrectly (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) method AnalyzeEventType (line 44) | private static void AnalyzeEventType(SonarSyntaxNodeReportingContext a... method IsCorrectEventHandlerSignature (line 56) | private static bool IsCorrectEventHandlerSignature(IMethodSymbol metho... method IsDerivedFromEventArgs (line 75) | private static bool IsDerivedFromEventArgs(ITypeSymbol type) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DeclareTypesInNamespaces.cs class DeclareTypesInNamespaces (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetTypeIdentifier (line 46) | protected override SyntaxToken GetTypeIdentifier(SyntaxNode declaratio... method IsInnerTypeOrWithinNamespace (line 49) | protected override bool IsInnerTypeOrWithinNamespace(SyntaxNode declar... method IsException (line 52) | protected override bool IsException(SyntaxNode node) => method IsTopLevelStatementPartialProgramClass (line 55) | private static bool IsTopLevelStatementPartialProgramClass(SyntaxNode ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DefaultSectionShouldBeFirstOrLast.cs class DefaultSectionShouldBeFirstOrLast (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DelegateSubtraction.cs class DelegateSubtraction (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method BinaryIsValidSubstraction (line 58) | private static bool BinaryIsValidSubstraction(BinaryExpressionSyntax s... method IsTopLevelSubtraction (line 74) | private static bool IsTopLevelSubtraction(BinaryExpressionSyntax subtr... method IsDelegateSubtraction (line 77) | private static bool IsDelegateSubtraction(SyntaxNode node, SemanticMod... method ExpressionIsSimple (line 81) | private static bool ExpressionIsSimple(ExpressionSyntax expression) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DisposableMemberInNonDisposableClass.cs class DisposableMemberInNonDisposableClass (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method ShouldExclude (line 54) | private static bool ShouldExclude(ITypeSymbol typeSymbol) => method GetMessage (line 59) | private static string GetMessage(SonarSymbolReportingContext context, ... method GetAssignmentsToFieldsIn (line 84) | private static IEnumerable GetAssignmentsToFieldsIn(ISym... method IsOwnerSinceDeclaration (line 100) | private static bool IsOwnerSinceDeclaration(ISymbol symbol) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DisposableNotDisposed.cs class DisposableNotDisposed (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 56) | protected override void Initialize(SonarAnalysisContext context) => method CreateNodeAndModel (line 109) | private static NodeAndModel CreateNodeAndModel(SonarSymbol... method TrackInitializedLocalsAndPrivateFields (line 112) | private static void TrackInitializedLocalsAndPrivateFields(INamedTypeS... method TrackAssignmentsToLocalsAndPrivateFields (line 136) | private static void TrackAssignmentsToLocalsAndPrivateFields(INamedTyp... method IsNodeInsideUsingStatement (line 156) | private static bool IsNodeInsideUsingStatement(SyntaxNode node) method GetDescendantNodes (line 172) | private static IEnumerable GetDescendantNodes(INamedTypeSy... method IsLocalOrPrivateField (line 177) | private static bool IsLocalOrPrivateField(ISymbol symbol) => method ExcludeDisposedAndClosedLocalsAndPrivateFields (line 181) | private static void ExcludeDisposedAndClosedLocalsAndPrivateFields(Syn... method ExcludeReturnedPassedAndAliasedLocalsAndPrivateFields (line 214) | private static void ExcludeReturnedPassedAndAliasedLocalsAndPrivateFie... method IsStandaloneExpression (line 253) | private static bool IsStandaloneExpression(ExpressionSyntax expression... method IsInstantiation (line 257) | private static bool IsInstantiation(ExpressionSyntax expression, Seman... method IsNewTrackedTypeObjectCreation (line 262) | private static bool IsNewTrackedTypeObjectCreation(ExpressionSyntax ex... method IsDisposableRefStructCreation (line 269) | private static bool IsDisposableRefStructCreation(ExpressionSyntax exp... method IsFactoryMethodInvocation (line 275) | private static bool IsFactoryMethodInvocation(ExpressionSyntax express... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DisposableReturnedFromUsing.cs class DisposableReturnedFromUsing (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method CheckReturns (line 84) | private static void CheckReturns(SonarSyntaxNodeReportingContext c, Sy... method GetReturnedSymbols (line 100) | private static ISet GetReturnedSymbols(SyntaxNode body, Seman... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DisposableTypesNeedFinalizers.cs class DisposableTypesNeedFinalizers (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) => method HasNativeHandleFields (line 49) | private static bool HasNativeHandleFields(TypeDeclarationSyntax classD... method HasFinalizer (line 55) | private static bool HasFinalizer(TypeDeclarationSyntax classDeclaratio... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DisposeFromDispose.cs class DisposeFromDispose (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) => method FieldDisposedInDispose (line 52) | private static bool FieldDisposedInDispose(SemanticModel model, IField... method FieldIsDisposedIn (line 57) | private static bool FieldIsDisposedIn(SemanticModel model, IFieldSymbo... method FieldDeclaredInType (line 75) | private static bool FieldDeclaredInType(SemanticModel model, Invocatio... method InvocationTargetAndName (line 80) | private static bool InvocationTargetAndName(InvocationExpressionSyntax... method IsDisposableClassOrStruct (line 103) | private static bool IsDisposableClassOrStruct(INamedTypeSymbol type, L... method IsCalledInsideDispose (line 106) | private static bool IsCalledInsideDispose(InvocationExpressionSyntax i... method IsDisposeMethodCalled (line 116) | private static bool IsDisposeMethodCalled(InvocationExpressionSyntax i... method IDisposableDisposeMethodSymbol (line 123) | private static IMethodSymbol IDisposableDisposeMethodSymbol(Compilatio... method IsMethodMatchingDisposeMethodName (line 126) | private static bool IsMethodMatchingDisposeMethodName(IMethodSymbol en... method ImplementsDisposable (line 130) | private static bool ImplementsDisposable(INamedTypeSymbol containingTy... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DisposeNotImplementingDispose.cs class DisposeNotImplementingDispose (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => method CollectInvocationsFromDisposeImplementation (line 65) | private static void CollectInvocationsFromDisposeImplementation(IMetho... method CollectDisposeMethodsCalledFromDispose (line 91) | private static void CollectDisposeMethodsCalledFromDispose(InvocationE... method ReportDisposeMethods (line 108) | private static void ReportDisposeMethods(SonarSymbolReportingContext c... method CollectMethodsNamedAndImplementingDispose (line 119) | private static void CollectMethodsNamedAndImplementingDispose(IMethodS... method MethodIsDisposeImplementation (line 139) | private static bool MethodIsDisposeImplementation(IMethodSymbol method... method MethodMightImplementDispose (line 142) | private static bool MethodMightImplementDispose(IMethodSymbol declared... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotCallAssemblyGetExecutingAssemblyMethod.cs class DoNotCallAssemblyGetExecutingAssemblyMethod (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method DoNotCallAssemblyGetExecutingAssemblyMethod (line 34) | public DoNotCallAssemblyGetExecutingAssemblyMethod() : base(Diagnostic... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotCallAssemblyLoadInvalidMethods.cs class DoNotCallAssemblyLoadInvalidMethods (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method DoNotCallAssemblyLoadInvalidMethods (line 44) | public DoNotCallAssemblyLoadInvalidMethods() : base(DiagnosticId) { } method IsInValidContext (line 46) | protected override bool IsInValidContext(InvocationExpressionSyntax in... method IsInResolutionHandler (line 53) | private static bool IsInResolutionHandler(InvocationExpressionSyntax i... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotCallExitMethods.cs class DoNotCallExitMethods (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method DoNotCallExitMethods (line 34) | public DoNotCallExitMethods() : base(DiagnosticId) { } method IsInValidContext (line 36) | protected override bool IsInValidContext(InvocationExpressionSyntax in... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotCallGCCollectMethod.cs class DoNotCallGCCollectMethod (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method DoNotCallGCCollectMethod (line 35) | public DoNotCallGCCollectMethod() : base(DiagnosticId) { } method ShouldReportOnMethodCall (line 37) | protected override bool ShouldReportOnMethodCall(InvocationExpressionS... method IsGetTotalMemoryFalse (line 40) | private static bool IsGetTotalMemoryFalse(MemberDescriptor memberDescr... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotCallGCSuppressFinalize.cs class DoNotCallGCSuppressFinalize (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method DoNotCallGCSuppressFinalize (line 34) | public DoNotCallGCSuppressFinalize() : base(DiagnosticId) { } method ShouldReportOnMethodCall (line 36) | protected override bool ShouldReportOnMethodCall(InvocationExpressionS... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotCallMethodsCsharpBase.cs class DoNotCallMethodsCSharpBase (line 20) | public abstract class DoNotCallMethodsCSharpBase : DoNotCallMethodsBase<... method DoNotCallMethodsCSharpBase (line 24) | protected DoNotCallMethodsCSharpBase(string diagnosticId) : base(diagn... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotCatchNullReferenceException.cs class DoNotCatchNullReferenceException (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method IsCatchingNullReferenceException (line 50) | private static bool IsCatchingNullReferenceException(CatchDeclarationS... method HasIsNullReferenceExceptionFilter (line 58) | private static bool HasIsNullReferenceExceptionFilter(CatchFilterClaus... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotCatchSystemException.cs class DoNotCatchSystemException (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method IsCatchClauseEmptyOrNotPattern (line 45) | private static bool IsCatchClauseEmptyOrNotPattern(CatchClauseSyntax c... method IsSystemException (line 51) | private static bool IsSystemException(CatchDeclarationSyntax catchDecl... method IsThrowTheLastStatementInTheBlock (line 57) | private static bool IsThrowTheLastStatementInTheBlock(BlockSyntax block) method GetLocation (line 63) | private static Location GetLocation(CatchClauseSyntax catchClause) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotCheckZeroSizeCollection.cs class DoNotCheckZeroSizeCollection (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 28) | protected override void Initialize(SonarAnalysisContext context) method AnalyzePropertyPatternClause (line 37) | private void AnalyzePropertyPatternClause(SonarSyntaxNodeReportingCont... method AnalyzePatterns (line 55) | private void AnalyzePatterns(SonarSyntaxNodeReportingContext c, Expres... method AnalyzeIsPatternExpression (line 63) | private void AnalyzeIsPatternExpression(SonarSyntaxNodeReportingContex... method AnalyzeSwitchExpression (line 69) | private void AnalyzeSwitchExpression(SonarSyntaxNodeReportingContext c) method AnalyzeSwitchStatement (line 79) | private void AnalyzeSwitchStatement(SonarSyntaxNodeReportingContext c) method CheckPatternCondition (line 91) | private void CheckPatternCondition(SonarSyntaxNodeReportingContext con... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotCopyArraysInProperties.cs class DoNotCopyArraysInProperties (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 41) | protected override void Initialize(SonarAnalysisContext context) => method PropertyBody (line 61) | private static SyntaxNode PropertyBody(PropertyDeclarationSyntax prope... class PropertyWalker (line 69) | private sealed class PropertyWalker : SafeCSharpSyntaxWalker method PropertyWalker (line 77) | public PropertyWalker(SemanticModel model, bool isArrowExpression) method VisitInvocationExpression (line 83) | public override void VisitInvocationExpression(InvocationExpressionS... method VisitObjectCreationExpression (line 95) | public override void VisitObjectCreationExpression(ObjectCreationExp... method Visit (line 103) | public override void Visit(SyntaxNode node) method VisitReturnStatement (line 118) | public override void VisitReturnStatement(ReturnStatementSyntax node) method VisitSimpleLambdaExpression (line 125) | public override void VisitSimpleLambdaExpression(SimpleLambdaExpress... method VisitParenthesizedLambdaExpression (line 130) | public override void VisitParenthesizedLambdaExpression(Parenthesize... method VisitAnonymousMethodExpression (line 135) | public override void VisitAnonymousMethodExpression(AnonymousMethodE... method VisitAssignmentExpression (line 140) | public override void VisitAssignmentExpression(AssignmentExpressionS... method IsObjectCreationCopyingCollection (line 145) | private bool IsObjectCreationCopyingCollection(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotDecreaseMemberVisibility.cs class DoNotDecreaseMemberVisibility (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => class IssueReporter (line 50) | private sealed class IssueReporter method IssueReporter (line 58) | public IssueReporter(ITypeSymbol classSymbol, SonarSyntaxNodeReporti... method ReportIssue (line 72) | public void ReportIssue(MemberDeclarationSyntax memberDeclaration) method ReportMethodIssue (line 88) | private void ReportMethodIssue(MemberDeclarationSyntax memberDeclara... method ReportPropertyIssue (line 100) | private void ReportPropertyIssue(MemberDeclarationSyntax memberDecla... method ReportEventIssue (line 110) | private void ReportEventIssue(MemberDeclarationSyntax memberDeclarat... method GetPropertyToken (line 121) | private static SyntaxToken GetPropertyToken(BasePropertyDeclarationS... method IsSymbolVisibleFromNamespace (line 129) | private static bool IsSymbolVisibleFromNamespace(ISymbol symbol, INa... method IsDecreasingPropertyAccess (line 133) | private static bool IsDecreasingPropertyAccess(IPropertySymbol baseP... method GetEffectiveDeclaredAccess (line 151) | private static Accessibility GetEffectiveDeclaredAccess(ISymbol symb... method IsMatchingSignature (line 163) | private static bool IsMatchingSignature(IMethodSymbol baseMethod, IM... method AreParameterTypesEqual (line 168) | private static bool AreParameterTypesEqual(IEnumerable FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotHardcodeCredentials.cs class DoNotHardcodeCredentials (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method InitializeActions (line 25) | protected override void InitializeActions(SonarParametrizedAnalysisCon... method IsSecureStringAppendCharFromConstant (line 54) | protected override bool IsSecureStringAppendCharFromConstant(SyntaxNod... class VariableDeclarationBannedWordsFinder (line 67) | private sealed class VariableDeclarationBannedWordsFinder : Credential... method VariableDeclarationBannedWordsFinder (line 69) | public VariableDeclarationBannedWordsFinder(DoNotHardcodeCredentials... method AssignedValue (line 71) | protected override string AssignedValue(VariableDeclaratorSyntax syn... method VariableName (line 74) | protected override string VariableName(VariableDeclaratorSyntax synt... method ShouldHandle (line 77) | protected override bool ShouldHandle(VariableDeclaratorSyntax syntax... method FindStringLiteralInVariableDeclaration (line 83) | private static LiteralExpressionSyntax FindStringLiteralInVariableDe... class AssignmentExpressionBannedWordsFinder (line 98) | private sealed class AssignmentExpressionBannedWordsFinder : Credentia... method AssignmentExpressionBannedWordsFinder (line 100) | public AssignmentExpressionBannedWordsFinder(DoNotHardcodeCredential... method AssignedValue (line 102) | protected override string AssignedValue(AssignmentExpressionSyntax s... method VariableName (line 105) | protected override string VariableName(AssignmentExpressionSyntax sy... method ShouldHandle (line 108) | protected override bool ShouldHandle(AssignmentExpressionSyntax synt... class StringLiteralBannedWordsFinder (line 120) | private sealed class StringLiteralBannedWordsFinder : CredentialWordsF... method StringLiteralBannedWordsFinder (line 122) | public StringLiteralBannedWordsFinder(DoNotHardcodeCredentials analy... method AssignedValue (line 124) | protected override string AssignedValue(LiteralExpressionSyntax synt... method VariableName (line 130) | protected override string VariableName(LiteralExpressionSyntax synta... method ShouldHandle (line 133) | protected override bool ShouldHandle(LiteralExpressionSyntax syntaxN... method ShouldHandle (line 136) | private static bool ShouldHandle(SyntaxNode method, SyntaxNode curre... class AddExpressionBannedWordsFinder (line 168) | private sealed class AddExpressionBannedWordsFinder : CredentialWordsF... method AddExpressionBannedWordsFinder (line 170) | public AddExpressionBannedWordsFinder(DoNotHardcodeCredentials analy... method AssignedValue (line 172) | protected override string AssignedValue(BinaryExpressionSyntax synta... method VariableName (line 181) | protected override string VariableName(BinaryExpressionSyntax syntax... method ShouldHandle (line 183) | protected override bool ShouldHandle(BinaryExpressionSyntax syntaxNo... class InterpolatedStringBannedWordsFinder (line 186) | private sealed class InterpolatedStringBannedWordsFinder : CredentialW... method InterpolatedStringBannedWordsFinder (line 188) | public InterpolatedStringBannedWordsFinder(DoNotHardcodeCredentials ... method AssignedValue (line 190) | protected override string AssignedValue(InterpolatedStringExpression... method VariableName (line 198) | protected override string VariableName(InterpolatedStringExpressionS... method ShouldHandle (line 200) | protected override bool ShouldHandle(InterpolatedStringExpressionSyn... class InvocationBannedWordsFinder (line 203) | private sealed class InvocationBannedWordsFinder : CredentialWordsFind... method InvocationBannedWordsFinder (line 205) | public InvocationBannedWordsFinder(DoNotHardcodeCredentials analyzer... method AssignedValue (line 207) | protected override string AssignedValue(InvocationExpressionSyntax s... method VariableName (line 220) | protected override string VariableName(InvocationExpressionSyntax sy... method ShouldHandle (line 222) | protected override bool ShouldHandle(InvocationExpressionSyntax synt... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotHardcodeSecrets.cs class DoNotHardcodeSecrets (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method RegisterNodeActions (line 25) | protected override void RegisterNodeActions(SonarCompilationStartAnaly... method IdentifierRoot (line 52) | protected override SyntaxNode IdentifierRoot(SyntaxNode node) => method RightHandSide (line 63) | protected override SyntaxNode RightHandSide(SyntaxNode node) => method IdentifierAndValue (line 75) | private static IdentifierValuePair IdentifierAndValue(ExpressionSyntax... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotHideBaseClassMethods.cs class DoNotHideBaseClassMethods (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) => class IssueReporter (line 49) | private sealed class IssueReporter type Match (line 51) | private enum Match method IssueReporter (line 61) | public IssueReporter(ITypeSymbol typeSymbol, SonarSyntaxNodeReportin... method ReportIssue (line 67) | public void ReportIssue(MemberDeclarationSyntax memberDeclaration) method GetAllBaseMethods (line 77) | private static List GetAllBaseMethods(ITypeSymbol typ... method IsSymbolVisibleFromNamespace (line 87) | private static bool IsSymbolVisibleFromNamespace(ISymbol symbol, INa... method FindBaseMethodHiddenByMethod (line 91) | private IMethodSymbol FindBaseMethodHiddenByMethod(IMethodSymbol met... method ComputeSignatureMatch (line 111) | private static Match ComputeSignatureMatch(IMethodSymbol baseMethodS... method ComputeParameterMatch (line 140) | private static Match ComputeParameterMatch(IParameterSymbol basePara... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotInstantiateSharedClasses.cs class DoNotInstantiateSharedClasses (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 27) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotLockOnSharedResource.cs class DoNotLockOnSharedResource (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 27) | protected override void Initialize(SonarAnalysisContext context) method IsLockOnThis (line 44) | private static bool IsLockOnThis(ExpressionSyntax expression) => method IsLockOnStringLiteral (line 47) | private static bool IsLockOnStringLiteral(ExpressionSyntax expression) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotLockWeakIdentityObjects.cs class DoNotLockWeakIdentityObjects (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotMarkEnumsWithFlags.cs class DoNotMarkEnumsWithFlags (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) => method GetEnumValueOrDefault (line 69) | private static BigInteger? GetEnumValueOrDefault(IFieldSymbol enumMemb... method IsValidFlagValue (line 85) | private static bool IsValidFlagValue(BigInteger? enumValue, IEnumerabl... method IsZeroOrPowerOfTwo (line 90) | private static bool IsZeroOrPowerOfTwo(BigInteger value) => method IsCombinationOfOtherValues (line 94) | private static bool IsCombinationOfOtherValues(BigInteger value, IEnum... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotNestTernaryOperators.cs class DoNotNestTernaryOperators (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotNestTypesInArguments.cs class DoNotNestTypesInArguments (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method ImplementsAbstractClassOrInterface (line 50) | private static bool ImplementsAbstractClassOrInterface(SonarSyntaxNode... method MaxDepthReached (line 54) | private static bool MaxDepthReached(SyntaxNode parameterSyntax, Semant... method CheckArguments (line 61) | private static void CheckArguments(SonarSyntaxNodeReportingContext con... class GenericWalker (line 69) | private sealed class GenericWalker : SafeCSharpSyntaxWalker method GenericWalker (line 84) | public GenericWalker(int maxDepth, SemanticModel model) method VisitGenericName (line 90) | public override void VisitGenericName(GenericNameSyntax node) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotOverloadOperatorEqual.cs class DoNotOverloadOperatorEqual (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 38) | protected override void Initialize(SonarAnalysisContext context) => method CheckForIssue (line 41) | private static void CheckForIssue(SonarSyntaxNodeReportingContext anal... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotOverwriteCollectionElements.cs class DoNotOverwriteCollectionElements (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 36) | protected override void Initialize(SonarAnalysisContext context) => method GetCollectionIdentifier (line 41) | protected override SyntaxNode GetCollectionIdentifier(ExpressionStatem... method GetIndexOrKey (line 62) | protected override SyntaxNode GetIndexOrKey(ExpressionStatementSyntax ... method IsIdentifierOrLiteral (line 65) | protected override bool IsIdentifierOrLiteral(SyntaxNode node) => method GetAssignmentOrInvocation (line 68) | private static SyntaxNode GetAssignmentOrInvocation(StatementSyntax st... method GetIndexOrKeyArgument (line 82) | private static ArgumentSyntax GetIndexOrKeyArgument(StatementSyntax st... method GetInvokedMethodContainer (line 103) | private static SyntaxNode GetInvokedMethodContainer(InvocationExpressi... method GetIdentifier (line 132) | private static SyntaxNode GetIdentifier(ExpressionSyntax expression) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotShiftByZeroOrIntSize.cs class DoNotShiftByZeroOrIntSize (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] type Shift (line 49) | private enum Shift method Initialize (line 55) | protected override void Initialize(SonarAnalysisContext context) => method ContainsShiftExpressionWithinTwoLines (line 90) | private static bool ContainsShiftExpressionWithinTwoLines(HashSet... method GetRhsArgumentOfShiftNode (line 97) | private static Tuple GetRhsArgumentOfShiftNod... method TryGetConstantValue (line 124) | private static bool TryGetConstantValue(ExpressionSyntax expression, o... method FindShiftInstance (line 131) | private static ShiftInstance FindShiftInstance(SyntaxNode node, Semant... method FindTypeSizeOrDefault (line 150) | private static int FindTypeSizeOrDefault(ITypeSymbol typeSymbol) => method FindProblemDescription (line 156) | private static string FindProblemDescription(int typeSizeInBits, int s... class ShiftInstance (line 194) | private sealed class ShiftInstance method ShiftInstance (line 201) | public ShiftInstance(SyntaxNode node) => method ShiftInstance (line 204) | public ShiftInstance(string description, bool isLiteralZero, SyntaxN... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotTestThisWithIsOperator.cs class DoNotTestThisWithIsOperator (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method AnalyzeIsExpression (line 38) | private static void AnalyzeIsExpression(SonarSyntaxNodeReportingContex... method AnalyzeIsPatternExpression (line 46) | private static void AnalyzeIsPatternExpression(SonarSyntaxNodeReportin... method AnalyzeSwitchStatement (line 54) | private static void AnalyzeSwitchStatement(SonarSyntaxNodeReportingCon... method AnalyzeSwitchExpression (line 63) | private static void AnalyzeSwitchExpression(SonarSyntaxNodeReportingCo... method CollectSecondaryLocations (line 72) | private static IList CollectSecondaryLocations(Swit... method CollectSecondaryLocations (line 79) | private static IList CollectSecondaryLocations(Swit... method ContainsTypeCheckInCaseSwitchLabel (line 84) | private static bool ContainsTypeCheckInCaseSwitchLabel(SwitchLabelSynt... method ContainsTypeCheckInPattern (line 87) | private static bool ContainsTypeCheckInPattern(SyntaxNode node) => method IsTypeCheckOnThis (line 93) | private static bool IsTypeCheckOnThis(SyntaxNode pattern) method IsNotInSubPattern (line 117) | private static bool IsNotInSubPattern(SyntaxNode node) => method ReportDiagnostic (line 125) | private static void ReportDiagnostic(SonarSyntaxNodeReportingContext c... method ReportDiagnostic (line 128) | private static void ReportDiagnostic(SonarSyntaxNodeReportingContext c... method TypeMatchLocation (line 136) | private static Location TypeMatchLocation(SwitchLabelSyntax label) method IsThisExpressionSyntax (line 152) | private static bool IsThisExpressionSyntax(SyntaxNode syntaxNode) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotThrowFromDestructors.cs class DoNotThrowFromDestructors (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotUseCollectionInItsOwnMethodCalls.cs class DoNotUseCollectionInItsOwnMethodCalls (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 52) | protected override void Initialize(SonarAnalysisContext context) => method OperandsToCheckIfTrackedMethod (line 67) | private static OperandsToCheck? OperandsToCheckIfTrackedMethod(Invocat... method ProcessIssueMessage (line 84) | private static string ProcessIssueMessage(IMethodSymbol methodSymbol) method IsAnySetMethod (line 109) | private static bool IsAnySetMethod(IMethodSymbol methodSymbol, params ... type OperandsToCheck (line 114) | private readonly record struct OperandsToCheck FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotUseDateTimeNow.cs class DoNotUseDateTimeNow (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsInsideNameOf (line 25) | protected override bool IsInsideNameOf(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotUseLiteralBoolInAssertions.cs class DoNotUseLiteralBoolInAssertions (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 70) | protected override void Initialize(SonarAnalysisContext context) => method IsWorkingWithNullableType (line 86) | private static bool IsWorkingWithNullableType(IMethodSymbol methodSymb... method IsFirstOrSecondArgumentABoolLiteral (line 110) | private static bool IsFirstOrSecondArgumentABoolLiteral(SeparatedSynta... method IsBooleanLiteral (line 118) | private static bool IsBooleanLiteral(ArgumentSyntax argument) => method IsTrackedMethod (line 121) | private static bool IsTrackedMethod(ISymbol methodSymbol) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotUseOutRefParameters.cs class DoNotUseOutRefParameters (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method IsTryPattern (line 59) | private static bool IsTryPattern(IMethodSymbol method, SyntaxToken mod... method IsRefOrOut (line 64) | private static bool IsRefOrOut(SyntaxToken token) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DoNotWriteToStandardOutput.cs class DoNotWriteToStandardOutput (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected sealed override void Initialize(SonarAnalysisContext context... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DontMixIncrementOrDecrementWithOtherOperators.cs class DontMixIncrementOrDecrementWithOtherOperators (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 40) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DontUseTraceSwitchLevels.cs class DontUseTraceSwitchLevels (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 37) | protected override void Initialize(SonarAnalysisContext context) => method UsesTraceSwitchAsCondition (line 52) | private static SyntaxNode UsesTraceSwitchAsCondition(SemanticModel mod... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/DontUseTraceWrite.cs class DontUseTraceWrite (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method ShouldReportOnMethodCall (line 36) | protected override bool ShouldReportOnMethodCall(InvocationExpressionS... method DontUseTraceWrite (line 42) | public DontUseTraceWrite() : base(DiagnosticId) { } FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EmptyMethod.cs class EmptyMethod (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method CheckMethod (line 35) | protected override void CheckMethod(SonarSyntaxNodeReportingContext co... method ShouldBeExcluded (line 46) | private static bool ShouldBeExcluded(SonarSyntaxNodeReportingContext c... method ReportingToken (line 54) | private static SyntaxToken ReportingToken(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EmptyMethodCodeFix.cs class EmptyMethodCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 33) | protected override async Task RegisterCodeFixesAsync(SyntaxNode root, ... method RegisterCodeFixesForMethodsAsync (line 43) | private static async Task RegisterCodeFixesForMethodsAsync(SonarCodeFi... method NamespaceNeedsToBeAdded (line 104) | private static bool NamespaceNeedsToBeAdded(BlockSyntax methodBody, Se... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EmptyNamespace.cs class EmptyNamespace (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EmptyNamespaceCodeFix.cs class EmptyNamespaceCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 27) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EmptyNestedBlock.cs class EmptyNestedBlock (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method EmptyBlocks (line 41) | protected override IEnumerable EmptyBlocks(SyntaxNode node... method IsEmpty (line 47) | private static bool IsEmpty(SwitchStatementSyntax node) => method IsNestedAndEmpty (line 50) | private static bool IsNestedAndEmpty(BlockSyntax node) => method IsNested (line 53) | private static bool IsNested(BlockSyntax node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EmptyStatement.cs class EmptyStatement (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EmptyStatementCodeFix.cs class EmptyStatementCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 26) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method IsInBlock (line 49) | private static bool IsInBlock(SyntaxNode node) method RemoveUnusedCode (line 54) | internal static SyntaxNode RemoveUnusedCode(SyntaxNode root, SyntaxNod... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EncryptionAlgorithmsShouldBeSecure.cs class EncryptionAlgorithmsShouldBeSecure (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method EncryptionAlgorithmsShouldBeSecure (line 27) | public EncryptionAlgorithmsShouldBeSecure() : base(AnalyzerConfigurati... method IsInsideObjectInitializer (line 29) | protected override TrackerBase.Cond... method HasPkcs1PaddingArgument (line 32) | protected override TrackerBase.Conditio... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EnumNameHasEnumSuffix.cs class EnumNameHasEnumSuffix (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EnumNameShouldFollowRegex.cs class EnumNameShouldFollowRegex (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EnumStorageNeedsToBeInt32.cs class EnumStorageNeedsToBeInt32 (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method IsDefaultOrLarger (line 47) | private static bool IsDefaultOrLarger(SyntaxNode syntaxNode, SemanticM... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EnumerableSumInUnchecked.cs class EnumerableSumInUnchecked (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method IsSumInsideUnchecked (line 50) | private static bool IsSumInsideUnchecked(InvocationExpressionSyntax in... method IsUncheckedExpression (line 74) | private static bool IsUncheckedExpression(SyntaxNode node) method IsUncheckedStatement (line 80) | private static bool IsUncheckedStatement(SyntaxNode node) method IsSumOnInteger (line 86) | private static bool IsSumOnInteger(IMethodSymbol methodSymbol) method IsReturnTypeCandidate (line 94) | private static bool IsReturnTypeCandidate(IMethodSymbol methodSymbol) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EnumsShouldNotBeNamedReserved.cs class EnumsShouldNotBeNamedReserved (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EqualityOnFloatingPoint.cs class EqualityOnFloatingPoint (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 36) | protected override void Initialize(SonarAnalysisContext context) method CheckLogicalExpression (line 49) | private static void CheckLogicalExpression(SonarSyntaxNodeReportingCon... method MessageEqualityPart (line 65) | private static string MessageEqualityPart(bool isEquality) => method CheckEquality (line 68) | private static void CheckEquality(SonarSyntaxNodeReportingContext cont... method ProposedMessageForMemberAccess (line 85) | private static string ProposedMessageForMemberAccess(SonarSyntaxNodeRe... method ProposedMessageForIdentifier (line 93) | private static string ProposedMessageForIdentifier(SonarSyntaxNodeRepo... method IsFloatingPointType (line 105) | private static bool IsFloatingPointType(ITypeSymbol type) => method TryGetBinaryExpression (line 113) | private static BinaryExpressionSyntax TryGetBinaryExpression(Expressio... method IsIndirectInequality (line 116) | private static bool IsIndirectInequality(SemanticModel semanticModel, ... method IsIndirectEquality (line 121) | private static bool IsIndirectEquality(SemanticModel semanticModel, Bi... method HasFloatingType (line 126) | private static bool HasFloatingType(SemanticModel semanticModel, Binar... method IsExpressionFloatingType (line 129) | private static bool IsExpressionFloatingType(SemanticModel semanticMod... method IsOperatorPair (line 132) | private static bool IsOperatorPair(BinaryExpressionSyntax left, Binary... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EqualityOnModulus.cs class EqualityOnModulus (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 40) | protected override void Initialize(SonarAnalysisContext context) => method VisitEquality (line 43) | private static void VisitEquality(SonarSyntaxNodeReportingContext c) method CheckExpression (line 54) | private static int? CheckExpression(SyntaxNode node, ExpressionSyntax ... method ExpressionIsAlwaysPositive (line 63) | private static bool ExpressionIsAlwaysPositive(BinaryExpressionSyntax ... method IsCollectionSize (line 78) | private static bool IsCollectionSize(ISymbol symbol) => method IsEnumerableCountMethod (line 85) | private static bool IsEnumerableCountMethod(ISymbol symbol) => method IsLengthProperty (line 92) | private static bool IsLengthProperty(IPropertySymbol propertySymbol) => method IsCollectionCountProperty (line 96) | private static bool IsCollectionCountProperty(IPropertySymbol property... method IsListCapacityProperty (line 101) | private static bool IsListCapacityProperty(IPropertySymbol propertySym... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EquatableClassShouldBeSealed.cs class EquatableClassShouldBeSealed (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => method HasAnyInvalidIEquatableEqualsMethod (line 50) | private static bool HasAnyInvalidIEquatableEqualsMethod(INamedTypeSymb... method IsCompilableIEquatableTSymbol (line 75) | private static bool IsCompilableIEquatableTSymbol(INamedTypeSymbol nam... method IsIEquatableEqualsMethodCandidate (line 79) | private static bool IsIEquatableEqualsMethodCandidate(IMethodSymbol me... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EscapeLambdaParameterTypeNamedScoped.cs class EscapeLambdaParameterTypeNamedScoped (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method CheckParameter (line 46) | private static void CheckParameter(SonarSyntaxNodeReportingContext c, ... method IsScopedToken (line 58) | private static bool IsScopedToken(SyntaxToken token) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/EventHandlerDelegateShouldHaveProperArguments.cs class EventHandlerDelegateShouldHaveProperArguments (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 40) | protected override void Initialize(SonarAnalysisContext context) method GetEventSymbol (line 87) | private static IEventSymbol GetEventSymbol(ExpressionSyntax expression... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ExceptionRethrow.cs class ExceptionRethrow (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ExceptionRethrowCodeFix.cs class ExceptionRethrowCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 26) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ExceptionShouldNotBeThrownFromUnexpectedMethods.cs class ExceptionShouldNotBeThrownFromUnexpectedMethods (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 48) | protected override void Initialize(SonarAnalysisContext context) method CheckForIssue (line 72) | private static void CheckForIssue(SonarSyntaxNodeReportingCon... method IsTrackedOperator (line 82) | private static bool IsTrackedOperator(OperatorDeclarationSyntax declar... method IsTrackedMethod (line 85) | private static bool IsTrackedMethod(MethodDeclarationSyntax declaratio... method HasTrackedMethodOrAttributeName (line 90) | private static bool HasTrackedMethodOrAttributeName(MethodDeclarationS... method HasTrackedMethodOrAttributeType (line 104) | private static bool HasTrackedMethodOrAttributeType(IMethodSymbol meth... method IsModuleInitializer (line 112) | private static bool IsModuleInitializer(IMethodSymbol method) => method ReportOnInvalidThrow (line 115) | private static void ReportOnInvalidThrow(SonarSyntaxNodeReportingConte... method ShouldReport (line 142) | private static bool ShouldReport(INamedTypeSymbol exceptionType, Immut... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ExceptionsNeedStandardConstructors.cs class ExceptionsNeedStandardConstructors (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method HasStandardConstructors (line 47) | private static bool HasStandardConstructors(INamedTypeSymbol classSymbol) method HasConstructor (line 56) | private static bool HasConstructor(ImmutableArray const... method IsMatchingConstructor (line 62) | private static bool IsMatchingConstructor(IMethodSymbol constructor, A... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ExceptionsShouldBeLogged.cs class ExceptionsShouldBeLogged (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 40) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ExceptionsShouldBeLoggedOrThrown.cs class ExceptionsShouldBeLoggedOrThrown (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 41) | protected override void Initialize(SonarAnalysisContext context) => class LoggingInvocationWalker (line 68) | private sealed class LoggingInvocationWalker(SemanticModel model) : Ca... method VisitIfStatement (line 72) | public override void VisitIfStatement(IfStatementSyntax node) method VisitSwitchStatement (line 77) | public override void VisitSwitchStatement(SwitchStatementSyntax node) method VisitConditionalExpression (line 82) | public override void VisitConditionalExpression(ConditionalExpressio... method Visit (line 87) | public override void Visit(SyntaxNode node) method VisitThrowStatement (line 96) | public override void VisitThrowStatement(ThrowStatementSyntax node) method RethrowsCaughtException (line 106) | private bool RethrowsCaughtException(ExpressionSyntax expression) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ExceptionsShouldBePublic.cs class ExceptionsShouldBePublic (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ExceptionsShouldBeUsed.cs class ExceptionsShouldBeUsed (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ExcludeFromCodeCoverageAttributesNeedJustification.cs class ExcludeFromCodeCoverageAttributesNeedJustification (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetJustificationExpression (line 25) | protected override SyntaxNode GetJustificationExpression(SyntaxNode no... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ExpectedExceptionAttributeShouldNotBeUsed.cs class ExpectedExceptionAttributeShouldNotBeUsed (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method FindExpectedExceptionAttribute (line 25) | protected override SyntaxNode FindExpectedExceptionAttribute(SyntaxNod... method HasMultiLineBody (line 28) | protected override bool HasMultiLineBody(SyntaxNode node) method AssertInCatchFinallyBlock (line 35) | protected override bool AssertInCatchFinallyBlock(SyntaxNode node) class CatchFinallyAssertion (line 48) | private sealed class CatchFinallyAssertion : SafeCSharpSyntaxWalker method VisitInvocationExpression (line 52) | public override void VisitInvocationExpression(InvocationExpressionS... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ExpressionComplexity.cs class ExpressionComplexity (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method ExpressionChildren (line 64) | protected override SyntaxNode[] ExpressionChildren(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ExtensionMethodShouldBeInSeparateNamespace.cs class ExtensionMethodShouldBeInSeparateNamespace (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ExtensionMethodShouldNotExtendObject.cs class ExtensionMethodShouldNotExtendObject (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsExtensionMethod (line 25) | protected override bool IsExtensionMethod(MethodDeclarationSyntax decl... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/FieldShadowsParentField.cs class FieldShadowsParentField (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/FieldShouldBeReadonly.cs class FieldShouldBeReadonly (line 23) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 62) | protected override void Initialize(SonarAnalysisContext context) => class ReadonlyFieldCollector (line 98) | private sealed class ReadonlyFieldCollector method ReadonlyFieldCollector (line 115) | public ReadonlyFieldCollector(IEnumerable part... class PartialTypeDeclarationProcessor (line 137) | private sealed class PartialTypeDeclarationProcessor method PartialTypeDeclarationProcessor (line 144) | public PartialTypeDeclarationProcessor(TypeDeclarationTuple partia... method CollectFields (line 154) | public void CollectFields() method GetAllFields (line 166) | private IEnumerable GetAllFields(FieldDeclarationSynta... method CollectFieldsFromDeclarations (line 170) | private void CollectFieldsFromDeclarations() method CollectFieldsFromArguments (line 182) | private void CollectFieldsFromArguments() method CollectFieldsFromPostfixUnaryExpressions (line 195) | private void CollectFieldsFromPostfixUnaryExpressions() method CollectFieldsFromPrefixUnaryExpressions (line 207) | private void CollectFieldsFromPrefixUnaryExpressions() method CollectFieldsFromAssignments (line 219) | private void CollectFieldsFromAssignments() method ProcessExpression (line 242) | private void ProcessExpression(ExpressionSyntax expression) method ProcessAssignedTopMemberAccessExpression (line 248) | private void ProcessAssignedTopMemberAccessExpression(ExpressionSy... method GetTopMemberAccessIfNested (line 266) | private static ExpressionSyntax GetTopMemberAccessIfNested(Express... method ProcessAssignedExpression (line 289) | private void ProcessAssignedExpression(ExpressionSyntax expression) method ProcessExpressionOnField (line 295) | private void ProcessExpressionOnField(ExpressionSyntax expression,... method IsFieldRelevant (line 325) | private static bool IsFieldRelevant(IFieldSymbol fieldSymbol) => method TupleExpressionsOrSelf (line 328) | private static IEnumerable TupleExpressionsOrSel... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/FieldShouldBeReadonlyCodeFix.cs class FieldShouldBeReadonlyCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 27) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method HasAnyAccessibilityModifier (line 65) | private static bool HasAnyAccessibilityModifier(FieldDeclarationSyntax... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/FieldShouldNotBePublic.cs class FieldShouldNotBePublic (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Variables (line 25) | protected override IEnumerable Variables(Fie... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/FieldsShouldBeEncapsulatedInProperties.cs class FieldsShouldBeEncapsulatedInProperties (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 43) | protected override void Initialize(SonarAnalysisContext context) => method Serializable (line 70) | private static bool Serializable(ISymbol symbol, ISymbol parentSymbol) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/FileLines.cs class FileLines (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsEndOfFileToken (line 29) | protected override bool IsEndOfFileToken(SyntaxToken token) => token.I... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/FileShouldEndWithEmptyNewLine.cs class FileShouldEndWithEmptyNewLine (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/FinalizerShouldNotBeEmpty.cs class FinalizerShouldNotBeEmpty (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/FindInsteadOfFirstOrDefault.cs class FindInsteadOfFirstOrDefault (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/FlagsEnumWithoutInitializer.cs class FlagsEnumWithoutInitializer (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsInitialized (line 25) | protected override bool IsInitialized(EnumMemberDeclarationSyntax memb... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/FlagsEnumZeroMember.cs class FlagsEnumZeroMember (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ForLoopConditionAlwaysFalse.cs class ForLoopConditionAlwaysFalse (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 42) | protected override void Initialize(SonarAnalysisContext context) => method IsAlwaysFalseCondition (line 54) | private bool IsAlwaysFalseCondition(ExpressionSyntax condition) => method IsAlwaysTrueCondition (line 59) | private bool IsAlwaysTrueCondition(ExpressionSyntax condition) => method IsConditionFalseAtInitialization (line 64) | private static bool IsConditionFalseAtInitialization(ForStatementSynta... method ConditionIsTrue (line 88) | private static bool ConditionIsTrue(SyntaxKind syntaxKind, decimal lef... method IsLogicalNot (line 100) | private static bool IsLogicalNot(ExpressionSyntax expression, out Pref... method DecimalValue (line 107) | private static decimal? DecimalValue(IDictionary vari... method VariableDeclarationMapping (line 120) | private static IDictionary VariableDeclarationMapping... method LoopInitializerMapping (line 145) | private static IDictionary LoopInitializerMapping(IEn... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ForLoopCounterChanged.cs class ForLoopCounterChanged (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 59) | protected override void Initialize(SonarAnalysisContext context) => method LoopCounters (line 76) | private static IEnumerable LoopCounters(ForStatementSyntax no... method ComputeAffectedExpressions (line 99) | private static SyntaxNode[] ComputeAffectedExpressions(SyntaxNode node... type SideEffectExpression (line 106) | private readonly record struct SideEffectExpression(ImmutableHashSet method GetIncrementorSymbols (line 65) | private static IEnumerable GetIncrementorSymbols(ForStatement... method GetReadSymbolsCondition (line 80) | private static IEnumerable GetReadSymbolsCondition(ForStateme... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ForLoopIncrementSign.cs class ForLoopIncrementSign (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] type ArithmeticOperation (line 31) | private enum ArithmeticOperation type Condition (line 38) | private enum Condition method Initialize (line 57) | protected override void Initialize(SonarAnalysisContext context) method GetIncrementData (line 102) | private IncrementData GetIncrementData(ExpressionSyntax incrementor) method GetCondition (line 151) | private Condition GetCondition(BinaryExpressionSyntax conditionSyntax,... method IsVariableAndLiteralBinaryExpression (line 182) | private bool IsVariableAndLiteralBinaryExpression(BinaryExpressionSynt... method IsIdentifier (line 186) | private bool IsIdentifier(SyntaxNode node, string identifierName) => method GetUnnaryExpressionOperand (line 190) | private ExpressionSyntax GetUnnaryExpressionOperand(ExpressionSyntax s... class IncrementData (line 211) | private class IncrementData method IncrementData (line 217) | public IncrementData(string identifierName, ArithmeticOperation oper... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ForeachLoopExplicitConversion.cs class ForeachLoopExplicitConversion (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ForeachLoopExplicitConversionCodeFix.cs class ForeachLoopExplicitConversionCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 29) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method CalculateNewRoot (line 57) | private static SyntaxNode CalculateNewRoot(SyntaxNode root, ForEachSta... method GetOfTypeInvocation (line 109) | private static InvocationExpressionSyntax GetOfTypeInvocation(string t... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/FrameworkTypeNaming.cs class FrameworkTypeNaming (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/FunctionComplexity.cs class FunctionComplexity (line 23) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 37) | protected override void Initialize(SonarParametrizedAnalysisContext co... method CheckComplexity (line 86) | private void CheckComplexity(SonarSyntaxNodeReportingContext ... method CheckComplexity (line 90) | private void CheckComplexity( FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/FunctionNestingDepth.cs class FunctionNestingDepth (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 25) | protected override void Initialize(SonarParametrizedAnalysisContext co... class NestingDepthWalker (line 42) | private sealed class NestingDepthWalker : SafeCSharpSyntaxWalker method NestingDepthWalker (line 46) | public NestingDepthWalker(int maximumNestingDepth, Action method VisitForEachStatement (line 65) | public override void VisitForEachStatement(ForEachStatementSyntax no... method VisitWhileStatement (line 68) | public override void VisitWhileStatement(WhileStatementSyntax node) => method VisitDoStatement (line 71) | public override void VisitDoStatement(DoStatementSyntax node) => method VisitSwitchStatement (line 74) | public override void VisitSwitchStatement(SwitchStatementSyntax node... method VisitTryStatement (line 77) | public override void VisitTryStatement(TryStatementSyntax node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GenericInheritanceShouldNotBeRecursive.cs class GenericInheritanceShouldNotBeRecursive (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetKeyword (line 32) | protected override SyntaxToken GetKeyword(TypeDeclarationSyntax declar... method GetLocation (line 35) | protected override Location GetLocation(TypeDeclarationSyntax declarat... method GetNamedTypeSymbol (line 38) | protected override INamedTypeSymbol GetNamedTypeSymbol(TypeDeclaration... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GenericLoggerInjectionShouldMatchEnclosingType.cs class GenericLoggerInjectionShouldMatchEnclosingType (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method InvalidTypeParameters (line 48) | private static IEnumerable InvalidTypeParameters(Construct... method IsGenericLogger (line 73) | private static bool IsGenericLogger(ITypeSymbol type) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GenericReadonlyFieldPropertyAssignment.cs class GenericReadonlyFieldPropertyAssignment (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method ProcessPropertyChange (line 70) | private static void ProcessPropertyChange(SonarSyntaxNodeReportingCont... method IsFieldReadonlyAndPossiblyValueType (line 100) | private static bool IsFieldReadonlyAndPossiblyValueType(IFieldSymbol f... method IsInsideConstructorDeclaration (line 104) | private static bool IsInsideConstructorDeclaration(ExpressionSyntax ex... method GenericParameterMightBeValueType (line 108) | private static bool GenericParameterMightBeValueType(ITypeParameterSym... method MightBeValueType (line 117) | private static bool MightBeValueType(ITypeSymbol type) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GenericReadonlyFieldPropertyAssignmentCodeFix.cs class GenericReadonlyFieldPropertyAssignmentCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 31) | protected override async Task RegisterCodeFixesAsync(SyntaxNode root, ... method DocumentIdClassDeclarationMapping (line 95) | private static MultiValueDictionary NewCons... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GenericTypeParameterEmptinessChecking.cs class GenericTypeParameterEmptinessChecking (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GenericTypeParameterEmptinessCheckingCodeFix.cs class GenericTypeParameterEmptinessCheckingCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 26) | protected override async Task RegisterCodeFixesAsync(SyntaxNode root, ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GenericTypeParameterInOut.cs class GenericTypeParameterInOut (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method CheckInterfaceVariance (line 38) | private static void CheckInterfaceVariance(SonarSyntaxNodeReportingCon... method CheckDelegateVariance (line 58) | private static void CheckDelegateVariance(SonarSyntaxNodeReportingCont... method CheckTypeParameter (line 99) | private static bool CheckTypeParameter(ITypeParameterSymbol typeParame... method CheckTypeParameter (line 122) | private static bool CheckTypeParameter(ITypeParameterSymbol typeParame... method ReportIssue (line 170) | private static void ReportIssue(SonarSyntaxNodeReportingContext contex... method CheckTypeParameterInMethod (line 193) | private static bool CheckTypeParameterInMethod(ITypeParameterSymbol ty... method CheckTypeParameterInEvent (line 216) | private static bool CheckTypeParameterInEvent(ITypeParameterSymbol typ... method CheckTypeParameterInParameters (line 219) | private static bool CheckTypeParameterInParameters(ITypeParameterSymbo... method CheckTypeParameterConstraintsInSymbol (line 232) | private static bool CheckTypeParameterConstraintsInSymbol(ITypeParamet... method CanTypeParameterBeVariant (line 249) | private static bool CanTypeParameterBeVariant(ITypeParameterSymbol par... method CanTypeParameterBeVariant (line 277) | private static bool CanTypeParameterBeVariant(ITypeParameterSymbol par... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GenericTypeParameterUnused.cs class GenericTypeParameterUnused (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 36) | protected override void Initialize(SonarAnalysisContext context) method CheckGenericTypeParameters (line 62) | private static void CheckGenericTypeParameters(SonarSyntaxNodeReportin... method CreateParametersInfo (line 77) | private static ParametersInfo CreateParametersInfo(SonarSyntaxNodeRepo... method IsMethodCandidate (line 89) | private static bool IsMethodCandidate(MethodDeclarationSyntax methodDe... method GetUsedTypeParameters (line 96) | private static List GetUsedTypeParameters(SonarSyntaxNodeRepor... type ParametersInfo (line 105) | private sealed record ParametersInfo(TypeParameterListSyntax Parameter... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GenericTypeParametersRequired.cs class GenericTypeParametersRequired (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) => method AddTypeParameters (line 62) | private static void AddTypeParameters(ITypeSymbol argumentSymbol, ISet... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GetHashCodeEqualsOverride.cs class GetHashCodeEqualsOverride (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) => method IsEqualsCallInGuardCondition (line 77) | internal static bool IsEqualsCallInGuardCondition(InvocationExpression... method MethodIsRelevant (line 83) | internal static bool MethodIsRelevant(ISymbol symbol, ISet met... method TryGetLocationFromInvocationInsideMethod (line 86) | private static bool TryGetLocationFromInvocationInsideMethod(SonarSynt... method IfStatementWithSingleReturnTrue (line 107) | private static bool IfStatementWithSingleReturnTrue(IfStatementSyntax ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GetHashCodeMutable.cs class GetHashCodeMutable (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => method CreateSecondaryLocation (line 70) | private static SecondaryLocation CreateSecondaryLocation(SimpleNameSyn... method GetAllFirstMutableFieldsUsed (line 73) | private static IEnumerable GetAllFirstMutableFie... method IsFieldRelevant (line 102) | private static bool IsFieldRelevant(IFieldSymbol fieldSymbol, ICollect... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GetHashCodeMutableCodeFix.cs class GetHashCodeMutableCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 29) | protected override async Task RegisterCodeFixesAsync(SyntaxNode root,... method GetFieldDeclarationSyntaxAsync (line 58) | private static async Task GetFieldDeclarationS... method AddReadonlyToFieldDeclarationsAsync (line 79) | private static async Task AddReadonlyToFieldDeclarationsAsyn... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GetTypeWithIsAssignableFrom.cs class GetTypeWithIsAssignableFrom (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 35) | protected override void Initialize(SonarAnalysisContext context) method CheckAsOperatorComparedToNull (line 93) | private static void CheckAsOperatorComparedToNull(SonarSyntaxNodeRepor... method CheckGetTypeAndTypeOfEquality (line 101) | private static void CheckGetTypeAndTypeOfEquality(SonarSyntaxNodeRepor... method CheckForIsInstanceOfType (line 114) | private static void CheckForIsInstanceOfType(SonarSyntaxNodeReportingC... method CheckForIsAssignableFrom (line 124) | private static void CheckForIsAssignableFrom(SonarSyntaxNodeReportingC... method IsUnboundedGenericType (line 142) | private static bool IsUnboundedGenericType(TypeOfExpressionSyntax type... method ConstantPatternExpression (line 150) | private static ExpressionSyntax ConstantPatternExpression(SyntaxNode n... method ReportDiagnostic (line 158) | private static void ReportDiagnostic(SonarSyntaxNodeReportingContext c... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GetTypeWithIsAssignableFromCodeFix.cs class GetTypeWithIsAssignableFromCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 29) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method NewRoot (line 41) | private static SyntaxNode NewRoot(SyntaxNode root, Diagnostic diagnost... method ChangeInvocation (line 49) | private static SyntaxNode ChangeInvocation(SyntaxNode root, Diagnostic... method ChangeBinary (line 57) | private static SyntaxNode ChangeBinary(SyntaxNode root, BinaryExpressi... method ChangeIsPattern (line 73) | private static SyntaxNode ChangeIsPattern(SyntaxNode root, IsPatternEx... method ChangeIsExpressionToNullCheck (line 93) | private static SyntaxNode ChangeIsExpressionToNullCheck(SyntaxNode roo... method NullCheck (line 100) | private static BinaryExpressionSyntax NullCheck(BinaryExpressionSyntax... method RefactoredExpression (line 103) | private static ExpressionSyntax RefactoredExpression(BinaryExpressionS... method RefactoredExpression (line 125) | private static ExpressionSyntax RefactoredExpression(InvocationExpress... method NegatedExpression (line 134) | private static ExpressionSyntax NegatedExpression(bool negationRequire... method GetIsExpression (line 139) | private static ExpressionSyntax GetIsExpression(BinaryExpressionSyntax... method AsOperatorComparisonToNull (line 142) | private static BinaryExpressionSyntax AsOperatorComparisonToNull(Binar... method TryGetTypeOfComparison (line 150) | private static bool TryGetTypeOfComparison(BinaryExpressionSyntax bina... method IsInstanceOfTypeCall (line 162) | private static InvocationExpressionSyntax IsInstanceOfTypeCall(Invocat... method ExpressionWithParensIfNeeded (line 169) | private static ExpressionSyntax ExpressionWithParensIfNeeded(Expressio... method CreateIsExpression (line 174) | private static ExpressionSyntax CreateIsExpression(ExpressionSyntax ty... method ExpressionFromGetType (line 177) | private static ExpressionSyntax ExpressionFromGetType(ExpressionSyntax... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GotoStatement.cs class GotoStatement (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/GuardConditionOnEqualsOverride.cs class GuardConditionOnEqualsOverride (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => method CheckInvocationInsideMethod (line 46) | private static void CheckInvocationInsideMethod(SonarSyntaxNodeReporti... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/ClearTextProtocolsAreSensitive.cs class ClearTextProtocolsAreSensitive (line 23) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method ClearTextProtocolsAreSensitive (line 97) | public ClearTextProtocolsAreSensitive() : this(AnalyzerConfiguration.H... method ClearTextProtocolsAreSensitive (line 99) | public ClearTextProtocolsAreSensitive(IAnalyzerConfiguration analyzerC... method ClearTextProtocolsAreSensitive (line 101) | static ClearTextProtocolsAreSensitive() method Initialize (line 119) | protected override void Initialize(SonarAnalysisContext context) => method VisitObjectCreation (line 138) | private static void VisitObjectCreation(SonarSyntaxNodeReportingContex... method VisitInvocationExpression (line 152) | private static void VisitInvocationExpression(SonarSyntaxNodeReporting... method VisitAssignments (line 161) | private static void VisitAssignments(SonarSyntaxNodeReportingContext c... method VisitStringExpressions (line 173) | private static void VisitStringExpressions(SonarSyntaxNodeReportingCon... method IsServerSafe (line 181) | private static bool IsServerSafe(IObjectCreation objectCreation, Seman... method GetUnsafeProtocol (line 185) | private static string GetUnsafeProtocol(SyntaxNode node, SemanticModel... method GetText (line 206) | private static string GetText(SyntaxNode node, SemanticModel model) method IsNamespace (line 218) | private static bool IsNamespace(SemanticModel model, SyntaxNode node) => method IsAttributeWithNamespaceParameter (line 241) | private static bool IsAttributeWithNamespaceParameter(SemanticModel mo... method TokenContainsNamespace (line 244) | private static bool TokenContainsNamespace(SyntaxToken token) => method CompileRegex (line 247) | private static Regex CompileRegex(string pattern, bool ignoreCase = tr... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/CommandPath.cs class CommandPath (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method CommandPath (line 27) | public CommandPath() : this(AnalyzerConfiguration.Hotspot) { } method CommandPath (line 29) | internal /*for testing*/ CommandPath(IAnalyzerConfiguration configurat... method FirstArgument (line 31) | protected override string FirstArgument(InvocationContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/ConfiguringLoggers.cs class ConfiguringLoggers (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method ConfiguringLoggers (line 25) | public ConfiguringLoggers() : this(AnalyzerConfiguration.Hotspot) { } method ConfiguringLoggers (line 28) | internal ConfiguringLoggers(IAnalyzerConfiguration configuration) : ba... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/CookieShouldBeHttpOnly.cs class CookieShouldBeHttpOnly (line 23) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method CookieShouldBeHttpOnly (line 39) | public CookieShouldBeHttpOnly() : this(AnalyzerConfiguration.Hotspot) { } method CookieShouldBeHttpOnly (line 41) | internal CookieShouldBeHttpOnly(IAnalyzerConfiguration analyzerConfigu... method IsDefaultConstructorSafe (line 43) | protected override bool IsDefaultConstructorSafe(SonarCompilationStart... method Initialize (line 46) | protected override void Initialize(TrackerInput input) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/CookieShouldBeSecure.cs class CookieShouldBeSecure (line 23) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method CookieShouldBeSecure (line 39) | public CookieShouldBeSecure() : this(AnalyzerConfiguration.Hotspot) { } method CookieShouldBeSecure (line 41) | internal CookieShouldBeSecure(IAnalyzerConfiguration configuration) : ... method IsDefaultConstructorSafe (line 43) | protected override bool IsDefaultConstructorSafe(SonarCompilationStart... method Initialize (line 46) | protected override void Initialize(TrackerInput input) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/CreatingHashAlgorithms.cs class CreatingHashAlgorithms (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method CreatingHashAlgorithms (line 25) | public CreatingHashAlgorithms() : this(AnalyzerConfiguration.Hotspot) { } method CreatingHashAlgorithms (line 27) | internal /*for testing*/ CreatingHashAlgorithms(IAnalyzerConfiguration... method IsUnsafeAlgorithm (line 29) | protected override bool IsUnsafeAlgorithm(SyntaxNode argumentNode, Sem... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/DeliveringDebugFeaturesInProduction.cs class DeliveringDebugFeaturesInProduction (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method DeliveringDebugFeaturesInProduction (line 25) | public DeliveringDebugFeaturesInProduction() : this(AnalyzerConfigurat... method DeliveringDebugFeaturesInProduction (line 27) | internal /*for testing*/ DeliveringDebugFeaturesInProduction(IAnalyzer... method IsDevelopmentCheckInvoked (line 30) | protected override bool IsDevelopmentCheckInvoked(SyntaxNode node, Sem... method IsInDevelopmentContext (line 35) | protected override bool IsInDevelopmentContext(SyntaxNode node) => method IsDevelopmentCheck (line 40) | private bool IsDevelopmentCheck(SyntaxNode node, SemanticModel semanti... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/DisablingCsrfProtection.cs class DisablingCsrfProtection (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method DisablingCsrfProtection (line 31) | public DisablingCsrfProtection() : base(AnalyzerConfiguration.Hotspot)... method DisablingCsrfProtection (line 33) | public DisablingCsrfProtection(IAnalyzerConfiguration configuration) :... method Initialize (line 35) | protected override void Initialize(SonarAnalysisContext context) => method CheckIgnoreAntiforgeryTokenAttribute (line 51) | private static void CheckIgnoreAntiforgeryTokenAttribute(SonarSyntaxNo... method ReportDiagnostic (line 66) | private static void ReportDiagnostic(SonarSyntaxNodeReportingContext c... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/DisablingRequestValidation.cs class DisablingRequestValidation (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method DisablingRequestValidation (line 25) | public DisablingRequestValidation() : this(AnalyzerConfiguration.Hotsp... method DisablingRequestValidation (line 27) | public DisablingRequestValidation(IAnalyzerConfiguration analyzerConfi... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/DoNotUseRandom.cs class DoNotUseRandom (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method DoNotUseRandom (line 30) | public DoNotUseRandom() : base(AnalyzerConfiguration.Hotspot) { } method DoNotUseRandom (line 32) | public DoNotUseRandom(IAnalyzerConfiguration analyzerConfiguration) : ... method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/ExecutingSqlQueries.cs class ExecutingSqlQueries (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method ExecutingSqlQueries (line 27) | public ExecutingSqlQueries() : this(AnalyzerConfiguration.Hotspot) { } method ExecutingSqlQueries (line 29) | internal /*for testing*/ ExecutingSqlQueries(IAnalyzerConfiguration co... method GetArgumentAtIndex (line 31) | protected override ExpressionSyntax GetArgumentAtIndex(InvocationConte... method GetArgumentAtIndex (line 36) | protected override ExpressionSyntax GetArgumentAtIndex(ObjectCreationC... method GetSetValue (line 39) | protected override ExpressionSyntax GetSetValue(PropertyAccessContext ... method IsTracked (line 44) | protected override bool IsTracked(ExpressionSyntax expression, SyntaxB... method IsSensitiveExpression (line 47) | protected override bool IsSensitiveExpression(ExpressionSyntax express... method SecondaryLocationForExpression (line 53) | protected override Location SecondaryLocationForExpression(ExpressionS... method IsInvocationOfInterest (line 70) | private static bool IsInvocationOfInterest(InvocationExpressionSyntax ... method IsConcatenation (line 74) | private static bool IsConcatenation(ExpressionSyntax expression, Seman... method AllConstants (line 79) | private static bool AllConstants(IEnumerable arguments... method IsConcatenationOfConstants (line 82) | private static bool IsConcatenationOfConstants(BinaryExpressionSyntax ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/ExpandingArchives.cs class ExpandingArchives (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method ExpandingArchives (line 25) | public ExpandingArchives() : this(AnalyzerConfiguration.Hotspot) { } method ExpandingArchives (line 27) | internal /*for testing*/ ExpandingArchives(IAnalyzerConfiguration conf... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/HardcodedIpAddress.cs class HardcodedIpAddress (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method HardcodedIpAddress (line 25) | public HardcodedIpAddress() : this(AnalyzerConfiguration.Hotspot) { } method HardcodedIpAddress (line 27) | public HardcodedIpAddress(IAnalyzerConfiguration analyzerConfiguration... method HasAttributes (line 29) | protected override bool HasAttributes(SyntaxNode literalExpression) => method GetAssignedVariableName (line 32) | protected override string GetAssignedVariableName(SyntaxNode stringLit... method IsVariableIdentifier (line 35) | private static bool IsVariableIdentifier(SyntaxNode syntaxNode) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/InsecureDeserialization.cs class InsecureDeserialization (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method InsecureDeserialization (line 30) | public InsecureDeserialization() : this(AnalyzerConfiguration.Hotspot)... method InsecureDeserialization (line 31) | public InsecureDeserialization(IAnalyzerConfiguration analyzerConfigur... method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) => method ReportOnInsecureDeserializations (line 51) | private static void ReportOnInsecureDeserializations(SonarSyntaxNodeRe... method OnDeserializationHasConditions (line 87) | private static bool OnDeserializationHasConditions(TypeDeclarationSynt... method IsOnDeserialization (line 94) | private static bool IsOnDeserialization(MethodDeclarationSyntax method... method HasConstructorsWithParameters (line 99) | private static bool HasConstructorsWithParameters(TypeDeclarationSynta... method HasSerializableAttribute (line 105) | private static bool HasSerializableAttribute(ISymbol symbol) => method ImplementsISerializable (line 108) | private static bool ImplementsISerializable(ITypeSymbol symbol) => method ImplementsIDeserializationCallback (line 111) | private static bool ImplementsIDeserializationCallback(ITypeSymbol sym... class ConstructorDeclarationWalker (line 118) | private sealed class ConstructorDeclarationWalker : SafeCSharpSyntaxWa... method ConstructorDeclarationWalker (line 125) | public ConstructorDeclarationWalker(SemanticModel semanticModel) method GetConstructorsInfo (line 130) | public IEnumerable GetConstructorsInfo(Func method VisitConstructorDeclaration (line 136) | public override void VisitConstructorDeclaration(ConstructorDeclarat... method VisitClassDeclaration (line 149) | public override void VisitClassDeclaration(ClassDeclarationSyntax node) method Visit (line 161) | public override void Visit(SyntaxNode node) method HasParametersUsedInConditionalConstructs (line 177) | private bool HasParametersUsedInConditionalConstructs(BaseMethodDecl... method GetDeserializationConstructor (line 187) | private ConstructorInfo GetDeserializationConstructor() => method IsDeserializationConstructor (line 190) | private bool IsDeserializationConstructor(BaseMethodDeclarationSynta... method GetConstructorParameterSymbols (line 197) | private static ImmutableArray GetConstructorParameterSymbol... class ConditionalsWalker (line 207) | private sealed class ConditionalsWalker : SafeCSharpSyntaxWalker method ConditionalsWalker (line 212) | public ConditionalsWalker(SemanticModel semanticModel, ImmutableArra... method VisitIfStatement (line 221) | public override void VisitIfStatement(IfStatementSyntax node) method VisitConditionalExpression (line 228) | public override void VisitConditionalExpression(ConditionalExpressio... method VisitSwitchStatement (line 235) | public override void VisitSwitchStatement(SwitchStatementSyntax node) method VisitBinaryExpression (line 242) | public override void VisitBinaryExpression(BinaryExpressionSyntax node) method VisitAssignmentExpression (line 252) | public override void VisitAssignmentExpression(AssignmentExpressionS... method Visit (line 262) | public override void Visit(SyntaxNode node) method UpdateParameterValidationStatus (line 287) | private void UpdateParameterValidationStatus(SyntaxNode node) => class ConstructorInfo (line 296) | private sealed class ConstructorInfo method ConstructorInfo (line 300) | public ConstructorInfo(ConstructorDeclarationSyntax declaration, method GetReportLocation (line 313) | public Location GetReportLocation() => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/PermissiveCors.cs class PermissiveCors (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method PermissiveCors (line 33) | public PermissiveCors() : base(AnalyzerConfiguration.Hotspot, Diagnost... method PermissiveCors (line 35) | public PermissiveCors(IAnalyzerConfiguration configuration) : base(con... method Initialize (line 37) | protected override void Initialize(SonarAnalysisContext context) method Initialize (line 50) | protected override void Initialize(TrackerInput input) method SetupInvocationTracker (line 56) | private static void SetupInvocationTracker(InvocationTracker express... method ContainsStar (line 136) | private static bool ContainsStar(Optional constantValue) => method ContainsStar (line 139) | private static bool ContainsStar(IObjectCreation objectCreation, Seman... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/PubliclyWritableDirectories.cs class PubliclyWritableDirectories (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method PubliclyWritableDirectories (line 25) | public PubliclyWritableDirectories() : this(AnalyzerConfiguration.Hots... method PubliclyWritableDirectories (line 27) | internal PubliclyWritableDirectories(IAnalyzerConfiguration configurat... method IsGetTempPathAssignment (line 29) | private protected override bool IsGetTempPathAssignment(InvocationExpr... method IsInsecureEnvironmentVariableRetrieval (line 34) | private protected override bool IsInsecureEnvironmentVariableRetrieval... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/RequestsWithExcessiveLength.cs class RequestsWithExcessiveLength (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method RequestsWithExcessiveLength (line 25) | public RequestsWithExcessiveLength() : this(SonarAnalyzer.Core.Common.... method RequestsWithExcessiveLength (line 27) | internal RequestsWithExcessiveLength(IAnalyzerConfiguration analyzerCo... method Initialize (line 29) | protected override void Initialize(SonarParametrizedAnalysisContext co... method IsInvalidRequestFormLimits (line 56) | protected override AttributeSyntax IsInvalidRequestFormLimits(Attribut... method IsInvalidRequestSizeLimit (line 66) | protected override AttributeSyntax IsInvalidRequestSizeLimit(Attribute... method GetMethodLocalFunctionOrClassDeclaration (line 76) | protected override SyntaxNode GetMethodLocalFunctionOrClassDeclaration... method AttributeName (line 79) | protected override string AttributeName(AttributeSyntax attribute) => method IsMultipartBodyLengthLimit (line 82) | private static bool IsMultipartBodyLengthLimit(AttributeArgumentSyntax... class StreamReadSizeCheck (line 86) | private sealed class StreamReadSizeCheck(SemanticModel model, int file... method VisitInvocationExpression (line 93) | public override void VisitInvocationExpression(InvocationExpressionS... method OpenReadStreamInvocationSize (line 115) | private static long OpenReadStreamInvocationSize(InvocationExpressio... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/SpecifyTimeoutOnRegex.cs class SpecifyTimeoutOnRegex (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method SpecifyTimeoutOnRegex (line 25) | public SpecifyTimeoutOnRegex() : this(AnalyzerConfiguration.Hotspot) { } method SpecifyTimeoutOnRegex (line 27) | internal /*for testing*/ SpecifyTimeoutOnRegex(IAnalyzerConfiguration ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/UnsafeCodeBlocks.cs class UnsafeCodeBlocks (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method UnsafeCodeBlocks (line 28) | public UnsafeCodeBlocks() : this(AnalyzerConfiguration.Hotspot) { } method UnsafeCodeBlocks (line 30) | public UnsafeCodeBlocks(IAnalyzerConfiguration configuration) : base(c... method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) method ReportIfUnsafe (line 59) | private void ReportIfUnsafe(SonarSyntaxNodeReportingContext context, S... method Report (line 67) | private void Report(SonarSyntaxNodeReportingContext context, SyntaxTok... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Hotspots/UsingNonstandardCryptography.cs class UsingNonstandardCryptography (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method UsingNonstandardCryptography (line 34) | public UsingNonstandardCryptography() : this(AnalyzerConfiguration.Hot... method UsingNonstandardCryptography (line 36) | public UsingNonstandardCryptography(IAnalyzerConfiguration analyzerCon... method DeclaredSymbol (line 38) | protected override INamedTypeSymbol DeclaredSymbol(TypeDeclarationSynt... method Location (line 41) | protected override Location Location(TypeDeclarationSyntax typeDeclara... method DerivesOrImplementsAny (line 44) | protected override bool DerivesOrImplementsAny(TypeDeclarationSyntax t... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/IdentifiersNamedExtensionShouldBeEscaped.cs class IdentifiersNamedExtensionShouldBeEscaped (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method IsExtensionToken (line 73) | private static bool IsExtensionToken(SyntaxToken token) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/IdentifiersNamedFieldShouldBeEscaped.cs class IdentifiersNamedFieldShouldBeEscaped (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method RegisterForPropertyBody (line 47) | private static void RegisterForPropertyBody(SonarCodeBlockStartAnalysi... method IsFieldToken (line 87) | private static bool IsFieldToken(SyntaxToken token) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/IfChainWithoutElse.cs class IfChainWithoutElse (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsElseIfWithoutElse (line 29) | protected override bool IsElseIfWithoutElse(IfStatementSyntax ifSyntax... method IssueLocation (line 33) | protected override Location IssueLocation(SonarSyntaxNodeReportingCont... method IsEmptyBlock (line 40) | private static bool IsEmptyBlock(ElseClauseSyntax elseClause) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/IfCollapsible.cs class IfCollapsible (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 27) | protected override void Initialize(SonarAnalysisContext context) => method ContainsDynamicReference (line 47) | private static bool ContainsDynamicReference(IfStatementSyntax ifState... method ParentIfStatement (line 50) | private static IfStatementSyntax ParentIfStatement(IfStatementSyntax i... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ImplementIDisposableCorrectly.cs class ImplementIDisposableCorrectly (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 36) | protected override void Initialize(SonarAnalysisContext context) => class DisposableChecker (line 61) | private sealed class DisposableChecker method DisposableChecker (line 70) | public DisposableChecker(BaseListSyntax baseTypes, SyntaxToken typeI... method GetIssueLocations (line 79) | public List GetIssueLocations(TypeDeclarationSynt... method AddSecondaryLocation (line 131) | private void AddSecondaryLocation(Location location, string message) => method VerifyDestructor (line 134) | private void VerifyDestructor(DestructorDeclarationSyntax destructor... method VerifyDisposeOverrideCallsBase (line 149) | private void VerifyDisposeOverrideCallsBase(MethodDeclarationSyntax ... method VerifyDispose (line 164) | private void VerifyDispose(MethodDeclarationSyntax disposeMethod, bo... method IsOrImplementsIDisposable (line 222) | private bool IsOrImplementsIDisposable(BaseTypeSyntax baseType) => method CallsSuppressFinalize (line 225) | private bool CallsSuppressFinalize(BaseMethodDeclarationSyntax metho... method CallsVirtualDispose (line 232) | private bool CallsVirtualDispose(BaseMethodDeclarationSyntax methodD... method IsDisposeBool (line 240) | private static bool IsDisposeBool(IMethodSymbol method) => method HasStatementsCount (line 247) | private static bool HasStatementsCount(BaseMethodDeclarationSyntax m... method FindMethodDeclarations (line 251) | private static IEnumerable FindMethodDeclarations(INamed... method FindMethodImplementationOrAbstractDeclaration (line 254) | private static IEnumerable FindMethodImplementationOrAbs... method HasVirtualDisposeBool (line 263) | private static bool HasVirtualDisposeBool(ITypeSymbol typeSymbol) => method IsLiteralArgument (line 270) | private static bool IsLiteralArgument(ArgumentSyntax argument, Synta... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ImplementISerializableCorrectly.cs class ImplementISerializableCorrectly (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => method CheckSerializableAttribute (line 63) | private static IEnumerable CheckSerializableAttribu... method DeclarationOrImplementation (line 72) | private static IEnumerable DeclarationOrImplementation CheckGetObjectData(TypeD... method CheckGetObjectDataAccessibility (line 103) | private static IEnumerable CheckGetObjectDataAccess... method GetSerializableFieldNames (line 115) | private static IEnumerable GetSerializableFieldNames(INamedTyp... method CheckConstructor (line 120) | private static IEnumerable CheckConstructor(TypeDec... method IsCallingBase (line 144) | private static bool IsCallingBase(IMethodSymbol methodSymbol) => method IsCallingBaseConstructor (line 152) | private static bool IsCallingBaseConstructor(IMethodSymbol constructor... method ImplementsISerializable (line 155) | private static bool ImplementsISerializable(ITypeSymbol typeSymbol) => method OptsInForSerialization (line 160) | private static bool OptsInForSerialization(INamedTypeSymbol typeSymbol... method HasSerializableAttribute (line 165) | private static bool HasSerializableAttribute(ISymbol symbol) => method IsPublicVirtual (line 168) | private static bool IsPublicVirtual(IMethodSymbol methodSymbol) => method IsExplicitImplementation (line 172) | private static bool IsExplicitImplementation(IMethodSymbol methodSymbo... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ImplementSerializationMethodsCorrectly.cs class ImplementSerializationMethodsCorrectly (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetIdentifierLocation (line 30) | protected override Location GetIdentifierLocation(IMethodSymbol method... method Initialize (line 37) | protected override void Initialize(SonarAnalysisContext context) method ReportOnAttributes (line 58) | private void ReportOnAttributes(SonarSyntaxNodeReportingContext contex... method GetSerializationAttributes (line 66) | private static IEnumerable GetSerializationAttributes... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/IndentSingleLineFollowingConditional.cs class IndentSingleLineFollowingConditional (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method CheckWhile (line 41) | private static void CheckWhile(SonarSyntaxNodeReportingContext context) method CheckDo (line 52) | private static void CheckDo(SonarSyntaxNodeReportingContext context) method CheckFor (line 62) | private static void CheckFor(SonarSyntaxNodeReportingContext context) method CheckForEach (line 73) | private static void CheckForEach(SonarSyntaxNodeReportingContext context) method CheckIf (line 84) | private static void CheckIf(SonarSyntaxNodeReportingContext context) method CheckElse (line 115) | private static void CheckElse(SonarSyntaxNodeReportingContext context) method IsStatementIndentationOk (line 125) | private static bool IsStatementIndentationOk(SyntaxNode controlNode, S... method ReportIssue (line 129) | private static void ReportIssue(SonarSyntaxNodeReportingContext contex... method GetFirstLineOfNode (line 132) | private static Location GetFirstLineOfNode(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/IndexOfCheckAgainstZero.cs class IndexOfCheckAgainstZero (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Left (line 27) | protected override SyntaxNode Left(BinaryExpressionSyntax binaryExpres... method OperatorToken (line 30) | protected override SyntaxToken OperatorToken(BinaryExpressionSyntax bi... method Right (line 33) | protected override SyntaxNode Right(BinaryExpressionSyntax binaryExpre... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/InfiniteRecursion.RoslynCfg.cs class InfiniteRecursion (line 23) | public partial class InfiniteRecursion class RoslynChecker (line 25) | private sealed class RoslynChecker : IChecker method CheckForNoExitProperty (line 27) | public void CheckForNoExitProperty(SonarSyntaxNodeReportingContext c... method CheckForNoExitIndexer (line 33) | public void CheckForNoExitIndexer(SonarSyntaxNodeReportingContext c,... method CheckForNoExitEvent (line 39) | public void CheckForNoExitEvent(SonarSyntaxNodeReportingContext c, E... method CheckForNoExitMethod (line 53) | public void CheckForNoExitMethod(SonarSyntaxNodeReportingContext c, ... method CheckForNoExit (line 63) | private static void CheckForNoExit(SonarSyntaxNodeReportingContext c, class RecursionSearcher (line 104) | private sealed class RecursionSearcher : CfgAllPathValidator method RecursionSearcher (line 109) | public RecursionSearcher(RecursionContext contex... method CheckPaths (line 116) | public void CheckPaths() method IsValid (line 124) | protected override bool IsValid(BasicBlock block) method IsInvalid (line 156) | protected override bool IsInvalid(BasicBlock block) => false; method CfgCanExit (line 158) | private bool CfgCanExit() => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/InfiniteRecursion.SonarCfg.cs class InfiniteRecursion (line 22) | public partial class InfiniteRecursion class SonarChecker (line 24) | public class SonarChecker : IChecker method CheckForNoExitProperty (line 26) | public void CheckForNoExitProperty(SonarSyntaxNodeReportingContext c... method CheckForNoExitIndexer (line 60) | public void CheckForNoExitIndexer(SonarSyntaxNodeReportingContext c,... method CheckForNoExitEvent (line 65) | public void CheckForNoExitEvent(SonarSyntaxNodeReportingContext c, E... method CheckForNoExitMethod (line 70) | public void CheckForNoExitMethod(SonarSyntaxNodeReportingContext c, ... method CheckInfiniteJumpLoop (line 80) | private static void CheckInfiniteJumpLoop(SonarSyntaxNodeReportingCo... class RecursionSearcherForMethod (line 122) | private class RecursionSearcherForMethod : RecursionSearcher method RecursionSearcherForMethod (line 124) | public RecursionSearcherForMethod(RecursionContext class RecursionSearcherForProperty (line 135) | private class RecursionSearcherForProperty : RecursionSearcher method RecursionSearcherForProperty (line 139) | public RecursionSearcherForProperty(RecursionContext method MatchesAccessor (line 151) | private bool MatchesAccessor(SyntaxNode node) class RecursionSearcher (line 159) | private abstract class RecursionSearcher : CfgAllPathValidator method HasReferenceToDeclaringSymbol (line 163) | protected abstract bool HasReferenceToDeclaringSymbol(Block block); method RecursionSearcher (line 165) | protected RecursionSearcher(RecursionContext co... method CheckPaths (line 169) | public void CheckPaths() method IsBlockValid (line 177) | protected override bool IsBlockValid(Block block) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/InfiniteRecursion.cs class InfiniteRecursion (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method InfiniteRecursion (line 31) | public InfiniteRecursion() : this(AnalyzerConfiguration.AlwaysEnabled)... method InfiniteRecursion (line 33) | internal /* for testing */ InfiniteRecursion(IAnalyzerConfiguration co... method Initialize (line 36) | protected override void Initialize(SonarAnalysisContext context) method CheckForNoExitMethod (line 95) | private void CheckForNoExitMethod(SonarSyntaxNodeReportingContext c, S... method IsInstructionOnThisAndMatchesDeclaringSymbol (line 103) | private static bool IsInstructionOnThisAndMatchesDeclaringSymbol(Synta... class RecursionContext (line 114) | private sealed class RecursionContext method RecursionContext (line 124) | public RecursionContext(SonarSyntaxNodeReportingContext analysisCont... method ReportIssue (line 137) | public void ReportIssue() => type IChecker (line 141) | private interface IChecker method CheckForNoExitProperty (line 143) | void CheckForNoExitProperty(SonarSyntaxNodeReportingContext c, Prope... method CheckForNoExitIndexer (line 145) | void CheckForNoExitIndexer(SonarSyntaxNodeReportingContext c, Indexe... method CheckForNoExitEvent (line 147) | void CheckForNoExitEvent(SonarSyntaxNodeReportingContext c, EventDec... method CheckForNoExitMethod (line 149) | void CheckForNoExitMethod(SonarSyntaxNodeReportingContext c, SyntaxN... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/InheritedCollidingInterfaceMembers.cs class InheritedCollidingInterfaceMembers (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 40) | protected override void Initialize(SonarAnalysisContext context) => method SecondaryLocations (line 66) | private static IEnumerable SecondaryLocations(List<... method GetCollidingMembers (line 82) | private static IEnumerable GetCollidingMembers(ITypeS... method IsNotEventRemoveAccessor (line 116) | private static bool IsNotEventRemoveAccessor(IMethodSymbol methodSymbo... method GetIssueMessageText (line 121) | private static string GetIssueMessageText(IEnumerable... method GetMemberDisplayName (line 136) | private static string GetMemberDisplayName(IMethodSymbol method, int s... method AreCollidingMethods (line 156) | private static bool AreCollidingMethods(IMethodSymbol methodSymbol1, I... type CollidingMember (line 181) | private sealed record CollidingMember(IMethodSymbol Member, IMethodSym... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/InitializeStaticFieldsInline.cs class InitializeStaticFieldsInline (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method HasTupleAssignmentForMultipleFields (line 61) | private static bool HasTupleAssignmentForMultipleFields(SyntaxNode[] n... method FieldSymbolsFromLeftSide (line 67) | private static IEnumerable FieldSymbolsFromLeftSide(Assignmen... method ExtractSymbols (line 73) | private static ISymbol[] ExtractSymbols(SyntaxNode node, SemanticModel... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/InsecureContentSecurityPolicy.cs class InsecureContentSecurityPolicy (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method InsecureContentSecurityPolicy (line 30) | public InsecureContentSecurityPolicy() : base(AnalyzerConfiguration.Al... method InsecureContentSecurityPolicy (line 32) | public InsecureContentSecurityPolicy(IAnalyzerConfiguration configurat... method Initialize (line 34) | protected override void Initialize(TrackerInput input) method IsInsecureValue (line 59) | private static bool IsInsecureValue(SyntaxNode argumentNode, SemanticM... method IsInsecureContentSecurityPolicyValue (line 62) | private static bool IsInsecureContentSecurityPolicyValue(SyntaxNode no... method IsInsecureContentSecurityPolicyValue (line 71) | private static bool IsInsecureContentSecurityPolicyValue(string value) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/InsecureEncryptionAlgorithm.cs class InsecureEncryptionAlgorithm (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method ArgumentList (line 27) | protected override ArgumentListSyntax ArgumentList(InvocationExpressio... method Arguments (line 30) | protected override SeparatedSyntaxList Arguments(Argum... method IsStringLiteralArgument (line 33) | protected override bool IsStringLiteralArgument(ArgumentSyntax argumen... method Expression (line 36) | protected override SyntaxNode Expression(ArgumentSyntax argument) => method Location (line 39) | protected override Location Location(SyntaxNode objectCreation) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/InsecureTemporaryFilesCreation.cs class InsecureTemporaryFilesCreation (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/InsteadOfAny.cs class InsteadOfAny (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsSimpleEqualityCheck (line 25) | protected override bool IsSimpleEqualityCheck(InvocationExpressionSynt... method HasValidBinaryOperands (line 37) | private bool HasValidBinaryOperands(string lambdaVariableName, SyntaxN... method IsNullOrValueTypeOrString (line 41) | private static bool IsNullOrValueTypeOrString(SyntaxNode node, Semanti... method AreValidOperands (line 44) | protected override bool AreValidOperands(string lambdaVariable, Syntax... method GetArgumentExpression (line 53) | protected override SyntaxNode GetArgumentExpression(InvocationExpressi... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/InterfaceMethodsShouldBeCallableByChildTypes.cs class InterfaceMethodsShouldBeCallableByChildTypes (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method ReportOnIssue (line 46) | private static void ReportOnIssue(SonarSyntaxNodeReport... method IsDeclarationTracked (line 79) | private static bool IsDeclarationTracked(BaseTypeDeclarationSyntax dec... method AreMethodsEquivalent (line 87) | private static bool AreMethodsEquivalent(MethodDeclarationSyntax curre... method ArePropertiesEquivalent (line 93) | private static bool ArePropertiesEquivalent(PropertyDeclarationSyntax ... method AreEventsEquivalent (line 98) | private static bool AreEventsEquivalent(EventDeclarationSyntax current... method IsPublicOrProtected (line 103) | private static bool IsPublicOrProtected(SyntaxToken modifier) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/InterfacesShouldNotBeEmpty.cs class InterfacesShouldNotBeEmpty (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) => method IsAggregatingOtherInterfaces (line 51) | private static bool IsAggregatingOtherInterfaces(ITypeSymbol interface... method IsSpecializedGeneric (line 54) | private static bool IsSpecializedGeneric(INamedTypeSymbol interfaceSym... method IsConstraintGeneric (line 57) | private static bool IsConstraintGeneric(INamedTypeSymbol interfaceSymb... method IsBoundGeneric (line 60) | private static bool IsBoundGeneric(INamedTypeSymbol interfaceSymbol) => method HasEnhancingAttribute (line 63) | private static bool HasEnhancingAttribute(INamedTypeSymbol interfaceSy... method IsImplementingInterface (line 68) | private static bool IsImplementingInterface(INamedTypeSymbol interface... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/InvalidCastToInterface.cs class InvalidCastToInterface (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/InvocationResolvesToOverrideWithParams.cs class InvocationResolvesToOverrideWithParams (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) => method CheckCall (line 41) | private static void CheckCall(SonarSyntaxNodeReportingContext context,... method ArgumentTypes (line 60) | private static ITypeSymbol[] ArgumentTypes(SonarSyntaxNodeReportingCon... method OtherOverloadsOf (line 66) | private static IEnumerable OtherOverloadsOf(IMethodSymb... method IsInvocationWithExplicitArray (line 72) | private static bool IsInvocationWithExplicitArray(ArgumentListSyntax a... method ArgumentsMatchParameters (line 85) | private static bool ArgumentsMatchParameters(ArgumentListSyntax argume... method MethodAccessibleWithinType (line 99) | private static bool MethodAccessibleWithinType(IMethodSymbol method, I... method IsInTypeOrNested (line 113) | private static bool IsInTypeOrNested(IMethodSymbol method, ITypeSymbol... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/IssueSuppression.cs class IssueSuppression (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method CheckTrivias (line 66) | private static void CheckTrivias(SonarSyntaxTreeReportingContext c, Sy... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/JSInvokableMethodsShouldBePublic.cs class JSInvokableMethodsShouldBePublic (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method CheckMethod (line 39) | private static void CheckMethod(SonarSyntaxNodeReportingContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/JwtSigned.cs class JwtSigned (line 23) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method JwtSigned (line 28) | public JwtSigned() : base(AnalyzerConfiguration.AlwaysEnabled) { } method CreateBuilderPatternCondition (line 30) | protected override BuilderPatternCondition FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/LineLength.cs class LineLength (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/LinkedListPropertiesInsteadOfMethods.cs class LinkedListPropertiesInsteadOfMethods (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsRelevantCallAndType (line 25) | protected override bool IsRelevantCallAndType(InvocationExpressionSynt... method IsCorrectType (line 31) | private static bool IsCorrectType(SyntaxNode left, SemanticModel model... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/LinkedListPropertiesInsteadOfMethodsCodeFix.cs class LinkedListPropertiesInsteadOfMethodsCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 28) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/LiteralSuffixUpperCase.cs class LiteralSuffixUpperCase (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => method ShouldIgnore (line 47) | private static bool ShouldIgnore(string text) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/LiteralSuffixUpperCaseCodeFix.cs class LiteralSuffixUpperCaseCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 34) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/LiteralsShouldNotBePassedAsLocalizedParameters.cs class LiteralsShouldNotBePassedAsLocalizedParameters (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 37) | protected override void Initialize(SonarAnalysisContext context) method AnalyzeInvocations (line 43) | private static void AnalyzeInvocations(SonarSyntaxNodeReportingContext... method AnalyzeAssignments (line 79) | private static void AnalyzeAssignments(SonarSyntaxNodeReportingContext... method IsStringLiteral (line 99) | private static bool IsStringLiteral(SyntaxNode expression, SemanticMod... method IsLocalizable (line 102) | private static bool IsLocalizable(ISymbol symbol) => method IsLocalizable (line 107) | private static bool IsLocalizable(string symbolName, IReadOnlyCollecti... method IsLocalizableStringLiteral (line 112) | private static bool IsLocalizableStringLiteral(ISymbol symbol, Argumen... method HasConstructorWitValue (line 118) | private static bool HasConstructorWitValue(AttributeData attribute, bo... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/LockedFieldShouldBeReadonly.cs class LockedFieldShouldBeReadonly (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => method CheckLockStatement (line 35) | private static void CheckLockStatement(SonarSyntaxNodeReportingContext... method IsCreation (line 60) | private static bool IsCreation(ExpressionSyntax expression) => method IsOfTypeString (line 68) | private static bool IsOfTypeString(ExpressionSyntax expression, Lazy method InvalidFields (line 73) | private static IEnumerable InvalidFields(BaseFieldDeclara... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/LoggerMembersNamesShouldComply.cs class LoggerMembersNamesShouldComply (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 73) | protected override void Initialize(SonarParametrizedAnalysisContext co... method MatchesFormat (line 97) | private bool MatchesFormat(string name) => method Declarations (line 102) | private static IEnumerable Declarations(SyntaxNode node) type MemberData (line 118) | private readonly record struct MemberData(SyntaxNode Member, Location ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/LoggersShouldBeNamedForEnclosingType.cs class LoggersShouldBeNamedForEnclosingType (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 45) | protected override void Initialize(SonarAnalysisContext context) => method Process (line 54) | private static void Process(SonarSyntaxNodeReportingContext context) method EnclosingTypeNode (line 69) | private static SyntaxNode EnclosingTypeNode(InvocationExpressionSyntax... method ExtractArgument (line 77) | private static SyntaxNode ExtractArgument(InvocationExpressionSyntax i... method IsValidMethod (line 100) | private static bool IsValidMethod(IMethodSymbol method) method MatchesEnclosingType (line 119) | private static bool MatchesEnclosingType(SyntaxNode argument, SyntaxNo... method EnclosingTypeSymbol (line 126) | private static ITypeSymbol EnclosingTypeSymbol(SemanticModel model, Sy... method ExtractGeneric (line 129) | private static SyntaxNode ExtractGeneric(InvocationExpressionSyntax in... method ExtractTypeOfName (line 143) | private static SyntaxNode ExtractTypeOfName(MemberAccessExpressionSynt... method ExtractNameOf (line 149) | private static SyntaxNode ExtractNameOf(InvocationExpressionSyntax inv... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/LoggingArgumentsShouldBePassedCorrectly.cs class LoggingArgumentsShouldBePassedCorrectly (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 42) | protected override void Initialize(SonarAnalysisContext context) => method CheckInvalidParams (line 71) | private static void CheckInvalidParams(InvocationExpressionSyntax invo... method CheckInvalidTypeParams (line 90) | private static void CheckInvalidTypeParams(InvocationExpressionSyntax ... method IsNLogIgnoredOverload (line 101) | private static bool IsNLogIgnoredOverload(IMethodSymbol methodSymbol) => method MatchesParams (line 110) | private static bool MatchesParams(IMethodSymbol methodSymbol, params K... method InvalidArguments (line 114) | private static IEnumerable InvalidArguments(Invocation... method IsInvalidArgument (line 119) | private static bool IsInvalidArgument(ArgumentSyntax argumentSyntax, S... method Filter (line 126) | private static ImmutableArray Filter(IMethodSymbol methodSy... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/LoopsAndLinq.cs class LoopsAndLinq (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) => method IsInPerformanceSensitiveContext (line 55) | private static bool IsInPerformanceSensitiveContext(ForEachStatementSy... method CanBeSimplifiedUsingWhere (line 60) | private static bool CanBeSimplifiedUsingWhere(SyntaxNode statement, So... method ContainsRefStructReference (line 78) | private static bool ContainsRefStructReference(IfStatementSyntax ifSta... method RequiresNullableConversion (line 83) | private static bool RequiresNullableConversion(SyntaxNode returnOrAssi... method SingleReturnOrBreakingAssignment (line 98) | private static SyntaxNode SingleReturnOrBreakingAssignment(IfStatement... method IfStatement (line 116) | private static IfStatementSyntax IfStatement(SyntaxNode node) => method CanIfStatementBeMoved (line 124) | private static bool CanIfStatementBeMoved(IfStatementSyntax ifStatemen... method IsValidCondition (line 127) | private static bool IsValidCondition(ExpressionSyntax condition) => method IsValidBinaryExpression (line 139) | private static bool IsValidBinaryExpression(BinaryExpressionSyntax exp... method IsValidInvocation (line 142) | private static bool IsValidInvocation(InvocationExpressionSyntax invoc... method IsValidIsPattern (line 147) | private static bool IsValidIsPattern(SyntaxNode isPattern) => method CheckIfCanBeSimplifiedUsingSelect (line 162) | private static void CheckIfCanBeSimplifiedUsingSelect(SonarSyntaxNodeR... method IsOrImplementsIEnumerable (line 205) | private static bool IsOrImplementsIEnumerable(SemanticModel model, For... class UsageStats (line 212) | private sealed class UsageStats FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/LooseFilePermissions.cs class LooseFilePermissions (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method VisitInvocations (line 25) | protected override void VisitInvocations(SonarSyntaxNodeReportingConte... method ObjectCreation (line 37) | private static IObjectCreation ObjectCreation(InvocationExpressionSynt... method IsFileSystemAccessRuleForEveryoneWithAllow (line 57) | private static bool IsFileSystemAccessRuleForEveryoneWithAllow(IObject... method IsEveryone (line 63) | private static bool IsEveryone(SyntaxNode node, SemanticModel model) => method IsNTAccountWithEveryone (line 67) | private static bool IsNTAccountWithEveryone(IObjectCreation objectCrea... method IsSecurityIdentifierWithEveryone (line 72) | private static bool IsSecurityIdentifierWithEveryone(IObjectCreation o... method FilterObjectCreations (line 77) | private static IEnumerable FilterObjectCreations(IEnu... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/LossOfFractionInDivision.cs class LossOfFractionInDivision (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method DivisionIsInReturnAndTypeIsNonIntegral (line 51) | private static bool DivisionIsInReturnAndTypeIsNonIntegral(SyntaxNode ... method DivisionIsArgumentAndTypeIsNonIntegral (line 64) | private static bool DivisionIsArgumentAndTypeIsNonIntegral(SyntaxNode ... method DivisionIsInAssignmentAndTypeIsNonIntegral (line 89) | private static bool DivisionIsInAssignmentAndTypeIsNonIntegral(SyntaxN... method DivisionIsInTupleTypeIsNonIntegral (line 110) | private static bool DivisionIsInTupleTypeIsNonIntegral(SyntaxNode divi... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MagicNumberShouldNotBeUsed.cs class MagicNumberShouldNotBeUsed (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 43) | protected override void Initialize(SonarAnalysisContext context) => method IsExceptionToTheRule (line 56) | private static bool IsExceptionToTheRule(LiteralExpressionSyntax liter... method IsInsideProperty (line 70) | private static bool IsInsideProperty(SyntaxNode node) method IsSingleDigitInToleratedComparisons (line 80) | private static bool IsSingleDigitInToleratedComparisons(LiteralExpress... method IsToleratedArgument (line 86) | private static bool IsToleratedArgument(LiteralExpressionSyntax litera... method IsToleratedMethodArgument (line 91) | private static bool IsToleratedMethodArgument(LiteralExpressionSyntax ... method LooksLikeTimeApi (line 95) | private static bool LooksLikeTimeApi(SyntaxNode node) => method IsSingleOrNamedAttributeArgument (line 100) | private static bool IsSingleOrNamedAttributeArgument(LiteralExpression... method IsSingleDigit (line 106) | private static bool IsSingleDigit(string text) => byte.TryParse(text, ... method IsComparingCollectionSize (line 109) | private static bool IsComparingCollectionSize(BinaryExpressionSyntax b... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MarkAssemblyWithAssemblyVersionAttribute.cs class MarkAssemblyWithAssemblyVersionAttribute (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MarkAssemblyWithClsCompliantAttribute.cs class MarkAssemblyWithClsCompliantAttribute (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MarkAssemblyWithComVisibleAttribute.cs class MarkAssemblyWithComVisibleAttribute (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MarkAssemblyWithNeutralResourcesLanguageAttribute.cs class MarkAssemblyWithNeutralResourcesLanguageAttribute (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method IsDesignerFile (line 47) | private static bool IsDesignerFile(SyntaxTree tree) => method HasGeneratedCodeAttributeWithStronglyTypedResourceBuilderValue (line 50) | private static bool HasGeneratedCodeAttributeWithStronglyTypedResource... method IsResxGeneratedFile (line 57) | private static bool IsResxGeneratedFile(SemanticModel semanticModel, C... method HasNeutralResourcesLanguageAttribute (line 60) | private static bool HasNeutralResourcesLanguageAttribute(IAssemblySymb... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MarkWindowsFormsMainWithStaThread.cs class MarkWindowsFormsMainWithStaThread (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetLocation (line 29) | protected override Location GetLocation(MethodDeclarationSyntax method... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MemberInitializedToDefault.cs class MemberInitializedToDefault (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) method CheckAutoProperty (line 40) | private static void CheckAutoProperty(SonarSyntaxNodeReportingContext ... method CheckEvent (line 59) | private static void CheckEvent(SonarSyntaxNodeReportingContext context) method CheckField (line 78) | private static void CheckField(SonarSyntaxNodeReportingContext context) method IsDefaultValueInitializer (line 92) | internal static bool IsDefaultValueInitializer(EqualsValueClauseSyntax... method IsDefaultExpressionInitializer (line 97) | private static bool IsDefaultExpressionInitializer(EqualsValueClauseSy... method IsReferenceTypeNullInitializer (line 100) | private static bool IsReferenceTypeNullInitializer(EqualsValueClauseSy... method IsValueTypeDefaultValueInitializer (line 104) | private static bool IsValueTypeDefaultValueInitializer(EqualsValueClau... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MemberInitializedToDefaultCodeFix.cs class MemberInitializedToDefaultCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 30) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MemberInitializerRedundant.RoslynCfg.cs class MemberInitializerRedundant (line 22) | public sealed partial class MemberInitializerRedundant class RoslynChecker (line 24) | private class RoslynChecker : CfgAllPathValidator method RoslynChecker (line 30) | public RoslynChecker(ControlFlowGraph cfg, ISymbol memberToCheck, Ca... method IsValid (line 38) | protected override bool IsValid(BasicBlock block) => method IsInvalid (line 42) | protected override bool IsInvalid(BasicBlock block) => method ProcessBlock (line 45) | private bool ProcessBlock(BasicBlock block, ControlFlowGraph control... method IsReadOrWrite (line 66) | private bool IsReadOrWrite(IOperationWrapperSonar child, bool checkR... method MemberSymbol (line 78) | private static ISymbol MemberSymbol(IOperation operation) => method InstanceReferencesThis (line 90) | private static bool InstanceReferencesThis(IOperation instance) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MemberInitializerRedundant.SonarCfg.cs class MemberInitializerRedundant (line 22) | public sealed partial class MemberInitializerRedundant class SonarChecker (line 24) | private class SonarChecker : CfgAllPathValidator method SonarChecker (line 28) | public SonarChecker(IControlFlowGraph cfg, ISymbol memberToCheck, Se... method IsBlockValid (line 32) | protected override bool IsBlockValid(Block block) method IsBlockInvalid (line 64) | protected override bool IsBlockInvalid(Block block) class RedundancyChecker (line 106) | private class RedundancyChecker method RedundancyChecker (line 111) | public RedundancyChecker(ISymbol memberToCheck, SemanticModel sema... method IsMemberUsedInsideLambda (line 117) | public bool IsMemberUsedInsideLambda(SyntaxNode instruction) => method IsMatchingMember (line 123) | public bool IsMatchingMember(ExpressionSyntax expression) method PossibleMemberAccessParent (line 150) | public static ExpressionSyntax PossibleMemberAccessParent(SyntaxNo... method PossibleMemberAccessParent (line 155) | private static ExpressionSyntax PossibleMemberAccessParent(Identif... method TryGetReadWriteFromMemberAccess (line 170) | public bool TryGetReadWriteFromMemberAccess(ExpressionSyntax expre... method IsBeingAssigned (line 196) | private static bool IsBeingAssigned(ExpressionSyntax expression) => method IsOutArgument (line 201) | private static bool IsOutArgument(ExpressionSyntax parenthesized) => method IsReadAccess (line 205) | private static bool IsReadAccess(ExpressionSyntax parenthesized, S... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MemberInitializerRedundant.cs class MemberInitializerRedundant (line 24) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method MemberInitializerRedundant (line 37) | public MemberInitializerRedundant() : this(AnalyzerConfiguration.Alway... method MemberInitializerRedundant (line 39) | internal MemberInitializerRedundant(IAnalyzerConfiguration configurati... method Initialize (line 42) | protected override void Initialize(SonarAnalysisContext context) => method CheckInstanceMembers (line 64) | private void CheckInstanceMembers(SonarSyntaxNodeReportingContext c, T... method CheckStaticMembers (line 96) | private void CheckStaticMembers(SonarSyntaxNodeReportingContext c, Typ... method IsSymbolFirstSetInCfg (line 127) | private bool IsSymbolFirstSetInCfg(ISymbol classMember, BaseMethodDecl... method IsNotStaticOrConst (line 150) | private static bool IsNotStaticOrConst(SyntaxTokenList tokenList) => method IsStatic (line 153) | private static bool IsStatic(SyntaxTokenList tokenList) => method InitializedMembers (line 157) | private static Dictionary Initialize... method ConstructorDeclarations (line 171) | private static List> Constr... method InitializedPropertyDeclarations (line 183) | private static IEnumerable> Initiali... method InitializedFieldLikeDeclarations (line 192) | private static IEnumerable> InitializedField... class DeclarationTuple (line 206) | private sealed class DeclarationTuple method DeclarationTuple (line 212) | public DeclarationTuple(EqualsValueClauseSyntax initializer, TSymbol... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MemberOverrideCallsBaseMember.cs class MemberOverrideCallsBaseMember (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) method IsPropertyCandidate (line 58) | private static bool IsPropertyCandidate(PropertyDeclarationSyntax prop... method CheckGetAccessorIfAny (line 81) | private static bool CheckGetAccessorIfAny(PropertyDeclarationSyntax pr... method IsBaseProperty (line 99) | private static bool IsBaseProperty(IPropertySymbol propertySymbol, Sem... method CheckSetAccessorIfAny (line 103) | private static bool CheckSetAccessorIfAny(PropertyDeclarationSyntax pr... method IsMethodCandidate (line 122) | private static bool IsMethodCandidate(MethodDeclarationSyntax methodSy... method IsMethodSymbolExcluded (line 145) | private static bool IsMethodSymbolExcluded(IMethodSymbol methodSymbol) => method IsRecordCompilerGenerated (line 156) | private static bool IsRecordCompilerGenerated(IMethodSymbol methodSymb... method HasDocumentationComment (line 161) | private static bool HasDocumentationComment(SyntaxNode node) => method AreArgumentsMatchParameters (line 165) | private static bool AreArgumentsMatchParameters(IMethodSymbol methodSy... method GetSingleStatementExpression (line 192) | private static ExpressionSyntax GetSingleStatementExpression(BlockSynt... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MemberOverrideCallsBaseMemberCodeFix.cs class MemberOverrideCallsBaseMemberCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 27) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MemberShadowsOuterStaticMember.cs class MemberShadowsOuterStaticMember (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method CheckNamedType (line 66) | private static void CheckNamedType(SonarSymbolReportingContext context... method CheckMember (line 77) | private static void CheckMember(SonarSymbolReportingContext context, I... method SelfAndOuterNamedTypes (line 86) | private static IReadOnlyList SelfAndOuterNamedTypes(... method IsValidType (line 98) | private static bool IsValidType(INamedTypeSymbol symbol) method IsStaticAndVirtualOrAbstract (line 101) | private static bool IsStaticAndVirtualOrAbstract(ISymbol symbol) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MemberShouldBeStatic.cs class MemberShouldBeStatic (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 53) | protected override void Initialize(SonarAnalysisContext context) method PropertyDescendants (line 64) | private static IEnumerable PropertyDescendants(PropertyDec... method MethodDescendants (line 69) | private static IEnumerable MethodDescendants(MethodDeclara... method CheckIssue (line 74) | private static void CheckIssue(SonarSyntaxNodeRepo... method IsIgnoredAttribute (line 123) | private static bool IsIgnoredAttribute(AttributeData attribute) => method IsEmptyMethod (line 126) | private static bool IsEmptyMethod(MemberDeclarationSyntax node) => method IsNewMethod (line 129) | private static bool IsNewMethod(ISymbol symbol) => method IsNewProperty (line 135) | private static bool IsNewProperty(ISymbol symbol) => method IsAutoProperty (line 141) | private static bool IsAutoProperty(ISymbol symbol) => method IsPublicControllerMethod (line 147) | private static bool IsPublicControllerMethod(ISymbol symbol) => method IsWindowsDesktopEventHandler (line 152) | private static bool IsWindowsDesktopEventHandler(ISymbol symbol) => method IsContainingTypeWindowsForm (line 159) | private static bool IsContainingTypeWindowsForm(IMethodSymbol methodSy... method IsContainingTypeWpf (line 162) | private static bool IsContainingTypeWpf(IMethodSymbol methodSymbol) => method HasInstanceReferences (line 165) | private static bool HasInstanceReferences(IEnumerable node... method IsLeftmostIdentifierName (line 171) | private static bool IsLeftmostIdentifierName(ExpressionSyntax node) method IsInstanceMember (line 191) | private static bool IsInstanceMember(ExpressionSyntax node, SemanticMo... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MemberShouldNotHaveConflictingTransparencyAttributes.cs class MemberShouldNotHaveConflictingTransparencyAttributes (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => method CollectSecurityAttributes (line 43) | private static void CollectSecurityAttributes(SonarSyntaxNodeReporting... method ReportOnConflictingTransparencyAttributes (line 67) | private static void ReportOnConflictingTransparencyAttributes(SonarCom... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MessageTemplates/IMessageTemplateCheck.cs type IMessageTemplateCheck (line 22) | public interface IMessageTemplateCheck method Execute (line 26) | void Execute(SonarSyntaxNodeReportingContext context, InvocationExpres... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MessageTemplates/LoggingTemplatePlaceHoldersShouldBeInOrder.cs class LoggingTemplatePlaceHoldersShouldBeInOrder (line 23) | public sealed class LoggingTemplatePlaceHoldersShouldBeInOrder : IMessag... method Execute (line 33) | public void Execute(SonarSyntaxNodeReportingContext context, Invocatio... method SecondaryLocations (line 53) | private static IEnumerable SecondaryLocations(Synta... method BetterFitName (line 56) | private static string BetterFitName(SyntaxNode node) => method PlaceholderValues (line 59) | private static IEnumerable PlaceholderValues(InvocationExp... method OutOfOrderPlaceholderValue (line 82) | private static SyntaxNode OutOfOrderPlaceholderValue( method MatchesName (line 107) | private static bool? MatchesName(string placeholderName, SyntaxNode pl... method SimpleStringMatches (line 116) | private static bool SimpleStringMatches(string placeholderName, string... method SplitByCamelCase (line 130) | private static IEnumerable SplitByCamelCase(string text) method OnlyLetters (line 151) | private static string OnlyLetters(string text) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MessageTemplates/MessageTemplateAnalyzer.cs class MessageTemplateAnalyzer (line 23) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 41) | protected override void Initialize(SonarAnalysisContext context) => method HasValidExpression (line 73) | private static bool HasValidExpression(ArgumentSyntax argument) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MessageTemplates/MessageTemplateExtractor.cs class MessageTemplateExtractor (line 22) | internal static class MessageTemplateExtractor method TemplateArgument (line 24) | public static ArgumentSyntax TemplateArgument(InvocationExpressionSynt... method TemplateArgument (line 32) | private static ArgumentSyntax TemplateArgument(InvocationExpressionSyn... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MessageTemplates/MessageTemplatesShouldBeCorrect.cs class MessageTemplatesShouldBeCorrect (line 24) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) => class TemplateValidator (line 58) | private static class TemplateValidator method ContainsErrors (line 71) | public static bool ContainsErrors(string template, out List method ReportIssue (line 50) | private static void ReportIssue(SonarSymbolReportingContext c, Paramet... method GetParameterHidingInfo (line 73) | private static List GetParameterHidingInfo(... method MethodsUsingSameParameterNames (line 90) | private static bool MethodsUsingSameParameterNames(ParameterHidingMeth... method IsMoreParameterAvailableInConflicting (line 103) | private static bool IsMoreParameterAvailableInConflicting(ParameterHid... method IsMethodHidingOriginal (line 106) | private static bool IsMethodHidingOriginal(IMethodSymbol candidateHidi... method AreTypesEqual (line 112) | private static bool AreTypesEqual(ITypeSymbol t1, ITypeSymbol t2) => method AreGenericInstancesTypesEqual (line 117) | private static bool AreGenericInstancesTypesEqual(ITypeSymbol t1, ITyp... method ShouldSkip (line 130) | private static bool ShouldSkip(IMethodSymbol methodSymbol) => class ParameterHidingMethodInfo (line 135) | private sealed class ParameterHidingMethodInfo FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodOverloadsShouldBeGrouped.cs class MethodOverloadsShouldBeGrouped (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method CreateMemberInfo (line 35) | protected override MemberInfo CreateMemberInfo(SonarSyntaxNodeReportin... method MemberDeclarations (line 44) | protected override IEnumerable MemberDeclarat... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodOverrideAddsParams.cs class MethodOverrideAddsParams (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method IsNotSemanticallyParams (line 58) | private static bool IsNotSemanticallyParams(ParameterSyntax parameter,... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodOverrideAddsParamsCodeFix.cs class MethodOverrideAddsParamsCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 28) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodOverrideChangedDefaultValue.cs class MethodOverrideChangedDefaultValue (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 35) | protected override void Initialize(SonarAnalysisContext context) method ReportParameterIfNeeded (line 63) | private static void ReportParameterIfNeeded(SonarSyntaxNodeReportingCo... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodOverrideChangedDefaultValueCodeFix.cs class MethodOverrideChangedDefaultValueCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 31) | protected override async Task RegisterCodeFixesAsync(SyntaxNode root, ... method RegisterCodeFix (line 79) | private static void RegisterCodeFix(SonarCodeFixContext context, Synta... method TryGetNewParameterSyntax (line 91) | private static bool TryGetNewParameterSyntax(ParameterSyntax parameter... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodOverrideNoParams.cs class MethodOverrideNoParams (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodOverrideNoParamsCodeFix.cs class MethodOverrideNoParamsCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 26) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodParameterMissingOptional.cs class MethodParameterMissingOptional (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodParameterMissingOptionalCodeFix.cs class MethodParameterMissingOptionalCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 29) | protected override async Task RegisterCodeFixesAsync(SyntaxNode root, ... method GetNewAttributeList (line 58) | private static AttributeListSyntax GetNewAttributeList(AttributeListSy... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodParameterUnused.cs class MethodParameterUnused (line 25) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method MethodParameterUnused (line 38) | public MethodParameterUnused() : this(AnalyzerConfiguration.AlwaysEnab... method MethodParameterUnused (line 40) | internal /* for testing */ MethodParameterUnused(IAnalyzerConfiguratio... method Initialize (line 43) | protected override void Initialize(SonarAnalysisContext context) => method CreateContext (line 64) | private static MethodContext CreateContext(SonarSyntaxNodeReportingCon... method OnlyThrowsNotImplementedException (line 80) | private static bool OnlyThrowsNotImplementedException(MethodContext de... method ReportUnusedParametersOnMethod (line 107) | private void ReportUnusedParametersOnMethod(MethodContext declaration) method ReportOnDeadParametersAtEntry (line 125) | private void ReportOnDeadParametersAtEntry(MethodContext declaration, ... method ComputeLva (line 146) | private LvaResult ComputeLva(MethodContext declaration) method ReportOnUnusedParameters (line 162) | private static void ReportOnUnusedParameters(MethodContext declaration... method MethodCanBeSafelyChanged (line 183) | private static bool MethodCanBeSafelyChanged(IMethodSymbol methodSymbo... method GetUnusedParameters (line 189) | private static IImmutableList GetUnusedParameters(Me... method GetUsedParameters (line 210) | private static ISet GetUsedParameters(ImmutableArray... method IsUsedAsEventHandlerFunctionOrAction (line 217) | private static bool IsUsedAsEventHandlerFunctionOrAction(MethodContext... method IsMethodUsedAsEventHandlerFunctionOrActionWithinNode (line 221) | private static bool IsMethodUsedAsEventHandlerFunctionOrActionWithinNo... method IsMethodUsedAsEventHandlerFunctionOrActionInExpression (line 226) | private static bool IsMethodUsedAsEventHandlerFunctionOrActionInExpres... method IsStandaloneExpression (line 232) | private static bool IsStandaloneExpression(ExpressionSyntax expression) method IsCandidateSerializableConstructor (line 240) | private static bool IsCandidateSerializableConstructor(IImmutableList<... class MethodContext (line 250) | private sealed class MethodContext method MethodContext (line 259) | public MethodContext(SonarSyntaxNodeReportingContext context, BaseMe... method MethodContext (line 262) | public MethodContext(SonarSyntaxNodeReportingContext context, LocalF... method MethodContext (line 265) | public MethodContext(SonarSyntaxNodeReportingContext context, Syntax... class LvaResult (line 276) | private sealed class LvaResult method LvaResult (line 281) | public LvaResult(MethodContext declaration, IControlFlowGraph cfg) method LvaResult (line 288) | public LvaResult(ControlFlowGraph cfg, CancellationToken cancel) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodParameterUnusedCodeFix.cs class MethodParameterUnusedCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 27) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodShouldBeNamedAccordingToSynchronicity.cs class MethodShouldBeNamedAccordingToSynchronicity (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 42) | protected override void Initialize(SonarAnalysisContext context) => method HasAsyncReturnType (line 78) | private static bool HasAsyncReturnType(IMethodSymbol methodSymbol) => method IsAsyncType (line 85) | private static bool IsAsyncType(ITypeSymbol typeSymbol) => method HasAsyncSuffix (line 90) | private static bool HasAsyncSuffix(MethodDeclarationSyntax methodDecla... method IsSignalRHubMethod (line 93) | private static bool IsSignalRHubMethod(ISymbol methodSymbol) => method IsSignalRHubMethod (line 97) | private static bool IsSignalRHubMethod(ITypeSymbol typeSymbol) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodShouldNotOnlyReturnConstant.cs class MethodShouldNotOnlyReturnConstant (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method IsVirtual (line 49) | private static bool IsVirtual(BaseMethodDeclarationSyntax methodDeclar... method SingleExpressionOrDefault (line 52) | private static ExpressionSyntax SingleExpressionOrDefault(MethodDeclar... method IsConstantExpression (line 60) | private static bool IsConstantExpression(ExpressionSyntax expression, ... method ContainsConditionalCompilation (line 65) | private static bool ContainsConditionalCompilation(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodsShouldNotHaveIdenticalImplementations.cs class MethodsShouldNotHaveIdenticalImplementations (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetMethodDeclarations (line 35) | protected override IEnumerable GetMethodDeclaratio... method AreDuplicates (line 40) | protected override bool AreDuplicates(SemanticModel model, IMethodDecl... method GetMethodIdentifier (line 48) | protected override SyntaxToken GetMethodIdentifier(IMethodDeclaration ... method IsExcludedFromBeingExamined (line 51) | protected override bool IsExcludedFromBeingExamined(SonarSyntaxNodeRep... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodsShouldNotHaveTooManyLines.cs class MethodsShouldNotHaveTooManyLines (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 43) | protected override void Initialize(SonarParametrizedAnalysisContext co... method GetMethodTokens (line 65) | protected override IEnumerable GetMethodTokens(BaseMethod... method GetMethodIdentifierToken (line 70) | protected override SyntaxToken? GetMethodIdentifierToken(BaseMethodDec... method GetMethodKindAndName (line 73) | protected override string GetMethodKindAndName(SyntaxToken identifierT... method GetMethodTokens (line 100) | private static IEnumerable GetMethodTokens(LocalFunctionS... method CountLines (line 105) | private static long CountLines(LocalFunctionStatementSyntaxWrapper wra... method IsStaticLocalFunction (line 110) | private static bool IsStaticLocalFunction(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MethodsShouldUseBaseTypes.cs class MethodsShouldUseBaseTypes (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) => method FindViolations (line 34) | private static List FindViolations(BaseMethodDeclarationSy... method IsNestedGeneric (line 88) | private static bool IsNestedGeneric(ISymbol symbol) => method IsTrackedParameter (line 92) | private static bool IsTrackedParameter(IParameterSymbol parameterSymbol) method GetFirstNonParenthesizedParent (line 101) | private static SyntaxNode GetFirstNonParenthesizedParent(SyntaxNode no... method FindParameterUseAsType (line 104) | private static ITypeSymbol FindParameterUseAsType(SyntaxNode identifie... method HandleConditionalAccess (line 121) | private static ITypeSymbol HandleConditionalAccess(ConditionalAccessEx... method HandlePropertyOrField (line 136) | private static ITypeSymbol HandlePropertyOrField(SyntaxNode identifier... method HandleInvocation (line 153) | private static ITypeSymbol HandleInvocation(SyntaxNode invokedOn, ISym... method FindOriginatingSymbol (line 165) | private static INamedTypeSymbol FindOriginatingSymbol(ISymbol accessed... class ParameterData (line 194) | private sealed class ParameterData method ParameterData (line 202) | public ParameterData(IParameterSymbol parameterSymbol, Accessibility... method AddUsage (line 208) | public void AddUsage(ITypeSymbol symbolUsedAs) method MatchesIdentifier (line 220) | public bool MatchesIdentifier(ExpressionSyntax identifier, SemanticM... method GetRuleViolation (line 226) | public Diagnostic GetRuleViolation() method IsIgnoredBaseType (line 240) | private static bool IsIgnoredBaseType(ITypeSymbol typeSymbol) => method IsCollectionOfKeyValuePair (line 245) | private static bool IsCollectionOfKeyValuePair(ITypeSymbol typeSymbo... method FindMostGeneralType (line 251) | private ISymbol FindMostGeneralType() method DerivesOrImplementsAll (line 297) | private bool DerivesOrImplementsAll(ITypeSymbol type) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MultilineBlocksWithoutBrace.cs class MultilineBlocksWithoutBrace (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method CheckLoop (line 50) | private static void CheckLoop(SonarSyntaxNodeReportingContext context,... method CheckIf (line 58) | private static void CheckIf(SonarSyntaxNodeReportingContext context, I... method LastStatementInIfChain (line 69) | private static StatementSyntax LastStatementInIfChain(IfStatementSynta... method CheckStatement (line 85) | private static void CheckStatement(SonarSyntaxNodeReportingContext con... method IsNotEmpty (line 100) | private static bool IsNotEmpty(SyntaxNode node) => method MisleadingtIndenting (line 103) | private static bool MisleadingtIndenting(SyntaxNode first, SyntaxNode ... method StartPosition (line 115) | private static LinePosition StartPosition(SyntaxNode node) => method SecondStatement (line 118) | private static SyntaxNode SecondStatement(SyntaxNode root, SyntaxNode ... method IsNestedStatement (line 128) | private static bool IsNestedStatement(StatementSyntax statement) => method IsStatementCandidateLoop (line 131) | private static bool IsStatementCandidateLoop(StatementSyntax statement... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MultipleVariableDeclaration.cs class MultipleVariableDeclaration (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MultipleVariableDeclarationCodeFix.cs class MultipleVariableDeclarationCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method CalculateNewRoot (line 23) | protected override SyntaxNode CalculateNewRoot(SyntaxNode root, Syntax... method CreateNewNodes (line 28) | private static IEnumerable CreateNewNodes(VariableDeclarat... method CreateNewDeclaration (line 39) | private static VariableDeclarationSyntax CreateNewDeclaration(Variable... method GetLeadingTriviaFor (line 44) | private static IEnumerable GetLeadingTriviaFor(VariableD... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MutableFieldsShouldNotBe.cs class MutableFieldsShouldNotBe (line 20) | public abstract class MutableFieldsShouldNotBe : SonarDiagnosticAnalyzer method MutableFieldsShouldNotBe (line 47) | protected MutableFieldsShouldNotBe(string diagnosticId, string message... method Initialize (line 50) | protected sealed override void Initialize(SonarAnalysisContext context... method HasAllInvalidModifiers (line 79) | private bool HasAllInvalidModifiers(FieldDeclarationSyntax fieldDeclar... method FieldAssignmentImmutability (line 82) | private static Dictionary FieldAssignmentImmutability(T... method CollectInvalidFieldVariables (line 109) | private static IEnumerable CollectInvalidFieldVariables(FieldD... method CollectReadonlyInvalidFieldVariables (line 114) | private static IEnumerable CollectReadonlyInvalidFieldVariable... method IsImmutableOrValidMutableType (line 142) | private static bool IsImmutableOrValidMutableType(ITypeSymbol typeSymb... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MutableFieldsShouldNotBePublicReadonly.cs class MutableFieldsShouldNotBePublicReadonly (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method MutableFieldsShouldNotBePublicReadonly (line 32) | public MutableFieldsShouldNotBePublicReadonly() : base(DiagnosticId, M... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/MutableFieldsShouldNotBePublicStatic.cs class MutableFieldsShouldNotBePublicStatic (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method MutableFieldsShouldNotBePublicStatic (line 32) | public MutableFieldsShouldNotBePublicStatic() : base(DiagnosticId, Mes... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/NameOfShouldBeUsed.cs class NameOfShouldBeUsed (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method MethodSyntax (line 34) | protected override BaseMethodDeclarationSyntax MethodSyntax(SyntaxNode... method IsStringLiteral (line 37) | protected override bool IsStringLiteral(SyntaxToken t) => method GetParameterNames (line 40) | protected override IEnumerable GetParameterNames(BaseMethodDec... method LeastLanguageVersionMatches (line 48) | protected override bool LeastLanguageVersionMatches(SonarSyntaxNodeRep... method IsArgumentExceptionCallingNameOf (line 51) | protected override bool IsArgumentExceptionCallingNameOf(SyntaxNode no... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/NativeMethodsShouldBeWrapped.cs class NativeMethodsShouldBeWrapped (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method ReportPublicExternalMethods (line 37) | private static void ReportPublicExternalMethods(SonarSymbolReportingCo... method IsExternMethod (line 53) | private static bool IsExternMethod(IMethodSymbol methodSymbol) => method ReportTrivialWrappers (line 56) | private static void ReportTrivialWrappers(SonarSyntaxNodeReportingCont... method GetExternalMethods (line 102) | private static ISet GetExternalMethods(IMethodSymbol me... method GetBodyDescendants (line 108) | private static IEnumerable GetBodyDescendants(MethodDeclar... method HasAtLeastTwo (line 113) | private static bool HasAtLeastTwo(IEnumerable collection) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/NestedCodeBlock.cs class NestedCodeBlock (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/NoExceptionsInFinally.cs class NoExceptionsInFinally (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => class ThrowInFinallyWalker (line 30) | private sealed class ThrowInFinallyWalker : SafeCSharpSyntaxWalker method ThrowInFinallyWalker (line 35) | public ThrowInFinallyWalker(SonarSyntaxNodeReportingContext context,... method VisitThrowStatement (line 41) | public override void VisitThrowStatement(ThrowStatementSyntax node) => method VisitFinallyClause (line 44) | public override void VisitFinallyClause(FinallyClauseSyntax node) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/NonAsyncTaskShouldNotReturnNull.cs class NonAsyncTaskShouldNotReturnNull (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 37) | protected override void Initialize(SonarAnalysisContext context) method GetEnclosingMember (line 60) | private static SyntaxNode GetEnclosingMember(LiteralExpressionSyntax l... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/NonDerivedPrivateClassesShouldBeSealed.cs class NonDerivedPrivateClassesShouldBeSealed (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 45) | protected override void Initialize(SonarAnalysisContext context) => method HasVirtualMembers (line 68) | private static bool HasVirtualMembers(TypeDeclarationSyntax typeDeclar... method IsSealed (line 73) | private static bool IsSealed(TypeDeclarationSyntax typeDeclaration) => method IsPossiblyDerived (line 78) | private static bool IsPossiblyDerived( FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/NonFlagsEnumInBitwiseOperation.cs class NonFlagsEnumInBitwiseOperation (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) method CheckExpressionWithOperator (line 48) | private static void CheckExpressionWithOperator(SonarSyntaxNodeRepo... method IsIgnored (line 69) | private static bool IsIgnored(ITypeSymbol enumType) => // https://stac... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/NonFlagsEnumInBitwiseOperationCodeFix.cs class NonFlagsEnumInBitwiseOperationCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 27) | protected override async Task RegisterCodeFixesAsync(SyntaxNode root, ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/NormalizeStringsToUppercase.cs class NormalizeStringsToUppercase (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method NormalizeStringsToUppercase (line 37) | public NormalizeStringsToUppercase() : base(DiagnosticId) { } method ShouldReportOnMethodCall (line 39) | protected override bool ShouldReportOnMethodCall(InvocationExpressionS... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/NotAssignedPrivateMember.cs class NotAssignedPrivateMember (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 46) | protected override void Initialize(SonarAnalysisContext context) => method CandidateDeclarations (line 73) | private static List> Candidate... method TypeDefinitionShouldBeAnalyzed (line 84) | private static bool TypeDefinitionShouldBeAnalyzed(ITypeSymbol namedTy... method HasStructLayoutAttribute (line 90) | private static bool HasStructLayoutAttribute(ISymbol namedTypeSymbol) => method IsInitializedOrFixed (line 93) | private static bool IsInitializedOrFixed(VariableDeclaratorSyntax decl... method IsAutoPropertyWithNoInitializer (line 98) | private static bool IsAutoPropertyWithNoInitializer(PropertyDeclaratio... method MemberUsages (line 103) | private static IList MemberUsages(CSharpRemovableDeclarat... method AssignedMemberSymbols (line 122) | private static ISet AssignedMemberSymbols(IList ... method RelevantNode (line 145) | private static SyntaxNode RelevantNode(ExpressionSyntax node, ISymbol ... method IsParentMemberAccess (line 176) | private static bool IsParentMemberAccess(MemberAccessExpressionSyntax ... method IsValueType (line 179) | private static bool IsValueType(ISymbol symbol) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/NumberPatternShouldBeRegular.cs class NumberPatternShouldBeRegular (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) method HasIrregularPattern (line 55) | internal static bool HasIrregularPattern(string numericToken) method StripNumericPreAndSuffix (line 85) | private static string StripNumericPreAndSuffix(string numericToken) method HasIrregularGroupLengths (line 118) | private static bool HasIrregularGroupLengths(int[] groupLengths) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ObjectCreatedDropped.cs class ObjectCreatedDropped (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ObjectShouldBeInitializedCorrectlyBase.cs class ObjectShouldBeInitializedCorrectlyBase (line 25) | public abstract class ObjectShouldBeInitializedCorrectlyBase : TrackerHo... method ObjectShouldBeInitializedCorrectlyBase (line 31) | protected ObjectShouldBeInitializedCorrectlyBase(IAnalyzerConfiguratio... method IsDefaultConstructorSafe (line 34) | protected virtual bool IsDefaultConstructorSafe(SonarCompilationStartA... method Initialize (line 36) | protected override void Initialize(TrackerInput input) method Initialize (line 41) | protected override void Initialize(SonarAnalysisContext context) method IsWebConfigCookieSet (line 78) | protected static bool IsWebConfigCookieSet(SonarCompilationStartAnalys... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ObsoleteAttributes.cs class ObsoleteAttributes (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetExplanationExpression (line 25) | protected override SyntaxNode GetExplanationExpression(SyntaxNode node... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/OperatorOverloadsShouldHaveNamedAlternatives.cs class OperatorOverloadsShouldHaveNamedAlternatives (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 91) | protected override void Initialize(SonarAnalysisContext context) method HasAlternativeMethod (line 123) | private static bool HasAlternativeMethod(IMethodSymbol operatorSymbol,... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/OperatorsShouldBeOverloadedConsistently.cs class OperatorsShouldBeOverloadedConsistently (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => method FindMissingMethods (line 52) | private static IEnumerable FindMissingMethods(INamedTypeSymbol... method GetImplementedMethods (line 84) | private static IEnumerable GetImplementedMethods(INamedTypeSym... method ImplementedOperator (line 103) | private static string ImplementedOperator(IMethodSymbol member) => class MethodName (line 117) | private static class MethodName FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/OptionalParameter.cs class OptionalParameter (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetParameters (line 30) | protected override IEnumerable GetParameters(BaseMeth... method IsOptional (line 33) | protected override bool IsOptional(ParameterSyntax parameter) => method GetReportLocation (line 36) | protected override Location GetReportLocation(ParameterSyntax paramete... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/OptionalParameterNotPassedToBaseCall.cs class OptionalParameterNotPassedToBaseCall (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetArgumentCount (line 30) | protected override int GetArgumentCount(InvocationExpressionSyntax inv... method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/OptionalParameterWithDefaultValue.cs class OptionalParameterWithDefaultValue (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/OptionalParameterWithDefaultValueCodeFix.cs class OptionalParameterWithDefaultValueCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 27) | protected override async Task RegisterCodeFixesAsync(SyntaxNode root, ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/OptionalRefOutParameter.cs class OptionalRefOutParameter (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/OptionalRefOutParameterCodeFix.cs class OptionalRefOutParameterCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 27) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/OrderByRepeated.cs class OrderByRepeated (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method IsMethodOrderByExtension (line 50) | private static bool IsMethodOrderByExtension(InvocationExpressionSynta... method IsMethodThenByExtension (line 57) | private static bool IsMethodThenByExtension(InvocationExpressionSyntax... method MethodIsOnIOrderedEnumerable (line 64) | private static bool MethodIsOnIOrderedEnumerable(IMethodSymbol methodS... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/OrderByRepeatedCodeFix.cs class OrderByRepeatedCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 26) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method ChangeToThenByAsync (line 40) | private static async Task ChangeToThenByAsync(Document docum... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/OverrideGetHashCodeOnOverridingEquals.cs class OverrideGetHashCodeOnOverridingEquals (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method GetMissingMethodName (line 58) | private static string GetMissingMethodName(string overridenMethodName) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PInvokesShouldNotBeVisible.cs class PInvokesShouldNotBeVisible (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ParameterAssignedTo.cs class ParameterAssignedTo (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsAssignmentToCatchVariable (line 25) | protected override bool IsAssignmentToCatchVariable(ISymbol symbol, Sy... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ParameterNameMatchesOriginal.cs class ParameterNameMatchesOriginal (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method ParameterIdentifiers (line 26) | protected override IEnumerable ParameterIdentifiers(Metho... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ParameterNamesShouldNotDuplicateMethodNames.cs class ParameterNamesShouldNotDuplicateMethodNames (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method CheckMethodParameters (line 48) | private static void CheckMethodParameters(SonarSyntaxNodeReportingCont... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ParameterTypeShouldMatchRouteTypeConstraint.cs class ParameterTypeShouldMatchRouteTypeConstraint (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 54) | protected override void Initialize(SonarAnalysisContext context) => method GetPropertyTypeMismatches (line 73) | private static IReadOnlyList GetPropertyTypeMism... method IsTypeMatchRouteConstraint (line 96) | private static bool IsTypeMatchRouteConstraint(ITypeSymbol type, strin... method GetRouteParametersWithValidConstraint (line 106) | private static Dictionary> GetRouteParame... method CalculateRouteParamLocation (line 141) | private static Location CalculateRouteParamLocation(Location attribute... class PropertyTypeMismatch (line 159) | private sealed class PropertyTypeMismatch method PropertyTypeMismatch (line 169) | public PropertyTypeMismatch(TypeSyntax type, string constraintType, ... method ToPrimaryMessage (line 177) | public string ToPrimaryMessage() method GetTypeName (line 193) | private static string GetTypeName(TypeSyntax type) => method ToSecondaryLocations (line 201) | public IEnumerable ToSecondaryLocations() => method ToSecondaryMessage (line 204) | private string ToSecondaryMessage() => type RouteParameter (line 208) | private readonly record struct RouteParameter(string Constraint, strin... type SupportedType (line 210) | private readonly record struct SupportedType(KnownType ConstraintKnown... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ParameterValidationInAsyncShouldBeWrapped.cs class ParameterValidationInAsyncShouldBeWrapped (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) => class ParameterValidationInAsyncWalker (line 54) | private sealed class ParameterValidationInAsyncWalker : ParameterValid... method ParameterValidationInAsyncWalker (line 58) | public ParameterValidationInAsyncWalker(SemanticModel model) method VisitAwaitExpression (line 63) | public override void VisitAwaitExpression(AwaitExpressionSyntax node... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ParameterValidationInYieldShouldBeWrapped.cs class ParameterValidationInYieldShouldBeWrapped (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => class ParameterValidationInYieldWalker (line 49) | private sealed class ParameterValidationInYieldWalker : ParameterValid... method ParameterValidationInYieldWalker (line 53) | public ParameterValidationInYieldWalker(SemanticModel model) method VisitYieldStatement (line 58) | public override void VisitYieldStatement(YieldStatementSyntax node) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ParametersCorrectOrder.cs class ParametersCorrectOrder (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PartCreationPolicyShouldBeUsedWithExportAttribute.cs class PartCreationPolicyShouldBeUsedWithExportAttribute (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetTypeDeclaration (line 28) | protected override TypeDeclarationSyntax GetTypeDeclaration(AttributeS... method Initialize (line 45) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PartialMethodNoImplementation.cs class PartialMethodNoImplementation (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method CheckForCandidatePartialDeclaration (line 37) | private static void CheckForCandidatePartialDeclaration(SonarSyntaxNod... method CheckForCandidatePartialInvocation (line 52) | private static void CheckForCandidatePartialInvocation(SonarSyntaxNode... method PartialMethodsWithoutAccessModifier (line 67) | private static IEnumerable PartialMethodsWith... method HasAccessModifier (line 76) | private static bool HasAccessModifier(SyntaxToken token) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PasswordsShouldBeStoredCorrectly.cs class PasswordsShouldBeStoredCorrectly (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) method AspNetCore (line 42) | private static void AspNetCore(SonarAnalysisContext context) method AspNetFramework (line 69) | private static void AspNetFramework(SonarAnalysisContext context) method Rfc2898DeriveBytes (line 79) | private static void Rfc2898DeriveBytes(SonarAnalysisContext context) method BouncyCastle (line 120) | private static void BouncyCastle(SonarAnalysisContext context) method HasFewIterations (line 157) | private static bool HasFewIterations(PropertyAccessContext context, Pr... method ArgumentLessThan (line 160) | private static bool ArgumentLessThan(ArgumentContext context, int thre... method Track (line 164) | private static void Track(SyntaxTrackerBase method SymbolIfPointerType (line 55) | private static IFieldSymbol SymbolIfPointerType(VariableDeclarationSyn... method IsPointerStructure (line 72) | private static bool IsPointerStructure(VariableDeclarationSyntax varia... method IsNameOfPointerStruct (line 79) | private static bool IsNameOfPointerStruct(string typeName) => method IsUnmanagedFunctionPointer (line 82) | private static bool IsUnmanagedFunctionPointer(VariableDeclarationSynt... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PreferGuidEmpty.cs class PreferGuidEmpty (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PreferGuidEmptyCodeFix.cs class PreferGuidEmptyCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 29) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method ToReplace (line 41) | private static SyntaxNode ToReplace(SyntaxNode root, SonarCodeFixConte... method Replacement (line 49) | private static SyntaxNode Replacement(SyntaxNode root, SyntaxNode toRe... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PreferJaggedArraysOverMultidimensional.cs class PreferJaggedArraysOverMultidimensional (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method AnalyzeNode (line 57) | private static void AnalyzeNode(SonarSyntaxNodeReportingConte... method IsMultiDimensionalArray (line 74) | private static bool IsMultiDimensionalArray(ITypeSymbol type) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PrivateFieldUsedAsLocalVariable.cs class PrivateFieldUsedAsLocalVariable (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 37) | protected override void Initialize(SonarAnalysisContext context) => method GetPrivateFields (line 65) | private static IDictionary Get... class FieldAccessCollector (line 83) | private sealed class FieldAccessCollector : SafeCSharpSyntaxWalker method FieldAccessCollector (line 101) | public FieldAccessCollector(SemanticModel model, IDictionary : Dictionary method IsPartial (line 63) | private static bool IsPartial(TypeDeclarationSyntax type) => method HasNestedTypeDeclarations (line 66) | private static bool HasNestedTypeDeclarations(TypeDeclarationSyntax ty... method PrivateStaticMethodsOf (line 71) | private static MethodDeclarationSyntax[] PrivateStaticMethodsOf(TypeDe... method IsPrivateAndStatic (line 77) | private static bool IsPrivateAndStatic(MethodDeclarationSyntax method,... method LowestCommonAncestorOrSelf (line 95) | private static TypeDeclarationSyntax LowestCommonAncestorOrSelf(IEnume... method TypesWhichUseTheMethods (line 126) | private static IEnumerable TypesWhichUseTheMethods( type MethodWithPotentialReferences (line 167) | private sealed record MethodWithPotentialReferences(MethodDeclarationS... type MethodUsedByTypes (line 169) | private sealed record MethodUsedByTypes(MethodDeclarationSyntax Method... class PotentialMethodReferenceCollector (line 177) | private sealed class PotentialMethodReferenceCollector : SafeCSharpSyn... method PotentialMethodReferenceCollector (line 184) | public PotentialMethodReferenceCollector(IEnumerable FindFieldAssignments(IProper... method FindFieldReads (line 47) | protected override IEnumerable FindFieldReads(IPropertySymb... method ShouldIgnoreAccessor (line 82) | protected override bool ShouldIgnoreAccessor(IMethodSymbol accessorMet... method ImplementsExplicitGetterOrSetter (line 102) | protected override bool ImplementsExplicitGetterOrSetter(IPropertySymb... method FillAssignments (line 106) | private static void FillAssignments(IDictionary FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PropertiesShouldBePreferred.cs class PropertiesShouldBePreferred (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => method HasCandidateSignature (line 57) | private static bool HasCandidateSignature(IMethodSymbol method) => method HasCandidateReturnType (line 65) | private static bool HasCandidateReturnType(IMethodSymbol method) => method HasCandidateName (line 71) | private static bool HasCandidateName(IMethodSymbol method) method UsageAttributesAllowProperties (line 81) | private static bool UsageAttributesAllowProperties(IMethodSymbol metho... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PropertyGetterWithThrow.cs class PropertyGetterWithThrow (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsGetter (line 29) | protected override bool IsGetter(AccessorDeclarationSyntax propertyGet... method IsIndexer (line 31) | protected override bool IsIndexer(AccessorDeclarationSyntax propertyGe... method GetThrowExpression (line 34) | protected override SyntaxNode GetThrowExpression(SyntaxNode syntaxNode... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PropertyNamesShouldNotMatchGetMethods.cs class PropertyNamesShouldNotMatchGetMethods (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method AreCollidingNames (line 47) | private static bool AreCollidingNames(string propertyName, string meth... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PropertyToAutoProperty.cs class PropertyToAutoProperty (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => method HasAttributes (line 58) | private static bool HasAttributes(SyntaxList ModifierKinds(AccessorDeclarati... method FieldFromSetter (line 70) | private static IFieldSymbol FieldFromSetter(AccessorDeclarationSyntax ... method FieldSymbol (line 90) | private static IFieldSymbol FieldSymbol(ExpressionSyntax expression, I... method FieldFromGetter (line 101) | private static IFieldSymbol FieldFromGetter(AccessorDeclarationSyntax ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PropertyWriteOnly.cs class PropertyWriteOnly (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsWriteOnlyProperty (line 26) | protected override bool IsWriteOnlyProperty(PropertyDeclarationSyntax ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ProvideDeserializationMethodsForOptionalFields.cs class ProvideDeserializationMethodsForOptionalFields (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetNamedTypeIdentifierLocation (line 25) | protected override Location GetNamedTypeIdentifierLocation(SyntaxNode ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PublicConstantField.cs class PublicConstantField (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetReportLocation (line 30) | protected override Location GetReportLocation(VariableDeclaratorSyntax... method GetVariables (line 33) | protected override IEnumerable GetVariables(... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PublicMethodWithMultidimensionalArray.cs class PublicMethodWithMultidimensionalArray (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetIssueLocation (line 34) | protected override Location GetIssueLocation(SyntaxNode node) => method GetType (line 37) | protected override string GetType(SyntaxNode node) => method MethodSymbolOfNode (line 40) | protected override IMethodSymbol MethodSymbolOfNode(SemanticModel sema... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/PureAttributeOnVoidMethod.cs class PureAttributeOnVoidMethod (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) method IsPureAttribute (line 41) | private static bool IsPureAttribute(AttributeSyntax attribute) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundancyInConstructorDestructorDeclaration.cs class RedundancyInConstructorDestructorDeclaration (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 38) | protected override void Initialize(SonarAnalysisContext context) method CheckTypesWithPrimaryConstructor (line 45) | private static void CheckTypesWithPrimaryConstructor(SonarSyntaxNodeRe... method CheckDestructorDeclaration (line 60) | private static void CheckDestructorDeclaration(SonarSyntaxNodeReportin... method CheckConstructorDeclaration (line 70) | private static void CheckConstructorDeclaration(SonarSyntaxNodeReporti... method IsInitializerRedundant (line 87) | private static bool IsInitializerRedundant(ConstructorInitializerSynta... method IsConstructorRedundant (line 92) | private static bool IsConstructorRedundant(ConstructorDeclarationSynta... method IsStructWithInitializedFieldOrProperty (line 98) | private static bool IsStructWithInitializedFieldOrProperty(BaseTypeDec... method IsSinglePublicConstructor (line 103) | private static bool IsSinglePublicConstructor(ConstructorDeclarationSy... method IsInitializerEmptyOrRedundant (line 109) | private static bool IsInitializerEmptyOrRedundant(ConstructorInitializ... method TypeHasExactlyOneConstructor (line 112) | private static bool TypeHasExactlyOneConstructor(BaseTypeDeclarationSy... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundancyInConstructorDestructorDeclarationCodeFix.cs class RedundancyInConstructorDestructorDeclarationCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 29) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method RegisterActionForDestructor (line 56) | private static void RegisterActionForDestructor(SonarCodeFixContext co... method RegisterActionForConstructor (line 65) | private static void RegisterActionForConstructor(SonarCodeFixContext c... method RegisterActionForBaseCall (line 74) | private static void RegisterActionForBaseCall(SonarCodeFixContext cont... method RemoveInitializer (line 90) | private static SyntaxNode RemoveInitializer(SyntaxNode root, Construct... method GetConstructor (line 142) | private static ConstructorDeclarationSyntax GetConstructor(SyntaxNode ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantArgument.cs class RedundantArgument (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method ArgumentHasDefaultValue (line 30) | internal static bool ArgumentHasDefaultValue(NodeAndSymbol method ProcessArgumentMappings (line 54) | private static void ProcessArgumentMappings(SonarSyntaxNodeReportingCo... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantArgumentCodeFix.cs class RedundantArgumentCodeFix (line 23) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 31) | protected override async Task RegisterCodeFixesAsync(SyntaxNode root, ... method RemoveArgumentsAndAddNecessaryNamesAsync (line 96) | private static async Task RemoveArgumentsAndAddNecessaryName... method AddArgument (line 133) | private static ArgumentListSyntax AddArgument(ArgumentListSyntax argum... method AddParamsArguments (line 145) | private static ArgumentListSyntax AddParamsArguments(SemanticModel sem... method RemoveArgumentsAsync (line 179) | private static async Task RemoveArgumentsAsync(Document docu... method GetInvocation (line 186) | private static InvocationExpressionSyntax GetInvocation(SyntaxNode roo... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantCast.cs class RedundantCast (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) method CheckCastExpression (line 57) | private static void CheckCastExpression(SonarSyntaxNodeReportingContex... method FlowStateEquals (line 70) | private static bool FlowStateEquals(SemanticModel model, TypeInfo expr... method CheckExtensionMethodInvocation (line 104) | private static void CheckExtensionMethodInvocation(SonarSyntaxNodeRepo... method ReportIssue (line 128) | private static void ReportIssue(SonarSyntaxNodeReportingContext contex... method GetEnumerableExtensionSymbol (line 132) | private static IMethodSymbol GetEnumerableExtensionSymbol(InvocationEx... method GetGenericTypeArgument (line 140) | private static ITypeSymbol GetGenericTypeArgument(ITypeSymbol type) => method CanHaveNullValue (line 145) | private static bool CanHaveNullValue(ITypeSymbol type) => method GetReportLocation (line 148) | private static Location GetReportLocation(InvocationExpressionSyntax i... method GetElementType (line 153) | private static ITypeSymbol GetElementType(InvocationExpressionSyntax i... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantCastCodeFix.cs class RedundantCastCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 26) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method RemoveCall (line 70) | private static SyntaxNode RemoveCall(SyntaxNode root, method RemoveStaticMemberCall (line 78) | private static SyntaxNode RemoveStaticMemberCall(SyntaxNode root, method RemoveExtensionMethodCall (line 85) | private static SyntaxNode RemoveExtensionMethodCall(SyntaxNode root, I... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantConditionalAroundAssignment.cs class RedundantConditionalAroundAssignment (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method UselessConditionIfStatement (line 36) | private static void UselessConditionIfStatement(SonarSyntaxNodeReporti... method UselessConditionSwitchExpression (line 66) | private static void UselessConditionSwitchExpression(SonarSyntaxNodeRe... method TryGetNotEqualsCondition (line 91) | private static bool TryGetNotEqualsCondition(IfStatementSyntax ifState... method TryGetSingleAssignment (line 97) | private static bool TryGetSingleAssignment(IfStatementSyntax ifStateme... method AreMatchingExpressions (line 113) | private static bool AreMatchingExpressions(SyntaxNode condition1, Synt... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantConditionalAroundAssignmentCodeFix.cs class RedundantConditionalAroundAssignmentCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 27) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method HandleIfStatement (line 50) | private static Task HandleIfStatement(SyntaxNode root, SonarCodeFixCon... method HandleSwitchExpression (line 77) | private static Task HandleSwitchExpression(SyntaxNode root, SonarCodeF... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantDeclaration.cs class RedundantDeclaration (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] type RedundancyType (line 32) | internal enum RedundancyType method Initialize (line 48) | protected override void Initialize(SonarAnalysisContext context) method VisitParenthesizedLambdaExpression (line 73) | private static void VisitParenthesizedLambdaExpression(SonarSyntaxNode... method CheckTypeSpecifications (line 81) | private static void CheckTypeSpecifications(SonarSyntaxNodeReportingCo... method CheckUnusedParameters (line 109) | private static void CheckUnusedParameters(SonarSyntaxNodeReportingCont... method UsedIdentifiers (line 130) | private static IEnumerable UsedIdentifiers(ParenthesizedLambda... method IsParameterListModifiable (line 133) | private static bool IsParameterListModifiable(ParenthesizedLambdaExpre... method ParameterTypesMatch (line 137) | private static bool ParameterTypesMatch(IMethodSymbol method1, IMethod... method ReportRedundantNullableConstructorCall (line 153) | private static void ReportRedundantNullableConstructorCall(SonarSyntax... method IsNullableCreation (line 169) | private static bool IsNullableCreation(IObjectCreation objectCreation,... method IsInAssignmentOrReturnValue (line 172) | private static bool IsInAssignmentOrReturnValue(SyntaxNode objectCreat... method IsInNotVarDeclaration (line 181) | private static bool IsInNotVarDeclaration(SyntaxNode objectCreation) method ReportRedundancyInArrayCreation (line 193) | private static void ReportRedundancyInArrayCreation(SonarSyntaxNodeRep... method ReportRedundantArraySizeSpecifier (line 200) | private static void ReportRedundantArraySizeSpecifier(SonarSyntaxNodeR... method ReportRedundantArrayTypeSpecifier (line 222) | private static void ReportRedundantArrayTypeSpecifier(SonarSyntaxNodeR... method ReportOnRedundantObjectInitializer (line 260) | private static void ReportOnRedundantObjectInitializer(SonarSyntaxNode... method ReportOnExplicitDelegateCreation (line 274) | private static void ReportOnExplicitDelegateCreation(SonarSyntaxNodeRe... method IsInDeclarationNotVarNotDelegate (line 300) | private static bool IsInDeclarationNotVarNotDelegate(SyntaxNode object... method IsDelegateCreation (line 317) | private static bool IsDelegateCreation(IObjectCreation objectCreation,... method IsReturnValueNotDelegate (line 320) | private static bool IsReturnValueNotDelegate(SyntaxNode objectCreation... method IsAssignmentNotDelegate (line 337) | private static bool IsAssignmentNotDelegate(SyntaxNode objectCreation,... method ReportOnRedundantParameterList (line 354) | private static void ReportOnRedundantParameterList(SonarSyntaxNodeRepo... method IsInArgumentAndCanBeChanged (line 384) | private static bool IsInArgumentAndCanBeChanged(IObjectCreation object... method ReportIssueOnRedundantObjectCreation (line 425) | private static void ReportIssueOnRedundantObjectCreation(SonarSyntaxNo... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantDeclarationCodeFix.cs class RedundantDeclarationCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 36) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method RegisterRedundantLambdaParameterAction (line 52) | private static void RegisterRedundantLambdaParameterAction(SyntaxNode ... method RegisterRedundantArraySizeAction (line 88) | private static void RegisterRedundantArraySizeAction(SyntaxNode syntax... method RegisterRedundantArrayTypeAction (line 108) | private static void RegisterRedundantArrayTypeAction(SyntaxNode syntax... method RegisterRedundantExplicitObjectCreationAction (line 128) | private static void RegisterRedundantExplicitObjectCreationAction(Synt... method RegisterRedundantObjectInitializerAction (line 160) | private static void RegisterRedundantObjectInitializerAction(SyntaxNod... method RegisterRedundantParameterTypeAction (line 178) | private static void RegisterRedundantParameterTypeAction(SyntaxNode sy... method RegisterAction (line 196) | private static void RegisterAction(SyntaxNode syntaxNode, FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantInheritanceList.cs class RedundantInheritanceList (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 36) | protected override void Initialize(SonarAnalysisContext context) => method ReportRedundantBaseType (line 64) | private static void ReportRedundantBaseType(SonarSyntaxNodeReportingCo... method ReportRedundantInterfaces (line 75) | private static void ReportRedundantInterfaces(SonarSyntaxNodeReporting... method GetImplementedInterfaceMappings (line 103) | private static MultiValueDictionary DiagnosticsProperti... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantInheritanceListCodeFix.cs class RedundantInheritanceListCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 28) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method HasLineEnding (line 47) | internal static bool HasLineEnding(SyntaxNode node) => method HasLineEnding (line 51) | private static bool HasLineEnding(SyntaxToken token) => method RemoveDeclaration (line 55) | private static SyntaxNode RemoveDeclaration(SyntaxNode root, BaseListS... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantJumpStatement.cs class RedundantJumpStatement (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => method CheckForRedundantJumps (line 50) | private static void CheckForRedundantJumps(SonarSyntaxNodeReportingCon... method IsJumpRemovable (line 67) | private static bool IsJumpRemovable(JumpBlock jumpBlock, int yieldStat... method IsValidJumpInsideTryCatch (line 77) | private static bool IsValidJumpInsideTryCatch(JumpBlock jumpBlock) => method IsInsideSwitch (line 82) | private static bool IsInsideSwitch(JumpBlock jumpBlock) => method IsYieldReturn (line 86) | private static bool IsYieldReturn(JumpBlock jumpBlock) => method IsOnlyYieldBreak (line 91) | private static bool IsOnlyYieldBreak(JumpBlock jumpBlock, int yieldSta... method IsThrow (line 96) | private static bool IsThrow(JumpBlock jumpBlock) => method IsReturnWithExpression (line 99) | private static bool IsReturnWithExpression(JumpBlock jumpBlock) => method IsReturnWithFollowingLocalFunction (line 102) | private static bool IsReturnWithFollowingLocalFunction(JumpBlock jumpB... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantModifier.cs class RedundantModifier (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 40) | protected override void Initialize(SonarAnalysisContext context) method CheckForUnnecessaryUnsafeBlocks (line 79) | private static void CheckForUnnecessaryUnsafeBlocks(SonarSyntaxNodeRep... method CheckForUnnecessaryUnsafeBlocksBelow (line 91) | private static void CheckForUnnecessaryUnsafeBlocksBelow(SonarSyntaxNo... method CheckForUnnecessaryUnsafeBlocksInMember (line 111) | private static void CheckForUnnecessaryUnsafeBlocksInMember(SonarSynta... method HasUnsafeConstructInside (line 140) | private static bool HasUnsafeConstructInside(SyntaxNode container, Sem... method ContainsUnsafeParameter (line 147) | private static bool ContainsUnsafeParameter(SyntaxNode container, Sema... method ContainsUnsafeInvocationReturnValue (line 152) | private static bool ContainsUnsafeInvocationReturnValue(SyntaxNode con... method ContainsUnsafeTypedIdentifier (line 157) | private static bool ContainsUnsafeTypedIdentifier(SyntaxNode container... method ContainsFixedDeclaration (line 162) | private static bool ContainsFixedDeclaration(SyntaxNode container) => method ContainsUnsafeConstruct (line 167) | private static bool ContainsUnsafeConstruct(SyntaxNode container) => method IsUnsafe (line 170) | private static bool IsUnsafe(ITypeSymbol type) => method MarkAllUnsafeBlockInside (line 175) | private static void MarkAllUnsafeBlockInside(SonarSyntaxNodeReportingC... method ReportOnUnsafeBlock (line 183) | private static void ReportOnUnsafeBlock(SonarSyntaxNodeReportingContex... method FindUnsafeKeyword (line 186) | private static SyntaxToken FindUnsafeKeyword(MemberDeclarationSyntax m... method CheckTypeDeclarationForRedundantPartial (line 189) | private static void CheckTypeDeclarationForRedundantPartial(SonarSynta... method Modifiers (line 201) | private static SyntaxTokenList Modifiers(MemberDeclarationSyntax membe... method CheckSealedMemberInSealedClass (line 212) | private static void CheckSealedMemberInSealedClass(SonarSyntaxNodeRepo... class CheckedWalker (line 223) | private sealed class CheckedWalker : SafeCSharpSyntaxWalker method CheckedWalker (line 254) | public CheckedWalker(SonarSyntaxNodeReportingContext context) method VisitCheckedExpression (line 265) | public override void VisitCheckedExpression(CheckedExpressionSyntax ... method VisitCheckedStatement (line 268) | public override void VisitCheckedStatement(CheckedStatementSyntax no... method VisitAssignmentExpression (line 271) | public override void VisitAssignmentExpression(AssignmentExpressionS... method VisitBinaryExpression (line 280) | public override void VisitBinaryExpression(BinaryExpressionSyntax node) method VisitPrefixUnaryExpression (line 289) | public override void VisitPrefixUnaryExpression(PrefixUnaryExpressio... method VisitCastExpression (line 298) | public override void VisitCastExpression(CastExpressionSyntax node) method IsTopLevel (line 304) | public static bool IsTopLevel(SyntaxNode node) => method VisitChecked (line 307) | private void VisitChecked(T node, SyntaxKind checkedKind, SyntaxT... method IsCurrentNodeEmbeddedInsideSameChecked (line 328) | private bool IsCurrentNodeEmbeddedInsideSameChecked(SyntaxNode node,... method SetHasIntegralOperation (line 331) | private void SetHasIntegralOperation(CastExpressionSyntax node) method SetHasIntegralOperation (line 341) | private void SetHasIntegralOperation(ExpressionSyntax node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantModifierCodeFix.cs class RedundantModifierCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 38) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method ReplaceRoot (line 64) | private static Task ReplaceRoot(SonarCodeFixContext context,... method RemoveRedundantUnsafe (line 67) | private static SyntaxNode RemoveRedundantUnsafe(SyntaxNode root, Synta... method RemoveRedundantToken (line 81) | private static SyntaxNode RemoveRedundantToken(SyntaxNode root, Syntax... method RemoveRedundantCheckedStatement (line 88) | private static SyntaxNode RemoveRedundantCheckedStatement(SyntaxNode r... method RemoveRedundantCheckedExpression (line 91) | private static SyntaxNode RemoveRedundantCheckedExpression(SyntaxNode ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantNullCheck.cs class RedundantNullCheck (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method GetLeftNode (line 39) | protected override SyntaxNode GetLeftNode(BinaryExpressionSyntax binar... method GetRightNode (line 41) | protected override SyntaxNode GetRightNode(BinaryExpressionSyntax bina... method GetNullCheckVariable (line 43) | protected override SyntaxNode GetNullCheckVariable(SyntaxNode node) =>... method GetNonNullCheckVariable (line 45) | protected override SyntaxNode GetNonNullCheckVariable(SyntaxNode node)... method GetIsOperatorCheckVariable (line 47) | protected override SyntaxNode GetIsOperatorCheckVariable(SyntaxNode node) method GetInvertedIsOperatorCheckVariable (line 69) | protected override SyntaxNode GetInvertedIsOperatorCheckVariable(Synta... method AreEquivalent (line 91) | protected override bool AreEquivalent(SyntaxNode node1, SyntaxNode nod... method CheckAndPattern (line 93) | private static void CheckAndPattern(SonarSyntaxNodeReportingContext co... method CheckOrPattern (line 122) | private static void CheckOrPattern(SonarSyntaxNodeReportingContext con... method GetNullCheckVariable (line 157) | private static SyntaxNode GetNullCheckVariable(SyntaxNode node, bool e... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantNullCheckCodeFix.cs class RedundantNullCheckCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 27) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method RegisterBinaryExpressionCodeFix (line 58) | private static void RegisterBinaryExpressionCodeFix(SonarCodeFixContex... method RegisterBinaryPatternCodeFix (line 73) | private static void RegisterBinaryPatternCodeFix(SonarCodeFixContext c... method ReplaceNode (line 89) | private static SyntaxNode ReplaceNode(SyntaxNode root, SyntaxNode bina... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantNullableTypeComparison.cs class RedundantNullableTypeComparison (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method CheckGetTypeAndTypeOfEquality (line 44) | private static void CheckGetTypeAndTypeOfEquality(SonarSyntaxNodeRepor... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantParentheses.cs class RedundantParentheses (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetExpression (line 30) | protected override SyntaxNode GetExpression(ParenthesizedExpressionSyn... method GetOpenParenToken (line 32) | protected override SyntaxToken GetOpenParenToken(ParenthesizedExpressi... method GetCloseParenToken (line 34) | protected override SyntaxToken GetCloseParenToken(ParenthesizedExpress... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantParenthesesCodeFix.cs class RedundantParenthesesCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 27) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantParenthesesObjectsCreation.cs class RedundantParenthesesObjectsCreation (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantPropertyNamesInAnonymousClass.cs class RedundantPropertyNamesInAnonymousClass (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method GetRedundantInitializers (line 46) | private static IEnumerable GetR... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantPropertyNamesInAnonymousClassCodeFix.cs class RedundantPropertyNamesInAnonymousClassCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 26) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method GetNewSyntaxListItem (line 56) | private static SyntaxNodeOrToken GetNewSyntaxListItem(SyntaxNodeOrToke... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantToArrayCall.cs class RedundantToArrayCall (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method GetRedundantMemberAccess (line 44) | private static MemberAccessExpressionSyntax GetRedundantMemberAccess(S... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantToArrayCallCodeFix.cs class RedundantToArrayCallCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 26) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantToStringCall.cs class RedundantToStringCall (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 35) | protected override void Initialize(SonarAnalysisContext context) method CheckRightSideOfAddAssignmentsForToStringCall (line 42) | private static void CheckRightSideOfAddAssignmentsForToStringCall(Sona... method CheckSidesOfAddExpressionsForToStringCall (line 59) | private static void CheckSidesOfAddExpressionsForToStringCall(SonarAna... method CheckToStringInvocationsOnStringAndInStringFormat (line 77) | private static void CheckToStringInvocationsOnStringAndInStringFormat(... method CheckLeftExpressionForRemovableToStringCall (line 117) | private static void CheckLeftExpressionForRemovableToStringCall(SonarS... method CheckRightExpressionForRemovableToStringCall (line 122) | private static void CheckRightExpressionForRemovableToStringCall(Sonar... method CheckRightExpressionForRemovableToStringCall (line 127) | private static void CheckRightExpressionForRemovableToStringCall(Sonar... method CheckExpressionForRemovableToStringCall (line 133) | private static void CheckExpressionForRemovableToStringCall(SonarSynta... method TryGetExpressionTypeOfOwner (line 161) | private static bool TryGetExpressionTypeOfOwner(InvocationExpressionSy... method DoesCollidingAdditionExist (line 176) | private static bool DoesCollidingAdditionExist(ITypeSymbol subExpressi... method IsStringFormatCall (line 188) | private static bool IsStringFormatCall(IMethodSymbol stringFormatSymbol) method IsOperationAddOnString (line 195) | private static bool IsOperationAddOnString(IMethodSymbol operation) method IsArgumentlessToStringCallNotOnBaseExpression (line 202) | private static bool IsArgumentlessToStringCallNotOnBaseExpression(Expr... method IsParameterlessToString (line 229) | private static bool IsParameterlessToString(IMethodSymbol methodSymbol) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RedundantToStringCallCodeFix.cs class RedundantToStringCallCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method GetFixAllProvider (line 27) | public override FixAllProvider GetFixAllProvider() => method RegisterCodeFixesAsync (line 30) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ReferenceEqualityCheckWhenEqualsExists.cs class ReferenceEqualityCheckWhenEqualsExists (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 44) | protected override void Initialize(SonarAnalysisContext context) => method MightOverrideEquals (line 81) | private static bool MightOverrideEquals(ITypeSymbol type, ISet method HasAllowedBaseType (line 93) | private static bool HasAllowedBaseType(ITypeSymbol type) => method IsBinaryCandidateForReporting (line 96) | private static bool IsBinaryCandidateForReporting(BinaryExpressionSynt... method HasEqualsOverride (line 101) | private static bool HasEqualsOverride(ITypeSymbol type) => method GetEqualsOverrides (line 104) | private static IEnumerable GetEqualsOverrides(ITypeSymb... method IsInEqualsOverride (line 119) | private static bool IsInEqualsOverride(IMethodSymbol method) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ReferenceEqualsOnValueType.cs class ReferenceEqualsOnValueType (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) method AnyArgumentIsValueType (line 51) | private static bool AnyArgumentIsValueType(ArgumentListSyntax argument... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RegularExpressions/RegexMustHaveValidSyntax.cs class RegexMustHaveValidSyntax (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RequireAttributeUsageAttribute.cs class RequireAttributeUsageAttribute (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => method InheritsAttributeUsage (line 49) | private static bool InheritsAttributeUsage(INamedTypeSymbol classSymbo... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ReturnEmptyCollectionInsteadOfNull.cs class ReturnEmptyCollectionInsteadOfNull (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) => method ReportIfReturnsNullOrDefault (line 44) | private static void ReportIfReturnsNullOrDefault(SonarSyntaxNodeReport... method Body (line 72) | private static BlockSyntax Body(SyntaxNode node) => method IsReturningCollection (line 75) | private static bool IsReturningCollection(SonarSyntaxNodeReportingCont... method DeclaredType (line 82) | private static ITypeSymbol DeclaredType(SonarSyntaxNodeReportingContex... method ExpressionBody (line 88) | private static ArrowExpressionClauseSyntax ExpressionBody(SyntaxNode n... method GetAccessor (line 96) | private static AccessorDeclarationSyntax GetAccessor(BasePropertyDecla... method ReturnNullOrDefaultExpressions (line 99) | private static IEnumerable ReturnNullOrDefaultExpressions(... method NullOrDefaultExpressions (line 107) | private static IEnumerable NullOrDefaultExpressions(Syntax... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ReturnTypeNamedPartialShouldBeEscaped.cs class ReturnTypeNamedPartialShouldBeEscaped (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method IsGenericMethod (line 52) | private static bool IsGenericMethod(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ReturnValueIgnored.cs class ReturnValueIgnored (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 67) | protected override void Initialize(SonarAnalysisContext context) method CheckExpressionForPureMethod (line 94) | private static void CheckExpressionForPureMethod(SonarSyntaxNodeReport... method IsSideEffectFreeOrPure (line 105) | private static bool IsSideEffectFreeOrPure(IMethodSymbol invokedMethod... method IsPureMethod (line 114) | private static bool IsPureMethod(IMethodSymbol invokedMethodSymbol, IN... method HasOnlySideEffectFreeMethods (line 118) | private static bool HasOnlySideEffectFreeMethods(INamedTypeSymbol cont... method IsLinqMethod (line 121) | private static bool IsLinqMethod(IMethodSymbol methodSymbol) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ReuseClientBase.cs class ReuseClientBase (line 20) | public abstract class ReuseClientBase : SonarDiagnosticAnalyzer method IsAssignedForReuse (line 33) | protected static bool IsAssignedForReuse(SonarSyntaxNodeReportingConte... method IsReusableClient (line 37) | protected bool IsReusableClient(SonarSyntaxNodeReportingContext context) method IsInVariableDeclaration (line 43) | private static bool IsInVariableDeclaration(SyntaxNode node) => method IsInFieldOrPropertyInitializer (line 46) | private static bool IsInFieldOrPropertyInitializer(SyntaxNode node) => method IsInConditionalCode (line 51) | private static bool IsInConditionalCode(SyntaxNode node) => method IsAssignedToStaticFieldOrProperty (line 54) | private static bool IsAssignedToStaticFieldOrProperty(SonarSyntaxNodeR... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ReversedOperators.cs class ReversedOperators (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 27) | protected override void Initialize(SonarAnalysisContext context) => method GetOperatorToken (line 34) | protected override SyntaxToken GetOperatorToken(PrefixUnaryExpressionS... method IsEqualsToken (line 36) | protected override bool IsEqualsToken(SyntaxToken token) => token.IsKi... method IsMinusToken (line 38) | protected override bool IsMinusToken(SyntaxToken token) => token.IsKin... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/RightCurlyBraceStartsLine.cs class RightCurlyBraceStartsLine (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method StartsLine (line 48) | private static bool StartsLine(SyntaxToken token) method IsOnSameLineAsOpenBrace (line 53) | private static bool IsOnSameLineAsOpenBrace(SyntaxToken closeBraceToken) method IsInitializer (line 59) | private static bool IsInitializer(SyntaxNode node) method GetDescendantCloseBraceTokens (line 67) | private static IEnumerable GetDescendantCloseBraceTokens(... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SecurityPInvokeMethodShouldNotBeCalled.cs class SecurityPInvokeMethodShouldNotBeCalled (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method MethodSymbolForInvalidInvocation (line 25) | protected override IMethodSymbol MethodSymbolForInvalidInvocation(Synt... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SelfAssignment.cs class SelfAssignment (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SerializationConstructorsShouldBeSecured.cs class SerializationConstructorsShouldBeSecured (line 20) | [Obsolete("This rule has been deprecated since 9.14")] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) method FindPossibleViolations (line 38) | private static void FindPossibleViolations(SonarSyntaxNodeReportingCon... method GetCASAttributes (line 78) | private static IEnumerable GetCASAttributes(IMethodSymb... class AttributeComparer (line 87) | private class AttributeComparer : IEqualityComparer method Equals (line 89) | public bool Equals(AttributeData x, AttributeData y) method AreNamedArgumentsEqual (line 96) | private bool AreNamedArgumentsEqual( method GetHashCode (line 121) | public int GetHashCode(AttributeData obj) => 1; FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SetLocaleForDataTypes.cs class SetLocaleForDataTypes (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) => method ProcessObjectCreations (line 49) | private static void ProcessObjectCreations(SonarSyntaxNodeReportingCon... method ProcessSimpleAssignments (line 71) | private static void ProcessSimpleAssignments(SonarSyntaxNodeReportingC... method ProcessCollectedSymbols (line 83) | private static void ProcessCollectedSymbols(SonarCompilationReportingC... method GetSymbolFromConstructorInvocation (line 94) | private static ISymbol GetSymbolFromConstructorInvocation(SyntaxNode c... method GetAssignmentTargetVariable (line 99) | private static SyntaxNode GetAssignmentTargetVariable(SyntaxNode objec... method GetAccessedVariable (line 108) | private static ISymbol GetAccessedVariable(SyntaxNode node, SemanticMo... method GetAssignmentTargetSymbol (line 125) | private static ISymbol GetAssignmentTargetSymbol(SyntaxNode objectCrea... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SetPropertiesInsteadOfMethods.cs class SetPropertiesInsteadOfMethods (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method HasCorrectArgumentCount (line 25) | protected override bool HasCorrectArgumentCount(InvocationExpressionSy... method TryGetOperands (line 28) | protected override bool TryGetOperands(InvocationExpressionSyntax invo... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ShiftDynamicNotInteger.cs class ShiftDynamicNotInteger (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method ShouldRaise (line 25) | protected override bool ShouldRaise(SemanticModel model, SyntaxNode le... method CanBeConvertedTo (line 28) | protected override bool CanBeConvertedTo(SyntaxNode expression, ITypeS... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ShouldImplementExportedInterfaces.cs class ShouldImplementExportedInterfaces (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetAttributeArguments (line 25) | protected override SeparatedSyntaxList? GetAt... method GetAttributeName (line 28) | protected override SyntaxNode GetAttributeName(AttributeSyntax attribu... method IsClassOrRecordSyntax (line 31) | protected override bool IsClassOrRecordSyntax(SyntaxNode syntaxNode) => method GetTypeOfOrGetTypeExpression (line 34) | protected override SyntaxNode GetTypeOfOrGetTypeExpression(SyntaxNode ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SingleStatementPerLine.cs class SingleStatementPerLine (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method StatementShouldBeExcluded (line 27) | protected override bool StatementShouldBeExcluded(StatementSyntax stat... method StatementIsSingleInLambda (line 30) | private static bool StatementIsSingleInLambda(StatementSyntax st) => method StatementIsBlock (line 36) | private static bool StatementIsBlock(StatementSyntax st) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SpecifyIFormatProviderOrCultureInfo.cs class SpecifyIFormatProviderOrCultureInfo (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method HasAnyFormatOrCultureParameter (line 70) | public static bool HasAnyFormatOrCultureParameter(ISymbol method) => method Initialize (line 73) | protected override void Initialize(SonarAnalysisContext context) => method CanPotentiallyRaise (line 89) | private static bool CanPotentiallyRaise(IMethodSymbol methodSymbol) => method IsIgnored (line 93) | private static bool IsIgnored(IMethodSymbol methodSymbol) => method ReturnsOrAcceptsFormattableType (line 98) | private static bool ReturnsOrAcceptsFormattableType(IMethodSymbol meth... method Matches (line 102) | private static bool Matches(MemberDescriptor memberDescriptor, IMethod... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SpecifyStringComparison.cs class SpecifyStringComparison (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) method IsInvalidCall (line 49) | private static bool IsInvalidCall(ExpressionSyntax expression, Semanti... method HasAnyStringComparisonParameter (line 58) | public static bool HasAnyStringComparisonParameter(IMethodSymbol method) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SqlKeywordsDelimitedBySpace.cs class SqlKeywordsDelimitedBySpace (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 84) | protected override void Initialize(SonarAnalysisContext context) => method HasSqlNamespace (line 102) | private static bool HasSqlNamespace(SyntaxList u... method BuildQualifiedNameSyntax (line 107) | private static QualifiedNameSyntax BuildQualifiedNameSyntax(string a, ... method BuildQualifiedNameSyntax (line 113) | private static QualifiedNameSyntax BuildQualifiedNameSyntax(string a, ... class StringConcatenationWalker (line 120) | private sealed class StringConcatenationWalker : SafeCSharpSyntaxWalker method StringConcatenationWalker (line 124) | public StringConcatenationWalker(SonarSyntaxNodeReportingContext con... method VisitInterpolatedStringExpression (line 127) | public override void VisitInterpolatedStringExpression(InterpolatedS... method VisitBinaryExpression (line 146) | public override void VisitBinaryExpression(BinaryExpressionSyntax node) method RaiseIssueIfNotDelimited (line 164) | private void RaiseIssueIfNotDelimited(List stringWrap... method TryGetStringWrapper (line 181) | private bool TryGetStringWrapper(ExpressionSyntax expression, out St... method TryExtractNestedStrings (line 214) | private bool TryExtractNestedStrings(BinaryExpressionSyntax node, Li... method TryGetConstantValues (line 236) | private bool TryGetConstantValues(InterpolatedStringExpressionSyntax... method StartsWithSqlKeyword (line 259) | private static bool StartsWithSqlKeyword(string firstString) => method IsInvalidCombination (line 263) | private static bool IsInvalidCombination(char first, char second) class StringWrapper (line 278) | private sealed class StringWrapper method StringWrapper (line 283) | internal StringWrapper(SyntaxNode node, string text) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/StaticFieldInGenericClass.cs class StaticFieldInGenericClass (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method CheckMember (line 60) | private static void CheckMember(SonarSyntaxNodeReportingContext contex... method CollectTypeParameterNames (line 68) | private static string[] CollectTypeParameterNames(SyntaxNode current) method HasGenericType (line 82) | private static bool HasGenericType(SonarSyntaxNodeReportingContext con... method BaseTypeHasGenericTypeArgument (line 87) | private static bool BaseTypeHasGenericTypeArgument(TypeDeclarationSynt... method HasGenericTypeArgument (line 90) | private static bool HasGenericTypeArgument(GenericNameSyntax genericTy... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/StaticFieldInitializerOrder.cs class StaticFieldInitializerOrder (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 39) | protected override void Initialize(SonarAnalysisContext context) => method IdentifierFields (line 67) | private static IEnumerable IdentifierFields(VariableDecl... method GetTypeDeclaration (line 82) | private static TypeDeclarationSyntax GetTypeDeclaration(IFieldSymbol f... type IdentifierTypeDeclarationMapping (line 85) | private sealed record IdentifierTypeDeclarationMapping(IFieldSymbol Fi... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/StaticFieldVisible.cs class StaticFieldVisible (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method GetDiagnostics (line 41) | private static IEnumerable GetDiagnostics(SemanticModel mo... method FieldIsRelevant (line 48) | private static bool FieldIsRelevant(FieldDeclarationSyntax node) => method FieldIsThreadSafe (line 55) | private static bool FieldIsThreadSafe(IFieldSymbol fieldSymbol) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/StaticFieldWrittenFrom.cs class StaticFieldWrittenFrom (line 20) | public abstract class StaticFieldWrittenFrom : SonarDiagnosticAnalyzer method IsValidCodeBlockContext (line 24) | protected abstract bool IsValidCodeBlockContext(SyntaxNode node, ISymb... method GetDiagnosticMessageArgument (line 25) | protected abstract string GetDiagnosticMessageArgument(SyntaxNode node... method Initialize (line 29) | protected sealed override void Initialize(SonarAnalysisContext context... method CollectLocationOfStaticField (line 94) | private static void CollectLocationOfStaticField(SemanticModel semanti... method GetStaticFieldSymbol (line 102) | private static IFieldSymbol GetStaticFieldSymbol(SemanticModel semanti... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/StaticFieldWrittenFromInstanceConstructor.cs class StaticFieldWrittenFromInstanceConstructor (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsValidCodeBlockContext (line 29) | protected override bool IsValidCodeBlockContext(SyntaxNode node, ISymb... method GetDiagnosticMessageArgument (line 33) | protected override string GetDiagnosticMessageArgument(SyntaxNode node... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/StaticFieldWrittenFromInstanceMember.cs class StaticFieldWrittenFromInstanceMember (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsValidCodeBlockContext (line 30) | protected override bool IsValidCodeBlockContext(SyntaxNode node, ISymb... method GetDiagnosticMessageArgument (line 35) | protected override string GetDiagnosticMessageArgument(SyntaxNode node... method DeclarationType (line 45) | private static string DeclarationType(SyntaxNode declaration) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/StaticSealedClassProtectedMembers.cs class StaticSealedClassProtectedMembers (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method ReportDiagnostics (line 58) | private static void ReportDiagnostics(SonarSyntaxNodeReportingContext ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/StreamReadStatement.cs class StreamReadStatement (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 40) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/StringConcatenationInLoop.cs class StringConcatenationInLoop (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method LeftMostExpression (line 40) | protected override SyntaxNode LeftMostExpression(SyntaxNode expression... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/StringFormatValidator.cs class StringFormatValidator (line 24) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 78) | protected override void Initialize(SonarAnalysisContext context) => method CheckForFormatStringIssues (line 81) | private static void CheckForFormatStringIssues(SonarSyntaxNodeReportin... method CanIgnoreFailure (line 121) | private static bool CanIgnoreFailure(ValidationFailureWithAdditionalDa... method TryParseAndValidate (line 133) | private static ValidationFailureWithAdditionalData TryParseAndValidate... method ExtractFormatItems (line 138) | private static ValidationFailureWithAdditionalData ExtractFormatItems(... method TryParseItem (line 197) | private static ValidationFailure TryParseItem(string formatItem, out F... method TryValidateFormatString (line 212) | private static ValidationFailureWithAdditionalData TryValidateFormatSt... method HasFormatItemIndexTooBig (line 249) | private static ValidationFailureWithAdditionalData HasFormatItemIndexT... method IsSimpleString (line 254) | private static ValidationFailureWithAdditionalData IsSimpleString(int ... method HasMissingFormatItemIndex (line 259) | private static ValidationFailureWithAdditionalData HasMissingFormatIte... method HasUnusedArguments (line 278) | private static ValidationFailureWithAdditionalData HasUnusedArguments(... class ValidationFailure (line 291) | public class ValidationFailure method ValidationFailure (line 307) | private ValidationFailure(string message) => class ValidationFailureWithAdditionalData (line 311) | private class ValidationFailureWithAdditionalData method ValidationFailureWithAdditionalData (line 316) | public ValidationFailureWithAdditionalData(ValidationFailure failure... method ToString (line 322) | public override string ToString() => class FormatStringItem (line 326) | private sealed class FormatStringItem method FormatStringItem (line 331) | public FormatStringItem(int index, int? alignment) class FormatStringArgument (line 338) | private sealed class FormatStringArgument method FormatStringArgument (line 344) | private FormatStringArgument(string name, ITypeSymbol typeSymbol, in... method Create (line 351) | public static FormatStringArgument Create(ExpressionSyntax expressio... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/StringLiteralShouldNotBeDuplicated.cs class StringLiteralShouldNotBeDuplicated (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsMatchingMethodParameterName (line 42) | protected override bool IsMatchingMethodParameterName(LiteralExpressio... method IsInnerInstance (line 49) | protected override bool IsInnerInstance(SonarSyntaxNodeReportingContex... method FindLiteralExpressions (line 54) | protected override IEnumerable FindLiteralExp... method LiteralToken (line 59) | protected override SyntaxToken LiteralToken(LiteralExpressionSyntax li... method IsNamedTypeOrTopLevelMain (line 62) | protected override bool IsNamedTypeOrTopLevelMain(SonarSyntaxNodeRepor... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/StringOffsetMethods.cs class StringOffsetMethods (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 39) | protected override void Initialize(SonarAnalysisContext context) method IsTargetMethodInvocation (line 57) | private bool IsTargetMethodInvocation(InvocationExpressionSyntax invoc... method HasSubstringMethodInvocationChild (line 60) | private bool HasSubstringMethodInvocationChild(InvocationExpressionSyn... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/StringOperationWithoutCulture.cs class StringOperationWithoutCulture (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) method ReportOnViolation (line 40) | private static void ReportOnViolation(SonarSyntaxNodeReportingContext ... method IsMethodOnNonIntegralOrDateTime (line 91) | private static bool IsMethodOnNonIntegralOrDateTime(IMethodSymbol meth... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/StringOrIntegralTypesForIndexers.cs class StringOrIntegralTypesForIndexers (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 35) | protected override void Initialize(SonarAnalysisContext context) => method IsGenericTypeParameter (line 60) | private static bool IsGenericTypeParameter(IParameterSymbol parameterS... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SuppressFinalizeUseless.cs class SuppressFinalizeUseless (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SuppressFinalizeUselessCodeFix.cs class SuppressFinalizeUselessCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 26) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SwaggerActionReturnType.cs class SwaggerActionReturnType (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 56) | protected override void Initialize(SonarAnalysisContext context) => method InvalidMethod (line 79) | private static InvalidMethodResult InvalidMethod(BaseMethodDeclaration... method FindSuccessResponses (line 93) | private static SyntaxNode[] FindSuccessResponses(SyntaxNode node, Sema... method IsControllerCandidate (line 121) | private static bool IsControllerCandidate(ISymbol symbol) method GetMessage (line 137) | private static string GetMessage(ISymbol symbol) => method HasProducesAttributesWithReturnType (line 142) | private static bool HasProducesAttributesWithReturnType(AttributeData ... method HasApiExplorerSettingsWithIgnoreApiTrue (line 147) | private static bool HasApiExplorerSettingsWithIgnoreApiTrue(AttributeD... method ContainsReturnType (line 151) | private static bool ContainsReturnType(AttributeData attribute) => type InvalidMethodResult (line 155) | private sealed record InvalidMethodResult(IMethodSymbol Symbol, Syntax... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SwitchCaseFallsThroughToDefault.cs class SwitchCaseFallsThroughToDefault (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SwitchCaseFallsThroughToDefaultCodeFix.cs class SwitchCaseFallsThroughToDefaultCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 26) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SwitchCasesMinimumThree.cs class SwitchCasesMinimumThree (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] type SwitchExpressionType (line 23) | private enum SwitchExpressionType method Initialize (line 40) | protected override void Initialize(SonarAnalysisContext context) method HasAtLeastThreeLabels (line 71) | private static bool HasAtLeastThreeLabels(SwitchStatementSyntax node) => method EvaluateType (line 74) | private static SwitchExpressionType EvaluateType(SwitchExpressionSynta... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SwitchDefaultClauseEmpty.cs class SwitchDefaultClauseEmpty (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method HasAnyComment (line 53) | private static bool HasAnyComment(SwitchSectionSyntax section) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SwitchDefaultClauseEmptyCodeFix.cs class SwitchDefaultClauseEmptyCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 26) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SwitchSectionShouldNotHaveTooManyStatements.cs class SwitchSectionShouldNotHaveTooManyStatements (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 28) | protected override void Initialize(SonarParametrizedAnalysisContext co... method GetSubStatements (line 50) | private IEnumerable GetSubStatements(StatementSyntax ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SwitchShouldNotBeNested.cs class SwitchShouldNotBeNested (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/SwitchWithoutDefault.cs class SwitchWithoutDefault (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method TryGetDiagnostic (line 30) | protected override bool TryGetDiagnostic(SyntaxNode node, out Diagnost... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TabCharacter.cs class TabCharacter (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TaskConfigureAwait.cs class TaskConfigureAwait (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TestClassShouldHaveTestMethod.cs class TestClassShouldHaveTestMethod (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 38) | protected override void Initialize(SonarAnalysisContext context) => method HasAnyTestMethod (line 54) | private static bool HasAnyTestMethod(INamespaceOrTypeSymbol symbol) => method IsViolatingRule (line 57) | private static bool IsViolatingRule(INamedTypeSymbol symbol) => method IsExceptionToTheRule (line 61) | private static bool IsExceptionToTheRule(ITypeSymbol symbol) => method HasSetupOrCleanupAttributes (line 66) | private static bool HasSetupOrCleanupAttributes(INamespaceOrTypeSymbol... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TestMethodShouldContainAssertion.cs class TestMethodShouldContainAssertion (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 63) | protected override void Initialize(SonarAnalysisContext context) => method ContainsAssertion (line 84) | private static bool ContainsAssertion(SyntaxNode methodDeclaration, Se... method IsAssertion (line 123) | private static bool IsAssertion(InvocationExpressionSyntax invocation) => method IsKnownAssertion (line 130) | private static bool IsKnownAssertion(ISymbol methodSymbol) => method IsCustomAssertion (line 134) | private static bool IsCustomAssertion(ISymbol methodSymbol) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TestMethodShouldHaveCorrectSignature.cs class TestMethodShouldHaveCorrectSignature (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 93) | protected override void Initialize(SonarAnalysisContext context) => method AnalyzeMethod (line 96) | private static void AnalyzeMethod(SonarSyntaxNodeReportingContext c) method HasAttributes (line 109) | private static bool HasAttributes(SyntaxNode node) => method GetValidator (line 114) | private static SignatureValidator GetValidator(IMethodSymbol method) => method GetFaultMessage (line 120) | private static string GetFaultMessage(SyntaxNode methodNode, IMethodSy... method GetFaultMessage (line 125) | private static string GetFaultMessage(IMethodSymbol methodSymbol, bool... method GetFaultMessageParts (line 128) | private static IEnumerable GetFaultMessageParts(IMethodSymbol ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TestMethodShouldNotBeIgnored.cs class TestMethodShouldNotBeIgnored (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 37) | protected override void Initialize(SonarAnalysisContext context) => method GetAllAttributes (line 60) | private static IEnumerable GetAllAttributes(SyntaxNode ... method HasReasonPhrase (line 65) | private static bool HasReasonPhrase(AttributeSyntax ignoreAttributeSyn... method HasTrailingComment (line 68) | private static bool HasTrailingComment(SyntaxNode ignoreAttributeSynta... method IsWorkItemAttribute (line 73) | private static bool IsWorkItemAttribute(AttributeData a) => method IsKnownIgnoreAttribute (line 76) | private static bool IsKnownIgnoreAttribute(AttributeSyntax attributeSy... method IsTestOrTestClassAttribute (line 85) | private static bool IsTestOrTestClassAttribute(AttributeData a) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TestsShouldNotUseThreadSleep.cs class TestsShouldNotUseThreadSleep (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method MethodDeclaration (line 25) | protected override SyntaxNode MethodDeclaration(MethodDeclarationSynta... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ThisShouldNotBeExposedFromConstructors.cs class ThisShouldNotBeExposedFromConstructors (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method IsClassMember (line 80) | private bool IsClassMember(ExpressionSyntax expression) => method IsThisExpression (line 84) | private static bool IsThisExpression(ExpressionSyntax expression) => method IsInstanceConstructor (line 88) | private static bool IsInstanceConstructor(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ThreadResumeOrSuspendShouldNotBeCalled.cs class ThreadResumeOrSuspendShouldNotBeCalled (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ThreadStaticNonStaticField.cs class ThreadStaticNonStaticField (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ThreadStaticNonStaticFieldCodeFix.cs class ThreadStaticNonStaticFieldCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 26) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ThreadStaticWithInitializer.cs class ThreadStaticWithInitializer (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => method HasThreadStaticAttribute (line 49) | private static bool HasThreadStaticAttribute(SyntaxList Conditionals(SyntaxNode exp... method IsLocalOrLambda (line 41) | protected override bool IsLocalOrLambda(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TooManyGenericParameters.cs class TooManyGenericParameters (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 38) | protected override void Initialize(SonarParametrizedAnalysisContext co... method EnclosingTypeName (line 81) | private static string EnclosingTypeName(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TooManyLabelsInSwitch.cs class TooManyLabelsInSwitch (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetExpression (line 55) | protected override SyntaxNode GetExpression(SwitchStatementSyntax stat... method GetSectionsCount (line 58) | protected override int GetSectionsCount(SwitchStatementSyntax statemen... method AllSectionsAreOneLiners (line 61) | protected override bool AllSectionsAreOneLiners(SwitchStatementSyntax ... method GetKeywordLocation (line 64) | protected override Location GetKeywordLocation(SwitchStatementSyntax s... method HasOneLine (line 67) | private static bool HasOneLine(SwitchSectionSyntax switchSection) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TooManyLoggingCalls.cs class TooManyLoggingCalls (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 69) | protected override void Initialize(SonarParametrizedAnalysisContext co... method Process (line 78) | private void Process(SonarSyntaxNodeReportingContext context) method Threshold (line 100) | private int Threshold(string category) method IsBlockNodeSupported (line 112) | private static bool IsBlockNodeSupported(SyntaxNode node) => class LoggingCallCollector (line 116) | private sealed class LoggingCallCollector : SafeCSharpSyntaxWalker method LoggingCallCollector (line 123) | public LoggingCallCollector(SemanticModel model, SyntaxNode currentB... method VisitBlock (line 129) | public override void VisitBlock(BlockSyntax node) method VisitInvocationExpression (line 137) | public override void VisitInvocationExpression(InvocationExpressionS... method VisitIfStatement (line 155) | public override void VisitIfStatement(IfStatementSyntax node) method VisitParenthesizedLambdaExpression (line 160) | public override void VisitParenthesizedLambdaExpression(Parenthesize... method VisitSimpleLambdaExpression (line 165) | public override void VisitSimpleLambdaExpression(SimpleLambdaExpress... method VisitSwitchStatement (line 170) | public override void VisitSwitchStatement(SwitchStatementSyntax node) method IsLoggerMethod (line 175) | private static bool IsLoggerMethod(string methodName) => method LoggingCategoryName (line 179) | private static string LoggingCategoryName(InvocationExpressionSyntax... method CategoryNameForLogLevel (line 183) | private static string CategoryNameForLogLevel(InvocationExpressionSy... method LogLevelArgumentName (line 195) | private static string LogLevelArgumentName(InvocationExpressionSynta... type LoggingCategory (line 204) | private sealed record LoggingCategory(string CategoryName, ImmutableHa... class DefaultThresholds (line 206) | private static class DefaultThresholds class CategoryNames (line 214) | private static class CategoryNames FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TooManyParameters.cs class TooManyParameters (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method UserFriendlyNameForNode (line 38) | protected override string UserFriendlyNameForNode(SyntaxNode node) => method CountParameters (line 41) | protected override int CountParameters(ParameterListSyntax parameterLi... method CanBeChanged (line 44) | protected override bool CanBeChanged(SyntaxNode node, SemanticModel se... method BaseParameterCount (line 47) | protected override int BaseParameterCount(SyntaxNode node) => method IsExtern (line 55) | protected override bool IsExtern(SyntaxNode node) => method RetrieveBasePrimaryConstructorArguments (line 58) | private static int RetrieveBasePrimaryConstructorArguments(ClassDeclar... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TrackNotImplementedException.cs class TrackNotImplementedException (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method ReportDiagnostic (line 54) | private static void ReportDiagnostic(SonarSyntaxNodeReportingContext c... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TryStatementsWithIdenticalCatchShouldBeMerged.cs class TryStatementsWithIdenticalCatchShouldBeMerged (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TypeExaminationOnSystemType.cs class TypeExaminationOnSystemType (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) => method CheckIsInstanceOfTypeCallWithTypeArgument (line 47) | private static void CheckIsInstanceOfTypeCallWithTypeArgument(SonarSyn... method CheckGetTypeCallOnType (line 70) | private static void CheckGetTypeCallOnType(SonarSyntaxNodeReportingCon... method IsException (line 88) | private static bool IsException(MemberAccessExpressionSyntax memberAcc... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TypeMemberVisibility.cs class TypeMemberVisibility (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 38) | protected override void Initialize(SonarAnalysisContext context) => method GetInvalidMemberLocations (line 54) | private static SecondaryLocation[] GetInvalidMemberLocations(SemanticM... method IsInterfaceImplementation (line 72) | private static bool IsInterfaceImplementation(SemanticModel semanticMo... method GetParentType (line 75) | private static BaseTypeDeclarationSyntax GetParentType(SyntaxNode node... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TypeNamesShouldNotMatchNamespaces.cs class TypeNamesShouldNotMatchNamespaces (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 44) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/TypesShouldNotExtendOutdatedBaseTypes.cs class TypesShouldNotExtendOutdatedBaseTypes (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 42) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UnaryPrefixOperatorRepeated.cs class UnaryPrefixOperatorRepeated (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetOperand (line 36) | protected override SyntaxNode GetOperand(PrefixUnaryExpressionSyntax u... method GetOperatorToken (line 39) | protected override SyntaxToken GetOperatorToken(PrefixUnaryExpressionS... method SameOperators (line 42) | protected override bool SameOperators(PrefixUnaryExpressionSyntax expr... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UnaryPrefixOperatorRepeatedCodeFix.cs class UnaryPrefixOperatorRepeatedCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 28) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method GetExpression (line 60) | private static void GetExpression(PrefixUnaryExpressionSyntax prefix, ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UnchangedLocalVariablesShouldBeConst.cs class UnchangedLocalVariablesShouldBeConst (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] type DeclarationType (line 27) | private enum DeclarationType method Initialize (line 39) | protected override void Initialize(SonarAnalysisContext context) => method FindDeclarationType (line 65) | private static DeclarationType FindDeclarationType(LocalDeclarationSta... method IsInitializedWithCompatibleConstant (line 98) | private static bool IsInitializedWithCompatibleConstant(VariableDeclar... method HasMutableUsagesInMethod (line 108) | private static bool HasMutableUsagesInMethod(SemanticModel model, Vari... method IsMutatingUse (line 137) | private static bool IsMutatingUse(SemanticModel model, IdentifierNameS... method IsUsedAsLambdaExpression (line 148) | private static bool IsUsedAsLambdaExpression(SemanticModel model, Iden... method ContainsInterpolation (line 167) | private static bool ContainsInterpolation(VariableDeclaratorSyntax dec... method Report (line 171) | private static void Report(SonarSyntaxNodeReportingContext c, Variable... method AdditionalMessageHints (line 178) | private static string AdditionalMessageHints(SemanticModel model, Vari... method IsAssignedToRefReadonly (line 183) | private static bool IsAssignedToRefReadonly(IdentifierNameSyntax ident... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UnchangedLocalVariablesShouldBeConstCodeFix.cs class UnchangedLocalVariablesShouldBeConstCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 30) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method ChangeDocument (line 47) | public static async Task ChangeDocument( method VariableDeclaration (line 63) | private static VariableDeclarationSyntax VariableDeclaration(SyntaxNod... method ConstantDeclaration (line 66) | private static LocalDeclarationStatementSyntax ConstantDeclaration(Var... method WithExplictType (line 72) | private static VariableDeclarationSyntax WithExplictType(VariableDecla... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UnconditionalJumpStatement.cs class UnconditionalJumpStatement (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetWalker (line 33) | protected override LoopWalkerBase GetWalk... class LoopWalker (line 36) | private class LoopWalker : LoopWalkerBase method LoopWalker (line 65) | public LoopWalker(SonarSyntaxNodeReportingContext context, ISet method TryGetTryAncestorStatements (line 76) | protected override bool TryGetTryAncestorStatements(StatementSyntax ... class CsLoopwalker (line 90) | private sealed class CsLoopwalker : SafeCSharpSyntaxWalker method CsLoopwalker (line 94) | public CsLoopwalker(LoopWalker loopWalker) method VisitContinueStatement (line 99) | public override void VisitContinueStatement(ContinueStatementSynta... method VisitBreakStatement (line 105) | public override void VisitBreakStatement(BreakStatementSyntax node) method VisitReturnStatement (line 111) | public override void VisitReturnStatement(ReturnStatementSyntax node) method VisitThrowStatement (line 117) | public override void VisitThrowStatement(ThrowStatementSyntax node) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UninvokedEventDeclaration.cs class UninvokedEventDeclaration (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => method RaiseOnUninvokedEventDeclaration (line 35) | private static void RaiseOnUninvokedEventDeclaration(SonarSymbolReport... method InvokedEventSymbols (line 61) | private static IEnumerable InvokedEventSymbols(CSharpRemovabl... method PossiblyCopiedSymbols (line 77) | private static IEnumerable PossiblyCopiedSymbols(CSharpRemova... method EventExpressionFromInvocation (line 102) | private static ExpressionSyntax EventExpressionFromInvocation(Invocati... method IsExplicitDelegateInvocation (line 115) | private static bool IsExplicitDelegateInvocation(IMethodSymbol symbol,... method IsDelegateInvocation (line 120) | private static bool IsDelegateInvocation(IMethodSymbol symbol) => method IsInvoke (line 126) | private static bool IsInvoke(IMethodSymbol symbol) => method IsDynamicInvoke (line 130) | private static bool IsDynamicInvoke(IMethodSymbol symbol) => method IsBeginInvoke (line 135) | private static bool IsBeginInvoke(IMethodSymbol symbol) => type NodeAndName (line 140) | file record struct NodeAndName(ExpressionSyntax Node, SimpleNameSyntax N... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UnnecessaryBitwiseOperation.cs class UnnecessaryBitwiseOperation (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) method CheckAssignment (line 46) | private void CheckAssignment(SonarSyntaxNodeReportingContext context, ... method CheckBinary (line 59) | private void CheckBinary(SonarSyntaxNodeReportingContext context, int ... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UnnecessaryBitwiseOperationCodeFix.cs class UnnecessaryBitwiseOperationCodeFix (line 23) | [ExportCodeFixProvider(LanguageNames.CSharp)] method CreateNewRoot (line 26) | protected override Func CreateNewRoot(SyntaxNode root, Tex... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UnnecessaryMathematicalComparison.cs class UnnecessaryMathematicalComparison (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method CheckComparisonOutOfRange (line 35) | private static void CheckComparisonOutOfRange(SonarSyntaxNodeReporting... method TryGetConstantValue (line 47) | private static bool TryGetConstantValue(SemanticModel model, BinaryExp... method TryGetRange (line 72) | private static ValuesRange? TryGetRange(ITypeSymbol typeSymbol) => type ValuesRange (line 82) | private readonly record struct ValuesRange(double Min, double Max) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UnnecessaryUsings.cs class UnnecessaryUsings (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 38) | protected override void Initialize(SonarAnalysisContext context) => method VisitContent (line 63) | private static void VisitContent(ISafeSyntaxWalker visitor, SyntaxList... method CheckUnnecessaryUsings (line 71) | private static void CheckUnnecessaryUsings(SonarSyntaxNodeReportingCon... class CSharpRemovableUsingWalker (line 91) | private sealed class CSharpRemovableUsingWalker : SafeCSharpSyntaxWalker method CSharpRemovableUsingWalker (line 100) | public CSharpRemovableUsingWalker(SonarSyntaxNodeReportingContext co... method VisitNamespaceDeclaration (line 111) | public override void VisitNamespaceDeclaration(NamespaceDeclarationS... method VisitInitializerExpression (line 114) | public override void VisitInitializerExpression(InitializerExpressio... method VisitIdentifierName (line 126) | public override void VisitIdentifierName(IdentifierNameSyntax node) method VisitGenericName (line 132) | public override void VisitGenericName(GenericNameSyntax node) method VisitAwaitExpression (line 138) | public override void VisitAwaitExpression(AwaitExpressionSyntax node) method VisitQueryExpression (line 148) | public override void VisitQueryExpression(QueryExpressionSyntax node) method Visit (line 158) | public override void Visit(SyntaxNode node) method VisitNamespace (line 173) | private void VisitNamespace(SyntaxList usings,... method TryGetSystemLinkNamespace (line 190) | private bool TryGetSystemLinkNamespace(out INamespaceSymbol systemLi... method VisitNameNode (line 209) | private void VisitNameNode(ExpressionSyntax node) => method VisitSymbol (line 212) | private void VisitSymbol(ISymbol symbol) class EquivalentNameSyntax (line 224) | internal sealed class EquivalentNameSyntax : IEquatable method GetHashCode (line 231) | public override int GetHashCode() => method Equals (line 234) | public override bool Equals(object obj) => method Equals (line 237) | public bool Equals(EquivalentNameSyntax other) => class NamespaceComparer (line 241) | internal sealed class NamespaceComparer : IEqualityComparer method GetHashCode (line 250) | public int GetHashCode(INamespaceSymbol obj) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UnnecessaryUsingsCodeFix.cs class UnnecessaryUsingsCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 26) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UnusedPrivateMember.cs class UnusedPrivateMember (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 44) | protected override void Initialize(SonarAnalysisContext context) => method NamedSymbolAction (line 72) | private static void NamedSymbolAction(SonarSymbolReportingContext cont... method AssociatedSymbols (line 87) | private static IEnumerable AssociatedSymbols(IEnumerable(TContext cont... method IsUsedWithReflection (line 148) | private static bool IsUsedWithReflection(ISymbol symbol, HashSet UnusedSymbols(SymbolUsageCollector usa... method IsDeconstructMethod (line 193) | private static bool IsDeconstructMethod(ISymbol symbol) => method IsAccessorUsed (line 198) | private static bool IsAccessorUsed(ISymbol symbol, SymbolUsageCollecto... method FieldAccessibilityForMessage (line 204) | private static string FieldAccessibilityForMessage(ISymbol symbol) => method ReportDiagnosticsForMembers (line 207) | private static void ReportDiagnosticsForMembers(TContext con... method ReportProperty (line 262) | private static void ReportProperty(TContext context, method VisitDeclaringReferences (line 285) | private static bool VisitDeclaringReferences(ISymbol symbol, ISafeSynt... method RetrieveRemovableSymbols (line 297) | private static CSharpRemovableSymbolWalker RetrieveRemovableSymbols(IN... method CopyRetrievedSymbols (line 305) | private static void CopyRetrievedSymbols(CSharpRemovableSymbolWalker r... class CSharpRemovableSymbolWalker (line 325) | private sealed class CSharpRemovableSymbolWalker : SafeCSharpSyntaxWalker method CSharpRemovableSymbolWalker (line 334) | public CSharpRemovableSymbolWalker(Func(TSymbol symbol, Func method StoreRemovableVariableDeclarations (line 492) | private void StoreRemovableVariableDeclarations(BaseFieldDeclaration... method IsEmptyConstructor (line 505) | private static bool IsEmptyConstructor(BaseMethodDeclarationSyntax c... method IsRemovableMethod (line 509) | private static bool IsRemovableMethod(IMethodSymbol methodSymbol) => method IsRemovable (line 518) | private static bool IsRemovable(ISymbol symbol) => method HasAttributes (line 527) | private static bool HasAttributes(ISymbol symbol) method IsRemovableMember (line 537) | private static bool IsRemovableMember(ISymbol symbol) => method IsRemovableType (line 541) | private static bool IsRemovableType(ISymbol typeSymbol) => method VisitBaseTypeDeclaration (line 548) | private void VisitBaseTypeDeclaration(SyntaxNode node) method IsPrivateOrInPrivateType (line 556) | private bool IsPrivateOrInPrivateType(SyntaxTokenList modifiers, boo... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UnusedPrivateMemberCodeFix.cs class UnusedPrivateMemberCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 27) | protected sealed override Task RegisterCodeFixesAsync(SyntaxNode root,... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UnusedReturnValue.cs class UnusedReturnValue (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) method AnalyzeNamedTypes (line 38) | private static void AnalyzeNamedTypes(SonarSymbolReportingContext cont... method AnalyzeLocalFunctionStatements (line 70) | private static void AnalyzeLocalFunctionStatements(SonarSyntaxNodeRepo... method IsReturnValueUsed (line 96) | private static bool IsReturnValueUsed(NodeSymbolAndModel matchingInvoc... method IsActionLambda (line 100) | private static bool IsActionLambda(SyntaxNode node, SemanticModel sema... method IsExpressionStatement (line 104) | private static bool IsExpressionStatement(SyntaxNode node) => method GetLocalMatchingInvocations (line 107) | private static IEnumerable GetLocalMatchingInvocat... method FilterInvocations (line 114) | private static IEnumerable FilterInvocations(NodeA... method CollectRemovableMethods (line 120) | private static IEnumerable method IsStringBuilderObjectCreation (line 74) | private static bool IsStringBuilderObjectCreation(ExpressionSyntax exp... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UriShouldNotBeHardcoded.cs class UriShouldNotBeHardcoded (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetRelevantAncestor (line 28) | protected override SyntaxNode GetRelevantAncestor(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseAwaitableMethod.cs class UseAwaitableMethod (line 23) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 35) | protected override void Initialize(SonarAnalysisContext context) => method BuildWellKnownExtensionMethodContainers (line 63) | private static WellKnownExtensionMethodContainer BuildWellKnownExtensi... method BuildExclusions (line 89) | private static ImmutableArray> BuildExclusio... method FindAwaitableAlternatives (line 111) | private static ImmutableArray FindAwaitableAlternatives(WellK... method GetMethodSymbolsInScope (line 138) | private static IEnumerable GetMethodSymbolsInScope(stri... method WellKnownExtensionMethodContainer (line 146) | private static IEnumerable WellKnownExtensionMethodC... method SpeculativeBindCandidates (line 151) | private static IEnumerable SpeculativeBindCandidates(Semantic... method SpeculativeBindCandidate (line 159) | private static IMethodSymbol SpeculativeBindCandidate(SemanticModel mo... method ReplaceInvocation (line 173) | private static SyntaxNode ReplaceInvocation(SyntaxNode awaitableRoot, ... method GetAwaitableRootOfInvocation (line 205) | private static ExpressionSyntax GetAwaitableRootOfInvocation(Expressio... method IsAsyncCodeBlock (line 215) | private static bool IsAsyncCodeBlock(SyntaxNode codeBlock) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseCharOverloadOfStringMethods.cs class UseCharOverloadOfStringMethods (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method HasCorrectArguments (line 25) | protected override bool HasCorrectArguments(InvocationExpressionSyntax... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseCharOverloadOfStringMethodsCodeFix.cs class UseCharOverloadOfStringMethodsCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 28) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method Convert (line 42) | private static LiteralExpressionSyntax Convert(LiteralExpressionSyntax... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseConstantLoggingTemplate.cs class UseConstantLoggingTemplate (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 83) | protected override void Initialize(SonarAnalysisContext context) => method ArgumentValue (line 100) | private static CSharpSyntaxNode ArgumentValue(InvocationExpressionSynt... method IsLog4NetExceptionMethod (line 113) | private static bool IsLog4NetExceptionMethod(IMethodSymbol method) => method InvalidSyntaxNode (line 116) | private static SyntaxNode InvalidSyntaxNode(SyntaxNode messageArgument... method AllMembersAreConstantStrings (line 122) | private static bool AllMembersAreConstantStrings(BinaryExpressionSynta... method IsConstantStringOrConcatenation (line 125) | private static bool IsConstantStringOrConcatenation(SyntaxNode node, S... method IsStringFormatInvocation (line 132) | private static bool IsStringFormatInvocation(SyntaxNode node, Semantic... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseConstantsWhereAppropriate.cs class UseConstantsWhereAppropriate (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 48) | protected override void Initialize(SonarAnalysisContext context) method IsFieldRelevant (line 80) | private static bool IsFieldRelevant(IFieldSymbol fieldSymbol) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseCurlyBraces.cs class UseCurlyBraces (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] class CheckedKind (line 31) | private sealed class CheckedKind method Initialize (line 88) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseDateTimeOffsetInsteadOfDateTime.cs class UseDateTimeOffsetInsteadOfDateTime (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseFindSystemTimeZoneById.cs class UseFindSystemTimeZoneById (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseGenericEventHandlerInstances.cs class UseGenericEventHandlerInstances (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 36) | protected override void Initialize(SonarAnalysisContext context) method AnalyzeEventType (line 58) | private static void AnalyzeEventType(SonarSyntaxNodeReportingContext a... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseGenericWithRefParameters.cs class UseGenericWithRefParameters (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => method IsRefObject (line 56) | private static bool IsRefObject(IParameterSymbol parameter) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseIFormatProviderForParsingDateAndTime.cs class UseIFormatProviderForParsingDateAndTime (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseIndexingInsteadOfLinqMethods.cs class UseIndexingInsteadOfLinqMethods (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetArgumentCount (line 25) | protected override int GetArgumentCount(InvocationExpressionSyntax inv... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseLambdaParameterInConcurrentDictionary.cs class UseLambdaParameterInConcurrentDictionary (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetArguments (line 25) | protected override SeparatedSyntaxList GetArguments(In... method IsLambdaAndContainsIdentifier (line 28) | protected override bool IsLambdaAndContainsIdentifier(ArgumentSyntax a... method TryGetKeyName (line 43) | protected override bool TryGetKeyName(ArgumentSyntax argument, out str... method IsContainingValidIdentifier (line 54) | private bool IsContainingValidIdentifier(SyntaxNode node, string keyNa... method IsContainedInNameOfInvocation (line 57) | private bool IsContainedInNameOfInvocation(IdentifierNameSyntax identi... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseNumericLiteralSeparator.cs class UseNumericLiteralSeparator (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) method ShouldHaveSeparator (line 55) | private static bool ShouldHaveSeparator(LiteralExpressionSyntax numeri... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseParamsForVariableArguments.cs class UseParamsForVariableArguments (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => method MethodSymbol (line 54) | private static IMethodSymbol MethodSymbol(SyntaxNode node, SemanticMod... method CheckModifiers (line 59) | private static bool CheckModifiers(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseShortCircuitingOperator.cs class UseShortCircuitingOperator (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetSuggestedOpName (line 25) | protected override string GetSuggestedOpName(BinaryExpressionSyntax no... method GetCurrentOpName (line 28) | protected override string GetCurrentOpName(BinaryExpressionSyntax node... method GetOperator (line 31) | protected override SyntaxToken GetOperator(BinaryExpressionSyntax expr... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseShortCircuitingOperatorCodeFix.cs class UseShortCircuitingOperatorCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method IsCandidateExpression (line 23) | internal override bool IsCandidateExpression(BinaryExpressionSyntax ex... method GetShortCircuitingExpressionNode (line 28) | protected override BinaryExpressionSyntax GetShortCircuitingExpression... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseStringCreate.cs class UseStringCreate (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) => method NameIsEqual (line 63) | private static bool NameIsEqual(SyntaxNode node, string name) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseStringIsNullOrEmpty.cs class UseStringIsNullOrEmpty (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) method IsStringIdentifier (line 65) | private static bool IsStringIdentifier(ExpressionSyntax expression, Se... method IsConstantEmptyString (line 77) | private static bool IsConstantEmptyString(ExpressionSyntax expression,... method IsStringEmptyConst (line 82) | private static bool IsStringEmptyConst(ExpressionSyntax expression, Se... method IsStringEmptyLiteral (line 89) | private static bool IsStringEmptyLiteral(ExpressionSyntax expression) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseTestableTimeProvider.cs class UseTestableTimeProvider (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Ignore (line 25) | protected override bool Ignore(SyntaxNode ancestor, SemanticModel sema... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseTrueForAll.cs class UseTrueForAll (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseUnixEpoch.cs class UseUnixEpoch (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsDateTimeKindUtc (line 25) | protected override bool IsDateTimeKindUtc(MemberAccessExpressionSyntax... method IsGregorianCalendar (line 28) | protected override bool IsGregorianCalendar(SyntaxNode node) => method IsZeroTimeOffset (line 31) | protected override bool IsZeroTimeOffset(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseUnixEpochCodeFix.cs class UseUnixEpochCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method ReplaceConstructorWithField (line 23) | protected override SyntaxNode ReplaceConstructorWithField(SyntaxNode r... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseUriInsteadOfString.cs class UseUriInsteadOfString (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 43) | protected override void Initialize(SonarAnalysisContext context) method VerifyMethodDeclaration (line 61) | private static void VerifyMethodDeclaration(SonarSyntaxNodeReportingCo... method VerifyPropertyDeclaration (line 95) | private static void VerifyPropertyDeclaration(SonarSyntaxNodeReporting... method VerifyRecordDeclaration (line 107) | private static void VerifyRecordDeclaration(SonarSyntaxNodeReportingCo... method StringUriParams (line 119) | private static IEnumerable StringUriParams(BaseParame... method VerifyInvocationAndCreation (line 122) | private static void VerifyInvocationAndCreation(SonarSyntaxNodeReporti... method VerifyReturnType (line 133) | private static void VerifyReturnType(SonarSyntaxNodeReportingContext c... method FindOverloadsThatUseUriTypeInPlaceOfString (line 143) | private static IEnumerable FindOverloadsThatUseUriTypeI... method StringUrlParamIndexes (line 157) | private static ISet StringUrlParamIndexes(IMethodSymbol methodSym... method OtherMethodOverrides (line 171) | private static IEnumerable OtherMethodOverrides(IMethod... method UsesUriInPlaceOfStringUri (line 177) | private static bool UsesUriInPlaceOfStringUri(IParameterSymbol paramSy... method NameContainsUri (line 182) | private static bool NameContainsUri(string name) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseValueParameter.cs class UseValueParameter (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method OnlyThrows (line 56) | private static bool OnlyThrows(AccessorDeclarationSyntax accessor) => method IsAccessorValue (line 60) | private static bool IsAccessorValue(IdentifierNameSyntax identifier, S... method GetAccessorType (line 70) | private static string GetAccessorType(AccessorDeclarationSyntax access... method GetPropertyAccessorKind (line 79) | private static string GetPropertyAccessorKind(AccessorDeclarationSynta... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseWhereBeforeOrderBy.cs class UseWhereBeforeOrderBy (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/UseWhileLoopInstead.cs class UseWhileLoopInstead (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Utilities/AnalysisWarningAnalyzer.cs class AnalysisWarningAnalyzer (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Utilities/CopyPasteTokenAnalyzer.cs class CopyPasteTokenAnalyzer (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsUsingDirective (line 36) | protected override bool IsUsingDirective(SyntaxNode node) => method GetCpdValue (line 39) | protected override string GetCpdValue(SyntaxToken token) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Utilities/FileMetadataAnalyzer.cs class FileMetadataAnalyzer (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Utilities/LogAnalyzer.cs class LogAnalyzer (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method LanguageVersion (line 25) | protected override string LanguageVersion(Compilation compilation) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Utilities/MetricsAnalyzer.cs class MetricsAnalyzer (line 23) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetMetrics (line 28) | protected override MetricsBase GetMetrics(SyntaxTree syntaxTree, Seman... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Utilities/SymbolReferenceAnalyzer.cs class SymbolReferenceAnalyzer (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetBindableParent (line 25) | protected override SyntaxNode GetBindableParent(SyntaxToken token) => method CreateDeclarationReferenceInfo (line 28) | protected override ReferenceInfo[] CreateDeclarationReferenceInfo(Synt... method GetDeclarations (line 45) | protected override IList GetDeclarations(SyntaxNode node) method CreateDeclarationReferenceInfo (line 52) | private static ReferenceInfo[] CreateDeclarationReferenceInfo(Variable... method CreateDeclarationReferenceInfo (line 55) | private static ReferenceInfo CreateDeclarationReferenceInfo(SyntaxNode... class DeclarationsFinder (line 58) | private sealed class DeclarationsFinder : SafeCSharpSyntaxWalker method Visit (line 82) | public override void Visit(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Utilities/TelemetryAnalyzer.cs class TelemetryAnalyzer (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method LanguageVersion (line 25) | protected override string LanguageVersion(Compilation compilation) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Utilities/TestMethodDeclarationsAnalyzer.cs class TestMethodDeclarationsAnalyzer (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetMethodDeclarations (line 25) | protected override IEnumerable GetMethodDeclarations(Synta... method GetTypeDeclarations (line 28) | protected override IEnumerable GetTypeDeclarations(SyntaxN... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/Utilities/TokenTypeAnalyzer.cs class TokenTypeAnalyzer (line 23) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetTokenClassifier (line 28) | protected override TokenClassifierBase GetTokenClassifier(SemanticMode... method GetTriviaClassifier (line 31) | protected override TriviaClassifierBase GetTriviaClassifier() => class TokenClassifier (line 34) | internal sealed class TokenClassifier : TokenClassifierBase method TokenClassifier (line 54) | public TokenClassifier(SemanticModel semanticModel, bool skipIdentif... method GetBindableParent (line 56) | protected override SyntaxNode GetBindableParent(SyntaxToken token) => method IsIdentifier (line 59) | protected override bool IsIdentifier(SyntaxToken token) => method IsKeyword (line 62) | protected override bool IsKeyword(SyntaxToken token) => method IsNumericLiteral (line 65) | protected override bool IsNumericLiteral(SyntaxToken token) => method IsStringLiteral (line 68) | protected override bool IsStringLiteral(SyntaxToken token) => method ClassifyIdentifier (line 71) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/i... method ClassifySimpleName (line 110) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/i... method ClassifySimpleNameExpression (line 116) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/i... method ClassifySimpleNameExpressionSpecialContext (line 128) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/i... method IsNameOf (line 143) | private bool IsNameOf(ArgumentSyntax argument) method NameIsRightOfIsExpression (line 153) | private bool NameIsRightOfIsExpression(NameSyntax name, SyntaxNode b... method ClassifySimpleNameExpressionSpecialNames (line 159) | private TokenType ClassifySimpleNameExpressionSpecialNames(SimpleNam... method IsValueParameterOfSetter (line 165) | private bool IsValueParameterOfSetter(SimpleNameSyntax simpleName) method IsLeftMostMemberAccess (line 176) | private static bool IsLeftMostMemberAccess(SimpleNameSyntax simpleName) method ClassifyMemberAccess (line 180) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/i... method AnyMemberAccessLeftIsNotAType (line 201) | private static bool AnyMemberAccessLeftIsNotAType(MemberAccessExpres... method ClassifyIdentifierByModel (line 214) | private TokenType ClassifyIdentifierByModel(SimpleNameSyntax name) => method ClassifyAliasDeclarationByModel (line 219) | private TokenType ClassifyAliasDeclarationByModel(UsingDirectiveSynt... method ClassifySimpleNameType (line 224) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/i... method ClassifySimpleNameTypeSpecialContext (line 230) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/i... method ClassifySimpleNameTypeInTypeContext (line 254) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/i... method IsInTypeContext (line 274) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/i... class TriviaClassifier (line 337) | internal sealed class TriviaClassifier : TriviaClassifierBase method IsRegularComment (line 351) | protected override bool IsRegularComment(SyntaxTrivia trivia) => method IsDocComment (line 354) | protected override bool IsDocComment(SyntaxTrivia trivia) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ValueTypeShouldImplementIEquatable.cs class ValueTypeShouldImplementIEquatable (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/ValuesUselesslyIncremented.cs class ValuesUselesslyIncremented (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method VisitParent (line 45) | private static void VisitParent(SonarSyntaxNodeReportingContext contex... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/VariableShadowsField.cs class VariableShadowsField (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method GetDeclarationOrDesignation (line 43) | private static SyntaxNode GetDeclarationOrDesignation(SyntaxNode node) => method Process (line 59) | private static void Process(SonarSyntaxNodeReportingContext context, S... method ExtractIdentifiers (line 71) | private static List ExtractIdentifiers(SyntaxNode node) => method GetContextSymbols (line 80) | private static List GetContextSymbols(SonarSyntaxNodeReportin... method ReportOnVariableMatchingField (line 88) | private static void ReportOnVariableMatchingField(SonarSyntaxNodeRepor... method GetSymbolName (line 97) | private static string GetSymbolName(ISymbol symbol) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/VariableUnused.cs class VariableUnused (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method IsExcludedDeclaration (line 25) | protected override bool IsExcludedDeclaration(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/VirtualEventField.cs class VirtualEventField (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/VirtualEventFieldCodeFix.cs class VirtualEventFieldCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 26) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/WcfMissingContractAttribute.cs class WcfMissingContractAttribute (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => method HasAnyMethodWithOperationContract (line 77) | private static bool HasAnyMethodWithOperationContract(INamespaceOrType... method GetTypeDeclaration (line 82) | private static TypeDeclarationSyntax GetTypeDeclaration(SonarSymbolRep... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/WcfNonVoidOneWay.cs class WcfNonVoidOneWay (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method GetReturnTypeLocation (line 33) | protected override Location GetReturnTypeLocation(MethodDeclarationSyn... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/WeakSslTlsProtocols.cs class WeakSslTlsProtocols (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/XMLSignatureCheck.cs class XmlSignatureCheck (line 22) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/XXE/XmlReaderSettingsValidator.cs class XmlReaderSettingsValidator (line 32) | internal class XmlReaderSettingsValidator method XmlReaderSettingsValidator (line 37) | public XmlReaderSettingsValidator(SemanticModel semanticModel, NetFram... method GetUnsafeAssignmentLocations (line 50) | public IList GetUnsafeAssignmentLocations(Invocatio... method IsMemberAccessOnSymbol (line 89) | private static bool IsMemberAccessOnSymbol(ExpressionSyntax expression... method GetAssignments (line 94) | private static IEnumerable GetAssignments(... method IsXmlResolverPropertySafeByDefault (line 99) | private static bool IsXmlResolverPropertySafeByDefault(NetFrameworkVer... method GetObjectCreation (line 102) | private static IObjectCreation GetObjectCreation(ISymbol symbol, Invoc... method IsXmlReaderSettingsCreationWithInitializer (line 111) | private static bool IsXmlReaderSettingsCreationWithInitializer(IObject... method IsXmlResolverDtdProcessingUnsafe (line 114) | private static bool IsXmlResolverDtdProcessingUnsafe(AssignmentExpress... method IsXmlResolverAssignmentUnsafe (line 122) | private static bool IsXmlResolverAssignmentUnsafe(AssignmentExpression... FILE: analyzers/src/SonarAnalyzer.CSharp/Rules/XmlExternalEntityShouldNotBeParsed.cs class XmlExternalEntityShouldNotBeParsed (line 24) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method XmlExternalEntityShouldNotBeParsed (line 40) | public XmlExternalEntityShouldNotBeParsed() : this(new NetFrameworkVer... method XmlExternalEntityShouldNotBeParsed (line 42) | internal /*for testing*/ XmlExternalEntityShouldNotBeParsed(NetFramewo... method Initialize (line 45) | protected override void Initialize(SonarAnalysisContext context) => method VerifyXmlReaderInvocations (line 83) | private void VerifyXmlReaderInvocations(SonarSyntaxNodeReportingContex... method VerifyXPathDocumentConstructor (line 104) | private void VerifyXPathDocumentConstructor(SonarSyntaxNodeReportingCo... method IsXPathDocumentSecureByDefault (line 120) | private static bool IsXPathDocumentSecureByDefault(NetFrameworkVersion... method ConstructorIsSafe (line 125) | private static bool ConstructorIsSafe(NetFrameworkVersion version) => class TrackerFactory (line 134) | private static class TrackerFactory method Create (line 155) | public static TrackersHolder Create() method IsAllowedValueForXmlTextReader (line 175) | private static bool IsAllowedValueForXmlTextReader(object constantVa... method IsUnsafeXmlResolverConstructor (line 189) | private static bool IsUnsafeXmlResolverConstructor(ISymbol symbol) => method IsAllowedObject (line 193) | private static bool IsAllowedObject(ISymbol symbol) => method IsUnsafeXmlResolverReturnType (line 198) | private static bool IsUnsafeXmlResolverReturnType(ISymbol symbol) => type TrackersHolder (line 203) | private readonly struct TrackersHolder method TrackersHolder (line 208) | internal TrackersHolder(CSharpObjectInitializationTracker xmlDocumen... FILE: analyzers/src/SonarAnalyzer.CSharp/Syntax/Extensions/ExpressionSyntaxExtensions.cs class ExpressionSyntaxExtensions (line 20) | internal static class ExpressionSyntaxExtensions method MapToPattern (line 29) | public static Dictionary MapToPattern(th... method FillPatternMap (line 36) | private static void FillPatternMap(Dictionary PrecedingIfsInConditionChain(th... method PrecedingStatementsInConditionChain (line 42) | public static IEnumerable PrecedingStatementsInCondit... method PrecedingConditionsInConditionChain (line 45) | public static IEnumerable PrecedingConditionsInCondi... FILE: analyzers/src/SonarAnalyzer.CSharp/Syntax/Extensions/InvocationExpressionSyntaxExtensions.cs class InvocationExpressionSyntaxExtensions (line 20) | internal static class InvocationExpressionSyntaxExtensions method HasOverloadWithType (line 22) | public static bool HasOverloadWithType(this InvocationExpressionSyntax... method IsCompatibleOverload (line 30) | private static bool IsCompatibleOverload(InvocationExpressionSyntax in... method InvocationParameters (line 37) | private static IMethodSymbol InvocationParameters(InvocationExpression... method SameParametersExceptWantedType (line 40) | private static bool SameParametersExceptWantedType(IMethodSymbol possi... method ConstructTypedPossibleOverload (line 71) | private static IMethodSymbol ConstructTypedPossibleOverload(IMethodSym... method VerifyCompatibility (line 80) | private static bool VerifyCompatibility(IParameterSymbol[] invocationP... FILE: analyzers/src/SonarAnalyzer.CSharp/Syntax/Extensions/SwitchSectionSyntaxExtensions.cs class SwitchSectionSyntaxExtensions (line 20) | internal static class SwitchSectionSyntaxExtensions method PrecedingSections (line 22) | public static IEnumerable PrecedingSections(this ... FILE: analyzers/src/SonarAnalyzer.CSharp/Syntax/Extensions/SyntaxNodeExtensions.cs class SyntaxNodeExtensions (line 20) | internal static class SyntaxNodeExtensions method IsInDebugBlock (line 22) | public static bool IsInDebugBlock(this SyntaxNode node) => method IsInConditionalDebug (line 25) | public static bool IsInConditionalDebug(this SyntaxNode node, Semantic... method ActiveConditionalCompilationSections (line 42) | public static IEnumerable ActiveConditionalCompilationSections... method FindDirectiveName (line 77) | private static string FindDirectiveName(BranchingDirectiveTriviaSyntax... method SafePop (line 82) | private static void SafePop(Stack stack) method CollectPrecedingDirectiveSyntax (line 90) | private static IList CollectPrecedingDirectiveS... class BranchingDirectiveCollector (line 100) | private sealed class BranchingDirectiveCollector : SafeCSharpSyntaxWalker method BranchingDirectiveCollector (line 107) | public BranchingDirectiveCollector(SyntaxNode terminatingNode) : bas... method Visit (line 110) | public override void Visit(SyntaxNode node) method VisitIfDirectiveTrivia (line 129) | public override void VisitIfDirectiveTrivia(IfDirectiveTriviaSyntax ... method VisitElseDirectiveTrivia (line 135) | public override void VisitElseDirectiveTrivia(ElseDirectiveTriviaSyn... method VisitElifDirectiveTrivia (line 141) | public override void VisitElifDirectiveTrivia(ElifDirectiveTriviaSyn... method VisitEndIfDirectiveTrivia (line 147) | public override void VisitEndIfDirectiveTrivia(EndIfDirectiveTriviaS... method AddDirective (line 153) | private void AddDirective(DirectiveTriviaSyntax node) method VisitTerminatingNodeLeadingTrivia (line 161) | private void VisitTerminatingNodeLeadingTrivia() FILE: analyzers/src/SonarAnalyzer.CSharp/Syntax/Utilities/AttributeSyntaxSymbolMapping.cs class AttributeSyntaxSymbolMapping (line 20) | internal class AttributeSyntaxSymbolMapping method AttributeSyntaxSymbolMapping (line 25) | private AttributeSyntaxSymbolMapping(AttributeSyntax node, IMethodSymb... method GetAttributesForParameter (line 31) | public static IEnumerable GetAttributesF... FILE: analyzers/src/SonarAnalyzer.CSharp/Syntax/Utilities/SymbolUsage.cs class SymbolUsage (line 20) | internal class SymbolUsage method SymbolUsage (line 28) | public SymbolUsage(ISymbol symbol) => FILE: analyzers/src/SonarAnalyzer.CSharp/Syntax/Utilities/SymbolUsageCollector.cs class SymbolUsageCollector (line 24) | internal class SymbolUsageCollector : SafeCSharpSyntaxWalker type SymbolAccess (line 26) | [Flags] method SymbolUsageCollector (line 54) | public SymbolUsageCollector(Compilation compilation, IEnumerable method ArgumentAccessType (line 306) | private static SymbolAccess ArgumentAccessType(ArgumentSyntax argument... method Symbols (line 321) | private ImmutableArray Symbols(TSyntaxNode node)... method ResolveSymbols (line 324) | private static IEnumerable ResolveSymbols(SymbolInfo symbolIn... method OriginalDefinition (line 330) | private static ISymbol OriginalDefinition(ISymbol candidateSymbol) => method TryStorePropertyAccess (line 335) | private void TryStorePropertyAccess(ExpressionSyntax node, IEnumerable... method StorePropertyAccess (line 348) | private void StorePropertyAccess(IPropertySymbol propertySymbol, Acces... method EvaluatePropertyAccesses (line 360) | private AccessorAccess EvaluatePropertyAccesses(ExpressionSyntax node) method IsKnownIdentifier (line 393) | private bool IsKnownIdentifier(SyntaxToken identifier) => method TryStoreFieldAccess (line 396) | private void TryStoreFieldAccess(IdentifierNameSyntax node, IEnumerabl... method FieldSymbolUsagesList (line 419) | private List FieldSymbolUsagesList(IEnumerable s... method FieldSymbolUsage (line 422) | private SymbolUsage FieldSymbolUsage(ISymbol symbol) => method TopmostSyntaxWithTheSameSymbol (line 425) | private static SyntaxNode TopmostSyntaxWithTheSameSymbol(SyntaxNode id... method ImplicitlyCalledConstructor (line 437) | private static IMethodSymbol ImplicitlyCalledConstructor(IMethodSymbol... method DefaultConstructor (line 446) | private static IMethodSymbol DefaultConstructor(INamedTypeSymbol named... method IsDefaultConstructor (line 450) | private static bool IsDefaultConstructor(IMethodSymbol constructor) => method Name (line 453) | private static string Name(ISymbol symbol) => FILE: analyzers/src/SonarAnalyzer.CSharp/Walkers/CatchLoggingInvocationWalker.cs class CatchLoggingInvocationWalker (line 29) | public class CatchLoggingInvocationWalker(SemanticModel model) : SafeCSh... method VisitCatchClause (line 54) | public override void VisitCatchClause(CatchClauseSyntax node) method VisitInvocationExpression (line 71) | public override void VisitInvocationExpression(InvocationExpressionSyn... method VisitParenthesizedLambdaExpression (line 90) | public override void VisitParenthesizedLambdaExpression(ParenthesizedL... method VisitSimpleLambdaExpression (line 95) | public override void VisitSimpleLambdaExpression(SimpleLambdaExpressio... method GetArgumentSymbolDerivedFromException (line 100) | private static ISymbol GetArgumentSymbolDerivedFromException(Invocatio... method IsLoggingInvocation (line 108) | private static bool IsLoggingInvocation(InvocationExpressionSyntax inv... method IsLoggingInvocation (line 111) | private static bool IsLoggingInvocation(InvocationExpressionSyntax inv... type LoggingInvocationDescriptor (line 116) | private record struct LoggingInvocationDescriptor(HashSet Meth... FILE: analyzers/src/SonarAnalyzer.CSharp/Walkers/ParameterValidationInMethodWalker.cs class ParameterValidationInMethodWalker (line 20) | internal class ParameterValidationInMethodWalker : SafeCSharpSyntaxWalker method ParameterValidationInMethodWalker (line 39) | public ParameterValidationInMethodWalker(SemanticModel model) => method Visit (line 42) | public override void Visit(SyntaxNode node) method VisitThrowStatement (line 51) | public override void VisitThrowStatement(ThrowStatementSyntax node) method VisitInvocationExpression (line 64) | public override void VisitInvocationExpression(InvocationExpressionSyn... FILE: analyzers/src/SonarAnalyzer.Core/AnalysisContext/IAnalysisContext.cs type IAnalysisContext (line 20) | public interface IAnalysisContext FILE: analyzers/src/SonarAnalyzer.Core/AnalysisContext/IReport.cs type IReport (line 20) | public interface IReport method CreateReportingContext (line 22) | ReportingContext CreateReportingContext(Diagnostic diagnostic); type ITreeReport (line 28) | public interface ITreeReport : IReport method ReportIssue (line 32) | void ReportIssue(DiagnosticDescriptor rule, method ReportIssue (line 38) | [Obsolete("Use another overload of ReportIssue, without calling Diagno... type ICompilationReport (line 45) | public interface ICompilationReport : IReport method ReportIssue (line 47) | void ReportIssue(GeneratedCodeRecognizer generatedCodeRecognizer, method ReportIssue (line 53) | [Obsolete("Use another overload of ReportIssue, without calling Diagno... FILE: analyzers/src/SonarAnalyzer.Core/AnalysisContext/IReportingContext.cs type IReportingContext (line 20) | public interface IReportingContext method ReportDiagnostic (line 25) | void ReportDiagnostic(Diagnostic diagnostic); FILE: analyzers/src/SonarAnalyzer.Core/AnalysisContext/IssueReporter.cs class IssueReporter (line 23) | public static class IssueReporter method ReportIssueCore (line 46) | public static void ReportIssueCore(Compilation compilation, method ReportIssueCore (line 64) | [Obsolete("Use another overload of ReportIssue, without calling Diagno... method SetMinimumDesignTimeRoslynVersion (line 92) | internal static void SetMinimumDesignTimeRoslynVersion(Version version... method GetMinimumDesignTimeRoslynVersion (line 95) | internal static Version GetMinimumDesignTimeRoslynVersion() => method IsTextMatchingVbcErrorPattern (line 98) | internal static bool IsTextMatchingVbcErrorPattern(string text) => method ShouldRaiseOnRazorFile (line 101) | private static bool ShouldRaiseOnRazorFile(ref Diagnostic diagnostic) method MapDiagnostic (line 133) | private static Diagnostic MapDiagnostic(Diagnostic diagnostic) method IsTriggeringVbcError (line 167) | private static bool IsTriggeringVbcError(Diagnostic diagnostic) FILE: analyzers/src/SonarAnalyzer.Core/AnalysisContext/ReportingContext.cs class ReportingContext (line 20) | public class ReportingContext : IReportingContext method ReportingContext (line 28) | public ReportingContext(SonarSyntaxNodeReportingContext context, Diagn... method ReportingContext (line 31) | public ReportingContext(SonarSyntaxTreeReportingContext context, Diagn... method ReportingContext (line 34) | public ReportingContext(SonarCompilationReportingContext context, Diag... method ReportingContext (line 37) | public ReportingContext(SonarSymbolReportingContext context, Diagnosti... method ReportingContext (line 40) | public ReportingContext(SonarCodeBlockReportingContext context, Diagno... method ReportingContext (line 43) | public ReportingContext(SonarSemanticModelReportingContext context, Di... method ReportingContext (line 46) | internal ReportingContext(Diagnostic diagnostic, Action ro... method ReportDiagnostic (line 54) | public void ReportDiagnostic(Diagnostic diagnostic) => FILE: analyzers/src/SonarAnalyzer.Core/AnalysisContext/ShouldAnalyzeTreeCache.cs class ShouldAnalyzeTreeCache (line 22) | internal class ShouldAnalyzeTreeCache type ShouldAnalyzeTree (line 24) | private enum ShouldAnalyzeTree method ShouldAnalyzeTreeCache (line 46) | public ShouldAnalyzeTreeCache(SyntaxTree tree) method ShouldAnalyze (line 59) | [PerformanceSensitive("")] method LegacyIsRegisteredActionEnabled (line 78) | [PerformanceSensitive("")] method ShouldAnalyzeRazorFile (line 83) | [PerformanceSensitive("")] FILE: analyzers/src/SonarAnalyzer.Core/AnalysisContext/SonarAnalysisContext.cs class SonarAnalysisContext (line 23) | public class SonarAnalysisContext method SonarAnalysisContext (line 58) | internal SonarAnalysisContext(RoslynAnalysisContext analysisContext, I... method SonarAnalysisContext (line 64) | private protected SonarAnalysisContext(SonarAnalysisContext context) :... method TryGetValue (line 66) | public bool TryGetValue(SourceText text, SourceTextValueProvid... method RegisterCodeBlockStartAction (line 69) | public void RegisterCodeBlockStartAction(GeneratedCodeRec... method RegisterCompilationAction (line 74) | public void RegisterCompilationAction(Action a... method RegisterSymbolStartAction (line 86) | public void RegisterSymbolStartAction(Action(GeneratedCodeRecognizer ge... method RegisterSemanticModelAction (line 95) | public void RegisterSemanticModelAction(GeneratedCodeRecognizer genera... method RegisterTreeAction (line 99) | public void RegisterTreeAction(GeneratedCodeRecognizer generatedCodeRe... method RegisterNodeActionInAllFiles (line 112) | public void RegisterNodeActionInAllFiles(Action(TSonarContext context, Action : IAnalysisContext method SonarAnalysisContextBase (line 29) | protected SonarAnalysisContextBase(SonarAnalysisContext analysisContex... FILE: analyzers/src/SonarAnalyzer.Core/AnalysisContext/SonarCodeBlockReportingContext.cs type SonarCodeBlockReportingContext (line 20) | public readonly record struct SonarCodeBlockReportingContext(SonarAnalys... FILE: analyzers/src/SonarAnalyzer.Core/AnalysisContext/SonarCodeBlockStartAnalysisContext.cs class SonarCodeBlockStartAnalysisContext (line 20) | public sealed class SonarCodeBlockStartAnalysisContext : So... method SonarCodeBlockStartAnalysisContext (line 29) | internal SonarCodeBlockStartAnalysisContext(SonarAnalysisContext analy... method RegisterNodeAction (line 31) | public void RegisterNodeAction(Action... method RegisterCodeBlockEndAction (line 34) | public void RegisterCodeBlockEndAction(Action method RegisterCodeFix (line 36) | public void RegisterCodeFix(string title, Func(SourceText text, SourceTextValueProvid... method TryGetValue (line 38) | public bool TryGetValue(SyntaxTree tree, SyntaxTreeValueProvid... method RegisterCodeBlockStartAction (line 41) | public void RegisterCodeBlockStartAction(GeneratedCodeRec... method RegisterSymbolAction (line 45) | public void RegisterSymbolAction(Action a... method RegisterSymbolStartAction (line 48) | public void RegisterSymbolStartAction(Action(Action(TSonarContext context, Action(Action a... method RegisterOperationBlockAction (line 41) | public void RegisterOperationBlockAction(Action(Action ToTags(this SourceScope sourceScope... method BuildUtilityTags (line 90) | private static string[] BuildUtilityTags() => method ToArray (line 94) | Union(new[] { WellKnownDiagnosticTags.NotConfigurable }) FILE: analyzers/src/SonarAnalyzer.Core/Analyzers/HotspotDiagnosticAnalyzer.cs class HotspotDiagnosticAnalyzer (line 20) | public abstract class HotspotDiagnosticAnalyzer : SonarDiagnosticAnalyzer method HotspotDiagnosticAnalyzer (line 24) | protected HotspotDiagnosticAnalyzer(IAnalyzerConfiguration configurati... method IsEnabled (line 27) | protected bool IsEnabled(AnalyzerOptions options) FILE: analyzers/src/SonarAnalyzer.Core/Analyzers/ParametrizedDiagnosticAnalyzer.cs class ParametrizedDiagnosticAnalyzer (line 22) | public abstract class ParametrizedDiagnosticAnalyzer : SonarDiagnosticAn... method Initialize (line 24) | protected abstract void Initialize(SonarParametrizedAnalysisContext co... method Initialize (line 26) | protected sealed override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.Core/Analyzers/SonarCodeFix.cs class SonarCodeFix (line 22) | public abstract class SonarCodeFix : CodeFixProvider method RegisterCodeFixesAsync (line 24) | protected abstract Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method GetFixAllProvider (line 26) | public override FixAllProvider GetFixAllProvider() => method RegisterCodeFixesAsync (line 29) | public sealed override async Task RegisterCodeFixesAsync(CodeFixContex... FILE: analyzers/src/SonarAnalyzer.Core/Analyzers/SonarDiagnosticAnalyzer.cs class SonarDiagnosticAnalyzer (line 24) | public abstract class SonarDiagnosticAnalyzer : DiagnosticAnalyzer method Initialize (line 28) | protected abstract void Initialize(SonarAnalysisContext context); method Initialize (line 32) | public sealed override void Initialize(RoslynAnalysisContext context) method IsConcurrentExecutionEnabled (line 43) | protected static bool IsConcurrentExecutionEnabled() method SonarDiagnosticAnalyzer (line 59) | protected SonarDiagnosticAnalyzer(string diagnosticId) => class SonarDiagnosticAnalyzer (line 50) | public abstract class SonarDiagnosticAnalyzer : SonarDiagno... method Initialize (line 28) | protected abstract void Initialize(SonarAnalysisContext context); method Initialize (line 32) | public sealed override void Initialize(RoslynAnalysisContext context) method IsConcurrentExecutionEnabled (line 43) | protected static bool IsConcurrentExecutionEnabled() method SonarDiagnosticAnalyzer (line 59) | protected SonarDiagnosticAnalyzer(string diagnosticId) => FILE: analyzers/src/SonarAnalyzer.Core/Analyzers/TrackerHotspotDiagnosticAnalyzer.cs class TrackerHotspotDiagnosticAnalyzer (line 22) | public abstract class TrackerHotspotDiagnosticAnalyzer : Ho... method Initialize (line 25) | protected abstract void Initialize(TrackerInput input); method TrackerHotspotDiagnosticAnalyzer (line 30) | protected TrackerHotspotDiagnosticAnalyzer(IAnalyzerConfiguration conf... method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.Core/Common/AnalyzerAdditionalFile.cs class AnalyzerAdditionalFile (line 23) | public sealed class AnalyzerAdditionalFile : AdditionalText method AnalyzerAdditionalFile (line 25) | public AnalyzerAdditionalFile(string path) method GetText (line 32) | public override SourceText GetText(CancellationToken cancel = default) => FILE: analyzers/src/SonarAnalyzer.Core/Common/AnalyzerConfiguration.cs class AnalyzerConfiguration (line 20) | public class AnalyzerConfiguration class AlwaysEnabledConfiguration (line 36) | private class AlwaysEnabledConfiguration : IAnalyzerConfiguration method AlwaysEnabledConfiguration (line 40) | public AlwaysEnabledConfiguration(bool forceSonarCfg) => method Initialize (line 43) | public void Initialize(AnalyzerOptions options) method IsEnabled (line 48) | public bool IsEnabled(string ruleKey) => true; class HotspotConfiguration (line 54) | internal /* for tests */ class HotspotConfiguration : IAnalyzerConfigu... method HotspotConfiguration (line 74) | public HotspotConfiguration(IRuleLoader ruleLoader) => this.ruleLoad... method IsEnabled (line 76) | public bool IsEnabled(string ruleKey) => method Initialize (line 85) | public void Initialize(AnalyzerOptions options) FILE: analyzers/src/SonarAnalyzer.Core/Common/AnalyzerLanguage.cs class AnalyzerLanguage (line 22) | public sealed class AnalyzerLanguage method AnalyzerLanguage (line 30) | private AnalyzerLanguage(string languageName, string fileExtension) method ToString (line 36) | public override string ToString() => method FromName (line 39) | public static AnalyzerLanguage FromName(string name) => method FromPath (line 47) | public static AnalyzerLanguage FromPath(string path) FILE: analyzers/src/SonarAnalyzer.Core/Common/BidirectionalDictionary.cs class BidirectionalDictionary (line 20) | internal class BidirectionalDictionary method Add (line 29) | public void Add(TA a, TB b) method GetByA (line 40) | public TB GetByA(TA a) => aToB[a]; method GetByB (line 42) | public TA GetByB(TB b) => bToA[b]; method ContainsKeyByA (line 44) | public bool ContainsKeyByA(TA a) => method ContainsKeyByB (line 47) | public bool ContainsKeyByB(TB b) => FILE: analyzers/src/SonarAnalyzer.Core/Common/Constants.cs class Constants (line 20) | public static class Constants FILE: analyzers/src/SonarAnalyzer.Core/Common/Conversions.cs class Conversions (line 20) | public static class Conversions method ToInt (line 22) | public static int? ToInt(object value) => method ToDouble (line 25) | public static double? ToDouble(object value) method ConvertWith (line 36) | public static T? ConvertWith(object value, Func converte... FILE: analyzers/src/SonarAnalyzer.Core/Common/DisjointSets.cs class DisjointSets (line 33) | public class DisjointSets method DisjointSets (line 37) | public DisjointSets(IEnumerable elements) => method Union (line 40) | public void Union(string from, string to) => method FindRoot (line 43) | public string FindRoot(string element) => method GetAllSets (line 47) | public List> GetAllSets() => FILE: analyzers/src/SonarAnalyzer.Core/Common/DocumentBasedFixAllProvider.cs class DocumentBasedFixAllProvider (line 23) | public class DocumentBasedFixAllProvider : FixAllProvider method DocumentBasedFixAllProvider (line 27) | private DocumentBasedFixAllProvider() method GetFixAllTitle (line 40) | private static string GetFixAllTitle(FixAllContext fixAllContext) method GetFixAsync (line 61) | public override Task GetFixAsync(FixAllContext fixAllContext) method GetFixedSolutionAsync (line 85) | private static async Task GetFixedSolutionAsync(FixAllContex... method GetFixedProjectAsync (line 96) | private static async Task GetFixedProjectAsync(FixAllContext... method GetFixedDocumentAsync (line 108) | private static async Task GetFixedDocumentAsync(FixAllCont... method GetReportedElement (line 172) | private static SyntaxNodeOrToken GetReportedElement(Diagnostic diagnos... method RemoveAnnotationIfExists (line 181) | private static SyntaxNode RemoveAnnotationIfExists(SyntaxNode root, Sy... method GetRootWithAnnotatedElements (line 203) | private static SyntaxNode GetRootWithAnnotatedElements(SyntaxNode root, method CreateAnnotationForDiagnostics (line 226) | private static void CreateAnnotationForDiagnostics(System.Collections.... FILE: analyzers/src/SonarAnalyzer.Core/Common/HashCode.cs class HashCode (line 23) | public static class HashCode // Replacement for System.HashCode that ... method DictionaryContentHash (line 31) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/pul... method EnumerableUnorderedContentHash (line 53) | public static int EnumerableUnorderedContentHash(IEnumerable(IEnumerable(T1 a, T2 b) => method Combine (line 65) | public static int Combine(T1 a, T2 b, T3 c) => method Combine (line 68) | public static int Combine(T1 a, T2 b, T3 c, T4 d) => method Combine (line 71) | public static int Combine(T1 a, T2 b, T3 c, T4 d, ... method AddHash (line 74) | [MethodImpl(MethodImplOptions.AggressiveInlining)] method AddHash (line 78) | [MethodImpl(MethodImplOptions.AggressiveInlining)] method RotateLeft (line 82) | [MethodImpl(MethodImplOptions.AggressiveInlining)] FILE: analyzers/src/SonarAnalyzer.Core/Common/IAnalyzerConfiguration.cs type IAnalyzerConfiguration (line 20) | public interface IAnalyzerConfiguration method IsEnabled (line 25) | bool IsEnabled(string ruleKey); method Initialize (line 27) | void Initialize(AnalyzerOptions options); FILE: analyzers/src/SonarAnalyzer.Core/Common/IRuleLoader.cs type IRuleLoader (line 20) | public interface IRuleLoader method GetEnabledRules (line 22) | ISet GetEnabledRules(string content); FILE: analyzers/src/SonarAnalyzer.Core/Common/ISafeSyntaxWalker.cs type ISafeSyntaxWalker (line 20) | public interface ISafeSyntaxWalker method SafeVisit (line 22) | public bool SafeVisit(SyntaxNode syntaxNode); FILE: analyzers/src/SonarAnalyzer.Core/Common/IsExternalInit.cs class IsExternalInit (line 26) | [EditorBrowsable(EditorBrowsableState.Never)] FILE: analyzers/src/SonarAnalyzer.Core/Common/MultiValueDictionary.cs class MultiValueDictionary (line 20) | public sealed class MultiValueDictionary : Dictionary Create() method Add (line 31) | public void Add(TKey key, TValue value) => method AddWithKey (line 34) | public void AddWithKey(TKey key, TValue value) method AddRangeWithKey (line 44) | public void AddRangeWithKey(TKey key, IEnumerable addedValues) class MultiValueDictionaryExtensions (line 60) | public static class MultiValueDictionaryExtensions method ToMultiValueDictionary (line 62) | public static MultiValueDictionary ToMultiValueDict... method ToMultiValueDictionary (line 65) | public static MultiValueDictionary ToMultiValueDiction... FILE: analyzers/src/SonarAnalyzer.Core/Common/NaturalLanguageDetector.cs class NaturalLanguageDetector (line 25) | public static class NaturalLanguageDetector method HumanLanguageScore (line 98) | public static double HumanLanguageScore(string text) method Index (line 135) | private static int Index(char ch) => method WordScore (line 138) | private static double WordScore(string word) method StripAccents (line 154) | private static string StripAccents(string input) => FILE: analyzers/src/SonarAnalyzer.Core/Common/NodeAndModel.cs type NodeAndModel (line 20) | public readonly record struct NodeAndModel(TSyntax Node, Semant... FILE: analyzers/src/SonarAnalyzer.Core/Common/NodeAndSymbol.cs type NodeAndSymbol (line 20) | public readonly record struct NodeAndSymbol(TSynta... type NodeAndSymbol (line 24) | public readonly record struct NodeAndSymbol(SyntaxNode Node, ISymbol Sym... FILE: analyzers/src/SonarAnalyzer.Core/Common/NodeSymbolAndModel.cs type NodeSymbolAndModel (line 20) | public readonly record struct NodeSymbolAndModel(TSynt... FILE: analyzers/src/SonarAnalyzer.Core/Common/Pair.cs type Pair (line 20) | public readonly record struct Pair(TLeft Left, TRight Rig... method From (line 24) | public static Pair From(TLeft left, TRig... method Swap (line 27) | public static void Swap(ref T left, ref T right) class Pair (line 22) | public static class Pair method From (line 24) | public static Pair From(TLeft left, TRig... method Swap (line 27) | public static void Swap(ref T left, ref T right) FILE: analyzers/src/SonarAnalyzer.Core/Common/PropertyType.cs type PropertyType (line 25) | public enum PropertyType FILE: analyzers/src/SonarAnalyzer.Core/Common/RuleDescriptor.cs type RuleDescriptor (line 20) | public record RuleDescriptor(string Id, string Title, string Type, strin... FILE: analyzers/src/SonarAnalyzer.Core/Common/RuleLoader.cs class RuleLoader (line 22) | public class RuleLoader : IRuleLoader method GetEnabledRules (line 24) | public ISet GetEnabledRules(string content) => FILE: analyzers/src/SonarAnalyzer.Core/Common/RuleParameterAttribute.cs class RuleParameterAttribute (line 22) | [AttributeUsage(AttributeTargets.Property)] method RuleParameterAttribute (line 30) | public RuleParameterAttribute(string key, PropertyType type, string de... method RuleParameterAttribute (line 38) | public RuleParameterAttribute(string key, PropertyType type, string de... method RuleParameterAttribute (line 43) | public RuleParameterAttribute(string key, PropertyType type, string de... method RuleParameterAttribute (line 48) | public RuleParameterAttribute(string key, PropertyType type, string de... method RuleParameterAttribute (line 53) | public RuleParameterAttribute(string key, PropertyType type) FILE: analyzers/src/SonarAnalyzer.Core/Common/SecondaryLocation.cs type SecondaryLocation (line 20) | public record SecondaryLocation(Location Location, string Message); FILE: analyzers/src/SonarAnalyzer.Core/Common/ShannonEntropy.cs class ShannonEntropy (line 20) | public static class ShannonEntropy method Calculate (line 23) | public static double Calculate(string input) FILE: analyzers/src/SonarAnalyzer.Core/Common/SourceScope.cs type SourceScope (line 20) | public enum SourceScope FILE: analyzers/src/SonarAnalyzer.Core/Common/TokenAndModel.cs type TokenAndModel (line 20) | public readonly record struct TokenAndModel(SyntaxToken Token, SemanticM... FILE: analyzers/src/SonarAnalyzer.Core/Common/TopLevelStatements.cs class TopLevelStatements (line 20) | public static class TopLevelStatements FILE: analyzers/src/SonarAnalyzer.Core/Common/UnexpectedLanguageException.cs class UnexpectedLanguageException (line 20) | public sealed class UnexpectedLanguageException : Exception method UnexpectedLanguageException (line 22) | public UnexpectedLanguageException(AnalyzerLanguage language) : this(l... method UnexpectedLanguageException (line 24) | public UnexpectedLanguageException(string language) : base($"Unexpecte... FILE: analyzers/src/SonarAnalyzer.Core/Common/UnexpectedValueException.cs class UnexpectedValueException (line 20) | public sealed class UnexpectedValueException : Exception method UnexpectedValueException (line 22) | public UnexpectedValueException(string name, object value) : base($"Un... FILE: analyzers/src/SonarAnalyzer.Core/Configuration/AnalysisConfig.cs class AnalysisConfig (line 29) | internal sealed class AnalysisConfig method AnalysisConfig (line 36) | public AnalysisConfig(XDocument document) method AnalysisConfig (line 47) | private AnalysisConfig() FILE: analyzers/src/SonarAnalyzer.Core/Configuration/AnalysisConfigReader.cs class AnalysisConfigReader (line 26) | public class AnalysisConfigReader method AnalysisConfigReader (line 32) | public AnalysisConfigReader(string analysisConfigPath) method UnchangedFiles (line 51) | public string[] UnchangedFiles() => method ConfigValue (line 56) | private string ConfigValue(string id) => FILE: analyzers/src/SonarAnalyzer.Core/Configuration/ConfigSetting.cs type ConfigSetting (line 28) | internal sealed record ConfigSetting(string Id, string Value) FILE: analyzers/src/SonarAnalyzer.Core/Configuration/FilesToAnalyzeProvider.cs class FilesToAnalyzeProvider (line 23) | public class FilesToAnalyzeProvider method FilesToAnalyzeProvider (line 27) | public FilesToAnalyzeProvider(string filePath) => method FindFiles (line 30) | public IEnumerable FindFiles(string fileName, bool onlyExistin... method FindFiles (line 33) | public IEnumerable FindFiles(Regex fullPathRegex, bool onlyExi... method ReadLines (line 36) | private static IEnumerable ReadLines(string filePath) method FilterByFileName (line 54) | private static bool FilterByFileName(string fullPath, string fileName) FILE: analyzers/src/SonarAnalyzer.Core/Configuration/ParameterLoader.cs class ParameterLoader (line 23) | internal static class ParameterLoader method SetParameterValues (line 36) | internal static void SetParameterValues(ParametrizedDiagnosticAnalyzer... method TryConvertToParameterType (line 60) | private static bool TryConvertToParameterType(string parameter, Proper... FILE: analyzers/src/SonarAnalyzer.Core/Configuration/ProjectConfig.cs class ProjectConfig (line 29) | internal class ProjectConfig method ProjectConfig (line 63) | public ProjectConfig(XDocument document) method ProjectConfig (line 81) | private ProjectConfig(string projectType) => FILE: analyzers/src/SonarAnalyzer.Core/Configuration/ProjectConfigReader.cs class ProjectConfigReader (line 26) | public class ProjectConfigReader method ProjectConfigReader (line 45) | public ProjectConfigReader(SourceText sonarProjectConfig) method ReadContent (line 53) | private static ProjectConfig ReadContent(SourceText sonarProjectConfig) method ParseProjectType (line 65) | private ProjectType ParseProjectType() => FILE: analyzers/src/SonarAnalyzer.Core/Configuration/ProjectType.cs type ProjectType (line 23) | public enum ProjectType FILE: analyzers/src/SonarAnalyzer.Core/Configuration/ProjectTypeCache.cs class ProjectTypeCache (line 22) | internal static class ProjectTypeCache method IsTest (line 52) | public static bool IsTest(this Compilation compilation) => class IsTestWrapper (line 56) | private sealed class IsTestWrapper method IsTestWrapper (line 60) | public IsTestWrapper(Compilation compilation) => FILE: analyzers/src/SonarAnalyzer.Core/Configuration/SonarLintXml.cs class SonarLintXml (line 28) | [XmlRoot(ElementName = "AnalysisInput")] class SonarLintXmlRule (line 42) | public class SonarLintXmlRule class SonarLintXmlKeyValuePair (line 52) | public class SonarLintXmlKeyValuePair FILE: analyzers/src/SonarAnalyzer.Core/Configuration/SonarLintXmlReader.cs class SonarLintXmlReader (line 25) | public class SonarLintXmlReader method SonarLintXmlReader (line 42) | public SonarLintXmlReader(SourceText sonarLintXmlText) method IgnoreHeaderComments (line 73) | public bool IgnoreHeaderComments(string language) => method AnalyzeGeneratedCode (line 81) | public bool AnalyzeGeneratedCode(string language) => method AnalyzeRazorCode (line 89) | public bool AnalyzeRazorCode(string language) => method IsFileIncluded (line 97) | public bool IsFileIncluded(string filePath, bool isTestProject) => method IsFileIncluded (line 102) | private static bool IsFileIncluded(string[] inclusions, string[] exclu... method IsIncluded (line 107) | private static bool IsIncluded(string[] inclusions, string filePath) => method IsExcluded (line 110) | private static bool IsExcluded(string[] exclusions, string filePath) => method ParseContent (line 113) | private static SonarLintXml ParseContent(SourceText sonarLintXml) FILE: analyzers/src/SonarAnalyzer.Core/Extensions/AnalyzerOptionsExtensions.cs class AnalyzerOptionsExtensions (line 24) | public static class AnalyzerOptionsExtensions method SonarLintXml (line 28) | public static SonarLintXmlReader SonarLintXml(this AnalyzerOptions opt... method SonarLintXml (line 43) | public static AdditionalText SonarLintXml(this AnalyzerOptions options... method SonarProjectConfig (line 46) | public static AdditionalText SonarProjectConfig(this AnalyzerOptions o... method ProjectOutFolderPath (line 49) | public static AdditionalText ProjectOutFolderPath(this AnalyzerOptions... method AdditionalFile (line 52) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/iss... FILE: analyzers/src/SonarAnalyzer.Core/Extensions/CompilationExtensions.cs class CompilationExtensions (line 20) | internal static class CompilationExtensions method GetTypeByMetadataName (line 22) | public static INamedTypeSymbol GetTypeByMetadataName(this Compilation ... method SpecialTypeMethod (line 25) | public static IMethodSymbol SpecialTypeMethod(this Compilation compila... method IsNetFrameworkTarget (line 28) | public static bool IsNetFrameworkTarget(this Compilation compilation) => method ReferencesAny (line 33) | public static bool ReferencesAny(this Compilation compilation, params ... method ReferencesAll (line 38) | public static bool ReferencesAll(this Compilation compilation, params ... method References (line 41) | public static bool References(this Compilation compilation, KnownAssem... method IsMemberAvailable (line 44) | public static bool IsMemberAvailable(this Compilation com... method ReferencesNetCoreControllers (line 58) | public static bool ReferencesNetCoreControllers(this Compilation compi... method ReferencesNetFrameworkControllers (line 62) | public static bool ReferencesNetFrameworkControllers(this Compilation ... FILE: analyzers/src/SonarAnalyzer.Core/Extensions/DiagnosticDescriptorExtensions.cs class DiagnosticDescriptorExtensions (line 20) | public static class DiagnosticDescriptorExtensions method IsEnabled (line 22) | public static bool IsEnabled(this DiagnosticDescriptor descriptor, Son... FILE: analyzers/src/SonarAnalyzer.Core/Extensions/DictionaryExtensions.cs class DictionaryExtensions (line 20) | public static class DictionaryExtensions method GetValueOrDefault (line 22) | public static TValue GetValueOrDefault(this IDictionary<... method GetValueOrDefault (line 25) | public static TValue GetValueOrDefault(this IDictionary<... method GetOrAdd (line 28) | public static TValue GetOrAdd(this IDictionary(this IDictionary(this HashSet hashset, IEnumerable... FILE: analyzers/src/SonarAnalyzer.Core/Extensions/IAnalysisContextExtensions.cs class IAnalysisContextExtensions (line 26) | public static class IAnalysisContextExtensions method SonarLintXml (line 36) | public static SonarLintXmlReader SonarLintXml(this T context) where... method IsRazorAnalysisEnabled (line 39) | public static bool IsRazorAnalysisEnabled(this T context) where T :... method IsTestProject (line 42) | public static bool IsTestProject(this T context) where T : IAnalysi... method ProjectConfiguration (line 53) | public static ProjectConfigReader ProjectConfiguration(this T conte... method HasMatchingScope (line 56) | public static bool HasMatchingScope(this T context, ImmutableArray<... method HasMatchingScope (line 70) | public static bool HasMatchingScope(this T context, DiagnosticDescr... method ShouldAnalyzeTree (line 86) | public static bool ShouldAnalyzeTree(this T context, SyntaxTree tre... method IsUnchanged (line 94) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/iss... method IsExcluded (line 104) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/iss... method CreateUnchangedFilesHashSet (line 122) | private static ImmutableHashSet CreateUnchangedFilesHashSet(Pr... method MapFilePath (line 125) | private static string MapFilePath(SyntaxTree tree) => FILE: analyzers/src/SonarAnalyzer.Core/Extensions/ICompilationReportExtensions.cs class ICompilationReportExtensions (line 21) | public static class ICompilationReportExtensions method ReportIssue (line 23) | public static void ReportIssue(this T context, GeneratedCodeRecogni... method ReportIssue (line 29) | public static void ReportIssue(this T context, GeneratedCodeRecogni... method ReportIssue (line 35) | public static void ReportIssue(this T context, GeneratedCodeRecogni... FILE: analyzers/src/SonarAnalyzer.Core/Extensions/IEnumerableExtensions.cs class IEnumerableExtensions (line 22) | public static class IEnumerableExtensions method ToHashSet (line 24) | public static HashSet ToHashSet(this IEnumerable enumerable, ... method Equals (line 35) | public static bool Equals(this IEnumerable first, IEnumerable... method WhereNotNull (line 56) | public static IEnumerable WhereNotNull(this IEnumerable enume... method WhereNotNull (line 59) | public static IEnumerable WhereNotNull(this IEnumerable enum... method IsEmpty (line 62) | public static bool IsEmpty(this IEnumerable enumerable) => method Merge (line 79) | public static IEnumerable Merge(thi... method IndexOf (line 94) | public static int IndexOf(this IEnumerable enumerable, Func(this IEnumerable enumerable, string... method JoinStr (line 108) | public static string JoinStr(this IEnumerable enumerable, string... method JoinStr (line 114) | public static string JoinStr(this IEnumerable enumerable, stri... method JoinStr (line 120) | public static string JoinStr(this IEnumerable enumerable, string ... method JoinNonEmpty (line 127) | public static string JoinNonEmpty(this IEnumerable enumerable,... method JoinAnd (line 140) | public static string JoinAnd(this IEnumerable values) => method JoinOr (line 153) | public static string JoinOr(this IEnumerable values) => method ToSecondary (line 156) | public static IEnumerable ToSecondary(this IEnumera... method ToSecondaryLocations (line 159) | public static IEnumerable ToSecondaryLocations(this... method ToSecondaryLocations (line 162) | public static IEnumerable ToSecondaryLocations(this... method ToSentence (line 165) | public static string ToSentence(this IEnumerable words, bool q... method JoinWith (line 185) | private static string JoinWith(this IEnumerable values, string w... FILE: analyzers/src/SonarAnalyzer.Core/Extensions/ITreeReportExtensions.cs class ITreeReportExtensions (line 21) | public static class ITreeReportExtensions method ReportIssue (line 23) | public static void ReportIssue(this T context, method ReportIssue (line 29) | public static void ReportIssue(this T context, method ReportIssue (line 36) | public static void ReportIssue(this T context, method ReportIssue (line 43) | public static void ReportIssue(this T context, method ReportIssue (line 49) | public static void ReportIssue(this T context, method ReportIssue (line 56) | public static void ReportIssue(this T context, method ReportIssue (line 63) | public static void ReportIssue(this T context, method ReportIssue (line 69) | public static void ReportIssue(this T context, method ReportIssue (line 76) | public static void ReportIssue(this T context, FILE: analyzers/src/SonarAnalyzer.Core/Extensions/IXmlLineInfoExtensions.cs class IXmlLineInfoExtensions (line 24) | internal static class IXmlLineInfoExtensions method CreateLocation (line 26) | public static Location CreateLocation(this IXmlLineInfo startPos, stri... FILE: analyzers/src/SonarAnalyzer.Core/Extensions/RegexExtensions.cs class RegexExtensions (line 22) | public static class RegexExtensions method SafeMatch (line 29) | public static Match SafeMatch(this Regex regex, string input) method SafeIsMatch (line 44) | public static bool SafeIsMatch(this Regex regex, string input) => method SafeIsMatch (line 50) | public static bool SafeIsMatch(this Regex regex, string input, bool ti... method SafeMatches (line 65) | public static MatchCollection SafeMatches(this Regex regex, string input) method SafeReplace (line 83) | public static string SafeReplace(this Regex regex, string input, strin... class SafeRegex (line 96) | public static class SafeRegex method IsMatch (line 101) | public static bool IsMatch(string input, string pattern, bool timeoutF... method IsMatch (line 105) | public static bool IsMatch(string input, string pattern, RegexOptions ... method IsMatch (line 109) | public static bool IsMatch(string input, string pattern, RegexOptions ... FILE: analyzers/src/SonarAnalyzer.Core/Extensions/SonarAnalysisContextExtensions.cs class SonarAnalysisContextExtensions (line 23) | public static class SonarAnalysisContextExtensions method ProjectConfiguration (line 27) | public static ProjectConfigReader ProjectConfiguration(this SonarAnaly... method IsRazorAnalysisEnabled (line 43) | public static bool IsRazorAnalysisEnabled(this SonarAnalysisContext co... FILE: analyzers/src/SonarAnalyzer.Core/Extensions/StackExtensions.cs class StackExtensions (line 20) | public static class StackExtensions method TryPop (line 22) | public static bool TryPop(this Stack stack, out T result) method Push (line 33) | public static void Push(this Stack stack, IEnumerable items) FILE: analyzers/src/SonarAnalyzer.Core/Extensions/StringExtensions.cs class StringExtensions (line 22) | public static class StringExtensions method ParseXDocument (line 24) | public static XDocument ParseXDocument(this string text) FILE: analyzers/src/SonarAnalyzer.Core/Extensions/XAttributeExtensions.cs class XAttributeExtensions (line 22) | public static class XAttributeExtensions method CreateLocation (line 24) | public static Location CreateLocation(this XAttribute attribute, strin... FILE: analyzers/src/SonarAnalyzer.Core/Extensions/XElementExtensions.cs class XElementExtensions (line 22) | public static class XElementExtensions method GetAttributeIfBoolValueIs (line 24) | public static XAttribute GetAttributeIfBoolValueIs(this XElement eleme... method CreateLocation (line 30) | public static Location CreateLocation(this XElement element, string pa... FILE: analyzers/src/SonarAnalyzer.Core/Facade/ILanguageFacade.cs type ILanguageFacade (line 22) | public interface ILanguageFacade method CreateDescriptor (line 30) | DiagnosticDescriptor CreateDescriptor(string id, string messageFormat,... method FindConstantValue (line 31) | object FindConstantValue(SemanticModel model, SyntaxNode node); method MethodParameterLookup (line 32) | IMethodParameterLookup MethodParameterLookup(SyntaxNode invocation, IM... method MethodParameterLookup (line 33) | IMethodParameterLookup MethodParameterLookup(SyntaxNode invocation, Se... method GetName (line 34) | string GetName(SyntaxNode expression); type ILanguageFacade (line 37) | public interface ILanguageFacade : ILanguageFacade where TS... method CreateDescriptor (line 30) | DiagnosticDescriptor CreateDescriptor(string id, string messageFormat,... method FindConstantValue (line 31) | object FindConstantValue(SemanticModel model, SyntaxNode node); method MethodParameterLookup (line 32) | IMethodParameterLookup MethodParameterLookup(SyntaxNode invocation, IM... method MethodParameterLookup (line 33) | IMethodParameterLookup MethodParameterLookup(SyntaxNode invocation, Se... method GetName (line 34) | string GetName(SyntaxNode expression); FILE: analyzers/src/SonarAnalyzer.Core/Facade/ISyntaxKindFacade.cs type ISyntaxKindFacade (line 20) | public interface ISyntaxKindFacade where TSyntaxKind : ... FILE: analyzers/src/SonarAnalyzer.Core/Facade/ITrackerFacade.cs type ITrackerFacade (line 22) | public interface ITrackerFacade where TSyntaxKind : struct FILE: analyzers/src/SonarAnalyzer.Core/Facade/SyntaxFacade.cs class SyntaxFacade (line 20) | public abstract class SyntaxFacade where TSyntaxKind : struct method AreEquivalent (line 22) | public abstract bool AreEquivalent(SyntaxNode firstNode, SyntaxNode se... method ArgumentExpressions (line 23) | public abstract IEnumerable ArgumentExpressions(SyntaxNode... method ArgumentIndex (line 24) | public abstract int? ArgumentIndex(SyntaxNode argument); method ArgumentList (line 25) | public abstract IReadOnlyList ArgumentList(SyntaxNode node); method ArgumentNameColon (line 26) | public abstract SyntaxToken? ArgumentNameColon(SyntaxNode argument); method AssignmentLeft (line 27) | public abstract SyntaxNode AssignmentLeft(SyntaxNode assignment); method AssignmentRight (line 28) | public abstract SyntaxNode AssignmentRight(SyntaxNode assignment); method AssignmentTargets (line 29) | public abstract ImmutableArray AssignmentTargets(SyntaxNod... method BinaryExpressionLeft (line 30) | public abstract SyntaxNode BinaryExpressionLeft(SyntaxNode binary); method BinaryExpressionRight (line 31) | public abstract SyntaxNode BinaryExpressionRight(SyntaxNode binary); method CastType (line 32) | public abstract SyntaxNode CastType(SyntaxNode cast); method CastExpression (line 33) | public abstract SyntaxNode CastExpression(SyntaxNode cast); method ComparisonKind (line 34) | public abstract ComparisonKind ComparisonKind(SyntaxNode node); method EnumMembers (line 35) | public abstract IEnumerable EnumMembers(SyntaxNode @enum); method FieldDeclarationIdentifiers (line 36) | public abstract ImmutableArray FieldDeclarationIdentifier... method HasExactlyNArguments (line 37) | public abstract bool HasExactlyNArguments(SyntaxNode invocation, int c... method InvocationIdentifier (line 38) | public abstract SyntaxToken? InvocationIdentifier(SyntaxNode invocation); method IsAnyKind (line 39) | public abstract bool IsAnyKind(SyntaxNode node, ISet synt... method IsAnyKind (line 40) | [Obsolete("Either use '.Kind() is A or B' or the overload with the ISe... method IsAnyKind (line 42) | public abstract bool IsAnyKind(SyntaxTrivia trivia, ISet ... method IsInExpressionTree (line 43) | public abstract bool IsInExpressionTree(SemanticModel model, SyntaxNod... method IsKind (line 44) | public abstract bool IsKind(SyntaxNode node, TSyntaxKind kind); method IsKind (line 45) | public abstract bool IsKind(SyntaxToken token, TSyntaxKind kind); method IsKind (line 46) | public abstract bool IsKind(SyntaxTrivia trivia, TSyntaxKind kind); method IsKnownAttributeType (line 47) | public abstract bool IsKnownAttributeType(SemanticModel model, SyntaxN... method IsMemberAccessOnKnownType (line 48) | public abstract bool IsMemberAccessOnKnownType(SyntaxNode memberAccess... method IsNullLiteral (line 49) | public abstract bool IsNullLiteral(SyntaxNode node); method IsPartOfBinaryNegationOrCondition (line 50) | public abstract bool IsPartOfBinaryNegationOrCondition(SyntaxNode node); method IsStatic (line 51) | public abstract bool IsStatic(SyntaxNode node); method IsWrittenTo (line 52) | public abstract bool IsWrittenTo(SyntaxNode expression, SemanticModel ... method Kind (line 53) | public abstract TSyntaxKind Kind(SyntaxNode node); method LiteralText (line 54) | public abstract string LiteralText(SyntaxNode literal); method LocalDeclarationIdentifiers (line 55) | public abstract ImmutableArray LocalDeclarationIdentifier... method ModifierKinds (line 56) | public abstract TSyntaxKind[] ModifierKinds(SyntaxNode node); method NodeExpression (line 57) | public abstract SyntaxNode NodeExpression(SyntaxNode node); method NodeIdentifier (line 58) | public abstract SyntaxToken? NodeIdentifier(SyntaxNode node); method ObjectCreationTypeIdentifier (line 59) | public abstract SyntaxToken? ObjectCreationTypeIdentifier(SyntaxNode o... method RemoveConditionalAccess (line 60) | public abstract SyntaxNode RemoveConditionalAccess(SyntaxNode node); method RemoveParentheses (line 61) | public abstract SyntaxNode RemoveParentheses(SyntaxNode node); method StringValue (line 62) | public abstract string StringValue(SyntaxNode node, SemanticModel model); method InterpolatedTextValue (line 63) | public abstract string InterpolatedTextValue(SyntaxNode node, Semantic... method Operands (line 64) | public abstract Pair Operands(SyntaxNode invoc... method ParseExpression (line 65) | public abstract SyntaxNode ParseExpression(string expression); method Cast (line 67) | protected static T Cast(SyntaxNode node) where T : SyntaxNode => method InvalidOperation (line 70) | protected static Exception InvalidOperation(SyntaxNode node, string me... FILE: analyzers/src/SonarAnalyzer.Core/Json/JsonException.cs class JsonException (line 24) | [Serializable] method JsonException (line 27) | public JsonException(string message, LinePosition position) : base($"{... method JsonException (line 29) | [ExcludeFromCodeCoverage] FILE: analyzers/src/SonarAnalyzer.Core/Json/JsonNode.cs class JsonNode (line 24) | public sealed class JsonNode : IEnumerable method JsonNode (line 45) | public JsonNode(LinePosition start, LinePosition end, object value) method JsonNode (line 53) | public JsonNode(LinePosition start, Kind kind) method FromString (line 70) | public static JsonNode FromString(string json) method ToLocation (line 82) | public Location ToLocation(string path) method UpdateEnd (line 90) | public void UpdateEnd(LinePosition end) => method Add (line 95) | public void Add(JsonNode value) method Add (line 107) | public void Add(string key, JsonNode value) => method ContainsKey (line 110) | public bool ContainsKey(string key) => method TryGetPropertyNode (line 113) | public bool TryGetPropertyNode(string key, out JsonNode node) => method GetEnumerator (line 116) | public IEnumerator GetEnumerator() => method GetEnumerator (line 119) | IEnumerator IEnumerable.GetEnumerator() => method InvalidKind (line 122) | private InvalidOperationException InvalidKind() => method NotInitializedEnd (line 125) | private bool NotInitializedEnd() => FILE: analyzers/src/SonarAnalyzer.Core/Json/JsonSerializer.cs class JsonSerializer (line 23) | public static class JsonSerializer method Serialize (line 25) | public static string Serialize(object value) => method SerializeKey (line 28) | private static string SerializeKey(string key) => method SerializeValue (line 31) | private static string SerializeValue(object original) => method SerializeValue (line 55) | private static string SerializeValue(string value) method SerializePairs (line 77) | private static string SerializePairs(IEnumerable method VisitList (line 53) | protected virtual void VisitList(JsonNode node) method VisitValue (line 61) | protected virtual void VisitValue(JsonNode node) FILE: analyzers/src/SonarAnalyzer.Core/Json/Parsing/Kind.cs type Kind (line 20) | public enum Kind FILE: analyzers/src/SonarAnalyzer.Core/Json/Parsing/LexicalAnalyzer.cs class LexicalAnalyzer (line 24) | internal class LexicalAnalyzer method LexicalAnalyzer (line 35) | public LexicalAnalyzer(string source) method CurrentPosition (line 53) | public LinePosition CurrentPosition(int increment) => method NextSymbol (line 56) | public Symbol NextSymbol() method NextPosition (line 103) | private void NextPosition(bool throwIfReachedEndOfInput = true) method SeekToNextLine (line 115) | private void SeekToNextLine(bool throwIfReachedEndOfInput) method SkipWhitespaceAndComments (line 129) | private void SkipWhitespaceAndComments() method ReadKeyword (line 179) | private void ReadKeyword(string keyword) method ReadStringValue (line 191) | private string ReadStringValue() method ReadNumberValue (line 248) | private object ReadNumberValue() FILE: analyzers/src/SonarAnalyzer.Core/Json/Parsing/Symbol.cs type Symbol (line 20) | internal enum Symbol FILE: analyzers/src/SonarAnalyzer.Core/Json/Parsing/SyntaxAnalyzer.cs class SyntaxAnalyzer (line 22) | internal class SyntaxAnalyzer method SyntaxAnalyzer (line 37) | public SyntaxAnalyzer(string source) => method Parse (line 40) | public JsonNode Parse() => method ReadNext (line 48) | private Symbol ReadNext() => method ParseObject (line 51) | private JsonNode ParseObject() method ObjectKeyValue (line 71) | private void ObjectKeyValue(JsonNode target) method ParseList (line 88) | private JsonNode ParseList() method ParseValue (line 108) | private JsonNode ParseValue() => method Unexpected (line 118) | private JsonException Unexpected(string expected) => FILE: analyzers/src/SonarAnalyzer.Core/Metrics/CognitiveComplexity.cs class CognitiveComplexity (line 20) | public class CognitiveComplexity method CognitiveComplexity (line 25) | public CognitiveComplexity(int complexity, ImmutableArray method VisitWithNesting (line 48) | public void VisitWithNesting(TSyntaxNode node, Action method IncreaseComplexityByNestingPlusOne (line 58) | public void IncreaseComplexityByNestingPlusOne(SyntaxToken token) method IncreaseComplexity (line 67) | public void IncreaseComplexity(SyntaxToken token, int increment, strin... FILE: analyzers/src/SonarAnalyzer.Core/Metrics/FileComments.cs class FileComments (line 20) | public class FileComments method FileComments (line 25) | public FileComments(ISet noSonar, ISet nonBlank) FILE: analyzers/src/SonarAnalyzer.Core/Metrics/MetricsBase.cs class MetricsBase (line 20) | public abstract class MetricsBase method ComputeCyclomaticComplexity (line 28) | public abstract int ComputeCyclomaticComplexity(SyntaxNode node); method IsEndOfFile (line 29) | protected abstract bool IsEndOfFile(SyntaxToken token); method ComputeCognitiveComplexity (line 30) | protected abstract int ComputeCognitiveComplexity(SyntaxNode node); method IsNoneToken (line 31) | protected abstract bool IsNoneToken(SyntaxToken token); method IsCommentTrivia (line 32) | protected abstract bool IsCommentTrivia(SyntaxTrivia trivia); method IsClass (line 33) | protected abstract bool IsClass(SyntaxNode node); method IsStatement (line 34) | protected abstract bool IsStatement(SyntaxNode node); method IsFunction (line 35) | protected abstract bool IsFunction(SyntaxNode node); method MetricsBase (line 51) | protected MetricsBase(SyntaxTree tree) method GetComments (line 57) | public FileComments GetComments(bool ignoreHeaderComments) method IsInSameFile (line 105) | protected bool IsInSameFile(FileLinePositionSpan span) => method GetMappedLineSpan (line 116) | private FileLinePositionSpan? GetMappedLineSpan(SyntaxToken token) => method CategorizeLines (line 124) | private static void CategorizeLines(string line, int lineNumber, ISet<... method HasValidCommentContent (line 141) | private static bool HasValidCommentContent(string content) => FILE: analyzers/src/SonarAnalyzer.Core/RegularExpressions/NamingPatterns.cs class NamingPatterns (line 22) | public static class NamingPatterns method IsRegexMatch (line 31) | internal static bool IsRegexMatch(string name, string pattern, bool ti... FILE: analyzers/src/SonarAnalyzer.Core/RegularExpressions/RegexContext.cs class RegexContext (line 22) | internal sealed class RegexContext method RegexContext (line 44) | public RegexContext(SyntaxNode patternNode, string pattern, SyntaxNode... method FromAttribute (line 64) | public static RegexContext FromAttribute(ILanguageFacade<... method FromCtor (line 79) | public static RegexContext FromCtor(ILanguageFacade(ILanguageFacade(ILanguageFacade FILE: analyzers/src/SonarAnalyzer.Core/Rules/AllBranchesShouldNotHaveSameImplementationBase.cs class AllBranchesShouldNotHaveSameImplementationBase (line 20) | public abstract class AllBranchesShouldNotHaveSameImplementationBase : S... class IfStatementAnalyzerBase (line 31) | protected abstract class IfStatementAnalyzerBase method GetStatements (line 35) | protected abstract IEnumerable GetStatements(TElseSyntax... method GetIfBlocksStatements (line 37) | protected abstract IEnumerable> GetIfBlocksS... method IsLastElseInChain (line 40) | protected abstract bool IsLastElseInChain(TElseSyntax elseSyntax); method GetLocation (line 42) | protected abstract Location GetLocation(TIfSyntax topLevelIf); method GetAnalysisAction (line 44) | public Action GetAnalysisAction(Dia... method AreEquivalent (line 64) | private static bool AreEquivalent(IEnumerable nodes1, IE... class TernaryStatementAnalyzerBase (line 68) | protected abstract class TernaryStatementAnalyzerBase method GetWhenTrue (line 71) | protected abstract SyntaxNode GetWhenTrue(TTernaryStatement ternaryS... method GetWhenFalse (line 73) | protected abstract SyntaxNode GetWhenFalse(TTernaryStatement ternary... method GetLocation (line 75) | protected abstract Location GetLocation(TTernaryStatement ternarySta... method GetAnalysisAction (line 77) | public Action GetAnalysisAction(Dia... class SwitchStatementAnalyzerBase (line 92) | protected abstract class SwitchStatementAnalyzerBase GetSections(TSwitchSt... method HasDefaultLabel (line 98) | protected abstract bool HasDefaultLabel(TSwitchStatement switchState... method AreEquivalent (line 100) | protected abstract bool AreEquivalent(TSwitchSection section1, TSwit... method GetLocation (line 102) | protected abstract Location GetLocation(TSwitchStatement switchState... method GetAnalysisAction (line 104) | public Action GetAnalysisAction(Dia... FILE: analyzers/src/SonarAnalyzer.Core/Rules/AlwaysSetDateTimeKindBase.cs class AlwaysSetDateTimeKindBase (line 20) | public abstract class AlwaysSetDateTimeKindBase : SonarDiag... method AlwaysSetDateTimeKindBase (line 30) | protected AlwaysSetDateTimeKindBase() : base(DiagnosticId) { } method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => method IsDateTimeConstructorWithoutKindParameter (line 44) | protected static bool IsDateTimeConstructorWithoutKindParameter(Syntax... FILE: analyzers/src/SonarAnalyzer.Core/Rules/ArrayPassedAsParamsBase.cs class ArrayPassedAsParamsBase (line 20) | public abstract class ArrayPassedAsParamsBase method IsArrayOfCandidateTypes (line 52) | private bool IsArrayOfCandidateTypes(TArgumentNode lastArgument, IMeth... FILE: analyzers/src/SonarAnalyzer.Core/Rules/AspNet/BackslashShouldBeAvoidedInAspNetRoutesBase.cs class BackslashShouldBeAvoidedInAspNetRoutesBase (line 20) | public abstract class BackslashShouldBeAvoidedInAspNetRoutesBase method Check (line 42) | protected void Check(SonarSyntaxNodeReportingContext c) method IsRouteTemplate (line 54) | private bool IsRouteTemplate(SemanticModel model, SyntaxNode node) => method HasStringSyntaxAttributeOfTypeRoute (line 61) | private static bool HasStringSyntaxAttributeOfTypeRoute(IParameterSymb... method IsRouteTemplateBeforeAspNet6 (line 66) | private static bool IsRouteTemplateBeforeAspNet6(IParameterSymbol para... method ContainsBackslash (line 72) | private static bool ContainsBackslash(string value) FILE: analyzers/src/SonarAnalyzer.Core/Rules/AspNet/RouteTemplateShouldNotStartWithSlashBase.cs class RouteTemplateShouldNotStartWithSlashBase (line 22) | public abstract class RouteTemplateShouldNotStartWithSlashBase method ReportIssues (line 62) | private void ReportIssues(SonarSymbolReportingContext context, INamedT... method RouteAttributeTemplateArguments (line 88) | private static Dictionary RouteAttributeTemplateArgu... type ActionParametersInfo (line 101) | private readonly record struct ActionParametersInfo(Dictionary FILE: analyzers/src/SonarAnalyzer.Core/Rules/AvoidUnsealedAttributesBase.cs class AvoidUnsealedAttributesBase (line 20) | public abstract class AvoidUnsealedAttributesBase : SonarDi... method AvoidUnsealedAttributesBase (line 27) | protected AvoidUnsealedAttributesBase() : base(DiagnosticId) { } method Initialize (line 29) | protected sealed override void Initialize(SonarAnalysisContext context... FILE: analyzers/src/SonarAnalyzer.Core/Rules/BeginInvokePairedWithEndInvokeBase.cs class BeginInvokePairedWithEndInvokeBase (line 20) | public abstract class BeginInvokePairedWithEndInvokeBase method IsDelegate (line 61) | protected static bool IsDelegate(IMethodSymbol methodSymbol) => method IsParentDeclarationWithEndInvoke (line 64) | protected bool IsParentDeclarationWithEndInvoke(SyntaxNode node, Seman... method ParentMethodContainsEndInvoke (line 78) | private bool ParentMethodContainsEndInvoke(SyntaxNode node, SemanticMo... method IsParentDeclaration (line 82) | private bool IsParentDeclaration(SyntaxNode node) class EndInvokeContext (line 85) | protected class EndInvokeContext method EndInvokeContext (line 93) | public EndInvokeContext(BeginInvokePairedWithEndInvokeBase method VisitInvocationExpression (line 103) | public bool VisitInvocationExpression(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.Core/Rules/BinaryOperationWithIdenticalExpressionsBase.cs class BinaryOperationWithIdenticalExpressionsBase (line 20) | public abstract class BinaryOperationWithIdenticalExpressionsBase : Sona... FILE: analyzers/src/SonarAnalyzer.Core/Rules/BooleanCheckInvertedBase.cs class BooleanCheckInvertedBase (line 20) | public abstract class BooleanCheckInvertedBase : Sona... method LogicalNotNode (line 25) | protected abstract SyntaxNode LogicalNotNode(TBinaryExpression express... method SuggestedReplacement (line 27) | protected abstract string SuggestedReplacement(TBinaryExpression expre... method IsUnsafeInversionOperation (line 29) | protected abstract bool IsUnsafeInversionOperation(TBinaryExpression e... method AnalysisAction (line 31) | protected Action AnalysisAction(Diagn... method IsNullable (line 47) | protected static bool IsNullable(SyntaxNode expression, SemanticModel ... method IsFloatingPoint (line 51) | protected static bool IsFloatingPoint(SyntaxNode expression, SemanticM... method IsUserDefinedOperator (line 54) | private static bool IsUserDefinedOperator(TBinaryExpression expression... FILE: analyzers/src/SonarAnalyzer.Core/Rules/BooleanLiteralUnnecessaryBase.cs class BooleanLiteralUnnecessaryBase (line 20) | public abstract class BooleanLiteralUnnecessaryBase : Sonar... type ErrorLocation (line 27) | protected enum ErrorLocation method GetLeftNode (line 42) | protected abstract SyntaxNode GetLeftNode(SyntaxNode node); method GetRightNode (line 43) | protected abstract SyntaxNode GetRightNode(SyntaxNode node); method GetOperatorToken (line 44) | protected abstract SyntaxToken? GetOperatorToken(SyntaxNode node); method IsTrue (line 45) | protected abstract bool IsTrue(SyntaxNode syntaxNode); method IsFalse (line 46) | protected abstract bool IsFalse(SyntaxNode syntaxNode); method Initialize (line 48) | protected override void Initialize(SonarAnalysisContext context) => method IsInsideTernaryWithThrowExpression (line 55) | protected virtual bool IsInsideTernaryWithThrowExpression(SyntaxNode s... method BooleanLiteralUnnecessaryBase (line 59) | protected BooleanLiteralUnnecessaryBase() : base(DiagnosticId) { } method CheckAndExpression (line 62) | protected void CheckAndExpression(SonarSyntaxNodeReportingContext cont... method CheckOrExpression (line 79) | protected void CheckOrExpression(SonarSyntaxNodeReportingContext context) method CheckEquals (line 95) | protected void CheckEquals(SonarSyntaxNodeReportingContext context) method CheckNotEquals (line 109) | protected void CheckNotEquals(SonarSyntaxNodeReportingContext context) method CheckTernaryExpressionBranches (line 123) | protected void CheckTernaryExpressionBranches(SonarSyntaxNodeReporting... method CheckForNullabilityAndBooleanConstantsReport (line 148) | protected bool CheckForNullabilityAndBooleanConstantsReport(SonarSynta... method CheckForBooleanConstant (line 178) | protected void CheckForBooleanConstant(SonarSyntaxNodeReportingContext... method CheckForBooleanConstantOnLeft (line 199) | private void CheckForBooleanConstantOnLeft(SonarSyntaxNodeReportingCon... method CheckForBooleanConstantOnRight (line 202) | private void CheckForBooleanConstantOnRight(SonarSyntaxNodeReportingCo... method CalculateExtendedLocation (line 205) | private Location CalculateExtendedLocation(SyntaxNode parent, bool isL... method TypeShouldBeIgnored (line 215) | private bool TypeShouldBeIgnored(SyntaxNode node, SemanticModel model) FILE: analyzers/src/SonarAnalyzer.Core/Rules/BypassingAccessibilityBase.cs class BypassingAccessibilityBase (line 22) | public abstract class BypassingAccessibilityBase : TrackerH... method BypassingAccessibilityBase (line 28) | protected BypassingAccessibilityBase(IAnalyzerConfiguration configurat... method Initialize (line 31) | protected override void Initialize(TrackerInput input) FILE: analyzers/src/SonarAnalyzer.Core/Rules/CatchRethrowBase.cs class CatchRethrowBase (line 20) | public abstract class CatchRethrowBase : Sona... method AllCatches (line 26) | protected abstract TCatchClause[] AllCatches(SyntaxNode node); method DeclarationType (line 27) | protected abstract SyntaxNode DeclarationType(TCatchClause catchClause); method HasFilter (line 28) | protected abstract bool HasFilter(TCatchClause catchClause); method ContainsOnlyThrow (line 29) | protected abstract bool ContainsOnlyThrow(TCatchClause currentCatch); method CatchRethrowBase (line 33) | protected CatchRethrowBase() : base(DiagnosticId) { } method RaiseOnInvalidCatch (line 35) | protected void RaiseOnInvalidCatch(SonarSyntaxNodeReportingContext con... method IsRedundantToFollowingCatches (line 67) | private static bool IsRedundantToFollowingCatches(int catchIndex, TCat... method ComputeExceptionTypes (line 81) | private INamedTypeSymbol[] ComputeExceptionTypes(IEnumerable CreateNodeEqua... method FindReturnAndThrowExpressions (line 52) | protected abstract TExpressionSyntax[] FindReturnAndThrowExpressions(I... method IsTrueLiteral (line 53) | protected abstract bool IsTrueLiteral(TExpressionSyntax expression); method VariableInitializer (line 54) | protected abstract TExpressionSyntax VariableInitializer(TVariableSynt... method LambdaLocations (line 55) | protected abstract ImmutableArray LambdaLocations(Inspection... method LocalVariableScope (line 56) | protected abstract SyntaxNode LocalVariableScope(TVariableSyntax varia... method ExtractArgumentExpressionNode (line 57) | protected abstract SyntaxNode ExtractArgumentExpressionNode(SyntaxNode... method SyntaxFromReference (line 58) | protected abstract SyntaxNode SyntaxFromReference(SyntaxReference refe... method CertificateValidationCheckBase (line 62) | protected CertificateValidationCheckBase() : base(DiagnosticId) { } method CheckAssignmentSyntax (line 64) | protected void CheckAssignmentSyntax(SonarSyntaxNodeReportingContext c) method CheckConstructorParameterSyntax (line 75) | protected void CheckConstructorParameterSyntax(SonarSyntaxNodeReportin... method ParamLocations (line 92) | protected ImmutableArray ParamLocations(InspectionContext c,... method BlockLocations (line 116) | protected ImmutableArray BlockLocations(InspectionContext c,... method FindRootTypeDeclaration (line 131) | protected virtual SyntaxNode FindRootTypeDeclaration(SyntaxNode node) method IsTypeDeclaration (line 142) | private bool IsTypeDeclaration(SyntaxNode node) => method TryReportLocations (line 145) | private void TryReportLocations(InspectionContext c, Location primaryL... method IsValidationDelegateType (line 155) | private static bool IsValidationDelegateType(ITypeSymbol type) method ArgumentLocations (line 176) | private ImmutableArray ArgumentLocations(InspectionContext c... method VisitInvocation (line 202) | private ImmutableArray VisitInvocation(TInvocationExpression... method IdentifierLocations (line 214) | private ImmutableArray IdentifierLocations(InspectionContext... method VariableLocations (line 224) | private ImmutableArray VariableLocations(InspectionContext c... method InvocationLocations (line 248) | private ImmutableArray InvocationLocations(InspectionContext... method IsVisited (line 255) | private bool IsVisited(InspectionContext c, SyntaxNode expression) => method MultiExpressionSublocations (line 260) | private ImmutableArray MultiExpressionSublocations(Inspectio... method CallStackSublocations (line 273) | private ImmutableArray CallStackSublocations(InspectionConte... method FindInvocationList (line 288) | private ImmutableArray FindInvocationList... method SymbolFromCorrectModel (line 308) | private static ISymbol SymbolFromCorrectModel(SyntaxNode node, Semanti... type InspectionContext (line 314) | protected readonly struct InspectionContext method InspectionContext (line 319) | public InspectionContext(SonarSyntaxNodeReportingContext context) FILE: analyzers/src/SonarAnalyzer.Core/Rules/CheckFileLicenseBase.cs class CheckFileLicenseBase (line 23) | public abstract class CheckFileLicenseBase : ParametrizedDiagnosticAnalyzer method CheckFileLicenseBase (line 43) | protected CheckFileLicenseBase() => method Initialize (line 46) | protected override void Initialize(SonarParametrizedAnalysisContext co... method IsRegexPatternValid (line 67) | private static bool IsRegexPatternValid(string pattern) method HasValidLicenseHeader (line 80) | private bool HasValidLicenseHeader(SyntaxNode node) method AreHeadersEqual (line 92) | private bool AreHeadersEqual(string currentHeader) method CreateDiagnosticProperties (line 106) | private ImmutableDictionary CreateDiagnosticProperties... FILE: analyzers/src/SonarAnalyzer.Core/Rules/ClassNamedExceptionBase.cs class ClassNamedExceptionBase (line 20) | public abstract class ClassNamedExceptionBase : SonarDiagno... method ClassNamedExceptionBase (line 27) | protected ClassNamedExceptionBase() : base(DiagnosticId) { } method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/ClassNotInstantiatableBase.cs class ClassNotInstantiatableBase (line 20) | public abstract class ClassNotInstantiatableBase CollectRemovableDec... method ClassNotInstantiatableBase (line 30) | protected ClassNotInstantiatableBase() : base(DiagnosticId) { } method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => method IsClassTypeDeclaration (line 35) | private bool IsClassTypeDeclaration(SyntaxNode node) => method IsAnyConstructorCalled (line 38) | private bool IsAnyConstructorCalled(INamedTypeSymbol namedType, IEnume... method CheckClassWithOnlyUnusedPrivateConstructors (line 49) | private void CheckClassWithOnlyUnusedPrivateConstructors(SonarSymbolRe... method IsAnyNestedTypeExtendingCurrentType (line 77) | private bool IsAnyNestedTypeExtendingCurrentType(IEnumerable des... method HasNonPrivateConstructor (line 91) | private static bool HasNonPrivateConstructor(IEnumerable GetConstructors(IEnumerable<... method HasOnlyStaticMembers (line 99) | private static bool HasOnlyStaticMembers(ICollection members) => method IsNonStaticClassWithNoAttributes (line 103) | private static bool IsNonStaticClassWithNoAttributes(INamedTypeSymbol ... method HasOnlyCandidateConstructors (line 108) | private static bool HasOnlyCandidateConstructors(ICollection class ConstructorContext (line 116) | protected class ConstructorContext method ConstructorContext (line 121) | public ConstructorContext(NodeAndModel nodeAndModel... FILE: analyzers/src/SonarAnalyzer.Core/Rules/ClassShouldNotBeEmptyBase.cs class ClassShouldNotBeEmptyBase (line 20) | public abstract class ClassShouldNotBeEmptyBase method ShouldIgnoreBecauseOfName (line 63) | private static bool ShouldIgnoreBecauseOfName(SyntaxToken identifier) => method ShouldIgnoreBecauseOfBaseClassOrInterface (line 67) | private bool ShouldIgnoreBecauseOfBaseClassOrInterface(SyntaxNode node... method ShouldIgnoreType (line 71) | private static bool ShouldIgnoreType(TDeclarationSyntax node, Semantic... method HasNonPublicDefaultConstructor (line 77) | private static bool HasNonPublicDefaultConstructor(TDeclarationSyntax ... FILE: analyzers/src/SonarAnalyzer.Core/Rules/CognitiveComplexityBase.cs class CognitiveComplexityBase (line 22) | public abstract class CognitiveComplexityBase : Parametrize... method CognitiveComplexityBase (line 42) | protected CognitiveComplexityBase() => method CheckComplexity (line 45) | protected void CheckComplexity(SonarSyntaxNodeReportingContex... FILE: analyzers/src/SonarAnalyzer.Core/Rules/CollectionEmptinessCheckingBase.cs class CollectionEmptinessCheckingBase (line 20) | public abstract class CollectionEmptinessCheckingBase : Son... method CollectionEmptinessCheckingBase (line 25) | protected CollectionEmptinessCheckingBase() : base(DiagnosticId) { } method Initialize (line 27) | protected override void Initialize(SonarAnalysisContext context) => method CheckExpression (line 45) | private void CheckExpression(SonarSyntaxNodeReportingContext context, ... method TryGetCountCall (line 54) | private bool TryGetCountCall(SyntaxNode expression, SemanticModel mode... FILE: analyzers/src/SonarAnalyzer.Core/Rules/CommentKeywordBase.cs class CommentKeywordBase (line 22) | public abstract class CommentKeywordBase : SonarDiagnosticAnalyzer method IsComment (line 36) | protected abstract bool IsComment(SyntaxTrivia trivia); method CommentKeywordBase (line 40) | protected CommentKeywordBase() method Initialize (line 47) | protected sealed override void Initialize(SonarAnalysisContext context... method GetKeywordLocations (line 69) | private static IEnumerable GetKeywordLocations(SyntaxTree tr... method AllIndexesOf (line 85) | private static IEnumerable AllIndexesOf(string text, string value... method IsWordAt (line 95) | private static bool IsWordAt(string text, int index, int count) FILE: analyzers/src/SonarAnalyzer.Core/Rules/CommentsShouldNotBeEmptyBase.cs class CommentsShouldNotBeEmptyBase (line 20) | public abstract class CommentsShouldNotBeEmptyBase : SonarD... method GetCommentText (line 25) | protected abstract string GetCommentText(SyntaxTrivia trivia); method IsValidTriviaType (line 26) | protected abstract bool IsValidTriviaType(SyntaxTrivia trivia); method CommentsShouldNotBeEmptyBase (line 30) | protected CommentsShouldNotBeEmptyBase() : base(DiagnosticId) { } method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => method CheckTrivia (line 50) | private void CheckTrivia(SonarSyntaxTreeReportingContext context, IEnu... method PartitionComments (line 66) | private List> PartitionComments(IEnumerable method IsEndOfLine (line 138) | private bool IsEndOfLine(SyntaxTrivia trivia) => method IsWhitespace (line 141) | private bool IsWhitespace(SyntaxTrivia trivia) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/ConditionalStructureSameConditionBase.cs class ConditionalStructureSameConditionBase (line 20) | public abstract class ConditionalStructureSameConditionBase : SonarDiagn... method ConditionalStructureSameConditionBase (line 31) | protected ConditionalStructureSameConditionBase() => FILE: analyzers/src/SonarAnalyzer.Core/Rules/ConditionalStructureSameImplementationBase.cs class ConditionalStructureSameImplementationBase (line 20) | public abstract class ConditionalStructureSameImplementationBase : Sonar... FILE: analyzers/src/SonarAnalyzer.Core/Rules/ConstructorArgumentValueShouldExistBase.cs class ConstructorArgumentValueShouldExistBase (line 20) | public abstract class ConstructorArgumentValueShouldExistBase method GetConstructorParameterNames (line 47) | private static IEnumerable GetConstructorParameterNames(INamed... FILE: analyzers/src/SonarAnalyzer.Core/Rules/DangerousGetHandleShouldNotBeCalledBase.cs class DangerousGetHandleShouldNotBeCalledBase (line 22) | public abstract class DangerousGetHandleShouldNotBeCalledBase TypeNodesOfTemporalKeyPrope... method DateAndTimeShouldNotBeUsedasTypeForPrimaryKeyBase (line 39) | protected DateAndTimeShouldNotBeUsedasTypeForPrimaryKeyBase() : base(D... method Initialize (line 41) | protected override void Initialize(SonarAnalysisContext context) => method IsKeyPropertyBasedOnName (line 56) | protected static bool IsKeyPropertyBasedOnName(string propertyName, st... method IsTemporalType (line 60) | protected virtual bool IsTemporalType(string propertyTypeName) => method MatchesAttributeName (line 64) | protected bool MatchesAttributeName(string attributeName, string[] can... method ShouldRegisterAction (line 67) | private static bool ShouldRegisterAction(Compilation compilation) => method TypeNamesForAttribute (line 71) | private static string[] TypeNamesForAttribute(KnownType attributeType)... method RemoveFromEnd (line 79) | private static string RemoveFromEnd(string text, string subtextFromEnd... FILE: analyzers/src/SonarAnalyzer.Core/Rules/DateTimeFormatShouldNotBeHardcodedBase.cs class DateTimeFormatShouldNotBeHardcodedBase (line 20) | public abstract class DateTimeFormatShouldNotBeHardcodedBase method AnalyzeInvocation (line 45) | private void AnalyzeInvocation(SonarSyntaxNodeReportingContext analysi... FILE: analyzers/src/SonarAnalyzer.Core/Rules/DebuggerDisplayUsesExistingMembersBase.cs class DebuggerDisplayUsesExistingMembersBase (line 23) | public abstract class DebuggerDisplayUsesExistingMembersBase ResolvableIdentifiers(Sy... method DebuggerDisplayUsesExistingMembersBase (line 42) | protected DebuggerDisplayUsesExistingMembersBase() : base(DiagnosticId... method Initialize (line 44) | protected override void Initialize(SonarAnalysisContext context) => method FirstInvalidExpression (line 65) | private string FirstInvalidExpression(SonarSyntaxNodeReportingContext ... FILE: analyzers/src/SonarAnalyzer.Core/Rules/DeclareTypesInNamespacesBase.cs class DeclareTypesInNamespacesBase (line 20) | public abstract class DeclareTypesInNamespacesBase : SonarD... method IsInnerTypeOrWithinNamespace (line 26) | protected abstract bool IsInnerTypeOrWithinNamespace(SyntaxNode declar... method GetTypeIdentifier (line 27) | protected abstract SyntaxToken GetTypeIdentifier(SyntaxNode declaration); method IsException (line 28) | protected abstract bool IsException(SyntaxNode node); method DeclareTypesInNamespacesBase (line 32) | protected DeclareTypesInNamespacesBase() : base(DiagnosticId) { } method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/DoNotCallInsecureSecurityAlgorithmBase.cs class DoNotCallInsecureSecurityAlgorithmBase (line 20) | public abstract class DoNotCallInsecureSecurityAlgorithmBase Arguments(TArg... method IsStringLiteralArgument (line 36) | protected abstract bool IsStringLiteralArgument(TArgumentSyntax argume... method Expression (line 37) | protected abstract SyntaxNode Expression(TArgumentSyntax argument); method Initialize (line 39) | protected sealed override void Initialize(SonarAnalysisContext context) method CheckInvocation (line 45) | private void CheckInvocation(SonarSyntaxNodeReportingContext context) method CheckObjectCreation (line 57) | private void CheckObjectCreation(SonarSyntaxNodeReportingContext context) method IsInsecureBaseAlgorithmCreationFactoryCall (line 73) | private bool IsInsecureBaseAlgorithmCreationFactoryCall(IMethodSymbol ... method ReportAllDiagnostics (line 102) | private void ReportAllDiagnostics(SonarSyntaxNodeReportingContext cont... FILE: analyzers/src/SonarAnalyzer.Core/Rules/DoNotCallMethodsBase.cs class DoNotCallMethodsBase (line 22) | public abstract class DoNotCallMethodsBase method AnalyzeInvocation (line 46) | private void AnalyzeInvocation(SonarSyntaxNodeReportingContext analysi... FILE: analyzers/src/SonarAnalyzer.Core/Rules/DoNotCheckZeroSizeCollectionBase.cs class DoNotCheckZeroSizeCollectionBase (line 20) | public abstract class DoNotCheckZeroSizeCollectionBase : So... method DoNotCheckZeroSizeCollectionBase (line 32) | protected DoNotCheckZeroSizeCollectionBase() : base(DiagnosticId) { } method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) => method CheckExpression (line 53) | protected void CheckExpression(SonarSyntaxNodeReportingContext context... method HasCandidateName (line 66) | private bool HasCandidateName(string name) => method IsEnumerableCountMethod (line 71) | private bool IsEnumerableCountMethod(ISymbol symbol) => method IsArrayLengthProperty (line 78) | private bool IsArrayLengthProperty(ISymbol symbol) => method IsStringLengthProperty (line 83) | private bool IsStringLengthProperty(ISymbol symbol) => method IsCollectionCountProperty (line 88) | private bool IsCollectionCountProperty(ISymbol symbol) => method IsReadonlyCollectionCountProperty (line 93) | private bool IsReadonlyCollectionCountProperty(ISymbol symbol) => method CollecionSizeTypeName (line 98) | private string CollecionSizeTypeName(ISymbol symbol) FILE: analyzers/src/SonarAnalyzer.Core/Rules/DoNotHardcodeBase.cs class DoNotHardcodeBase (line 26) | public abstract class DoNotHardcodeBase : ParametrizedDiagn... method ExtractKeyWords (line 38) | protected abstract void ExtractKeyWords(string value); method FindIssue (line 39) | protected abstract string FindIssue(string variableName, string variab... method SplitKeyWordsByComma (line 50) | protected static ImmutableList SplitKeyWordsByComma(string key... method IsValidKeyword (line 57) | protected static bool IsValidKeyword(string suffix) method CheckWebConfig (line 63) | protected void CheckWebConfig(SonarCompilationReportingContext context) method CheckAppSettings (line 74) | protected void CheckAppSettings(SonarCompilationReportingContext conte... method CheckLaunchSettings (line 77) | protected void CheckLaunchSettings(SonarCompilationReportingContext co... method CheckJsonSettings (line 80) | private void CheckJsonSettings(SonarCompilationReportingContext contex... method CheckWebConfig (line 92) | private void CheckWebConfig(SonarCompilationReportingContext context, ... class CredentialWordsJsonWalker (line 110) | private sealed class CredentialWordsJsonWalker : JsonWalker method CredentialWordsJsonWalker (line 116) | public CredentialWordsJsonWalker(DoNotHardcodeBase anal... method VisitObject (line 123) | protected override void VisitObject(string key, JsonNode value) method VisitValue (line 135) | protected override void VisitValue(JsonNode node) => method CheckKeyValue (line 138) | private void CheckKeyValue(string key, JsonNode value) FILE: analyzers/src/SonarAnalyzer.Core/Rules/DoNotHardcodeCredentialsBase.cs class DoNotHardcodeCredentialsBase (line 25) | public abstract class DoNotHardcodeCredentialsBase : DoNotH... method InitializeActions (line 36) | protected abstract void InitializeActions(SonarParametrizedAnalysisCon... method IsSecureStringAppendCharFromConstant (line 37) | protected abstract bool IsSecureStringAppendCharFromConstant(SyntaxNod... method DoNotHardcodeCredentialsBase (line 45) | protected DoNotHardcodeCredentialsBase() method ExtractKeyWords (line 51) | protected override void ExtractKeyWords(string value) method Initialize (line 59) | protected sealed override void Initialize(SonarParametrizedAnalysisCon... method FindIssue (line 99) | protected override string FindIssue(string variableName, string variab... method FindKeyWords (line 119) | private string FindKeyWords(string variableName, string variableValue) method CreateUriUserInfoPattern (line 141) | private static Regex CreateUriUserInfoPattern() method ContainsUriUserInfo (line 156) | private static bool ContainsUriUserInfo(string variableValue) class CredentialWordsFinderBase (line 166) | protected abstract class CredentialWordsFinderBase method ShouldHandle (line 171) | protected abstract bool ShouldHandle(TSyntaxNode syntaxNode, Semanti... method VariableName (line 172) | protected abstract string VariableName(TSyntaxNode syntaxNode); method AssignedValue (line 173) | protected abstract string AssignedValue(TSyntaxNode syntaxNode, Sema... method CredentialWordsFinderBase (line 175) | protected CredentialWordsFinderBase(DoNotHardcodeCredentialsBase AnalysisAction() => FILE: analyzers/src/SonarAnalyzer.Core/Rules/DoNotHardcodeSecretsBase.cs class DoNotHardcodeSecretsBase (line 22) | public abstract class DoNotHardcodeSecretsBase : DoNotHardc... method RegisterNodeActions (line 37) | protected abstract void RegisterNodeActions(SonarCompilationStartAnaly... method IdentifierRoot (line 38) | protected abstract SyntaxNode IdentifierRoot(SyntaxNode node); method RightHandSide (line 39) | protected abstract SyntaxNode RightHandSide(SyntaxNode node); method DoNotHardcodeSecretsBase (line 52) | protected DoNotHardcodeSecretsBase() method Initialize (line 58) | protected override void Initialize(SonarParametrizedAnalysisContext co... method ExtractKeyWords (line 66) | protected override void ExtractKeyWords(string value) method FindIssue (line 74) | protected override string FindIssue(string variableName, string variab... method ReportIssues (line 90) | protected void ReportIssues(SonarSyntaxNodeReportingContext context) method ReportIssuesForEquals (line 108) | protected void ReportIssuesForEquals(SonarSyntaxNodeReportingContext c... method FindLiteralIssue (line 118) | private string FindLiteralIssue(string secret) method ShouldRaiseBinary (line 134) | private bool ShouldRaiseBinary(string left, string right) => method IsToken (line 141) | private bool IsToken(string value) => type IdentifierValuePair (line 146) | protected sealed record IdentifierValuePair(SyntaxToken? Identifier, S... FILE: analyzers/src/SonarAnalyzer.Core/Rules/DoNotInstantiateSharedClassesBase.cs class DoNotInstantiateSharedClassesBase (line 20) | public abstract class DoNotInstantiateSharedClassesBase : SonarDiagnosti... method IsShared (line 25) | protected static bool IsShared(AttributeData data) FILE: analyzers/src/SonarAnalyzer.Core/Rules/DoNotLockOnSharedResourceBase.cs class DoNotLockOnSharedResourceBase (line 20) | public abstract class DoNotLockOnSharedResourceBase : SonarDiagnosticAna... method IsLockOnForbiddenKnownType (line 31) | protected static bool IsLockOnForbiddenKnownType(SyntaxNode expression... FILE: analyzers/src/SonarAnalyzer.Core/Rules/DoNotLockWeakIdentityObjectsBase.cs class DoNotLockWeakIdentityObjectsBase (line 20) | public abstract class DoNotLockWeakIdentityObjectsBase : So... method DoNotLockWeakIdentityObjectsBase (line 42) | protected DoNotLockWeakIdentityObjectsBase() : base(DiagnosticId) { } method Initialize (line 44) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/DoNotNestTernaryOperatorsBase.cs class DoNotNestTernaryOperatorsBase (line 20) | public abstract class DoNotNestTernaryOperatorsBase : SonarDiagnosticAna... FILE: analyzers/src/SonarAnalyzer.Core/Rules/DoNotOverwriteCollectionElementsBase.cs class DoNotOverwriteCollectionElementsBase (line 20) | public abstract class DoNotOverwriteCollectionElementsBase IsSameCollection(SyntaxNode colle... method IsSameIndexOrKey (line 81) | private Func IsSameIndexOrKey(SyntaxNode index... method IsDictionaryOrCollection (line 84) | private static bool IsDictionaryOrCollection(SyntaxNode identifier, Se... method GetPreviousStatements (line 95) | private static IEnumerable GetPreviousStatements(TSt... FILE: analyzers/src/SonarAnalyzer.Core/Rules/DoNotThrowFromDestructorsBase.cs class DoNotThrowFromDestructorsBase (line 20) | public abstract class DoNotThrowFromDestructorsBase : SonarDiagnosticAna... FILE: analyzers/src/SonarAnalyzer.Core/Rules/DoNotUseDateTimeNowBase.cs class DoNotUseDateTimeNowBase (line 22) | public abstract class DoNotUseDateTimeNowBase : SonarDiagno... method IsInsideNameOf (line 35) | protected abstract bool IsInsideNameOf(SyntaxNode node); method DoNotUseDateTimeNowBase (line 37) | protected DoNotUseDateTimeNowBase() : base(DiagnosticId) { } method Initialize (line 39) | protected override void Initialize(SonarAnalysisContext context) => method IsDateTimeNowOrToday (line 49) | private bool IsDateTimeNowOrToday(SyntaxNode node, SemanticModel seman... method IsDateTimeOffsetNowDateTime (line 52) | private bool IsDateTimeOffsetNowDateTime(SyntaxNode node, SemanticMode... method MatchesAnyProperty (line 56) | private bool MatchesAnyProperty(SyntaxNode node, SemanticModel semanti... FILE: analyzers/src/SonarAnalyzer.Core/Rules/EmptyMethodBase.cs class EmptyMethodBase (line 20) | public abstract class EmptyMethodBase : SonarDiagnosticAnal... method CheckMethod (line 26) | protected abstract void CheckMethod(SonarSyntaxNodeReportingContext co... method EmptyMethodBase (line 30) | protected EmptyMethodBase() : base(DiagnosticId) { } method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/EmptyNestedBlockBase.cs class EmptyNestedBlockBase (line 20) | public abstract class EmptyNestedBlockBase : SonarDiagnosti... method EmptyBlocks (line 27) | protected abstract IEnumerable EmptyBlocks(SyntaxNode node); method EmptyNestedBlockBase (line 31) | protected EmptyNestedBlockBase() : base(DiagnosticId) { } method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/EncryptionAlgorithmsShouldBeSecureBase.cs class EncryptionAlgorithmsShouldBeSecureBase (line 22) | public abstract class EncryptionAlgorithmsShouldBeSecureBase.Con... method HasPkcs1PaddingArgument (line 29) | protected abstract TrackerBase.Conditi... method EncryptionAlgorithmsShouldBeSecureBase (line 31) | protected EncryptionAlgorithmsShouldBeSecureBase(IAnalyzerConfiguratio... method Initialize (line 34) | protected override void Initialize(TrackerInput input) FILE: analyzers/src/SonarAnalyzer.Core/Rules/EnumNameHasEnumSuffixBase.cs class EnumNameHasEnumSuffixBase (line 20) | public abstract class EnumNameHasEnumSuffixBase : SonarDiag... method EnumNameHasEnumSuffixBase (line 28) | protected EnumNameHasEnumSuffixBase() : base(DiagnosticId) { } method Initialize (line 30) | protected sealed override void Initialize(SonarAnalysisContext context... FILE: analyzers/src/SonarAnalyzer.Core/Rules/EnumNameShouldFollowRegexBase.cs class EnumNameShouldFollowRegexBase (line 22) | public abstract class EnumNameShouldFollowRegexBase : Param... method EnumNameShouldFollowRegexBase (line 42) | protected EnumNameShouldFollowRegexBase() => method Initialize (line 45) | protected sealed override void Initialize(SonarParametrizedAnalysisCon... FILE: analyzers/src/SonarAnalyzer.Core/Rules/ExceptionsShouldBePublicBase.cs class ExceptionsShouldBePublicBase (line 20) | public abstract class ExceptionsShouldBePublicBase : SonarD... method ExceptionsShouldBePublicBase (line 32) | protected ExceptionsShouldBePublicBase() : base(DiagnosticId) { } method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/ExcludeFromCodeCoverageAttributesNeedJustificationBase.cs class ExcludeFromCodeCoverageAttributesNeedJustificationBase (line 20) | public abstract class ExcludeFromCodeCoverageAttributesNeedJustification... method GetJustificationExpression (line 29) | protected abstract SyntaxNode GetJustificationExpression(SyntaxNode no... method ExcludeFromCodeCoverageAttributesNeedJustificationBase (line 31) | protected ExcludeFromCodeCoverageAttributesNeedJustificationBase() : b... method Initialize (line 33) | protected sealed override void Initialize(SonarAnalysisContext context... method NoJustification (line 48) | private bool NoJustification(SyntaxNode node, SemanticModel model) => method HasJustificationProperty (line 53) | private static bool HasJustificationProperty(INamedTypeSymbol symbol) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/ExpectedExceptionAttributeShouldNotBeUsedBase.cs class ExpectedExceptionAttributeShouldNotBeUsedBase (line 20) | public abstract class ExpectedExceptionAttributeShouldNotBeUsedBase method ContainExpectedExceptionType (line 53) | private static bool ContainExpectedExceptionType(Compilation compilati... FILE: analyzers/src/SonarAnalyzer.Core/Rules/ExpressionComplexityBase.cs class ExpressionComplexityBase (line 20) | public abstract class ExpressionComplexityBase : Parametriz... method ExpressionChildren (line 32) | protected abstract SyntaxNode[] ExpressionChildren(SyntaxNode node); method ExpressionComplexityBase (line 39) | protected ExpressionComplexityBase() => method Initialize (line 42) | protected sealed override void Initialize(SonarParametrizedAnalysisCon... method IsEqualsMethod (line 57) | private static bool IsEqualsMethod(ISymbol symbol) => method IsRoot (line 62) | private bool IsRoot(SyntaxNode node) => method CalculateComplexity (line 66) | private int CalculateComplexity(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.Core/Rules/ExtensionMethodShouldNotExtendObjectBase.cs class ExtensionMethodShouldNotExtendObjectBase (line 20) | public abstract class ExtensionMethodShouldNotExtendObjectBase FILE: analyzers/src/SonarAnalyzer.Core/Rules/FieldShadowsParentFieldBase.cs class FieldShadowsParentFieldBase (line 20) | [Obsolete("This rule has been deprecated since 9.32")] method FieldShadowsParentFieldBase (line 37) | protected FieldShadowsParentFieldBase() method CheckFields (line 43) | protected IEnumerable CheckFields(SemanticModel model, TVa... FILE: analyzers/src/SonarAnalyzer.Core/Rules/FieldShouldNotBePublicBase.cs class FieldShouldNotBePublicBase (line 20) | public abstract class FieldShouldNotBePublicBase Variables(TFieldDeclar... method FieldShouldNotBePublicBase (line 31) | protected FieldShouldNotBePublicBase() : base(DiagnosticId) { } method FieldIsRelevant (line 33) | protected static bool FieldIsRelevant(IFieldSymbol fieldSymbol) => method Initialize (line 38) | protected sealed override void Initialize(SonarAnalysisContext context... type Pair (line 54) | private sealed record Pair(TVariableSyntax Node, IFieldSymbol Symbol); FILE: analyzers/src/SonarAnalyzer.Core/Rules/FileLinesBase.cs class FileLinesBase (line 22) | public abstract class FileLinesBase : ParametrizedDiagnosticAnalyzer method Initialize (line 34) | protected override void Initialize(SonarParametrizedAnalysisContext co... method IsEndOfFileToken (line 56) | protected abstract bool IsEndOfFileToken(SyntaxToken token); FILE: analyzers/src/SonarAnalyzer.Core/Rules/FindInsteadOfFirstOrDefaultBase.cs class FindInsteadOfFirstOrDefaultBase (line 20) | public abstract class FindInsteadOfFirstOrDefaultBase : SonarDiagno... method FlagsEnumZeroMemberBase (line 26) | protected FlagsEnumZeroMemberBase() : base(DiagnosticId) { } method Initialize (line 28) | protected sealed override void Initialize(SonarAnalysisContext context... method ZeroMember (line 41) | private SyntaxNode ZeroMember(SyntaxNode node, SemanticModel semanticM... FILE: analyzers/src/SonarAnalyzer.Core/Rules/FunctionComplexityBase.cs class FunctionComplexityBase (line 20) | public abstract class FunctionComplexityBase : ParametrizedDiagnosticAna... method Initialize (line 32) | protected abstract override void Initialize(SonarParametrizedAnalysisC... method CheckComplexity (line 34) | protected void CheckComplexity(SonarSyntaxNodeReportingContex... method CheckComplexity (line 52) | protected void CheckComplexity(SonarSyntaxNodeReportingContex... method GetComplexity (line 59) | protected abstract int GetComplexity(SyntaxNode node, SemanticModel se... FILE: analyzers/src/SonarAnalyzer.Core/Rules/FunctionNestingDepthBase.cs class FunctionNestingDepthBase (line 20) | public abstract class FunctionNestingDepthBase : ParametrizedDiagnosticA... method FunctionNestingDepthBase (line 35) | protected FunctionNestingDepthBase() => class NestingDepthCounter (line 38) | protected class NestingDepthCounter method NestingDepthCounter (line 44) | public NestingDepthCounter(int maximumNestingDepth, Action method GetBaseTypes (line 50) | private static IEnumerable GetBaseTypes(INamedTypeSy... method HasRecursiveGenericSubstitution (line 58) | private static bool HasRecursiveGenericSubstitution(INamedTypeSymbol t... method IsGenericType (line 70) | private static bool IsGenericType(INamedTypeSymbol type) => method HasSubstitutedTypeArguments (line 73) | private static bool HasSubstitutedTypeArguments(INamedTypeSymbol type) => method IsRecursiveInheritance (line 76) | private static bool IsRecursiveInheritance(INamedTypeSymbol typeSymbol) FILE: analyzers/src/SonarAnalyzer.Core/Rules/GotoStatementBase.cs class GotoStatementBase (line 20) | public abstract class GotoStatementBase : SonarDiagnosticAn... method GotoStatementBase (line 30) | protected GotoStatementBase() : base(DiagnosticId) { } method Initialize (line 32) | protected sealed override void Initialize(SonarAnalysisContext context... FILE: analyzers/src/SonarAnalyzer.Core/Rules/Hotspots/CommandPathBase.cs class CommandPathBase (line 23) | public abstract class CommandPathBase : TrackerHotspotDiagn... method FirstArgument (line 31) | protected abstract string FirstArgument(InvocationContext context); method CommandPathBase (line 33) | protected CommandPathBase(IAnalyzerConfiguration configuration) : base... method Initialize (line 35) | protected override void Initialize(TrackerInput input) method IsInvalid (line 54) | private bool IsInvalid(string path) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/Hotspots/ConfiguringLoggersBase.cs class ConfiguringLoggersBase (line 22) | [Obsolete("This rule has been deprecated since 9.16")] method ConfiguringLoggersBase (line 29) | protected ConfiguringLoggersBase(IAnalyzerConfiguration configuration)... method Initialize (line 31) | protected override void Initialize(TrackerInput input) FILE: analyzers/src/SonarAnalyzer.Core/Rules/Hotspots/CreatingHashAlgorithmsBase.cs class CreatingHashAlgorithmsBase (line 22) | public abstract class CreatingHashAlgorithmsBase : TrackerH... method IsUnsafeAlgorithm (line 62) | protected abstract bool IsUnsafeAlgorithm(SyntaxNode argumentNode, Sem... method CreatingHashAlgorithmsBase (line 64) | protected CreatingHashAlgorithmsBase(IAnalyzerConfiguration configurat... method Initialize (line 67) | protected override void Initialize(TrackerInput input) FILE: analyzers/src/SonarAnalyzer.Core/Rules/Hotspots/DeliveringDebugFeaturesInProductionBase.cs class DeliveringDebugFeaturesInProductionBase (line 22) | public abstract class DeliveringDebugFeaturesInProductionBase.Condition MethodHa... method ArgumentAtIndexIsTracked (line 262) | private TrackerBase.Condition Argument... FILE: analyzers/src/SonarAnalyzer.Core/Rules/Hotspots/ExpandingArchivesBase.cs class ExpandingArchivesBase (line 22) | public abstract class ExpandingArchivesBase : TrackerHotspo... method ExpandingArchivesBase (line 28) | protected ExpandingArchivesBase(IAnalyzerConfiguration configuration) ... method Initialize (line 30) | protected override void Initialize(TrackerInput input) FILE: analyzers/src/SonarAnalyzer.Core/Rules/Hotspots/HardcodedIpAddressBase.cs class HardcodedIpAddressBase (line 23) | public abstract class HardcodedIpAddressBase method CheckForHardcodedIpAddressesInStringLiteral (line 78) | private void CheckForHardcodedIpAddressesInStringLiteral(SonarSyntaxNo... method CheckForHardcodedIpAddressesInStringInterpolation (line 89) | private void CheckForHardcodedIpAddressesInStringInterpolation(SonarSy... method IsRoutableNonLoopbackIPAddress (line 99) | private static bool IsRoutableNonLoopbackIPAddress(string literalValue... method IsInDocumentationBlock (line 105) | private bool IsInDocumentationBlock(IPAddress address) method IsObjectIdentifier (line 119) | private static bool IsObjectIdentifier(string literalValue) => method IsIgnoredVariableName (line 122) | private bool IsIgnoredVariableName(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/Hotspots/PubliclyWritableDirectoriesBase.cs class PubliclyWritableDirectoriesBase (line 22) | public abstract class PubliclyWritableDirectoriesBase method LinuxDirs (line 103) | private static string[] LinuxDirs() => new[] method MacDirs (line 110) | private static string[] MacDirs() => new[] FILE: analyzers/src/SonarAnalyzer.Core/Rules/Hotspots/RequestsWithExcessiveLengthBase.cs class RequestsWithExcessiveLengthBase (line 24) | public abstract class RequestsWithExcessiveLengthBase method IsRequestSizeLimit (line 84) | protected bool IsRequestSizeLimit(string attributeName) => method CollectAttributesOverTheLimit (line 88) | private void CollectAttributesOverTheLimit(SonarSyntaxNodeReportingCon... method ReportOnCollectedAttributes (line 116) | private void ReportOnCollectedAttributes(SonarCompilationReportingCont... method IsDisableRequestSizeLimit (line 128) | private bool IsDisableRequestSizeLimit(string attributeName) => method IsEnabled (line 132) | private bool IsEnabled(AnalyzerOptions options) method CheckWebConfig (line 138) | private void CheckWebConfig(SonarCompilationReportingContext c) method ReportRequestLengthViolation (line 150) | private void ReportRequestLengthViolation(SonarCompilationReportingCon... method IsVulnerable (line 172) | private static bool IsVulnerable(string value, int limit) => type Attributes (line 176) | private readonly struct Attributes method Attributes (line 187) | public Attributes(TAttributeSyntax requestForm, TAttributeSyntax req... method Attributes (line 193) | public Attributes(TAttributeSyntax requestForm, TAttributeSyntax req... FILE: analyzers/src/SonarAnalyzer.Core/Rules/Hotspots/SpecifyTimeoutOnRegexBase.cs class SpecifyTimeoutOnRegexBase (line 22) | public abstract class SpecifyTimeoutOnRegexBase : HotspotDi... method SpecifyTimeoutOnRegexBase (line 50) | protected SpecifyTimeoutOnRegexBase(IAnalyzerConfiguration config) : b... method Initialize (line 52) | protected override void Initialize(SonarAnalysisContext context) method RegexMethodLacksTimeout (line 89) | private bool RegexMethodLacksTimeout(SyntaxNode node, SemanticModel mo... method ContainsMatchTimeout (line 96) | private static bool ContainsMatchTimeout(IMethodSymbol method) => method NoBacktracking (line 99) | private bool NoBacktracking(IMethodSymbol method, SyntaxNode node, Sem... method IsCandidateCtor (line 105) | private bool IsCandidateCtor(SyntaxNode ctorNode) => method IsRegexMatchMethod (line 108) | private bool IsRegexMatchMethod(string name) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/Hotspots/UsingNonstandardCryptographyBase.cs class UsingNonstandardCryptographyBase (line 20) | public abstract class UsingNonstandardCryptographyBase FILE: analyzers/src/SonarAnalyzer.Core/Rules/IfChainWithoutElseBase.cs class IfChainWithoutElseBase (line 20) | public abstract class IfChainWithoutElseBase : S... method IsElseIfWithoutElse (line 29) | protected abstract bool IsElseIfWithoutElse(TIfSyntax ifSyntax); method IssueLocation (line 30) | protected abstract Location IssueLocation(SonarSyntaxNodeReportingCont... method IfChainWithoutElseBase (line 34) | protected IfChainWithoutElseBase() : base(DiagnosticId) { } method Initialize (line 36) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/IfCollapsibleBase.cs class IfCollapsibleBase (line 20) | public abstract class IfCollapsibleBase : SonarDiagnosticAnalyzer FILE: analyzers/src/SonarAnalyzer.Core/Rules/ImplementSerializationMethodsCorrectlyBase.cs class ImplementSerializationMethodsCorrectlyBase (line 20) | public abstract class ImplementSerializationMethodsCorrectlyBase : Sonar... method GetIdentifierLocation (line 39) | protected abstract Location GetIdentifierLocation(IMethodSymbol method... method ImplementSerializationMethodsCorrectlyBase (line 45) | protected ImplementSerializationMethodsCorrectlyBase() method Initialize (line 51) | protected override void Initialize(SonarAnalysisContext context) => method HiddenByEditorBrowsableAttribute (line 67) | private static bool HiddenByEditorBrowsableAttribute(IMethodSymbol met... method FindIssues (line 71) | private IEnumerable FindIssues(IMethodSymbol methodSymbol) FILE: analyzers/src/SonarAnalyzer.Core/Rules/IndexOfCheckAgainstZeroBase.cs class IndexOfCheckAgainstZeroBase (line 20) | public abstract class IndexOfCheckAgainstZeroBase FILE: analyzers/src/SonarAnalyzer.Core/Rules/InsecureTemporaryFilesCreationBase.cs class InsecureTemporaryFilesCreationBase (line 20) | public abstract class InsecureTemporaryFilesCreationBase method Visit (line 34) | private void Visit(SonarSyntaxNodeReportingContext context) FILE: analyzers/src/SonarAnalyzer.Core/Rules/InsteadOfAnyBase.cs class InsteadOfAnyBase (line 20) | public abstract class InsteadOfAnyBase method IsNameEqualTo (line 87) | protected bool IsNameEqualTo(SyntaxNode node, string name) => method IsValueTypeOrString (line 90) | protected static bool IsValueTypeOrString(SyntaxNode expression, Seman... method HasValidInvocationOperands (line 94) | protected bool HasValidInvocationOperands(TInvocationExpression invoca... method IsCorrectCall (line 119) | private static bool IsCorrectCall(SyntaxNode right, SemanticModel mode... method RaiseIssue (line 123) | private void RaiseIssue(SonarSyntaxNodeReportingContext c, SyntaxNode ... FILE: analyzers/src/SonarAnalyzer.Core/Rules/InvalidCastToInterfaceBase.cs class InvalidCastToInterfaceBase (line 22) | public abstract class InvalidCastToInterfaceBase : SonarDia... method Initialize (line 35) | protected override void Initialize(SonarAnalysisContext context) => method BuildTypeMap (line 57) | private static TypeMap BuildTypeMap(IEnumerable allT... method IsImpossibleCast (line 84) | private static bool IsImpossibleCast(TypeMap interfaceImplementers, IN... FILE: analyzers/src/SonarAnalyzer.Core/Rules/JwtSignedBase.cs class JwtSignedBase (line 22) | public abstract class JwtSignedBase : Tr... method CreateBuilderPatternCondition (line 31) | protected abstract BuilderPatternCondition[] J... FILE: analyzers/src/SonarAnalyzer.Core/Rules/LineLengthBase.cs class LineLengthBase (line 20) | public abstract class LineLengthBase : ParametrizedDiagnosticAnalyzer method Initialize (line 33) | protected sealed override void Initialize(SonarParametrizedAnalysisCon... FILE: analyzers/src/SonarAnalyzer.Core/Rules/LinkedListPropertiesInsteadOfMethodsBase.cs class LinkedListPropertiesInsteadOfMethodsBase (line 20) | public abstract class LinkedListPropertiesInsteadOfMethodsBase FILE: analyzers/src/SonarAnalyzer.Core/Rules/LooseFilePermissionsBase.cs class LooseFilePermissionsBase (line 20) | public abstract class LooseFilePermissionsBase method Initialize (line 38) | protected override void Initialize(SonarAnalysisContext context) => method VisitAssignments (line 45) | protected void VisitAssignments(SonarSyntaxNodeReportingContext context) method IsSetAccessRule (line 54) | protected bool IsSetAccessRule(SyntaxNode invocation, SemanticModel mo... method IsAddAccessRule (line 58) | protected bool IsAddAccessRule(SyntaxNode invocation, SemanticModel mo... method IsFileAccessPermissions (line 62) | protected bool IsFileAccessPermissions(SyntaxNode node, SemanticModel ... FILE: analyzers/src/SonarAnalyzer.Core/Rules/LooseFilePermissionsConfig.cs class LooseFilePermissionsConfig (line 20) | public static class LooseFilePermissionsConfig FILE: analyzers/src/SonarAnalyzer.Core/Rules/MarkAssemblyWithAssemblyVersionAttributeBase.cs class MarkAssemblyWithAssemblyVersionAttributeBase (line 20) | public abstract class MarkAssemblyWithAssemblyVersionAttributeBase() : M... FILE: analyzers/src/SonarAnalyzer.Core/Rules/MarkAssemblyWithAttributeBase.cs class MarkAssemblyWithAttributeBase (line 20) | public abstract class MarkAssemblyWithAttributeBase : SonarDiagnosticAna... method MarkAssemblyWithAttributeBase (line 31) | protected MarkAssemblyWithAttributeBase(string diagnosticId, string me... method Initialize (line 34) | protected sealed override void Initialize(SonarAnalysisContext context... FILE: analyzers/src/SonarAnalyzer.Core/Rules/MarkAssemblyWithClsCompliantAttributeBase.cs class MarkAssemblyWithClsCompliantAttributeBase (line 20) | public abstract class MarkAssemblyWithClsCompliantAttributeBase() : Mark... FILE: analyzers/src/SonarAnalyzer.Core/Rules/MarkAssemblyWithComVisibleAttributeBase.cs class MarkAssemblyWithComVisibleAttributeBase (line 20) | public abstract class MarkAssemblyWithComVisibleAttributeBase() : MarkAs... FILE: analyzers/src/SonarAnalyzer.Core/Rules/MarkWindowsFormsMainWithStaThreadBase.cs class MarkWindowsFormsMainWithStaThreadBase (line 20) | public abstract class MarkWindowsFormsMainWithStaThreadBase method Action (line 39) | private void Action(SonarSyntaxNodeReportingContext c) method IsAssemblyReferencingWindowsForms (line 58) | private static bool IsAssemblyReferencingWindowsForms(Compilation comp... FILE: analyzers/src/SonarAnalyzer.Core/Rules/MethodOverloadsShouldBeGroupedBase.cs class MethodOverloadsShouldBeGroupedBase (line 20) | public abstract class MethodOverloadsShouldBeGroupedBase MemberDeclara... method CreateMemberInfo (line 29) | protected abstract MemberInfo CreateMemberInfo(SonarSyntaxNodeReportin... method MethodOverloadsShouldBeGroupedBase (line 33) | protected MethodOverloadsShouldBeGroupedBase() : base(DiagnosticId) { } method Initialize (line 35) | protected override void Initialize(SonarAnalysisContext context) => method MisplacedOverloads (line 53) | protected List[] MisplacedOverloads(SonarSyntaxNodeReporti... method MembersGroupedByInterface (line 94) | private static Dictionary FindInterfaces(Semanti... method ExplicitInterfaceImplementations (line 130) | private static IEnumerable ExplicitInterfaceImplementations(I... class MemberInfo (line 139) | protected class MemberInfo method MemberInfo (line 149) | public MemberInfo(SonarSyntaxNodeReportingContext context, TMemberDe... method NameEquals (line 159) | public bool NameEquals(MemberInfo other) => method Equals (line 162) | public override bool Equals(object obj) => method GetHashCode (line 170) | public override int GetHashCode() => FILE: analyzers/src/SonarAnalyzer.Core/Rules/MethodParameterUnusedBase.cs class MethodParameterUnusedBase (line 20) | public abstract class MethodParameterUnusedBase : SonarDiagnosticAnalyzer FILE: analyzers/src/SonarAnalyzer.Core/Rules/MethodsShouldNotHaveIdenticalImplementationsBase.cs class MethodsShouldNotHaveIdenticalImplementationsBase (line 20) | public abstract class MethodsShouldNotHaveIdenticalImplementationsBase GetMethodDecl... method GetMethodIdentifier (line 28) | protected abstract SyntaxToken GetMethodIdentifier(TMethodDeclarationS... method AreDuplicates (line 29) | protected abstract bool AreDuplicates(SemanticModel model, TMethodDecl... method MethodsShouldNotHaveIdenticalImplementationsBase (line 33) | protected MethodsShouldNotHaveIdenticalImplementationsBase() : base(Di... method Initialize (line 35) | protected override void Initialize(SonarAnalysisContext context) => method IsExcludedFromBeingExamined (line 63) | protected virtual bool IsExcludedFromBeingExamined(SonarSyntaxNodeRepo... method HaveSameParameters (line 66) | protected static bool HaveSameParameters(SeparatedSyntaxList<... method HaveSameTypeParameters (line 71) | protected static bool HaveSameTypeParameters(SemanticModel mo... method AreTheSameType (line 79) | protected static bool AreTheSameType(SemanticModel model, SyntaxNode f... method AreTheSameTypeSymbols (line 84) | private static bool AreTheSameTypeSymbols(ITypeSymbol first, ITypeSymb... method HaveSameParameterLists (line 93) | private static bool HaveSameParameterLists(SeparatedSyntaxLis... method TypeParametersHaveSameNameAndConstraints (line 97) | private static bool TypeParametersHaveSameNameAndConstraints(ITypePara... method TypeConstraintsAreSame (line 106) | private static bool TypeConstraintsAreSame(ITypeSymbol first, ITypeSym... method TypesAreSameGenericType (line 115) | private static bool TypesAreSameGenericType(ITypeSymbol firstParameter... method AreSameNamedTypeParameters (line 122) | private static bool AreSameNamedTypeParameters(ITypeSymbol first, ITyp... FILE: analyzers/src/SonarAnalyzer.Core/Rules/MethodsShouldNotHaveTooManyLinesBase.cs class MethodsShouldNotHaveTooManyLinesBase (line 20) | public abstract class MethodsShouldNotHaveTooManyLinesBase GetMethodTokens(TBaseMetho... method GetMethodIdentifierToken (line 37) | protected abstract SyntaxToken? GetMethodIdentifierToken(TBaseMethodSy... method GetMethodKindAndName (line 38) | protected abstract string GetMethodKindAndName(SyntaxToken identifierT... method Initialize (line 40) | protected override void Initialize(SonarParametrizedAnalysisContext co... FILE: analyzers/src/SonarAnalyzer.Core/Rules/MultipleVariableDeclarationBase.cs class MultipleVariableDeclarationConstants (line 20) | public static class MultipleVariableDeclarationConstants class MultipleVariableDeclarationBase (line 25) | public abstract class MultipleVariableDeclarationBase : Son... method MultipleVariableDeclarationBase (line 30) | protected MultipleVariableDeclarationBase() : base(MultipleVariableDec... method Initialize (line 32) | protected sealed override void Initialize(SonarAnalysisContext context) method CheckAndReportVariables (line 51) | private static void CheckAndReportVariables(SonarSyntaxNodeReportingCo... FILE: analyzers/src/SonarAnalyzer.Core/Rules/MultipleVariableDeclarationCodeFixBase.cs class MultipleVariableDeclarationCodeFixBase (line 20) | public abstract class MultipleVariableDeclarationCodeFixBase : SonarCodeFix method RegisterCodeFixesAsync (line 26) | protected sealed override Task RegisterCodeFixesAsync(SyntaxNode root,... method CalculateNewRoot (line 43) | protected abstract SyntaxNode CalculateNewRoot(SyntaxNode root, Syntax... FILE: analyzers/src/SonarAnalyzer.Core/Rules/NameOfShouldBeUsedBase.cs class NameOfShouldBeUsedBase (line 20) | public abstract class NameOfShouldBeUsedBase GetParameterNames(TMethodSyntax... method IsStringLiteral (line 32) | protected abstract bool IsStringLiteral(SyntaxToken t); method LeastLanguageVersionMatches (line 33) | protected abstract bool LeastLanguageVersionMatches(SonarSyntaxNodeRep... method IsArgumentExceptionCallingNameOf (line 34) | protected abstract bool IsArgumentExceptionCallingNameOf(SyntaxNode no... method MethodSyntax (line 35) | protected abstract TMethodSyntax MethodSyntax(SyntaxNode node); method NameOfShouldBeUsedBase (line 39) | protected NameOfShouldBeUsedBase() : base(DiagnosticId) { } method Initialize (line 41) | protected override void Initialize(SonarAnalysisContext context) method ArgumentExceptionNameOfPosition (line 48) | protected int ArgumentExceptionNameOfPosition(string name) method ReportIssues (line 64) | private void ReportIssues(SonarSyntaxNodeReportingContext context) method GetStringTokenAndParamNamePairs (line 98) | private Dictionary GetStringTokenAndParamNamePair... FILE: analyzers/src/SonarAnalyzer.Core/Rules/NoExceptionsInFinallyBase.cs class NoExceptionsInFinallyBase (line 20) | public abstract class NoExceptionsInFinallyBase : SonarDiag... method NoExceptionsInFinallyBase (line 27) | protected NoExceptionsInFinallyBase() : base(DiagnosticId) { } FILE: analyzers/src/SonarAnalyzer.Core/Rules/NonAsyncTaskShouldNotReturnNullBase.cs class NonAsyncTaskShouldNotReturnNullBase (line 20) | public abstract class NonAsyncTaskShouldNotReturnNullBase : SonarDiagnos... method IsInvalidEnclosingSymbolContext (line 30) | protected static bool IsInvalidEnclosingSymbolContext(SyntaxNode enclo... method IsTaskReturnType (line 40) | private static bool IsTaskReturnType(ISymbol symbol, IMethodSymbol met... method IsSafeTaskReturnType (line 51) | private static bool IsSafeTaskReturnType(IMethodSymbol methodSymbol) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/ObsoleteAttributesBase.cs class ObsoleteAttributesBase (line 20) | public abstract class ObsoleteAttributesBase : SonarDiagnos... method GetExplanationExpression (line 31) | protected abstract SyntaxNode GetExplanationExpression(SyntaxNode node); method ObsoleteAttributesBase (line 38) | protected ObsoleteAttributesBase() method Initialize (line 45) | protected sealed override void Initialize(SonarAnalysisContext context... method NoExplanation (line 64) | private bool NoExplanation(SyntaxNode node, SemanticModel model) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/OptionalParameterBase.cs class OptionalParameterBase (line 20) | public abstract class OptionalParameterBase : SonarDiagnosticAnalyzer method Initialize (line 33) | protected sealed override void Initialize(SonarAnalysisContext context) method HasAllowedAttribute (line 61) | private static bool HasAllowedAttribute(TParameterSyntax parameterSynt... method GetParameters (line 68) | protected abstract IEnumerable GetParameters(TMethod... method IsOptional (line 70) | protected abstract bool IsOptional(TParameterSyntax parameter); method GetReportLocation (line 72) | protected abstract Location GetReportLocation(TParameterSyntax paramet... class OptionalParameterBase (line 28) | public abstract class OptionalParameterBase GetParameters(TMethod... method IsOptional (line 70) | protected abstract bool IsOptional(TParameterSyntax parameter); method GetReportLocation (line 72) | protected abstract Location GetReportLocation(TParameterSyntax paramet... FILE: analyzers/src/SonarAnalyzer.Core/Rules/OptionalParameterNotPassedToBaseCallBase.cs class OptionalParameterNotPassedToBaseCallBase (line 20) | public abstract class OptionalParameterNotPassedToBaseCallBase GetPreviousNodes(Location stopL... FILE: analyzers/src/SonarAnalyzer.Core/Rules/ParameterNameMatchesOriginalBase.cs class ParameterNameMatchesOriginalBase (line 20) | public abstract class ParameterNameMatchesOriginalBase ParameterIdentifiers(TMeth... method ParameterNameMatchesOriginalBase (line 31) | protected ParameterNameMatchesOriginalBase() : base(DiagnosticId) { } method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) => method VerifyParameters (line 58) | private void VerifyParameters(SonarSyntaxNodeReportingContext context,... method VerifyGenericParameters (line 68) | private void VerifyGenericParameters(SonarSyntaxNodeReportingContext c... method AreGenericTypeParametersWithDifferentTypes (line 89) | private static bool AreGenericTypeParametersWithDifferentTypes(ITypeSy... method AreTypeArgumentsDifferent (line 94) | private static bool AreTypeArgumentsDifferent(INamedTypeSymbol namedTy... FILE: analyzers/src/SonarAnalyzer.Core/Rules/ParametersCorrectOrderBase.cs class ParametersCorrectOrderBase (line 20) | public abstract class ParametersCorrectOrderBase : SonarDia... method ParametersCorrectOrderBase (line 27) | protected ParametersCorrectOrderBase() : base(DiagnosticId) { } method Initialize (line 29) | protected sealed override void Initialize(SonarAnalysisContext context... method PrimaryLocation (line 65) | protected virtual Location PrimaryLocation(SyntaxNode node) => method MatchingNames (line 68) | private bool MatchingNames(IParameterSymbol parameter, string argument... method ArgumentName (line 71) | private string ArgumentName(SyntaxNode argument) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/PartCreationPolicyShouldBeUsedWithExportAttributeBase.cs class PartCreationPolicyShouldBeUsedWithExportAttributeBase (line 20) | public abstract class PartCreationPolicyShouldBeUsedWithExportAttributeB... method GetTypeDeclaration (line 28) | protected abstract TDeclarationSyntax GetTypeDeclaration(TAttributeSyn... method AnalyzeNode (line 30) | protected void AnalyzeNode(SonarSyntaxNodeReportingContext c) FILE: analyzers/src/SonarAnalyzer.Core/Rules/PreferGuidEmptyBase.cs class PreferGuidEmptyBase (line 20) | public abstract class PreferGuidEmptyBase : SonarDiagnostic... method PreferGuidEmptyBase (line 27) | protected PreferGuidEmptyBase() : base(DiagnosticId) { } method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) method IsInvalidCtor (line 57) | private bool IsInvalidCtor(SyntaxNode ctorNode, SemanticModel semantic... method IsInParameter (line 63) | private bool IsInParameter(SyntaxNode defaultExpression) => method CreatesEmptyGuid (line 66) | private static bool CreatesEmptyGuid(SyntaxNode[] arguments, SemanticM... FILE: analyzers/src/SonarAnalyzer.Core/Rules/PropertiesAccessCorrectFieldBase.cs class PropertiesAccessCorrectFieldBase (line 20) | public abstract class PropertiesAccessCorrectFieldBase : So... type AccessorKind (line 30) | protected enum AccessorKind method FindFieldAssignments (line 36) | protected abstract IEnumerable FindFieldAssignments(IProper... method FindFieldReads (line 37) | protected abstract IEnumerable FindFieldReads(IPropertySymb... method ImplementsExplicitGetterOrSetter (line 38) | protected abstract bool ImplementsExplicitGetterOrSetter(IPropertySymb... method ShouldIgnoreAccessor (line 39) | protected abstract bool ShouldIgnoreAccessor(IMethodSymbol accessorMet... method PropertiesAccessCorrectFieldBase (line 43) | protected PropertiesAccessCorrectFieldBase() : base(DiagnosticId) { } method Initialize (line 45) | protected override void Initialize(SonarAnalysisContext context) => method AccessesSelfBaseProperty (line 51) | protected static bool AccessesSelfBaseProperty(IMethodSymbol accessorM... method FindInvokedMethod (line 56) | protected static SyntaxNode FindInvokedMethod(Compilation compilation,... method CheckType (line 65) | private void CheckType(SonarSymbolReportingContext context) method SelfAndBaseTypesFieldSymbols (line 107) | private static IEnumerable SelfAndBaseTypesFieldSymbols(... method ExplicitlyDeclaredProperties (line 112) | private IEnumerable ExplicitlyDeclaredProperties(INam... method CheckExpectedFieldIsUsed (line 119) | private void CheckExpectedFieldIsUsed(SonarSymbolReportingContext cont... method CollectPropertyData (line 151) | private IList CollectPropertyData(IEnumerable fields) => method SingleMatchingFieldOrNull (line 224) | public IFieldSymbol SingleMatchingFieldOrNull(IPropertySymbol proper... method CanonicalName (line 236) | private static string CanonicalName(string name) => method AreCanonicalNamesEqual (line 239) | private static bool AreCanonicalNamesEqual(string name1, string name... method FieldMatchesTheProperty (line 242) | private bool FieldMatchesTheProperty(IFieldSymbol field, IPropertySy... FILE: analyzers/src/SonarAnalyzer.Core/Rules/PropertyGetterWithThrowBase.cs class PropertyGetterWithThrowBase (line 20) | public abstract class PropertyGetterWithThrowBase : SonarDiagnosticAnalyzer method Initialize (line 42) | protected sealed override void Initialize(SonarAnalysisContext context) method IsIndexer (line 78) | protected abstract bool IsIndexer(TAccessorSyntax propertyGetter); method IsGetter (line 80) | protected abstract bool IsGetter(TAccessorSyntax propertyGetter); method GetThrowExpression (line 84) | protected abstract SyntaxNode GetThrowExpression(SyntaxNode syntaxNode); class PropertyGetterWithThrowBase (line 37) | public abstract class PropertyGetterWithThrowBase method Initialize (line 41) | protected sealed override void Initialize(SonarAnalysisContext context... method GetNamedTypeIdentifierLocation (line 67) | protected abstract Location GetNamedTypeIdentifierLocation(SyntaxNode ... method GetErrorMessage (line 69) | private static string GetErrorMessage(IReadOnlyCollection GetVariables(TFieldDeclarat... method GetReportLocation (line 69) | protected abstract Location GetReportLocation(TFieldName node); class PublicConstantFieldBase (line 28) | public abstract class PublicConstantFieldBase GetVariables(TFieldDeclarat... method GetReportLocation (line 69) | protected abstract Location GetReportLocation(TFieldName node); FILE: analyzers/src/SonarAnalyzer.Core/Rules/PublicMethodWithMultidimensionalArrayBase.cs class PublicMethodWithMultidimensionalArrayBase (line 20) | public abstract class PublicMethodWithMultidimensionalArrayBase : Sonar... method PureAttributeOnVoidMethodBase (line 27) | protected PureAttributeOnVoidMethodBase() : base(DiagnosticId) { } method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) => method InvalidPureDataAttributeUsage (line 40) | protected static AttributeData InvalidPureDataAttributeUsage(IMethodSy... method NoOutParameters (line 48) | private static bool NoOutParameters(IMethodSymbol method) => method ReturnsTask (line 51) | private static bool ReturnsTask(IMethodSymbol method) => method PureAttribute (line 54) | private static AttributeData PureAttribute(IMethodSymbol method) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/RedundantNullCheckBase.cs class RedundantNullCheckBase (line 20) | public abstract class RedundantNullCheckBase : SonarD... method GetLeftNode (line 25) | protected abstract SyntaxNode GetLeftNode(TBinaryExpression binaryExpr... method GetRightNode (line 27) | protected abstract SyntaxNode GetRightNode(TBinaryExpression binaryExp... method GetNullCheckVariable (line 29) | protected abstract SyntaxNode GetNullCheckVariable(SyntaxNode node); method GetNonNullCheckVariable (line 31) | protected abstract SyntaxNode GetNonNullCheckVariable(SyntaxNode node); method GetIsOperatorCheckVariable (line 33) | protected abstract SyntaxNode GetIsOperatorCheckVariable(SyntaxNode no... method GetInvertedIsOperatorCheckVariable (line 35) | protected abstract SyntaxNode GetInvertedIsOperatorCheckVariable(Synta... method AreEquivalent (line 37) | protected abstract bool AreEquivalent(SyntaxNode node1, SyntaxNode nod... method CheckAndExpression (line 40) | protected void CheckAndExpression(SonarSyntaxNodeReportingContext cont... method CheckOrExpression (line 61) | protected void CheckOrExpression(SonarSyntaxNodeReportingContext context) FILE: analyzers/src/SonarAnalyzer.Core/Rules/RedundantParenthesesBase.cs class RedundantParenthesesBase (line 20) | public abstract class RedundantParenthesesBase GetSelfAndDescendantPa... FILE: analyzers/src/SonarAnalyzer.Core/Rules/RegularExpressions/RegexMustHaveValidSyntaxBase.cs class RegexMustHaveValidSyntaxBase (line 22) | public abstract class RegexMustHaveValidSyntaxBase : SonarD... method RegexMustHaveValidSyntaxBase (line 29) | protected RegexMustHaveValidSyntaxBase() : base(DiagnosticId) { } method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method Analyze (line 49) | private void Analyze(SonarSyntaxNodeReportingContext c, RegexContext c... FILE: analyzers/src/SonarAnalyzer.Core/Rules/ReversedOperatorsBase.cs class ReversedOperatorsBase (line 20) | public abstract class ReversedOperatorsBase : So... method GetOperatorToken (line 26) | protected abstract SyntaxToken GetOperatorToken(TUnaryExpressionSyntax... method IsEqualsToken (line 28) | protected abstract bool IsEqualsToken(SyntaxToken token); method IsMinusToken (line 30) | protected abstract bool IsMinusToken(SyntaxToken token); method TiedTogether (line 32) | private static bool TiedTogether(FileLinePositionSpan left, FileLinePo... method GetAnalysisAction (line 35) | protected Action GetAnalysisAction(Di... FILE: analyzers/src/SonarAnalyzer.Core/Rules/SecurityPInvokeMethodShouldNotBeCalledBase.cs class SecurityPInvokeMethodShouldNotBeCalledBase (line 20) | [Obsolete("This rule has been deprecated since 9.18")] method MethodSymbolForInvalidInvocation (line 29) | protected abstract IMethodSymbol MethodSymbolForInvalidInvocation(Synt... method SecurityPInvokeMethodShouldNotBeCalledBase (line 39) | protected SecurityPInvokeMethodShouldNotBeCalledBase() : base(Diagnost... method Initialize (line 41) | protected override void Initialize(SonarAnalysisContext context) => method IsImportFromInteropDll (line 44) | protected virtual bool IsImportFromInteropDll(IMethodSymbol symbol, Se... method GetMethodName (line 51) | protected virtual string GetMethodName(ISymbol symbol, SemanticModel s... method IsInterop (line 54) | protected static bool IsInterop(string dllName) => method CheckForIssue (line 58) | private void CheckForIssue(SonarSyntaxNodeReportingContext analysisCon... FILE: analyzers/src/SonarAnalyzer.Core/Rules/SelfAssignmentBase.cs class SelfAssignmentBase (line 20) | public abstract class SelfAssignmentBase : SonarDiagnosticA... method SelfAssignmentBase (line 27) | protected SelfAssignmentBase() : base(DiagnosticId) { } FILE: analyzers/src/SonarAnalyzer.Core/Rules/SetPropertiesInsteadOfMethodsBase.cs class SetPropertiesInsteadOfMethodsBase (line 20) | public abstract class SetPropertiesInsteadOfMethodsBase method HasCorrectName (line 52) | private bool HasCorrectName(string methodName) => method IsCorrectType (line 56) | private static bool IsCorrectType(SyntaxNode node, SemanticModel model... method IsCorrectCall (line 59) | private static bool IsCorrectCall(SyntaxNode node, SemanticModel model... FILE: analyzers/src/SonarAnalyzer.Core/Rules/ShiftDynamicNotIntegerBase.cs class ShiftDynamicNotIntegerBase (line 20) | public abstract class ShiftDynamicNotIntegerBase : SonarDia... method CanBeConvertedTo (line 24) | protected abstract bool CanBeConvertedTo(SyntaxNode expression, ITypeS... method ShouldRaise (line 26) | protected abstract bool ShouldRaise(SemanticModel model, SyntaxNode le... method ShiftDynamicNotIntegerBase (line 30) | protected ShiftDynamicNotIntegerBase() : base(DiagnosticId) { } method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) method IsConvertibleToInt (line 47) | protected bool IsConvertibleToInt(SyntaxNode expression, SemanticModel... method CheckExpressionWithTwoParts (line 51) | private void CheckExpressionWithTwoParts(SonarSyntaxNodeReportingConte... method TypeNameForMessage (line 65) | private static string TypeNameForMessage(SyntaxNode expression, ITypeS... method IsErrorType (line 70) | private static bool IsErrorType(SyntaxNode expression, SemanticModel m... FILE: analyzers/src/SonarAnalyzer.Core/Rules/ShouldImplementExportedInterfacesBase.cs class ShouldImplementExportedInterfacesBase (line 20) | public abstract class ShouldImplementExportedInterfacesBase? GetAttributeA... method GetAttributeName (line 36) | protected abstract SyntaxNode GetAttributeName(TAttributeSyntax attrib... method IsClassOrRecordSyntax (line 37) | protected abstract bool IsClassOrRecordSyntax(SyntaxNode syntaxNode); method GetTypeOfOrGetTypeExpression (line 39) | protected abstract SyntaxNode GetTypeOfOrGetTypeExpression(SyntaxNode ... method ShouldImplementExportedInterfacesBase (line 43) | protected ShouldImplementExportedInterfacesBase() : base(DiagnosticId)... method Initialize (line 45) | protected override void Initialize(SonarAnalysisContext context) => method IsOfExportType (line 78) | private static bool IsOfExportType(ITypeSymbol type, INamedTypeSymbol ... method GetExportedTypeSymbol (line 86) | private INamedTypeSymbol GetExportedTypeSymbol(SeparatedSyntaxList method AreNotDefinedInTheSameLoop (line 94) | private bool AreNotDefinedInTheSameLoop(SyntaxNode expression, SyntaxN... FILE: analyzers/src/SonarAnalyzer.Core/Rules/StringLiteralShouldNotBeDuplicatedBase.cs class StringLiteralShouldNotBeDuplicatedBase (line 20) | public abstract class StringLiteralShouldNotBeDuplicatedBase FindLiteralEx... method LiteralToken (line 38) | protected abstract SyntaxToken LiteralToken(TLiteralExpressionSyntax l... method StringLiteralShouldNotBeDuplicatedBase (line 45) | protected StringLiteralShouldNotBeDuplicatedBase() => method Initialize (line 48) | protected override void Initialize(SonarParametrizedAnalysisContext co... method IsNamedTypeOrTopLevelMain (line 58) | protected virtual bool IsNamedTypeOrTopLevelMain(SonarSyntaxNodeReport... method IsNamedType (line 61) | protected static bool IsNamedType(SonarSyntaxNodeReportingContext cont... method ReportOnViolation (line 64) | private void ReportOnViolation(SonarSyntaxNodeReportingContext context... method IsInEFMigration (line 89) | private static bool IsInEFMigration(SyntaxNode node, SemanticModel mod... method IsEFMigrationType (line 93) | private static bool IsEFMigrationType(INamedTypeSymbol typeSymbol) => method ExtractStringContent (line 97) | private static string ExtractStringContent(SyntaxToken literalToken) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/SwitchCasesMinimumThreeBase.cs class SwitchCasesMinimumThreeBase (line 20) | public abstract class SwitchCasesMinimumThreeBase : SonarDiagnosticAnalyzer FILE: analyzers/src/SonarAnalyzer.Core/Rules/SwitchSectionShouldNotHaveTooManyStatementsBase.cs class SwitchSectionShouldNotHaveTooManyStatementsBase (line 20) | public abstract class SwitchSectionShouldNotHaveTooManyStatementsBase : ... FILE: analyzers/src/SonarAnalyzer.Core/Rules/SwitchShouldNotBeNestedBase.cs class SwitchShouldNotBeNestedBase (line 20) | public abstract class SwitchShouldNotBeNestedBase : SonarDiagnosticAnalyzer FILE: analyzers/src/SonarAnalyzer.Core/Rules/SwitchWithoutDefaultBase.cs class SwitchWithoutDefaultBase (line 20) | public abstract class SwitchWithoutDefaultBase : SonarDiagnosticAnalyzer method Initialize (line 31) | protected sealed override void Initialize(SonarAnalysisContext context) method TryGetDiagnostic (line 45) | protected abstract bool TryGetDiagnostic(SyntaxNode node, out Diagnost... class SwitchWithoutDefaultBase (line 28) | public abstract class SwitchWithoutDefaultBase : Swit... method Initialize (line 31) | protected sealed override void Initialize(SonarAnalysisContext context) method TryGetDiagnostic (line 45) | protected abstract bool TryGetDiagnostic(SyntaxNode node, out Diagnost... FILE: analyzers/src/SonarAnalyzer.Core/Rules/TabCharacterBase.cs class TabCharacterBase (line 22) | public abstract class TabCharacterBase : SonarDiagnosticAnalyzer method Initialize (line 24) | protected sealed override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.Core/Rules/TestsShouldNotUseThreadSleepBase.cs class TestsShouldNotUseThreadSleepBase (line 20) | public abstract class TestsShouldNotUseThreadSleepBase FILE: analyzers/src/SonarAnalyzer.Core/Rules/ThreadResumeOrSuspendShouldNotBeCalledBase.cs class ThreadResumeOrSuspendShouldNotBeCalledBase (line 22) | public abstract class ThreadResumeOrSuspendShouldNotBeCalledBase : SonarDi... method ThrowReservedExceptionsBase (line 36) | protected ThrowReservedExceptionsBase() : base(DiagnosticId) { } method Process (line 38) | protected void Process(SonarSyntaxNodeReportingContext context, Syntax... FILE: analyzers/src/SonarAnalyzer.Core/Rules/ToStringShouldNotReturnNullBase.cs class ToStringShouldNotReturnNullBase (line 20) | public abstract class ToStringShouldNotReturnNullBase : Son... method IsLocalOrLambda (line 26) | protected abstract bool IsLocalOrLambda(SyntaxNode node); method Conditionals (line 28) | protected abstract IEnumerable Conditionals(SyntaxNode exp... method ToStringShouldNotReturnNullBase (line 32) | protected ToStringShouldNotReturnNullBase() : base(DiagnosticId) { } method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) => method ToStringReturnsNull (line 40) | protected void ToStringReturnsNull(SonarSyntaxNodeReportingContext con... method ReturnsNull (line 48) | private bool ReturnsNull(SyntaxNode node) => method WithinToString (line 52) | private bool WithinToString(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/TooManyLabelsInSwitchBase.cs class TooManyLabelsInSwitchBase (line 20) | public abstract class TooManyLabelsInSwitchBase false; method TooManyParametersBase (line 41) | protected TooManyParametersBase() => method Initialize (line 44) | protected override void Initialize(SonarParametrizedAnalysisContext co... method VerifyCanBeChangedBySymbol (line 62) | protected static bool VerifyCanBeChangedBySymbol(SyntaxNode node, Sema... FILE: analyzers/src/SonarAnalyzer.Core/Rules/UnaryPrefixOperatorRepeatedBase.cs class UnaryPrefixOperatorRepeatedBase (line 20) | public abstract class UnaryPrefixOperatorRepeatedBase method GetOperand (line 71) | protected abstract SyntaxNode GetOperand(TSyntaxNode unarySyntax); method GetOperatorToken (line 73) | protected abstract SyntaxToken GetOperatorToken(TSyntaxNode unarySyntax); method SameOperators (line 75) | protected abstract bool SameOperators(TSyntaxNode expression1, TSyntax... FILE: analyzers/src/SonarAnalyzer.Core/Rules/UnconditionalJumpStatementBase.cs class UnconditionalJumpStatementBase (line 20) | public abstract class UnconditionalJumpStatementBase GetWa... method UnconditionalJumpStatementBase (line 32) | protected UnconditionalJumpStatementBase() : base(DiagnosticId) { } method Initialize (line 34) | protected override void Initialize(SonarAnalysisContext context) => class LoopWalkerBase (line 48) | public abstract class LoopWalkerBase method Visit (line 63) | public abstract void Visit(); method TryGetTryAncestorStatements (line 64) | protected abstract bool TryGetTryAncestorStatements(TStatementSyntax n... method IsPropertyAccess (line 65) | protected abstract bool IsPropertyAccess(TStatementSyntax node); method LoopWalkerBase (line 73) | protected LoopWalkerBase(SonarSyntaxNodeReportingContext context, ISet... method GetRuleViolations (line 80) | public List GetRuleViolations() method StoreVisitData (line 91) | protected void StoreVisitData(TStatementSyntax node, List method CheckBinary (line 34) | protected void CheckBinary(SonarSyntaxNodeReportingContext context, Sy... method FindIntConstant (line 56) | protected int? FindIntConstant(SemanticModel semanticModel, SyntaxNode... method IsFieldOrPropertyOutsideSystemNamespace (line 64) | private static bool IsFieldOrPropertyOutsideSystemNamespace(ISymbol sy... FILE: analyzers/src/SonarAnalyzer.Core/Rules/UnnecessaryBitwiseOperationCodeFixBase.cs class UnnecessaryBitwiseOperationCodeFixBase (line 22) | public abstract class UnnecessaryBitwiseOperationCodeFixBase : SonarCodeFix method CreateNewRoot (line 26) | protected abstract Func CreateNewRoot(SyntaxNode root, Tex... method RegisterCodeFixesAsync (line 30) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.Core/Rules/UnusedStringBuilderBase.cs class UnusedStringBuilderBase (line 20) | public abstract class UnusedStringBuilderBase method IsAccessExpression (line 41) | internal bool IsAccessExpression(string expression) => method Initialize (line 44) | protected sealed override void Initialize(SonarAnalysisContext context... method IsSameVariable (line 60) | private bool IsSameVariable(SemanticModel model, ILocalSymbol symbol, ... method LocalReferences (line 63) | private static IEnumerable LocalReferences(SyntaxNode... method IsStringBuilderAccessed (line 66) | private bool IsStringBuilderAccessed(SemanticModel model, ILocalSymbol... FILE: analyzers/src/SonarAnalyzer.Core/Rules/UriShouldNotBeHardcodedBase.cs class UriShouldNotBeHardcodedBase (line 23) | public abstract class UriShouldNotBeHardcodedBase FILE: analyzers/src/SonarAnalyzer.Core/Rules/UseCharOverloadOfStringMethodsBase.cs class UseCharOverloadOfStringMethodsBase (line 20) | public abstract class UseCharOverloadOfStringMethodsBase method CompilationTargetsValidNetVersion (line 56) | private static bool CompilationTargetsValidNetVersion(Compilation comp... method HasCorrectName (line 63) | private bool HasCorrectName(string methodName) => method IsCorrectType (line 67) | private static bool IsCorrectType(SyntaxNode left, SemanticModel model... FILE: analyzers/src/SonarAnalyzer.Core/Rules/UseDateTimeOffsetInsteadOfDateTimeBase.cs class UseDateTimeOffsetInsteadOfDateTimeBase (line 20) | public abstract class UseDateTimeOffsetInsteadOfDateTimeBase method GetTypeName (line 74) | private string GetTypeName(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/UseFindSystemTimeZoneByIdBase.cs class UseFindSystemTimeZoneByIdBase (line 22) | public abstract class UseFindSystemTimeZoneByIdBase FILE: analyzers/src/SonarAnalyzer.Core/Rules/UseIFormatProviderForParsingDateAndTimeBase.cs class UseIFormatProviderForParsingDateAndTimeBase (line 20) | public abstract class UseIFormatProviderForParsingDateAndTimeBase method NotUsingFormatProvider (line 58) | private bool NotUsingFormatProvider(IMethodSymbol methodSymbol, Syntax... FILE: analyzers/src/SonarAnalyzer.Core/Rules/UseIndexingInsteadOfLinqMethodsBase.cs class UseIndexingInsteadOfLinqMethodsBase (line 20) | public abstract class UseIndexingInsteadOfLinqMethodsBase method HasValidSignature (line 55) | private bool HasValidSignature(TInvocation invocation, out string meth... method IsCorrectType (line 78) | protected static bool IsCorrectType(SyntaxNode left, SemanticModel mod... method IsCorrectCall (line 82) | protected static bool IsCorrectCall(SyntaxNode right, SemanticModel mo... FILE: analyzers/src/SonarAnalyzer.Core/Rules/UseLambdaParameterInConcurrentDictionaryBase.cs class UseLambdaParameterInConcurrentDictionaryBase (line 20) | public abstract class UseLambdaParameterInConcurrentDictionaryBase GetArguments(T... method TryGetKeyName (line 30) | protected abstract bool TryGetKeyName(TArgumentSyntax argument, out st... method IsLambdaAndContainsIdentifier (line 31) | protected abstract bool IsLambdaAndContainsIdentifier(TArgumentSyntax ... method UseLambdaParameterInConcurrentDictionaryBase (line 33) | protected UseLambdaParameterInConcurrentDictionaryBase() : base(Diagno... method Initialize (line 35) | protected override void Initialize(SonarAnalysisContext context) => method HasCorrectName (line 57) | private bool HasCorrectName(string methodName) => method IsCorrectType (line 61) | private static bool IsCorrectType(SyntaxNode left, SemanticModel model... method IsCorrectCall (line 64) | private static bool IsCorrectCall(SyntaxNode right, SemanticModel mode... FILE: analyzers/src/SonarAnalyzer.Core/Rules/UseShortCircuitingOperatorBase.cs class UseShortCircuitingOperatorBase (line 20) | public abstract class UseShortCircuitingOperatorBase ReplaceExpressionAsync(TBinaryExpression expres... method GetShortCircuitingExpressionNode (line 56) | protected abstract TBinaryExpression GetShortCircuitingExpressionNode(... FILE: analyzers/src/SonarAnalyzer.Core/Rules/UseTestableTimeProviderBase.cs class UseTestableTimeProviderBase (line 20) | public abstract class UseTestableTimeProviderBase : SonarDi... method Ignore (line 29) | protected abstract bool Ignore(SyntaxNode ancestor, SemanticModel sema... method UseTestableTimeProviderBase (line 31) | protected UseTestableTimeProviderBase() : base(DiagnosticId) { } method Initialize (line 32) | protected sealed override void Initialize(SonarAnalysisContext context... method IsDateTimeProviderProperty (line 45) | private bool IsDateTimeProviderProperty(string name) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/UseTrueForAllBase.cs class UseTrueForAllBase (line 20) | public abstract class UseTrueForAllBase : SonarDiagnosticAn... method UseTrueForAllBase (line 31) | protected UseTrueForAllBase() : base(DiagnosticId) { } method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) => method IsCorrectType (line 46) | protected static bool IsCorrectType(SyntaxNode left, SemanticModel mod... method IsCorrectCall (line 49) | protected static bool IsCorrectCall(SyntaxNode right, SemanticModel mo... FILE: analyzers/src/SonarAnalyzer.Core/Rules/UseUnixEpochBase.cs class UseUnixEpochBase (line 20) | public abstract class UseUnixEpochBase : SonarDiagnosticAna... method UseUnixEpochBase (line 25) | protected UseUnixEpochBase() : base(DiagnosticId) { } method IsDateTimeKindUtc (line 42) | protected abstract bool IsDateTimeKindUtc(TMemberAccessExpression memb... method IsGregorianCalendar (line 43) | protected abstract bool IsGregorianCalendar(SyntaxNode node); method IsZeroTimeOffset (line 44) | protected abstract bool IsZeroTimeOffset(SyntaxNode node); method Initialize (line 46) | protected sealed override void Initialize(SonarAnalysisContext context... method IsValueEqualTo (line 79) | protected static bool IsValueEqualTo(TLiteralExpression literal, long ... method IsEpochCtor (line 82) | private bool IsEpochCtor(SyntaxNode node, SemanticModel model) method IsParameterExistingAndLiteralEqualTo (line 100) | private static bool IsParameterExistingAndLiteralEqualTo(string parame... method IsParameterNonExistingOrLiteralEqualTo (line 103) | private static bool IsParameterNonExistingOrLiteralEqualTo(string para... method IsLiteralAndEqualTo (line 106) | private static bool IsLiteralAndEqualTo(SyntaxNode node, int value) => method CheckAndGetTypeName (line 109) | private static string CheckAndGetTypeName(SyntaxNode node, SemanticMod... method IsDateTimeKindNonExistingOrUtc (line 112) | private bool IsDateTimeKindNonExistingOrUtc(IMethodParameterLookup loo... method IsCalendarNonExistingOrGregorian (line 116) | private bool IsCalendarNonExistingOrGregorian(IMethodParameterLookup l... method IsOffsetNonExistingOrZero (line 119) | private bool IsOffsetNonExistingOrZero(IMethodParameterLookup lookup) => method IsUnixEpochSupported (line 123) | private static bool IsUnixEpochSupported(Compilation compilation) => class UseUnixEpochBase (line 28) | public abstract class UseUnixEpochBase method CheckAndGetTypeName (line 109) | private static string CheckAndGetTypeName(SyntaxNode node, SemanticMod... method IsDateTimeKindNonExistingOrUtc (line 112) | private bool IsDateTimeKindNonExistingOrUtc(IMethodParameterLookup loo... method IsCalendarNonExistingOrGregorian (line 116) | private bool IsCalendarNonExistingOrGregorian(IMethodParameterLookup l... method IsOffsetNonExistingOrZero (line 119) | private bool IsOffsetNonExistingOrZero(IMethodParameterLookup lookup) => method IsUnixEpochSupported (line 123) | private static bool IsUnixEpochSupported(Compilation compilation) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/UseUnixEpochCodeFixBase.cs class UseUnixEpochCodeFixBase (line 20) | public abstract class UseUnixEpochCodeFixBase : SonarCodeFix method ReplaceConstructorWithField (line 25) | protected abstract SyntaxNode ReplaceConstructorWithField(SyntaxNode r... method RegisterCodeFixesAsync (line 30) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.Core/Rules/UseWhereBeforeOrderByBase.cs class UseWhereBeforeOrderByBase (line 20) | public abstract class UseWhereBeforeOrderByBase method LeftHasCorrectName (line 49) | private bool LeftHasCorrectName(SyntaxNode left, out string methodName) method MethodIsLinqExtension (line 62) | private static bool MethodIsLinqExtension(SyntaxNode node, SemanticMod... FILE: analyzers/src/SonarAnalyzer.Core/Rules/Utilities/AnalysisWarningAnalyzerBase.cs class AnalysisWarningAnalyzerBase (line 23) | public abstract class AnalysisWarningAnalyzerBase : UtilityAnalyzerBase method AnalysisWarningAnalyzerBase (line 31) | protected AnalysisWarningAnalyzerBase() : base(DiagnosticId, Title) { } method Initialize (line 33) | protected sealed override void Initialize(SonarAnalysisContext context... method WriteAllText (line 58) | private static void WriteAllText(string path, string text) FILE: analyzers/src/SonarAnalyzer.Core/Rules/Utilities/CopyPasteTokenAnalyzerBase.cs class CopyPasteTokenAnalyzerBase (line 22) | public abstract class CopyPasteTokenAnalyzerBase : UtilityA... method GetCpdValue (line 28) | protected abstract string GetCpdValue(SyntaxToken token); method IsUsingDirective (line 29) | protected abstract bool IsUsingDirective(SyntaxNode node); method ReadParameters (line 30) | protected override UtilityAnalyzerParameters ReadParameters(IAnalysisC... method CopyPasteTokenAnalyzerBase (line 36) | protected CopyPasteTokenAnalyzerBase() : base(DiagnosticId, Title) { } method ShouldGenerateMetrics (line 38) | protected sealed override bool ShouldGenerateMetrics(UtilityAnalyzerPa... method CreateMessage (line 42) | protected sealed override CopyPasteTokenInfo CreateMessage(UtilityAnal... FILE: analyzers/src/SonarAnalyzer.Core/Rules/Utilities/FileMetadataAnalyzerBase.cs class FileMetadataAnalyzerBase (line 22) | public abstract class FileMetadataAnalyzerBase : UtilityAna... method ReadParameters (line 29) | protected override UtilityAnalyzerParameters ReadParameters(IAnalysisC... method FileMetadataAnalyzerBase (line 32) | protected FileMetadataAnalyzerBase() : base(DiagnosticId, Title) { } method ShouldGenerateMetrics (line 34) | protected override bool ShouldGenerateMetrics(UtilityAnalyzerParameter... method CreateMessage (line 38) | protected sealed override FileMetadataInfo CreateMessage(UtilityAnalyz... FILE: analyzers/src/SonarAnalyzer.Core/Rules/Utilities/LogAnalyzerBase.cs class LogAnalyzerBase (line 22) | public abstract class LogAnalyzerBase : UtilityAnalyzerBase... method LanguageVersion (line 28) | protected abstract string LanguageVersion(Compilation compilation); method ReadParameters (line 31) | protected override UtilityAnalyzerParameters ReadParameters(IAnalysisC... method LogAnalyzerBase (line 34) | protected LogAnalyzerBase() : base(DiagnosticId, Title) { } method CreateAnalysisMessages (line 36) | protected sealed override IEnumerable CreateAnalysisMessages(... method CreateMessage (line 44) | protected sealed override LogInfo CreateMessage(UtilityAnalyzerParamet... method CreateMessage (line 49) | private static LogInfo CreateMessage(SyntaxTree tree) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/Utilities/MethodDeclarationInfoComparer.cs type MethodDeclarationInfoComparer (line 22) | public sealed record MethodDeclarationInfoComparer : IEqualityComparer : UtilityAnalyzer... method GetMetrics (line 29) | protected abstract MetricsBase GetMetrics(SyntaxTree syntaxTree, Seman... method ReadParameters (line 32) | protected override UtilityAnalyzerParameters ReadParameters(IAnalysisC... method MetricsAnalyzerBase (line 35) | protected MetricsAnalyzerBase() : base(DiagnosticId, Title) { } method CreateMessage (line 37) | protected sealed override MetricsInfo CreateMessage(UtilityAnalyzerPar... FILE: analyzers/src/SonarAnalyzer.Core/Rules/Utilities/SymbolReferenceAnalyzerBase.cs class SymbolReferenceAnalyzerBase (line 22) | public abstract class SymbolReferenceAnalyzerBase : Utility... method GetBindableParent (line 29) | protected abstract SyntaxNode GetBindableParent(SyntaxToken token); method CreateDeclarationReferenceInfo (line 31) | protected abstract ReferenceInfo[] CreateDeclarationReferenceInfo(Synt... method GetDeclarations (line 33) | protected abstract IList GetDeclarations(SyntaxNode node); method SymbolReferenceAnalyzerBase (line 37) | protected SymbolReferenceAnalyzerBase() : base(DiagnosticId, Title) { } method CreateMessage (line 39) | protected sealed override SymbolReferenceInfo CreateMessage(UtilityAna... method ShouldGenerateMetrics (line 54) | protected sealed override bool ShouldGenerateMetrics(UtilityAnalyzerPa... method GetReferences (line 58) | private Dictionary> GetReferences(SyntaxN... method GetReferenceSymbol (line 103) | private static ISymbol GetReferenceSymbol(SyntaxNode node, SemanticMod... method GetSymbolReference (line 110) | private static SymbolReferenceInfo.Types.SymbolReference GetSymbolRefe... method GetDeclarationSpan (line 134) | private static FileLinePositionSpan? GetDeclarationSpan(IReadOnlyList<... method HasTooManyTokens (line 148) | private static bool HasTooManyTokens(SyntaxTree tree) => type ReferenceInfo (line 151) | protected sealed record ReferenceInfo(SyntaxNode Node, SyntaxToken Ide... FILE: analyzers/src/SonarAnalyzer.Core/Rules/Utilities/TelemetryAnalyzerBase.cs class TelemetryAnalyzerBase (line 24) | public abstract class TelemetryAnalyzerBase : UtilityAnalyz... method LanguageVersion (line 32) | protected abstract string LanguageVersion(Compilation compilation); method TelemetryAnalyzerBase (line 34) | protected TelemetryAnalyzerBase() : base(DiagnosticId, Title) { } method Initialize (line 36) | protected sealed override void Initialize(SonarAnalysisContext context... method CreateTelemetry (line 52) | private Telemetry CreateTelemetry(SonarCompilationReportingContext c) FILE: analyzers/src/SonarAnalyzer.Core/Rules/Utilities/TestMethodDeclarationsAnalyzerBase.cs class TestMethodDeclarationsAnalyzerBase (line 27) | public abstract class TestMethodDeclarationsAnalyzerBase() ... method GetTypeDeclarations (line 33) | protected abstract IEnumerable GetTypeDeclarations(SyntaxN... method GetMethodDeclarations (line 35) | protected abstract IEnumerable GetMethodDeclarations(Synta... method ShouldGenerateMetrics (line 39) | protected override bool ShouldGenerateMetrics(UtilityAnalyzerParameter... method CreateMessage (line 43) | protected sealed override MethodDeclarationsInfo CreateMessage(Utility... method GetDeclarationInfo (line 64) | private static MethodDeclarationInfo GetDeclarationInfo(IMethodSymbol ... method GetDeclarationInfo (line 71) | private static MethodDeclarationInfo GetDeclarationInfo(ITypeSymbol de... method Name (line 78) | private static string Name(ITypeSymbol typeSymbol) method GetAllTestMethods (line 97) | private static IEnumerable GetAllTestMethods(IT... method GetTestMethodSymbols (line 114) | private static IEnumerable GetTestMethodSymbols(ITypeSy... method GetTestMethodSymbol (line 117) | private static IMethodSymbol GetTestMethodSymbol(SyntaxNode methodDecl... method IsTestMethod (line 122) | private static bool IsTestMethod(IMethodSymbol methodSymbol) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/Utilities/TokenTypeAnalyzerBase.cs class TokenTypeAnalyzerBase (line 24) | public abstract class TokenTypeAnalyzerBase : UtilityAnalyz... method TokenTypeAnalyzerBase (line 33) | protected TokenTypeAnalyzerBase() : base(DiagnosticId, Title) { } method GetTokenClassifier (line 35) | protected abstract TokenClassifierBase GetTokenClassifier(SemanticMode... method GetTriviaClassifier (line 36) | protected abstract TriviaClassifierBase GetTriviaClassifier(); method ShouldGenerateMetrics (line 38) | protected sealed override bool ShouldGenerateMetrics(UtilityAnalyzerPa... method CreateMessage (line 42) | protected sealed override TokenTypeInfo CreateMessage(UtilityAnalyzerP... class TokenClassifierBase (line 91) | protected internal abstract class TokenClassifierBase method GetBindableParent (line 111) | protected abstract SyntaxNode GetBindableParent(SyntaxToken token); method IsKeyword (line 112) | protected abstract bool IsKeyword(SyntaxToken token); method IsIdentifier (line 113) | protected abstract bool IsIdentifier(SyntaxToken token); method IsNumericLiteral (line 114) | protected abstract bool IsNumericLiteral(SyntaxToken token); method IsStringLiteral (line 115) | protected abstract bool IsStringLiteral(SyntaxToken token); method TokenClassifierBase (line 119) | protected TokenClassifierBase(SemanticModel semanticModel, bool skip... method ClassifyToken (line 125) | public TokenInfo ClassifyToken(SyntaxToken token) => method TokenInfo (line 135) | protected static TokenInfo TokenInfo(SyntaxToken token, TokenType to... method ClassifyIdentifier (line 145) | protected virtual TokenInfo ClassifyIdentifier(SyntaxToken token) method ClassifyIdentifier (line 161) | private TokenInfo ClassifyIdentifier(SyntaxToken token, ISymbol symb... class TriviaClassifierBase (line 174) | protected internal abstract class TriviaClassifierBase method IsDocComment (line 176) | protected abstract bool IsDocComment(SyntaxTrivia trivia); method IsRegularComment (line 177) | protected abstract bool IsRegularComment(SyntaxTrivia trivia); method ClassifyTrivia (line 179) | public TokenInfo ClassifyTrivia(SyntaxTrivia trivia) => method TokenInfo (line 188) | private TokenInfo TokenInfo(SyntaxTree tree, TokenType tokenType, Te... method ClassifyDocComment (line 195) | private TokenInfo ClassifyDocComment(SyntaxTrivia trivia) => FILE: analyzers/src/SonarAnalyzer.Core/Rules/Utilities/UtilityAnalyzerBase.cs type UtilityAnalyzerParameters (line 25) | public readonly record struct UtilityAnalyzerParameters(bool IsAnalyzerE... class UtilityAnalyzerBase (line 36) | public abstract class UtilityAnalyzerBase : SonarDiagnosticAnalyzer method UtilityAnalyzerBase (line 45) | protected UtilityAnalyzerBase(string diagnosticId, string title) => method ToTextRange (line 48) | internal static TextRange ToTextRange(FileLinePositionSpan lineSpan) => method ReadParameters (line 57) | protected virtual UtilityAnalyzerParameters ReadParameters(IAnalysisCo... method CreateMessage (line 88) | protected abstract TMessage CreateMessage(UtilityAnalyzerParameters pa... method UtilityAnalyzerBase (line 92) | protected UtilityAnalyzerBase(string diagnosticId, string title) : bas... method CreateAnalysisMessages (line 94) | protected virtual IEnumerable CreateAnalysisMessages(SonarCo... method Initialize (line 97) | protected sealed override void Initialize(SonarAnalysisContext context... method ShouldGenerateMetrics (line 129) | protected virtual bool ShouldGenerateMetrics(UtilityAnalyzerParameters... method MapFilePath (line 135) | protected static string MapFilePath(SyntaxTree tree) => method ShouldGenerateMetrics (line 141) | private bool ShouldGenerateMetrics(UtilityAnalyzerParameters parameter... method ShouldGenerateMetricsByType (line 145) | private bool ShouldGenerateMetricsByType(UtilityAnalyzerParameters par... class UtilityAnalyzerBase (line 82) | public abstract class UtilityAnalyzerBase : Utili... method UtilityAnalyzerBase (line 45) | protected UtilityAnalyzerBase(string diagnosticId, string title) => method ToTextRange (line 48) | internal static TextRange ToTextRange(FileLinePositionSpan lineSpan) => method ReadParameters (line 57) | protected virtual UtilityAnalyzerParameters ReadParameters(IAnalysisCo... method CreateMessage (line 88) | protected abstract TMessage CreateMessage(UtilityAnalyzerParameters pa... method UtilityAnalyzerBase (line 92) | protected UtilityAnalyzerBase(string diagnosticId, string title) : bas... method CreateAnalysisMessages (line 94) | protected virtual IEnumerable CreateAnalysisMessages(SonarCo... method Initialize (line 97) | protected sealed override void Initialize(SonarAnalysisContext context... method ShouldGenerateMetrics (line 129) | protected virtual bool ShouldGenerateMetrics(UtilityAnalyzerParameters... method MapFilePath (line 135) | protected static string MapFilePath(SyntaxTree tree) => method ShouldGenerateMetrics (line 141) | private bool ShouldGenerateMetrics(UtilityAnalyzerParameters parameter... method ShouldGenerateMetricsByType (line 145) | private bool ShouldGenerateMetricsByType(UtilityAnalyzerParameters par... FILE: analyzers/src/SonarAnalyzer.Core/Rules/ValueTypeShouldImplementIEquatableBase.cs class ValueTypeShouldImplementIEquatableBase (line 20) | public abstract class ValueTypeShouldImplementIEquatableBase : SonarDiagnosticA... method IsExcludedDeclaration (line 23) | protected abstract bool IsExcludedDeclaration(SyntaxNode node); method VariableUnusedBase (line 27) | protected VariableUnusedBase() : base("S1481") { } method Initialize (line 29) | protected sealed override void Initialize(SonarAnalysisContext context... method CollectDeclaration (line 50) | private void CollectDeclaration(SonarSyntaxNodeReportingContext c, Has... method ReportUnused (line 60) | private void ReportUnused(SonarCodeBlockReportingContext c, HashSet... method Initialize (line 27) | protected sealed override void Initialize(SonarAnalysisContext context) method GetReturnTypeLocation (line 72) | protected abstract Location GetReturnTypeLocation(TMethodSyntax method); FILE: analyzers/src/SonarAnalyzer.Core/Rules/WeakSslTlsProtocolsBase.cs class WeakSslTlsProtocolsBase (line 20) | public abstract class WeakSslTlsProtocolsBase : SonarDiagno... method WeakSslTlsProtocolsBase (line 36) | protected WeakSslTlsProtocolsBase() : base(DiagnosticId) { } method Initialize (line 38) | protected override void Initialize(SonarAnalysisContext context) => method IsWeakProtocol (line 51) | private bool IsWeakProtocol(SyntaxNode identifierName, SemanticModel m... FILE: analyzers/src/SonarAnalyzer.Core/Semantics/Extensions/IMethodSymbolExtensions.cs class IMethodSymbolExtensions (line 22) | public static class IMethodSymbolExtensions method IsExtensionOn (line 43) | public static bool IsExtensionOn(this IMethodSymbol methodSymbol, Know... method IsDestructor (line 58) | public static bool IsDestructor(this IMethodSymbol method) => method IsAnyAttributeInOverridingChain (line 61) | public static bool IsAnyAttributeInOverridingChain(this IMethodSymbol ... method Is (line 64) | public static bool Is(this IMethodSymbol methodSymbol, KnownType known... method IsAny (line 67) | public static bool IsAny(this IMethodSymbol methodSymbol, KnownType kn... method IsImplementingInterfaceMember (line 70) | public static bool IsImplementingInterfaceMember(this IMethodSymbol me... method IsControllerActionMethod (line 78) | public static bool IsControllerActionMethod(this IMethodSymbol methodS... method ComparisonKind (line 88) | public static Comparison ComparisonKind(this IMethodSymbol method) => method IsTestMethod (line 93) | public static bool IsTestMethod(this IMethodSymbol method) => method IsIgnoredTestMethod (line 98) | public static bool IsIgnoredTestMethod(this IMethodSymbol method) => method HasExpectedExceptionAttribute (line 104) | public static bool HasExpectedExceptionAttribute(this IMethodSymbol me... method HasAssertionInAttribute (line 109) | public static bool HasAssertionInAttribute(this IMethodSymbol method) => method IsMsTestOrNUnitTestIgnored (line 113) | public static bool IsMsTestOrNUnitTestIgnored(this IMethodSymbol metho... method FindFirstTestMethodType (line 123) | public static KnownType FindFirstTestMethodType(this IMethodSymbol met... method extension (line 126) | extension(IMethodSymbol method) FILE: analyzers/src/SonarAnalyzer.Core/Semantics/Extensions/INamedTypeSymbolExtensions.cs class INamedTypeSymbolExtensions (line 20) | public static class INamedTypeSymbolExtensions method IsTopLevelProgram (line 32) | public static bool IsTopLevelProgram(this INamedTypeSymbol symbol) => method GetAllNamedTypes (line 37) | public static IEnumerable GetAllNamedTypes(this INam... method IsControllerType (line 55) | public static bool IsControllerType(this INamedTypeSymbol namedType) => method IsCoreApiController (line 66) | public static bool IsCoreApiController(this INamedTypeSymbol namedType... method IsTestClass (line 75) | public static bool IsTestClass(this INamedTypeSymbol classSymbol) => method IsMefExportedType (line 83) | public static bool IsMefExportedType(this INamedTypeSymbol typeSymbol) => method SelfBaseTypesAndInterfaces (line 93) | public static IEnumerable SelfBaseTypesAndInterfaces... FILE: analyzers/src/SonarAnalyzer.Core/Semantics/Extensions/INamespaceSymbolExtensions.cs class INamespaceSymbolExtensions (line 20) | internal static class INamespaceSymbolExtensions method Is (line 28) | public static bool Is(this INamespaceSymbol symbol, string name) method GetAllNamedTypes (line 46) | public static IEnumerable GetAllNamedTypes(this INam... method IsSameNamespace (line 62) | public static bool IsSameNamespace(this INamespaceSymbol namespace1, I... method IsSameOrAncestorOf (line 69) | public static bool IsSameOrAncestorOf(this INamespaceSymbol thisNamesp... FILE: analyzers/src/SonarAnalyzer.Core/Semantics/Extensions/IParameterSymbolExtensions.cs class IParameterSymbolExtensions (line 20) | public static class IParameterSymbolExtensions method IsType (line 22) | public static bool IsType(this IParameterSymbol parameter, KnownType t... FILE: analyzers/src/SonarAnalyzer.Core/Semantics/Extensions/IPropertySymbolExtensions.cs class IPropertySymbolExtensions (line 20) | public static class IPropertySymbolExtensions method extension (line 22) | extension(IPropertySymbol property) method IsAnyAttributeInOverridingChain (line 26) | public bool IsAnyAttributeInOverridingChain() => FILE: analyzers/src/SonarAnalyzer.Core/Semantics/Extensions/ISymbolExtensions.Roslyn.cs class ISymbolExtensions (line 12) | [ExcludeFromCodeCoverage] method IsAwaitableNonDynamic (line 24) | public static bool IsAwaitableNonDynamic(this ISymbol? symbol) method VerifyGetAwaiter (line 55) | private static bool VerifyGetAwaiter(IMethodSymbol getAwaiter) FILE: analyzers/src/SonarAnalyzer.Core/Semantics/Extensions/ISymbolExtensions.cs class ISymbolExtensions (line 22) | public static class ISymbolExtensions method HasAnyAttribute (line 24) | public static bool HasAnyAttribute(this ISymbol symbol, ImmutableArray... method HasAttribute (line 27) | public static bool HasAttribute(this ISymbol symbol, KnownType type) => method GetFirstSyntaxRef (line 30) | public static SyntaxNode GetFirstSyntaxRef(this ISymbol symbol) => method IsAutoProperty (line 33) | public static bool IsAutoProperty(this ISymbol symbol) => method IsTopLevelMain (line 36) | public static bool IsTopLevelMain(this ISymbol symbol) => method IsGlobalNamespace (line 39) | public static bool IsGlobalNamespace(this ISymbol symbol) => method IsInSameAssembly (line 42) | public static bool IsInSameAssembly(this ISymbol symbol, ISymbol anoth... method HasNotNullAttribute (line 45) | public static bool HasNotNullAttribute(this ISymbol parameter) => method ExplicitOrImplicitInterfaceImplementations (line 49) | [ExcludeFromCodeCoverage] method HasContainingType (line 66) | public static bool HasContainingType(this ISymbol method, KnownType co... method IsInType (line 71) | public static bool IsInType(this ISymbol symbol, KnownType type) => method IsInType (line 74) | public static bool IsInType(this ISymbol symbol, ITypeSymbol type) => method IsInType (line 77) | public static bool IsInType(this ISymbol symbol, ImmutableArray InterfaceMembers(this T symbol) where ... method GetOverriddenMember (line 98) | public static T GetOverriddenMember(this T symbol) where T : class,... method GetOverriddenMembersAndSelf (line 109) | public static IEnumerable GetOverriddenMembersAndSelf(this T sym... method IsChangeable (line 120) | public static bool IsChangeable(this ISymbol symbol) => method GetParameters (line 126) | public static IEnumerable GetParameters(this ISymbol... method GetEffectiveAccessibility (line 134) | public static Accessibility GetEffectiveAccessibility(this ISymbol sym... method IsPubliclyAccessible (line 162) | public static bool IsPubliclyAccessible(this ISymbol symbol) => method IsConstructor (line 165) | public static bool IsConstructor(this ISymbol symbol) => method GetAttributes (line 168) | public static IEnumerable GetAttributes(this ISymbol sy... method GetAttributes (line 171) | public static IEnumerable GetAttributes(this ISymbol sy... method GetAttributesWithInherited (line 178) | public static IEnumerable GetAttributesWithInherited(th... method AnyAttributeDerivesFrom (line 208) | public static bool AnyAttributeDerivesFrom(this ISymbol symbol, KnownT... method AnyAttributeDerivesFromAny (line 211) | public static bool AnyAttributeDerivesFromAny(this ISymbol symbol, Imm... method AnyAttributeDerivesFromOrImplementsAny (line 214) | public static bool AnyAttributeDerivesFromOrImplementsAny(this ISymbol... method GetClassification (line 217) | public static string GetClassification(this ISymbol symbol) => method IsSerializableMember (line 278) | public static bool IsSerializableMember(this ISymbol symbol) => method IsAnyAttributeInOverridingChain (line 283) | public static bool IsAnyAttributeInOverridingChain(this TSymb... method AllPartialParts (line 305) | public static IEnumerable AllPartialParts(this ISymbol symbol) method CanBeInterfaceMember (line 337) | private static bool CanBeInterfaceMember(ISymbol symbol) => method IsNotNullAttribute (line 345) | private static bool IsNotNullAttribute(AttributeData attribute) => FILE: analyzers/src/SonarAnalyzer.Core/Semantics/Extensions/ITypeParameterSymbolExtensions.cs class ITypeParameterSymbolExtensions (line 20) | internal static class ITypeParameterSymbolExtensions method HasAnyConstraint (line 22) | public static bool HasAnyConstraint(this ITypeParameterSymbol typePara... FILE: analyzers/src/SonarAnalyzer.Core/Semantics/Extensions/ITypeSymbolExtensions.cs class ITypeSymbolExtensions (line 22) | public static class ITypeSymbolExtensions method IsInterface (line 26) | public static bool IsInterface(this ITypeSymbol self) => method IsClass (line 29) | public static bool IsClass(this ITypeSymbol self) => method IsStruct (line 32) | public static bool IsStruct(this ITypeSymbol self) => method IsClassOrStruct (line 40) | public static bool IsClassOrStruct(this ITypeSymbol self) => method IsNullableValueType (line 43) | public static bool IsNullableValueType(this ITypeSymbol self) => method IsNonNullableValueType (line 46) | public static bool IsNonNullableValueType(this ITypeSymbol self) => method IsEnum (line 49) | public static bool IsEnum(this ITypeSymbol self) => method CanBeNull (line 57) | public static bool CanBeNull(this ITypeSymbol self) => method Is (line 60) | public static bool Is(this ITypeSymbol self, TypeKind typeKind) => method Is (line 63) | public static bool Is(this ITypeSymbol typeSymbol, KnownType type) => method IsAny (line 66) | public static bool IsAny(this ITypeSymbol typeSymbol, params KnownType... method IsAny (line 85) | public static bool IsAny(this ITypeSymbol typeSymbol, ImmutableArray method Implements (line 113) | public static bool Implements(this ITypeSymbol typeSymbol, KnownType t... method ImplementsAny (line 117) | public static bool ImplementsAny(this ITypeSymbol typeSymbol, Immutabl... method DerivesFrom (line 121) | public static bool DerivesFrom(this ITypeSymbol typeSymbol, KnownType ... method DerivesFrom (line 136) | public static bool DerivesFrom(this ITypeSymbol typeSymbol, ITypeSymbo... method DerivesFromAny (line 151) | public static bool DerivesFromAny(this ITypeSymbol typeSymbol, Immutab... method DerivesOrImplements (line 166) | public static bool DerivesOrImplements(this ITypeSymbol type, KnownTyp... method DerivesOrImplements (line 169) | public static bool DerivesOrImplements(this ITypeSymbol type, ITypeSym... method DerivesOrImplementsAny (line 172) | public static bool DerivesOrImplementsAny(this ITypeSymbol type, Immut... method GetSymbolType (line 175) | public static ITypeSymbol GetSymbolType(this ISymbol symbol) => method GetSelfAndBaseTypes (line 189) | public static IEnumerable GetSelfAndBaseTypes(this I... method IsRecord (line 204) | public static bool IsRecord(this ITypeSymbol typeSymbol) => method NullableTypeArgument (line 207) | private static ITypeSymbol NullableTypeArgument(ITypeSymbol type) => method Implements (line 212) | private static bool Implements(this ITypeSymbol typeSymbol, ISymbol ty... FILE: analyzers/src/SonarAnalyzer.Core/Semantics/Extensions/KnownAssemblyExtensions.cs class KnownAssemblyExtensions (line 20) | internal static class KnownAssemblyExtensions method And (line 22) | internal static Func And(this Func Or(this Func AllSymbols(this SymbolInfo symbolIn... FILE: analyzers/src/SonarAnalyzer.Core/Semantics/KnownAssembly.Predicates.cs class KnownAssembly (line 20) | public sealed partial class KnownAssembly class Predicates (line 24) | internal static class Predicates method NameIs (line 26) | internal static Func NameIs(string name) => method StartsWith (line 29) | internal static Func StartsWith(string name) => method EndsWith (line 32) | internal static Func EndsWith(string name) => method Contains (line 35) | internal static Func Contains(string name) => method VersionLowerThen (line 38) | internal static Func VersionLowerThen(string... method VersionLowerThen (line 41) | internal static Func VersionLowerThen(Versio... method VersionGreaterOrEqual (line 44) | internal static Func VersionGreaterOrEqual(s... method VersionGreaterOrEqual (line 47) | internal static Func VersionGreaterOrEqual(V... method VersionBetween (line 50) | internal static Func VersionBetween(string f... method VersionBetween (line 53) | internal static Func VersionBetween(Version ... method OptionalPublicKeyTokenIs (line 56) | internal static Func OptionalPublicKeyTokenI... method PublicKeyTokenIs (line 59) | internal static Func PublicKeyTokenIs(string... method PublicKeyTokenIsAny (line 62) | internal static Func PublicKeyTokenIsAny(par... method NameAndPublicKeyIs (line 65) | internal static Func NameAndPublicKeyIs(stri... method PublicKeyEqualHex (line 68) | private static bool PublicKeyEqualHex(AssemblyIdentity identity, str... FILE: analyzers/src/SonarAnalyzer.Core/Semantics/KnownAssembly.cs class KnownAssembly (line 22) | public sealed partial class KnownAssembly method KnownAssembly (line 54) | internal KnownAssembly(Func predicate, params ... method KnownAssembly (line 60) | internal KnownAssembly(Func, bool> predi... method IsReferencedBy (line 63) | public bool IsReferencedBy(Compilation compilation) => method And (line 66) | internal static Func And(Func method IsStaticObjectEquals (line 66) | public static bool IsStaticObjectEquals(this IMethodSymbol methodSymbol) method IsObjectGetHashCode (line 83) | public static bool IsObjectGetHashCode(this IMethodSymbol methodSymbol... method IsObjectToString (line 91) | public static bool IsObjectToString(this IMethodSymbol methodSymbol) => method IsIDisposableDispose (line 101) | public static bool IsIDisposableDispose(this IMethodSymbol methodSymbo... method IsIAsyncDisposableDisposeAsync (line 113) | public static bool IsIAsyncDisposableDisposeAsync(this IMethodSymbol m... method IsGetObjectData (line 125) | public static bool IsGetObjectData(this IMethodSymbol methodSymbol) method IsSerializationConstructor (line 136) | public static bool IsSerializationConstructor(this IMethodSymbol metho... method IsArrayClone (line 143) | public static bool IsArrayClone(this IMethodSymbol methodSymbol) => method IsRecordPrintMembers (line 150) | public static bool IsRecordPrintMembers(this IMethodSymbol methodSymbo... method IsGcSuppressFinalize (line 161) | public static bool IsGcSuppressFinalize(this IMethodSymbol methodSymbo... method IsDebugAssert (line 167) | public static bool IsDebugAssert(this IMethodSymbol methodSymbol) => method IsDiagnosticDebugMethod (line 172) | public static bool IsDiagnosticDebugMethod(this IMethodSymbol methodSy... method IsOperatorBinaryPlus (line 175) | public static bool IsOperatorBinaryPlus(this IMethodSymbol methodSymbo... method IsOperatorBinaryMinus (line 178) | public static bool IsOperatorBinaryMinus(this IMethodSymbol methodSymb... method IsOperatorBinaryMultiply (line 181) | public static bool IsOperatorBinaryMultiply(this IMethodSymbol methodS... method IsOperatorBinaryDivide (line 184) | public static bool IsOperatorBinaryDivide(this IMethodSymbol methodSym... method IsOperatorBinaryModulus (line 187) | public static bool IsOperatorBinaryModulus(this IMethodSymbol methodSy... method IsOperatorEquals (line 190) | public static bool IsOperatorEquals(this IMethodSymbol methodSymbol) => method IsOperatorNotEquals (line 193) | public static bool IsOperatorNotEquals(this IMethodSymbol methodSymbol... method IsConsoleWriteLine (line 196) | public static bool IsConsoleWriteLine(this IMethodSymbol methodSymbol) => method IsConsoleWrite (line 201) | public static bool IsConsoleWrite(this IMethodSymbol methodSymbol) => method IsEnumerableConcat (line 206) | public static bool IsEnumerableConcat(this IMethodSymbol methodSymbol) => method IsEnumerableCount (line 209) | public static bool IsEnumerableCount(this IMethodSymbol methodSymbol) => method IsEnumerableExcept (line 212) | public static bool IsEnumerableExcept(this IMethodSymbol methodSymbol) => method IsEnumerableIntersect (line 215) | public static bool IsEnumerableIntersect(this IMethodSymbol methodSymb... method IsEnumerableSequenceEqual (line 218) | public static bool IsEnumerableSequenceEqual(this IMethodSymbol method... method IsEnumerableToList (line 221) | public static bool IsEnumerableToList(this IMethodSymbol methodSymbol) => method IsEnumerableToArray (line 224) | public static bool IsEnumerableToArray(this IMethodSymbol methodSymbol... method IsEnumerableUnion (line 227) | public static bool IsEnumerableUnion(this IMethodSymbol methodSymbol) => method IsListAddRange (line 230) | public static bool IsListAddRange(this IMethodSymbol methodSymbol) => method IsEventHandler (line 237) | public static bool IsEventHandler(this IMethodSymbol methodSymbol) => method IsEnumerableMethod (line 249) | private static bool IsEnumerableMethod(this IMethodSymbol methodSymbol... method HasExactlyNParameters (line 255) | private static bool HasExactlyNParameters(this IMethodSymbol methodSym... method ContainingInterface (line 259) | private static INamedTypeSymbol ContainingInterface(IMethodSymbol symbol) FILE: analyzers/src/SonarAnalyzer.Core/Semantics/KnownType.Implementation.cs class KnownType (line 22) | [DebuggerDisplay("{DebuggerDisplay}")] method KnownType (line 52) | public KnownType(string fullName, params string[] genericParameters) method Matches (line 65) | public bool Matches(ITypeSymbol symbol) => method IsMatch (line 68) | private bool IsMatch(ITypeSymbol symbol) method GenericParametersMatch (line 89) | private bool GenericParametersMatch(ISymbol symbol) => method OuterClassMatches (line 94) | private bool OuterClassMatches(ISymbol symbol) method NamespaceMatches (line 109) | private bool NamespaceMatches(ISymbol symbol) FILE: analyzers/src/SonarAnalyzer.Core/Semantics/KnownType.cs class KnownType (line 20) | public sealed partial class KnownType FILE: analyzers/src/SonarAnalyzer.Core/Semantics/NetFrameworkVersionProvider.cs type NetFrameworkVersion (line 20) | public enum NetFrameworkVersion class NetFrameworkVersionProvider (line 38) | public class NetFrameworkVersionProvider method Version (line 40) | public virtual NetFrameworkVersion Version(Compilation compilation) FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Extensions/AccessibilityExtensions.cs class AccessibilityExtensions (line 20) | public static class AccessibilityExtensions method IsAccessibleOutsideTheType (line 27) | public static bool IsAccessibleOutsideTheType(this Accessibility acces... FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Extensions/AttributeDataExtensions.cs class AttributeDataExtensions (line 20) | public static class AttributeDataExtensions method HasName (line 26) | public static bool HasName(this AttributeData attribute, string name) => method HasAnyName (line 29) | public static bool HasAnyName(this AttributeData attribute, params str... method GetAttributeRouteTemplate (line 32) | public static string GetAttributeRouteTemplate(this AttributeData attr... method TryGetAttributeValue (line 38) | public static bool TryGetAttributeValue(this AttributeData attribut... method HasAttributeUsageInherited (line 56) | public static bool HasAttributeUsageInherited(this AttributeData attri... method TryConvertConstant (line 64) | private static bool TryConvertConstant(TypedConstant constant, out ... FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Extensions/BinaryOperatorKindExtensions.cs class BinaryOperatorKindExtensions (line 20) | public static class BinaryOperatorKindExtensions method IsAnyEquality (line 22) | public static bool IsAnyEquality(this BinaryOperatorKind kind) => method IsEquals (line 25) | public static bool IsEquals(this BinaryOperatorKind kind) => method IsNotEquals (line 28) | public static bool IsNotEquals(this BinaryOperatorKind kind) => method IsAnyRelational (line 31) | public static bool IsAnyRelational(this BinaryOperatorKind kind) => FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Extensions/ComparisonKindExtensions.cs class ComparisonKindExtensions (line 20) | public static class ComparisonKindExtensions method Mirror (line 22) | public static ComparisonKind Mirror(this ComparisonKind comparison) => method ToDisplayString (line 32) | public static string ToDisplayString(this ComparisonKind kind, Analyze... FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Extensions/CountComparisonResultExtensions.cs class CountComparisonResultExtensions (line 20) | public static class CountComparisonResultExtensions method IsEmptyOrNotEmpty (line 22) | public static bool IsEmptyOrNotEmpty(this CountComparisonResult compar... method IsInvalid (line 25) | public static bool IsInvalid(this CountComparisonResult comparison) => method Compare (line 28) | public static CountComparisonResult Compare(this ComparisonKind compar... method Equals (line 40) | private static CountComparisonResult Equals(int count) => method NotEquals (line 43) | private static CountComparisonResult NotEquals(int count) => method GreaterThan (line 46) | private static CountComparisonResult GreaterThan(int count) => method GreaterThanOrEqual (line 49) | private static CountComparisonResult GreaterThanOrEqual(int count) => method LessThan (line 52) | private static CountComparisonResult LessThan(int count) => method LessThanOrEqual (line 55) | private static CountComparisonResult LessThanOrEqual(int count) => method Check (line 58) | private static CountComparisonResult Check(int count, int threshold, C... FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Extensions/FileLinePositionSpanExtensions.cs class FileLinePositionSpanExtensions (line 20) | public static class FileLinePositionSpanExtensions method LineNumbers (line 22) | public static IEnumerable LineNumbers(this FileLinePositionSpan l... FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Extensions/LinePositionExtensions.cs class LinePositionExtensions (line 22) | public static class LinePositionExtensions method LineNumberToReport (line 24) | public static int LineNumberToReport(this LinePosition position) => FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Extensions/LocationExtensions.cs class LocationExtensions (line 20) | public static class LocationExtensions method GetMappedLineSpanIfAvailable (line 22) | public static FileLinePositionSpan GetMappedLineSpanIfAvailable(this L... method EnsureMappedLocation (line 27) | public static Location EnsureMappedLocation(this Location location) method StartLine (line 39) | public static int StartLine(this Location location) => method StartColumn (line 42) | public static int StartColumn(this Location location) => method EndLine (line 45) | public static int EndLine(this Location location) => method IsValid (line 48) | public static bool IsValid(this Location location, Compilation compila... method ToSecondary (line 51) | public static SecondaryLocation ToSecondary(this Location location, st... method LineNumberToReport (line 56) | public static int LineNumberToReport(this Location location) => FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Extensions/SyntaxNodeExtensions.Roslyn.cs class SyntaxNodeExtensions (line 9) | [ExcludeFromCodeCoverage] method IsChildNode (line 21) | public static bool IsChildNode(this SyntaxNode node, Func(this SyntaxNode node) where TNo... method GetParent (line 54) | public static SyntaxNode GetParent(this SyntaxNode node, bool ascendOu... FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Extensions/SyntaxNodeExtensions.cs class SyntaxNodeExtensions (line 22) | public static class SyntaxNodeExtensions method IsKnownType (line 24) | public static bool IsKnownType(this SyntaxNode node, KnownType knownTy... method IsDeclarationKnownType (line 30) | public static bool IsDeclarationKnownType(this SyntaxNode node, KnownT... method EnsureCorrectSemanticModelOrDefault (line 33) | public static SemanticModel EnsureCorrectSemanticModelOrDefault(this S... method ToStringContains (line 36) | public static bool ToStringContains(this SyntaxNode node, string s) => method ToStringContains (line 39) | public static bool ToStringContains(this SyntaxNode node, string s, St... method ToStringContainsEitherOr (line 42) | public static bool ToStringContainsEitherOr(this SyntaxNode node, stri... method GetMappedFilePathFromRoot (line 48) | public static string GetMappedFilePathFromRoot(this SyntaxNode root) method Kind (line 64) | public static TSyntaxKind Kind(this SyntaxNode node) wher... method ToSecondaryLocation (line 67) | public static SecondaryLocation ToSecondaryLocation(this SyntaxNode no... method LineNumberToReport (line 72) | public static int LineNumberToReport(this SyntaxNode node) => method HasFlagsAttribute (line 75) | public static bool HasFlagsAttribute(this SyntaxNode node, SemanticMod... method CreateLocation (line 78) | public static Location CreateLocation(this SyntaxNode from, SyntaxNode... method CreateLocation (line 81) | public static Location CreateLocation(this SyntaxNode from, SyntaxToke... FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Extensions/SyntaxTokenExtensions.cs class SyntaxTokenExtensions (line 22) | public static class SyntaxTokenExtensions method Line (line 24) | public static int Line(this SyntaxToken token) => method ToSecondaryLocation (line 27) | public static SecondaryLocation ToSecondaryLocation(this SyntaxToken t... method CreateLocation (line 32) | public static Location CreateLocation(this SyntaxToken from, SyntaxTok... method CreateLocation (line 35) | public static Location CreateLocation(this SyntaxToken from, SyntaxNod... method LineNumbers (line 38) | public static IEnumerable LineNumbers(this SyntaxToken token, boo... method IsFirstTokenOnLine (line 41) | public static bool IsFirstTokenOnLine(this SyntaxToken token) => FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Extensions/SyntaxTreeExtensions.cs class SyntaxTreeExtensions (line 23) | internal static class SyntaxTreeExtensions method IsGenerated (line 27) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/iss... method IsConsideredGenerated (line 42) | public static bool IsConsideredGenerated(this SyntaxTree tree, Generat... method GetOriginalFilePath (line 47) | public static string GetOriginalFilePath(this SyntaxTree tree) => method EndsWith (line 53) | public static bool EndsWith(this SyntaxTree tree, string suffix) => method IsGeneratedGetOrAdd (line 56) | private static bool IsGeneratedGetOrAdd(SyntaxTree tree, GeneratedCode... FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Extensions/SyntaxTriviaExtensions.cs class SyntaxTriviaExtensions (line 20) | public static class SyntaxTriviaExtensions method LineNumbers (line 22) | public static IEnumerable LineNumbers(this SyntaxTrivia trivia, b... FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Utilities/AccessorAccess.cs type AccessorAccess (line 20) | [Flags] FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Utilities/ComparisonKind.cs type ComparisonKind (line 20) | public enum ComparisonKind FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Utilities/CountComparisionResult.cs type CountComparisonResult (line 20) | public enum CountComparisonResult FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Utilities/EquivalenceChecker.cs class EquivalenceChecker (line 20) | public static class EquivalenceChecker method AreEquivalent (line 22) | public static bool AreEquivalent(SyntaxNode node1, SyntaxNode node2, F... method AreEquivalent (line 25) | public static bool AreEquivalent(SyntaxList nodeList1, Syn... FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Utilities/ExpressionNumericConverterBase.cs class ExpressionNumericConverterBase (line 20) | public abstract class ExpressionNumericConverterBase method ConstantDoubleValue (line 36) | public double? ConstantDoubleValue(SyntaxNode expression) => method ConstantDecimalValue (line 39) | public decimal? ConstantDecimalValue(SyntaxNode expression) => method ConstantValue (line 42) | private T? ConstantValue(SemanticModel model, SyntaxNode expression... method Multiplier (line 62) | private int? Multiplier(SyntaxNode expression, out SyntaxNode internal... FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Utilities/GeneratedCodeRecognizer.cs class GeneratedCodeRecognizer (line 23) | public abstract class GeneratedCodeRecognizer method IsTriviaComment (line 50) | protected abstract bool IsTriviaComment(SyntaxTrivia trivia); method GetAttributeName (line 51) | protected abstract string GetAttributeName(SyntaxNode node); method IsGenerated (line 53) | public bool IsGenerated(SyntaxTree tree) => method IsBuildTimeRazorGeneratedFile (line 60) | public static bool IsBuildTimeRazorGeneratedFile(SyntaxTree tree) => method IsDesignTimeRazorGeneratedFile (line 67) | public static bool IsDesignTimeRazorGeneratedFile(SyntaxTree tree) => method IsRazorGeneratedFile (line 72) | public static bool IsRazorGeneratedFile(SyntaxTree tree) => method IsRazor (line 75) | public static bool IsRazor(SyntaxTree tree) => method IsCshtml (line 79) | public static bool IsCshtml(SyntaxTree tree) => method HasGeneratedCommentOrAttribute (line 83) | private bool HasGeneratedCommentOrAttribute(SyntaxTree tree) method HasAutoGeneratedComment (line 93) | private bool HasAutoGeneratedComment(SyntaxNode root) method HasGeneratedCodeAttribute (line 107) | private bool HasGeneratedCodeAttribute(SyntaxNode root) method HasGeneratedFileName (line 117) | private static bool HasGeneratedFileName(SyntaxTree tree) FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Utilities/IExpressionNumericConverter.cs type IExpressionNumericConverter (line 20) | public interface IExpressionNumericConverter method ConstantIntValue (line 22) | int? ConstantIntValue(SemanticModel model, SyntaxNode expression); method ConstantIntValue (line 23) | int? ConstantIntValue(SyntaxNode expression); method ConstantDoubleValue (line 24) | double? ConstantDoubleValue(SyntaxNode expression); FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Utilities/MethodParameterLookupBase.cs type IMethodParameterLookup (line 20) | public interface IMethodParameterLookup method TryGetSymbol (line 23) | bool TryGetSymbol(SyntaxNode argument, out IParameterSymbol parameter); method TryGetSyntax (line 24) | bool TryGetSyntax(IParameterSymbol parameter, out ImmutableArray... method TryGetNonParamsSyntax (line 26) | bool TryGetNonParamsSyntax(IParameterSymbol parameter, out SyntaxNode ... class MethodParameterLookupBase (line 30) | public abstract class MethodParameterLookupBase : IMeth... method GetNameColonIdentifier (line 35) | protected abstract SyntaxToken? GetNameColonIdentifier(TArgumentSyntax... method GetNameEqualsIdentifier (line 36) | protected abstract SyntaxToken? GetNameEqualsIdentifier(TArgumentSynta... method Expression (line 37) | protected abstract SyntaxNode Expression(TArgumentSyntax argument); method MethodParameterLookupBase (line 42) | protected MethodParameterLookupBase(SeparatedSyntaxList... method TryGetSyntax (line 62) | public bool TryGetSyntax(IParameterSymbol parameter, out ImmutableArra... method TryGetSyntax (line 71) | public bool TryGetSyntax(string parameterName, out ImmutableArray> G... method TryGetSymbol (line 107) | public bool TryGetSymbol(SyntaxNode argument, out IParameterSymbol par... method TryGetSymbol (line 110) | private bool TryGetSymbol(SyntaxNode argument, IMethodSymbol methodSym... method GetAllArgumentParameterMappings (line 149) | private IEnumerable> ... FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Utilities/RemovableDeclarationCollectorBase.cs class RemovableDeclarationCollectorBase (line 24) | public abstract class RemovableDeclarationCollectorBase RemovableFieldLikeDecl... method OwnerOfSubnodes (line 32) | public abstract TOwnerOfSubnodes OwnerOfSubnodes(TDeclaration node); method MatchingDeclarations (line 33) | protected abstract IEnumerable MatchingDeclarations(NodeAn... method RemovableDeclarationCollectorBase (line 42) | protected RemovableDeclarationCollectorBase(INamedTypeSymbol namedType... method RemovableDeclarations (line 48) | public IEnumerable RemovableDeclarations(ISet Conte... method TextToken (line 35) | protected abstract SyntaxToken TextToken(TInterpolatedStringTextSyntax... method InterpolatedTextValue (line 37) | public string InterpolatedTextValue(TInterpolatedStringExpressionSynta... FILE: analyzers/src/SonarAnalyzer.Core/Syntax/Utilities/VisualIndentComparer.cs class VisualIndentComparer (line 26) | internal static class VisualIndentComparer method IsSecondIndentLonger (line 28) | public static bool IsSecondIndentLonger(SyntaxNode node1, SyntaxNode n... method IsSecondIndentLonger (line 44) | public static bool IsSecondIndentLonger(string indent1, string indent2) method TabCount (line 68) | private static int TabCount(string text) => FILE: analyzers/src/SonarAnalyzer.Core/Trackers/ArgumentContext.cs class ArgumentContext (line 20) | public class ArgumentContext : SyntaxBaseContext method ArgumentContext (line 24) | public ArgumentContext(SonarSyntaxNodeReportingContext context) : base... method ArgumentContext (line 26) | public ArgumentContext(SyntaxNode node, SemanticModel model) : base(no... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/ArgumentDescriptor.cs type MemberKind (line 20) | public enum MemberKind class ArgumentDescriptor (line 28) | public class ArgumentDescriptor method ArgumentDescriptor (line 38) | private ArgumentDescriptor(MemberKind memberKind, method MethodInvocation (line 55) | public static ArgumentDescriptor MethodInvocation(KnownType invokedTyp... method MethodInvocation (line 58) | public static ArgumentDescriptor MethodInvocation(KnownType invokedTyp... method MethodInvocation (line 61) | public static ArgumentDescriptor MethodInvocation(KnownType invokedTyp... method MethodInvocation (line 64) | public static ArgumentDescriptor MethodInvocation(KnownType invokedType, method MethodInvocation (line 71) | public static ArgumentDescriptor MethodInvocation(Func : SyntaxTrackerBase ArgumentList(Syntax... method Position (line 25) | protected abstract int? Position(SyntaxNode argumentNode); method InvocationMatchesMemberKind (line 26) | protected abstract bool InvocationMatchesMemberKind(SyntaxNode invoked... method InvokedMemberMatches (line 27) | protected abstract bool InvokedMemberMatches(SemanticModel model, Synt... method MatchArgument (line 29) | public Condition MatchArgument(ArgumentDescriptor descriptor) => method CreateContext (line 46) | protected override ArgumentContext CreateContext(SonarSyntaxNodeReport... method MethodSymbol (line 49) | private IMethodSymbol MethodSymbol(SemanticModel model, SyntaxNode inv... method SyntacticChecks (line 60) | private bool SyntacticChecks(SemanticModel model, ArgumentDescriptor d... method RefKindMatches (line 68) | private bool RefKindMatches(ArgumentDescriptor descriptor, SyntaxNode ... method ParameterMatches (line 77) | private static bool ParameterMatches(IParameterSymbol parameter, Func<... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/AssignmentFinder.cs class AssignmentFinder (line 20) | public abstract class AssignmentFinder method IsAssignmentToIdentifier (line 23) | protected abstract bool IsAssignmentToIdentifier(SyntaxNode node, stri... method IsIdentifierDeclaration (line 24) | protected abstract bool IsIdentifierDeclaration(SyntaxNode node, strin... method IsLoop (line 25) | protected abstract bool IsLoop(SyntaxNode node); method GetTopMostContainingMethod (line 26) | protected abstract SyntaxNode GetTopMostContainingMethod(SyntaxNode no... method FindLinearPrecedingAssignmentExpression (line 28) | public SyntaxNode FindLinearPrecedingAssignmentExpression(string ident... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/BaseContext.cs class BaseContext (line 20) | public class BaseContext method AddSecondaryLocation (line 24) | public void AddSecondaryLocation(Location location, string message, pa... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/BaseTypeContext.cs class BaseTypeContext (line 23) | public class BaseTypeContext : SyntaxBaseContext method BaseTypeContext (line 30) | public BaseTypeContext(SonarSyntaxNodeReportingContext context, IEnume... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/BaseTypeTracker.cs class BaseTypeTracker (line 24) | public abstract class BaseTypeTracker : SyntaxTrackerBase GetBaseTypeNodes(SyntaxNode... method MatchSubclassesOf (line 32) | internal Condition MatchSubclassesOf(params KnownType[] types) method CreateContext (line 50) | protected override BaseTypeContext CreateContext(SonarSyntaxNodeReport... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/BuilderPatternCondition.cs class BuilderPatternCondition (line 20) | public abstract class BuilderPatternCondition method BuilderPatternDescriptor (line 27) | public BuilderPatternDescriptor(bool isValid, params TrackerBase isValid,... method IsMatch (line 35) | public bool IsMatch(InvocationContext context) => method IsValid (line 38) | public bool IsValid(TInvocationSyntax invocation) => FILE: analyzers/src/SonarAnalyzer.Core/Trackers/ConstantValueFinder.cs class ConstantValueFinder (line 20) | public abstract class ConstantValueFinder method FindConstant (line 44) | private object FindConstant(SyntaxNode node, HashSet visit... method FindAssignedConstant (line 61) | private object FindAssignedConstant(SyntaxNode node, SemanticModel mod... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/ElementAccessContext.cs class ElementAccessContext (line 20) | public class ElementAccessContext : SyntaxBaseContext method ElementAccessContext (line 24) | public ElementAccessContext(SonarSyntaxNodeReportingContext context) :... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/ElementAccessTracker.cs class ElementAccessTracker (line 20) | public abstract class ElementAccessTracker : SyntaxTrackerB... method AssignedValue (line 23) | public abstract object AssignedValue(ElementAccessContext context); method ArgumentAtIndexEquals (line 24) | public abstract Condition ArgumentAtIndexEquals(int index, string value); method MatchSetter (line 25) | public abstract Condition MatchSetter(); method MatchProperty (line 26) | public abstract Condition MatchProperty(MemberDescriptor member); method ArgumentAtIndexIs (line 28) | internal Condition ArgumentAtIndexIs(int index, params KnownType[] typ... method MatchIndexerIn (line 33) | internal Condition MatchIndexerIn(params KnownType[] types) => method CreateContext (line 37) | protected override ElementAccessContext CreateContext(SonarSyntaxNodeR... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/FieldAccessContext.cs class FieldAccessContext (line 20) | public class FieldAccessContext : SyntaxBaseContext method FieldAccessContext (line 25) | public FieldAccessContext(SonarSyntaxNodeReportingContext context, str... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/FieldAccessTracker.cs class FieldAccessTracker (line 20) | public abstract class FieldAccessTracker : SyntaxTrackerBas... method WhenRead (line 23) | public abstract Condition WhenRead(); method MatchSet (line 24) | public abstract Condition MatchSet(); method AssignedValueIsConstant (line 25) | public abstract Condition AssignedValueIsConstant(); method IsIdentifierWithinMemberAccess (line 26) | protected abstract bool IsIdentifierWithinMemberAccess(SyntaxNode expr... method MatchField (line 28) | public Condition MatchField(params MemberDescriptor[] fields) => method CreateContext (line 31) | protected override FieldAccessContext CreateContext(SonarSyntaxNodeRep... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/InvocationContext.cs class InvocationContext (line 20) | public class InvocationContext : SyntaxBaseContext method InvocationContext (line 25) | public InvocationContext(SonarSyntaxNodeReportingContext context, stri... method InvocationContext (line 27) | public InvocationContext(SyntaxNode node, string methodName, SemanticM... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/InvocationTracker.cs class InvocationTracker (line 20) | public abstract class InvocationTracker : SyntaxTrackerBase... method ArgumentAtIndexIsStringConstant (line 23) | public abstract Condition ArgumentAtIndexIsStringConstant(int index); method ArgumentAtIndexIsAny (line 24) | public abstract Condition ArgumentAtIndexIsAny(int index, params strin... method ArgumentAtIndexIs (line 25) | public abstract Condition ArgumentAtIndexIs(int index, Func method MethodNameIs (line 33) | public Condition MethodNameIs(string methodName) => method MethodIsStatic (line 36) | public Condition MethodIsStatic() => method MethodIsExtension (line 39) | public Condition MethodIsExtension() => method MethodHasParameters (line 42) | public Condition MethodHasParameters(int count) => method IsInvalidBuilderInitialization (line 46) | public Condition IsInvalidBuilderInitialization(Bui... method MethodReturnTypeIs (line 49) | internal Condition MethodReturnTypeIs(KnownType returnType) => method ArgumentIsBoolConstant (line 53) | internal Condition ArgumentIsBoolConstant(string parameterName, bool e... method IsIHeadersDictionary (line 57) | internal Condition IsIHeadersDictionary() => method NodeExpression (line 63) | protected virtual SyntaxNode NodeExpression(SyntaxNode node) => method CreateContext (line 66) | protected override InvocationContext CreateContext(SonarSyntaxNodeRepo... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/MemberDescriptor.cs class MemberDescriptor (line 20) | public class MemberDescriptor method MemberDescriptor (line 25) | internal MemberDescriptor(KnownType containingType, string name) method ToString (line 31) | public override string ToString() => method IsMatch (line 34) | public bool IsMatch(string memberName, ITypeSymbol containingType, Str... method IsMatch (line 38) | public bool IsMatch(string memberName, Lazy ... method MatchesAny (line 44) | public static bool MatchesAny(string memberName, Lazy(TSymbolType memberSymb... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/MethodDeclarationContext.cs class MethodDeclarationContext (line 20) | public class MethodDeclarationContext : BaseContext method MethodDeclarationContext (line 26) | public MethodDeclarationContext(IMethodSymbol methodSymbol, Compilatio... method GetSemanticModel (line 32) | public SemanticModel GetSemanticModel(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.Core/Trackers/MethodDeclarationTracker.cs class MethodDeclarationTracker (line 22) | public abstract class MethodDeclarationTracker : TrackerBas... method ParameterAtIndexIsUsed (line 25) | public abstract Condition ParameterAtIndexIsUsed(int index); method GetMethodIdentifier (line 26) | protected abstract SyntaxToken? GetMethodIdentifier(SyntaxNode methodD... method Track (line 28) | public void Track(TrackerInput input, params Condition[] conditions) method MatchMethodName (line 69) | public Condition MatchMethodName(params string[] methodNames) => method IsOrdinaryMethod (line 72) | public Condition IsOrdinaryMethod() => method IsMainMethod (line 75) | public Condition IsMainMethod() => method AnyParameterIsOfType (line 79) | internal Condition AnyParameterIsOfType(params KnownType[] types) method DecoratedWithAnyAttribute (line 87) | internal Condition DecoratedWithAnyAttribute(params KnownType[] attrib... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/ObjectCreationContext.cs class ObjectCreationContext (line 20) | public class ObjectCreationContext : SyntaxBaseContext method ObjectCreationContext (line 24) | public ObjectCreationContext(SonarSyntaxNodeReportingContext context) ... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/ObjectCreationTracker.cs class ObjectCreationTracker (line 20) | public abstract class ObjectCreationTracker : SyntaxTracker... method ArgumentAtIndexIsConst (line 23) | public abstract Condition ArgumentAtIndexIsConst(int index); method ConstArgumentForParameter (line 24) | public abstract object ConstArgumentForParameter(ObjectCreationContext... method ArgumentIsBoolConstant (line 28) | internal Condition ArgumentIsBoolConstant(string parameterName, bool e... method ArgumentAtIndexIs (line 31) | internal Condition ArgumentAtIndexIs(int index, KnownType type) => method WhenDerivesOrImplementsAny (line 36) | internal Condition WhenDerivesOrImplementsAny(params KnownType[] types... method MatchConstructor (line 41) | internal Condition MatchConstructor(params KnownType[] types) => method WhenDerivesFrom (line 49) | internal Condition WhenDerivesFrom(KnownType baseType) => method WhenImplements (line 54) | internal Condition WhenImplements(KnownType baseType) => method CreateContext (line 59) | protected override ObjectCreationContext CreateContext(SonarSyntaxNode... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/PropertyAccessContext.cs class PropertyAccessContext (line 20) | public class PropertyAccessContext : SyntaxBaseContext method PropertyAccessContext (line 25) | public PropertyAccessContext(SonarSyntaxNodeReportingContext context, ... method PropertyAccessContext (line 31) | public PropertyAccessContext(SyntaxNode node, SemanticModel model, str... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/PropertyAccessTracker.cs class PropertyAccessTracker (line 20) | public abstract class PropertyAccessTracker : SyntaxTracker... method AssignedValue (line 23) | public abstract object AssignedValue(PropertyAccessContext context); method MatchGetter (line 24) | public abstract Condition MatchGetter(); method MatchSetter (line 25) | public abstract Condition MatchSetter(); method AssignedValueIsConstant (line 26) | public abstract Condition AssignedValueIsConstant(); method IsIdentifierWithinMemberAccess (line 27) | protected abstract bool IsIdentifierWithinMemberAccess(SyntaxNode expr... method MatchProperty (line 29) | public Condition MatchProperty(params MemberDescriptor[] properties) => method MatchProperty (line 32) | public Condition MatchProperty(bool checkOverridenProperties, params M... method CreateContext (line 35) | protected override PropertyAccessContext CreateContext(SonarSyntaxNode... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/SyntaxBaseContext.cs class SyntaxBaseContext (line 20) | public class SyntaxBaseContext : BaseContext method SyntaxBaseContext (line 26) | public SyntaxBaseContext(SonarSyntaxNodeReportingContext context) : th... method SyntaxBaseContext (line 28) | public SyntaxBaseContext(SyntaxNode node, SemanticModel model) FILE: analyzers/src/SonarAnalyzer.Core/Trackers/SyntaxTrackerBase.cs class SyntaxTrackerBase (line 20) | public abstract class SyntaxTrackerBase : Tracker... method CreateContext (line 25) | protected abstract TContext CreateContext(SonarSyntaxNodeReportingCont... method Track (line 27) | public void Track(TrackerInput input, params Condition[] conditions) => method Track (line 30) | public void Track(TrackerInput input, string[] diagnosticMessageArgs, ... method ExceptWhen (line 52) | public Condition ExceptWhen(Condition condition) => method And (line 55) | public Condition And(Condition condition1, Condition condition2) => method Or (line 58) | public Condition Or(Condition condition1, Condition condition2) => method Or (line 61) | public Condition Or(Condition condition1, Condition condition2, Condit... FILE: analyzers/src/SonarAnalyzer.Core/Trackers/TrackerBase.cs class TrackerBase (line 20) | public abstract class TrackerBase FILE: analyzers/src/SonarAnalyzer.Core/Trackers/TrackerInput.cs class TrackerInput (line 20) | public class TrackerInput method TrackerInput (line 27) | public TrackerInput(SonarAnalysisContext context, IAnalyzerConfigurati... method IsEnabled (line 34) | public bool IsEnabled(AnalyzerOptions options) FILE: analyzers/src/SonarAnalyzer.Shared/LoggingFrameworkMethods.cs class LoggingFrameworkMethods (line 20) | public static class LoggingFrameworkMethods FILE: analyzers/src/SonarAnalyzer.Shared/Syntax/Extensions/MemberAccessExpressionSyntaxExtensionsShared.cs class MemberAccessExpressionSyntaxExtensionsShared (line 24) | internal static class MemberAccessExpressionSyntaxExtensionsShared method IsPtrZero (line 26) | public static bool IsPtrZero(this MemberAccessExpressionSyntax memberA... FILE: analyzers/src/SonarAnalyzer.Shared/Syntax/Extensions/StatementSyntaxExtensionsShared.cs class StatementSyntaxExtensionsShared (line 24) | public static class StatementSyntaxExtensionsShared method GetPreviousStatements (line 30) | public static IEnumerable GetPreviousStatements(this ... FILE: analyzers/src/SonarAnalyzer.Shared/Syntax/Extensions/SyntaxNodeExtensionsShared.cs class SyntaxNodeExtensionsShared (line 24) | public static class SyntaxNodeExtensionsShared method ContainsGetOrSetOnDependencyProperty (line 26) | public static bool ContainsGetOrSetOnDependencyProperty(this SyntaxNod... method GetPreviousStatementsCurrentBlock (line 37) | public static IEnumerable GetPreviousStatementsCurren... FILE: analyzers/src/SonarAnalyzer.Shared/Syntax/Extensions/SyntaxTokenExtensionsShared.cs class SyntaxTokenExtensionsShared (line 24) | public static class SyntaxTokenExtensionsShared method GetBindableParent (line 27) | public static SyntaxNode GetBindableParent(this SyntaxToken token) FILE: analyzers/src/SonarAnalyzer.ShimLayer.CodeGeneration/GeneratorSyntaxExtensions.cs class GeneratorSyntaxExtensions (line 9) | internal static class GeneratorSyntaxExtensions method WithLeadingBlankLine (line 11) | public static TSyntax WithLeadingBlankLine(this TSyntax syntax) FILE: analyzers/src/SonarAnalyzer.ShimLayer.CodeGeneration/OperationLightupGenerator.cs class OperationLightupGenerator (line 20) | [Generator] method Initialize (line 23) | public void Initialize(IncrementalGeneratorInitializationContext context) method Execute (line 29) | private void Execute(SourceProductionContext context, AdditionalText o... method GenerateOperationInterfaces (line 41) | private void GenerateOperationInterfaces(in SourceProductionContext co... method GenerateOperationInterface (line 59) | private void GenerateOperationInterface(in SourceProductionContext con... method GenerateOperationWrapperHelper (line 635) | private void GenerateOperationWrapperHelper(in SourceProductionContext... method GenerateOperationKindEx (line 857) | private void GenerateOperationKindEx(in SourceProductionContext contex... class DocumentData (line 910) | private sealed class DocumentData method DocumentData (line 912) | public DocumentData(XDocument document) method GetOperationKinds (line 954) | private static ImmutableDictionary GetSkippedOperationKinds(XDocum... method ParsePrefixHexValue (line 1035) | private static int ParsePrefixHexValue(string value) class InterfaceData (line 1046) | private sealed class InterfaceData method InterfaceData (line 1050) | public InterfaceData(DocumentData documentData, XElement node, Immut... class PropertyData (line 1126) | private sealed class PropertyData method PropertyData (line 1128) | public PropertyData(XElement node) method IsAnyOperation (line 1208) | private static bool IsAnyOperation(string type) method IsAnyOperationArray (line 1213) | private static bool IsAnyOperationArray(string type) FILE: analyzers/src/SonarAnalyzer.ShimLayer.CodeGeneration/RoslynHashCode.cs type RoslynHashCode (line 64) | [SuppressMessage("Design", "CA1066:Implement IEquatable when overriding ... method GenerateGlobalSeed (line 81) | private static uint GenerateGlobalSeed() method Combine (line 89) | public static int Combine(T1 value1) method Combine (line 109) | public static int Combine(T1 value1, T2 value2) method Combine (line 124) | public static int Combine(T1 value1, T2 value2, T3 value3) method Combine (line 141) | public static int Combine(T1 value1, T2 value2, T3 val... method Combine (line 162) | public static int Combine(T1 value1, T2 value2, T3... method Combine (line 186) | public static int Combine(T1 value1, T2 value2... method Combine (line 212) | public static int Combine(T1 value1, T2 va... method Combine (line 240) | public static int Combine(T1 value1, T... method Initialize (line 270) | [MethodImpl(MethodImplOptions.AggressiveInlining)] method Round (line 279) | [MethodImpl(MethodImplOptions.AggressiveInlining)] method QueueRound (line 285) | [MethodImpl(MethodImplOptions.AggressiveInlining)] method MixState (line 291) | [MethodImpl(MethodImplOptions.AggressiveInlining)] method MixEmptyState (line 297) | private static uint MixEmptyState() method MixFinal (line 302) | [MethodImpl(MethodImplOptions.AggressiveInlining)] method Add (line 313) | public void Add(T value) method Add (line 318) | public void Add(T value, IEqualityComparer? comparer) method Add (line 323) | private void Add(int value) method ToHashCode (line 379) | public int ToHashCode() method GetHashCode (line 435) | [Obsolete("HashCode is a mutable struct and should not be compared wit... method Equals (line 439) | [Obsolete("HashCode is a mutable struct and should not be compared wit... class SR (line 445) | private static class SR class BitOperations (line 451) | private static class BitOperations method RotateLeft (line 453) | [MethodImpl(MethodImplOptions.AggressiveInlining)] method RotateLeft (line 457) | [MethodImpl(MethodImplOptions.AggressiveInlining)] FILE: analyzers/src/SonarAnalyzer.ShimLayer.CodeGeneration/SyntaxLightupGenerator.cs class SyntaxLightupGenerator (line 21) | [Generator] type NodeKind (line 24) | private enum NodeKind method Initialize (line 31) | public void Initialize(IncrementalGeneratorInitializationContext context) method Execute (line 90) | private void Execute(in SourceProductionContext context, CompilationDa... method GenerateSyntaxWrappers (line 103) | private void GenerateSyntaxWrappers(in SourceProductionContext context... method GenerateSyntaxWrapper (line 111) | private void GenerateSyntaxWrapper(in SourceProductionContext context,... method GenerateSyntaxWrapperHelper (line 863) | private void GenerateSyntaxWrapperHelper(in SourceProductionContext co... class SyntaxData (line 1256) | private sealed class SyntaxData method SyntaxData (line 1260) | public SyntaxData(CompilationData compilationData, XDocument document) method TryGetConcreteType (line 1277) | public NodeData? TryGetConcreteType(NodeData? node) method TryGetConcreteBase (line 1291) | public NodeData? TryGetConcreteBase(NodeData node) method TryGetNode (line 1296) | public NodeData? TryGetNode(string name) class NodeData (line 1303) | private sealed class NodeData method NodeData (line 1317) | public NodeData(CompilationData compilationData, XElement element) method TryGetField (line 1357) | internal FieldData? TryGetField(string name) class FieldData (line 1363) | private sealed class FieldData method FieldData (line 1367) | public FieldData(NodeData nodeData, XElement element) method GetDeclaringNode (line 1410) | public NodeData GetDeclaringNode(SyntaxData syntaxData) method IsWrappedSeparatedSyntaxList (line 1424) | public bool IsWrappedSeparatedSyntaxList(SyntaxData syntaxData, [Not... method GetAccessorResultType (line 1441) | public string GetAccessorResultType(SyntaxData syntaxData) method GetAccessorResultElementType (line 1457) | public string? GetAccessorResultElementType(SyntaxData syntaxData) type CompilationData (line 1468) | private sealed record CompilationData type ExistingTypeData (line 1480) | private record class ExistingTypeData class EquatableValue (line 1503) | private sealed class EquatableValue : IEquatable?> method EquatableValue (line 1505) | public EquatableValue(T value, IEqualityComparer comparer) method Equals (line 1515) | public bool Equals(EquatableValue? other) class ImmutableDictionaryEqualityComparer (line 1526) | private sealed class ImmutableDictionaryEqualityComparer... method Equals (line 1531) | public bool Equals(ImmutableDictionary? x, ImmutableDi... method GetHashCode (line 1563) | public int GetHashCode(ImmutableDictionary? obj) class ImmutableArrayEqualityComparer (line 1584) | private sealed class ImmutableArrayEqualityComparer : IEqualityComp... method Equals (line 1588) | public bool Equals(ImmutableArray x, ImmutableArray y) method GetHashCode (line 1615) | public int GetHashCode(ImmutableArray obj) FILE: analyzers/src/SonarAnalyzer.ShimLayer.CodeGeneration/XElementExtensions.cs class XElementExtensions (line 9) | internal static class XElementExtensions method RequiredAttribute (line 11) | public static XAttribute RequiredAttribute(this XElement element, XNam... FILE: analyzers/src/SonarAnalyzer.ShimLayer.CodeGeneration/XmlSyntaxFactory.cs class XmlSyntaxFactory (line 9) | internal static class XmlSyntaxFactory FILE: analyzers/src/SonarAnalyzer.ShimLayer.Generator/Factory.cs class Factory (line 22) | public static class Factory method CreateAllFiles (line 27) | public static IEnumerable CreateAllFiles() type GeneratedFile (line 42) | public record GeneratedFile(string Name, string Content); FILE: analyzers/src/SonarAnalyzer.ShimLayer.Generator/Model/MemberDescriptor.cs type MemberDescriptor (line 20) | public record MemberDescriptor(MemberInfo Member, bool IsPassthrough); FILE: analyzers/src/SonarAnalyzer.ShimLayer.Generator/Model/ModelBuilder.cs class ModelBuilder (line 20) | public static class ModelBuilder method Build (line 24) | public static StrategyModel Build(TypeDescriptor[] latest, TypeDescrip... method CreateStrategy (line 30) | private static Strategy CreateStrategy(TypeDescriptor latest, TypeDesc... method FindCommonBaseType (line 73) | private static TypeDescriptor FindCommonBaseType(TypeDescriptor latest... method IsAssignableTo (line 87) | private static bool IsAssignableTo(Type type, string fullName) // We... method CreateMembers (line 104) | private static MemberDescriptor[] CreateMembers(TypeDescriptor latestT... method CreateEnumFields (line 110) | private static FieldInfo[] CreateEnumFields(TypeDescriptor latestType,... method IsSkipped (line 117) | private static bool IsSkipped(Type type) => method IsValid (line 122) | private static bool IsValid(MemberInfo member) => FILE: analyzers/src/SonarAnalyzer.ShimLayer.Generator/Model/StrategyModel.cs class StrategyModel (line 22) | public class StrategyModel : IEnumerable method StrategyModel (line 45) | public StrategyModel() => method StrategyModel (line 48) | public StrategyModel(Dictionary strategies) => method Add (line 51) | public void Add(Type type, Strategy strategy) => method GetEnumerator (line 54) | public IEnumerator GetEnumerator() => method GetEnumerator (line 57) | IEnumerator IEnumerable.GetEnumerator() => FILE: analyzers/src/SonarAnalyzer.ShimLayer.Generator/Model/TypeDescriptor.cs type TypeDescriptor (line 20) | public record TypeDescriptor(Type Type, MemberInfo[] Members); FILE: analyzers/src/SonarAnalyzer.ShimLayer.Generator/Model/TypeLoader.cs class TypeLoader (line 23) | public sealed class TypeLoader : IDisposable method Dispose (line 27) | public void Dispose() => method LoadBaseline (line 30) | public TypeDescriptor[] LoadBaseline() method LoadLatest (line 41) | public TypeDescriptor[] LoadLatest() => method Load (line 47) | private static TypeDescriptor[] Load(Assembly assembly) => method FindMembers (line 50) | private static IEnumerable FindMembers(Type type) class CustomAssemblyResolver (line 66) | file sealed class CustomAssemblyResolver : PathAssemblyResolver method CustomAssemblyResolver (line 68) | public CustomAssemblyResolver() : base(Directory.GetFiles(Path.GetDire... method Resolve (line 70) | public override Assembly Resolve(MetadataLoadContext context, Assembly... FILE: analyzers/src/SonarAnalyzer.ShimLayer.Generator/ShimLayerGenerator.cs class ShimLayerGenerator (line 22) | [Generator] method Initialize (line 26) | public void Initialize(IncrementalGeneratorInitializationContext conte... FILE: analyzers/src/SonarAnalyzer.ShimLayer.Generator/Strategies/IOperationStrategy.cs class IOperationStrategy (line 20) | public class IOperationStrategy : Strategy method IOperationStrategy (line 24) | public IOperationStrategy(Type latest, IReadOnlyList... method Generate (line 27) | public override string Generate(StrategyModel model) => method ReturnTypeSnippet (line 30) | public override string ReturnTypeSnippet() => method ToConversionSnippet (line 33) | public override string ToConversionSnippet(string from) => FILE: analyzers/src/SonarAnalyzer.ShimLayer.Generator/Strategies/NewEnumStrategy.cs class NewEnumStrategy (line 20) | public class NewEnumStrategy : Strategy method NewEnumStrategy (line 24) | public NewEnumStrategy(Type latest, FieldInfo[] fields) : base(latest) => method Generate (line 27) | public override string Generate(StrategyModel model) method ReturnTypeSnippet (line 41) | public override string ReturnTypeSnippet() => method ToConversionSnippet (line 44) | public override string ToConversionSnippet(string from) => FILE: analyzers/src/SonarAnalyzer.ShimLayer.Generator/Strategies/NoChangeStrategy.cs class NoChangeStrategy (line 20) | public class NoChangeStrategy : Strategy method NoChangeStrategy (line 24) | public NoChangeStrategy(Type latest) : base(latest) => method Generate (line 29) | public override string Generate(StrategyModel model) => null; method ReturnTypeSnippet (line 31) | public override string ReturnTypeSnippet() => method CompiletimeTypeSnippet (line 34) | public override string CompiletimeTypeSnippet() => method ToConversionSnippet (line 37) | public override string ToConversionSnippet(string from) => FILE: analyzers/src/SonarAnalyzer.ShimLayer.Generator/Strategies/PartialEnumStrategy.cs class PartialEnumStrategy (line 20) | public class PartialEnumStrategy : Strategy method PartialEnumStrategy (line 24) | public PartialEnumStrategy(Type latest, FieldInfo[] fields) : base(lat... method Generate (line 27) | public override string Generate(StrategyModel model) method ReturnTypeSnippet (line 42) | public override string ReturnTypeSnippet() => method ToConversionSnippet (line 45) | public override string ToConversionSnippet(string from) => FILE: analyzers/src/SonarAnalyzer.ShimLayer.Generator/Strategies/SeparatedSyntaxListStrategy.cs class SeparatedSyntaxListStrategy (line 20) | public class SeparatedSyntaxListStrategy : Strategy method SeparatedSyntaxListStrategy (line 25) | public SeparatedSyntaxListStrategy(Type latest, Strategy typeArgument)... method ReturnTypeSnippet (line 31) | public override string ReturnTypeSnippet() => method ToConversionSnippet (line 34) | public override string ToConversionSnippet(string from) => method CompiletimeTypeSnippet (line 37) | public override string CompiletimeTypeSnippet() => method PropertyAccessorInitializerSnippet (line 40) | public override string PropertyAccessorInitializerSnippet(string compi... method Generate (line 43) | public override string Generate(StrategyModel model) => null; FILE: analyzers/src/SonarAnalyzer.ShimLayer.Generator/Strategies/SkipStrategy.cs class SkipStrategy (line 20) | public class SkipStrategy : Strategy method SkipStrategy (line 24) | public SkipStrategy(Type latest) : base(latest) { } method ReturnTypeSnippet (line 26) | public override string ReturnTypeSnippet() => method ToConversionSnippet (line 29) | public override string ToConversionSnippet(string from) => method Generate (line 32) | public override string Generate(StrategyModel model) => null; FILE: analyzers/src/SonarAnalyzer.ShimLayer.Generator/Strategies/Strategy.cs method Generate (line 22) | public abstract string Generate(StrategyModel model); method ReturnTypeSnippet (line 23) | public abstract string ReturnTypeSnippet(); method ToConversionSnippet (line 24) | public abstract string ToConversionSnippet(string from); method Strategy (line 30) | protected Strategy(Type latest) => method CompiletimeTypeSnippet (line 33) | public virtual string CompiletimeTypeSnippet() => method JoinLines (line 36) | protected static string JoinLines(IEnumerable lines) => method Preamble (line 39) | protected static string Preamble(params IEnumerable additionalUs... method PropertyAccessorInitializerSnippet (line 72) | public virtual string PropertyAccessorInitializerSnippet(string compilet... method SerializeAttributes (line 75) | protected static string SerializeAttributes(IEnumerable method ReturnTypeSnippet (line 45) | public override string ReturnTypeSnippet() => method ToConversionSnippet (line 48) | public override string ToConversionSnippet(string from) => from; method GenerateMemberAccessor (line 50) | private string GenerateMemberAccessor(MemberInfo member, StrategyModel... method GenerateMemberExtension (line 60) | private static string GenerateMemberExtension(MemberInfo member, Strat... FILE: analyzers/src/SonarAnalyzer.ShimLayer.Generator/Strategies/SyntaxNodeWrapStrategy.cs class SyntaxNodeWrapStrategy (line 20) | public class SyntaxNodeWrapStrategy : Strategy method SyntaxNodeWrapStrategy (line 25) | public SyntaxNodeWrapStrategy(Type latest, Type baseType, IReadOnlyLis... method ReturnTypeSnippet (line 31) | public override string ReturnTypeSnippet() => method ToConversionSnippet (line 34) | public override string ToConversionSnippet(string from) => method CompiletimeTypeSnippet (line 37) | public override string CompiletimeTypeSnippet() => method Generate (line 40) | public override string Generate(StrategyModel model) => method WrapperToWrapperConversions (line 91) | private string WrapperToWrapperConversions(StrategyModel model) method MemberAccessorInitialization (line 108) | private string MemberAccessorInitialization(MemberInfo member, Strateg... method MemberDeclaration (line 115) | private string MemberDeclaration(MemberDescriptor member, StrategyMode... FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/AnalysisContext/CompilationStartAnalysisContextExtensions.cs class CompilationStartAnalysisContextExtensions (line 23) | public static class CompilationStartAnalysisContextExtensions method RegisterSymbolStartAction (line 28) | public static void RegisterSymbolStartAction(this CompilationStartAnal... method CreateRegisterSymbolStartAnalysisWrapper (line 33) | [ExcludeFromCodeCoverage] FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/AnalysisContext/SymbolStartAnalysisContextWrapper.cs type SymbolStartAnalysisContextWrapper (line 24) | public readonly struct SymbolStartAnalysisContextWrapper method SymbolStartAnalysisContextWrapper (line 51) | [ExcludeFromCodeCoverage] method SymbolStartAnalysisContextWrapper (line 185) | public SymbolStartAnalysisContextWrapper(object roslynSymbolStartAnaly... method RegisterCodeBlockAction (line 188) | public void RegisterCodeBlockAction(Action a... method RegisterCodeBlockStartAction (line 191) | public void RegisterCodeBlockStartAction(Action a... method RegisterOperationBlockAction (line 211) | public void RegisterOperationBlockAction(Action acti... method RegisterSyntaxNodeAction (line 220) | public void RegisterSyntaxNodeAction(Action FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/ITypeParameterSymbolExtensions.cs class ITypeParameterSymbolExtensions (line 11) | public static class ITypeParameterSymbolExtensions method ITypeParameterSymbolExtensions (line 15) | static ITypeParameterSymbolExtensions() method HasUnmanagedTypeConstraint (line 20) | public static bool HasUnmanagedTypeConstraint(this ITypeParameterSymbo... FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/ITypeSymbolExtensions.cs class ITypeSymbolExtensions (line 11) | public static partial class ITypeSymbolExtensions method ITypeSymbolExtensions (line 15) | static ITypeSymbolExtensions() method IsTupleType (line 20) | public static bool IsTupleType(this ITypeSymbol symbol) FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/LightupHelpers.cs class LightupHelpers (line 18) | public static class LightupHelpers method CanWrapObject (line 58) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/iss... method CanWrapNode (line 85) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/iss... method CanWrapOperation (line 112) | [PerformanceSensitive("https://github.com/SonarSource/sonar-dotnet/iss... method CreateOperationPropertyAccessor (line 140) | internal static Func CreateOperationPropertyAcc... method CreateOperationListPropertyAccessor (line 208) | internal static Func> CreateOpe... method CreateStaticPropertyAccessor (line 267) | internal static Func CreateStaticPropertyAccessor CreateSyntaxPropertyAccessor CreateSyntaxPropertyAcc... method CreateTryGetValueAccessor (line 416) | internal static TryGetValueAccessor CreateTryGe... method CreateTryGetValueAccessor (line 495) | internal static TryGetValueAccessor ... method CreateTryGetValueAccessor (line 586) | internal static TryGetValueAccessor> C... method CreateSyntaxWithPropertyAccessor (line 749) | internal static Func CreateSyntaxWithProp... method CreateSeparatedSyntaxListWithPropertyAccessor (line 815) | internal static Func, T... method ValidatePropertyType (line 885) | private static bool ValidatePropertyType(Type returnType, Type actualT... FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/SeparatedSyntaxListWrapper`1.cs class SeparatedSyntaxListWrapper (line 17) | public abstract class SeparatedSyntaxListWrapper : IEquatable Add(TNode node) method AddRange (line 88) | public SeparatedSyntaxListWrapper AddRange(IEnumerable n... method Any (line 91) | public abstract bool Any(); method Contains (line 93) | public abstract bool Contains(TNode node); method Equals (line 95) | public bool Equals(SeparatedSyntaxListWrapper other) method Equals (line 100) | public override bool Equals(object obj) method First (line 105) | public abstract TNode First(); method FirstOrDefault (line 107) | public abstract TNode FirstOrDefault(); method GetEnumerator (line 109) | public Enumerator GetEnumerator() method GetEnumerator (line 114) | IEnumerator IEnumerable.GetEnumerator() method GetEnumerator (line 119) | IEnumerator IEnumerable.GetEnumerator() method GetHashCode (line 124) | public override abstract int GetHashCode(); method GetSeparator (line 126) | public abstract SyntaxToken GetSeparator(int index); method GetSeparators (line 128) | public abstract IEnumerable GetSeparators(); method GetWithSeparators (line 130) | public abstract SyntaxNodeOrTokenList GetWithSeparators(); method IndexOf (line 132) | public abstract int IndexOf(Func predicate); method IndexOf (line 134) | public abstract int IndexOf(TNode node); method Insert (line 136) | public abstract SeparatedSyntaxListWrapper Insert(int index, TN... method InsertRange (line 138) | public abstract SeparatedSyntaxListWrapper InsertRange(int inde... method Last (line 140) | public abstract TNode Last(); method LastIndexOf (line 142) | public abstract int LastIndexOf(Func predicate); method LastIndexOf (line 144) | public abstract int LastIndexOf(TNode node); method LastOrDefault (line 146) | public abstract TNode LastOrDefault(); method Remove (line 148) | public abstract SeparatedSyntaxListWrapper Remove(TNode node); method RemoveAt (line 150) | public abstract SeparatedSyntaxListWrapper RemoveAt(int index); method Replace (line 152) | public abstract SeparatedSyntaxListWrapper Replace(TNode nodeIn... method ReplaceRange (line 154) | public abstract SeparatedSyntaxListWrapper ReplaceRange(TNode n... method ReplaceSeparator (line 156) | public abstract SeparatedSyntaxListWrapper ReplaceSeparator(Syn... method ToFullString (line 158) | public abstract string ToFullString(); method ToString (line 160) | public override abstract string ToString(); type Enumerator (line 162) | public struct Enumerator : IEnumerator method Enumerator (line 168) | public Enumerator(SeparatedSyntaxListWrapper wrapper) method Equals (line 179) | public override bool Equals(object obj) method GetHashCode (line 192) | public override int GetHashCode() method Dispose (line 202) | public void Dispose() method MoveNext (line 206) | public bool MoveNext() method Reset (line 224) | public void Reset() class AutoWrapSeparatedSyntaxList (line 231) | internal sealed class AutoWrapSeparatedSyntaxList : Separated... method AutoWrapSeparatedSyntaxList (line 236) | public AutoWrapSeparatedSyntaxList() method AutoWrapSeparatedSyntaxList (line 241) | public AutoWrapSeparatedSyntaxList(SeparatedSyntaxList synt... method Any (line 264) | public override bool Any() method Contains (line 267) | public override bool Contains(TNode node) method First (line 270) | public override TNode First() method FirstOrDefault (line 273) | public override TNode FirstOrDefault() method GetHashCode (line 276) | public override int GetHashCode() method GetSeparator (line 279) | public override SyntaxToken GetSeparator(int index) method GetSeparators (line 282) | public override IEnumerable GetSeparators() method GetWithSeparators (line 285) | public override SyntaxNodeOrTokenList GetWithSeparators() method IndexOf (line 288) | public override int IndexOf(TNode node) method IndexOf (line 291) | public override int IndexOf(Func predicate) method Insert (line 294) | public override SeparatedSyntaxListWrapper Insert(int index, ... method InsertRange (line 297) | public override SeparatedSyntaxListWrapper InsertRange(int in... method Last (line 300) | public override TNode Last() method LastIndexOf (line 303) | public override int LastIndexOf(TNode node) method LastIndexOf (line 306) | public override int LastIndexOf(Func predicate) method LastOrDefault (line 309) | public override TNode LastOrDefault() method Remove (line 312) | public override SeparatedSyntaxListWrapper Remove(TNode node) method RemoveAt (line 315) | public override SeparatedSyntaxListWrapper RemoveAt(int index) method Replace (line 318) | public override SeparatedSyntaxListWrapper Replace(TNode node... method ReplaceRange (line 321) | public override SeparatedSyntaxListWrapper ReplaceRange(TNode... method ReplaceSeparator (line 324) | public override SeparatedSyntaxListWrapper ReplaceSeparator(S... method ToFullString (line 327) | public override string ToFullString() method ToString (line 330) | public override string ToString() class UnsupportedSyntaxList (line 334) | private sealed class UnsupportedSyntaxList : SeparatedSyntaxListWrappe... method UnsupportedSyntaxList (line 338) | public UnsupportedSyntaxList() method Any (line 360) | public override bool Any() method Contains (line 363) | public override bool Contains(TNode node) method First (line 366) | public override TNode First() method FirstOrDefault (line 369) | public override TNode FirstOrDefault() method GetHashCode (line 372) | public override int GetHashCode() method GetSeparator (line 375) | public override SyntaxToken GetSeparator(int index) method GetSeparators (line 378) | public override IEnumerable GetSeparators() method GetWithSeparators (line 381) | public override SyntaxNodeOrTokenList GetWithSeparators() method IndexOf (line 384) | public override int IndexOf(TNode node) method IndexOf (line 387) | public override int IndexOf(Func predicate) method Insert (line 390) | public override SeparatedSyntaxListWrapper Insert(int index, ... method InsertRange (line 395) | public override SeparatedSyntaxListWrapper InsertRange(int in... method Last (line 400) | public override TNode Last() method LastIndexOf (line 403) | public override int LastIndexOf(TNode node) method LastIndexOf (line 406) | public override int LastIndexOf(Func predicate) method LastOrDefault (line 409) | public override TNode LastOrDefault() method Remove (line 412) | public override SeparatedSyntaxListWrapper Remove(TNode node) method RemoveAt (line 417) | public override SeparatedSyntaxListWrapper RemoveAt(int index) method Replace (line 422) | public override SeparatedSyntaxListWrapper Replace(TNode node... method ReplaceRange (line 427) | public override SeparatedSyntaxListWrapper ReplaceRange(TNode... method ReplaceSeparator (line 432) | public override SeparatedSyntaxListWrapper ReplaceSeparator(S... method ToFullString (line 437) | public override string ToFullString() method ToString (line 440) | public override string ToString() FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/Sonar/CaptureId.cs type CaptureId (line 20) | public readonly struct CaptureId : IEquatable method CaptureId (line 24) | public CaptureId(object instance) => method Equals (line 27) | public override bool Equals(object obj) => method Equals (line 30) | public bool Equals(CaptureId other) => method GetHashCode (line 33) | public override int GetHashCode() => method Serialize (line 36) | public string Serialize() => FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/Sonar/CompilationOptionsWrapper.cs type CompilationOptionsWrapper (line 20) | public readonly struct CompilationOptionsWrapper method CompilationOptionsWrapper (line 31) | static CompilationOptionsWrapper() method CompilationOptionsWrapper (line 37) | private CompilationOptionsWrapper(CompilationOptions node) => method FromObject (line 40) | public static CompilationOptionsWrapper FromObject(CompilationOptions ... method IsInstance (line 43) | public static bool IsInstance(object obj) => FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/Sonar/IEventSymbolExtensions.cs class IEventSymbolExtensions (line 20) | public static class IEventSymbolExtensions method extension (line 24) | extension(IEventSymbol symbol) FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/Sonar/IMethodSymbolExtensions.cs class IMethodSymbolExtensions (line 20) | public static class IMethodSymbolExtensions method extension (line 27) | extension(IMethodSymbol symbol) FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/Sonar/INamedTypeSymbolExtensions.Sonar.cs class INamedTypeSymbolExtensionsSonar (line 23) | public static class INamedTypeSymbolExtensionsSonar method INamedTypeSymbolExtensionsSonar (line 27) | static INamedTypeSymbolExtensionsSonar() method TypeArgumentNullableAnnotations (line 32) | public static ImmutableArray TypeArgumentNullableA... method CreateTypeArgumentNullableAnnotationsAccessor (line 34) | private static Func method IOperationWrapperSonar (line 39) | static IOperationWrapperSonar() method GetHashCode (line 49) | public override int GetHashCode() => method Equals (line 52) | public override bool Equals(object obj) => method ToString (line 55) | public override string ToString() => FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/Sonar/IPropertySymbolExtensions.cs class IPropertySymbolExtensions (line 20) | public static class IPropertySymbolExtensions method IPropertySymbolExtensions (line 27) | static IPropertySymbolExtensions() method IsRequired (line 35) | public static bool IsRequired(this IPropertySymbol propertySymbol) => method IsPartialDefinition (line 38) | public static bool IsPartialDefinition(this IPropertySymbol propertySy... method PartialDefinitionPart (line 41) | public static IPropertySymbol PartialDefinitionPart(this IPropertySymb... method PartialImplementationPart (line 44) | public static IPropertySymbol PartialImplementationPart(this IProperty... FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/Sonar/ISymbolNullableExtensions.cs class ISymbolNullableExtensions (line 20) | public static class ISymbolNullableExtensions method NullableAnnotation (line 42) | public static NullableAnnotation NullableAnnotation(this ITypeSymbol t... method NullableAnnotation (line 47) | public static NullableAnnotation NullableAnnotation(this IParameterSym... method NullableAnnotation (line 52) | public static NullableAnnotation NullableAnnotation(this ILocalSymbol ... method NullableAnnotation (line 57) | public static NullableAnnotation NullableAnnotation(this IPropertySymb... method NullableAnnotation (line 62) | public static NullableAnnotation NullableAnnotation(this IFieldSymbol ... method NullableAnnotation (line 67) | public static NullableAnnotation NullableAnnotation(this IEventSymbol ... method ElementNullableAnnotation (line 72) | public static NullableAnnotation ElementNullableAnnotation(this IArray... method ReferenceTypeConstraintNullableAnnotation (line 78) | public static NullableAnnotation ReferenceTypeConstraintNullableAnnota... method ReceiverNullableAnnotation (line 83) | public static NullableAnnotation ReceiverNullableAnnotation(this IMeth... method ReturnNullableAnnotation (line 88) | public static NullableAnnotation ReturnNullableAnnotation(this IMethod... method CreateSymbolNullableAnnotationAccessor (line 90) | private static Func CreateSymbolNullableAnnotat... FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/Sonar/ITypeSymbolExtension.cs class ITypeSymbolExtensions (line 20) | public static partial class ITypeSymbolExtensions method IsRefLikeType (line 24) | public static bool IsRefLikeType(this ITypeSymbol symbol) => IsRefLike... FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/Sonar/NullabilityInfo.cs type NullabilityInfo (line 20) | public readonly record struct NullabilityInfo FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/Sonar/SyntaxTreeOptionsProviderWrapper.cs type SyntaxTreeOptionsProviderWrapper (line 20) | public readonly struct SyntaxTreeOptionsProviderWrapper method SyntaxTreeOptionsProviderWrapper (line 30) | static SyntaxTreeOptionsProviderWrapper() method SyntaxTreeOptionsProviderWrapper (line 38) | private SyntaxTreeOptionsProviderWrapper(object instance) => method FromObject (line 41) | public static SyntaxTreeOptionsProviderWrapper FromObject(object insta... method IsInstance (line 57) | public static bool IsInstance(object obj) => method TryGetDiagnosticValue (line 60) | public bool TryGetDiagnosticValue(SyntaxTree tree, string diagnosticId... method TryGetGlobalDiagnosticValue (line 73) | public bool TryGetGlobalDiagnosticValue(string diagnosticId, Cancellat... FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/Sonar/TypeInfoExtensions.cs class TypeInfoExtensions (line 22) | public static class TypeInfoExtensions method ConvertedNullability (line 27) | public static NullabilityInfo ConvertedNullability(this TypeInfo typeI... method Nullability (line 30) | public static NullabilityInfo Nullability(this TypeInfo typeInfo) => method CreateNullabilityAccessor (line 33) | private static Func CreateNullabilityAccess... FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/StatementSyntaxExtensions.cs class StatementSyntaxExtensions (line 12) | public static class StatementSyntaxExtensions method StatementSyntaxExtensions (line 17) | static StatementSyntaxExtensions() method AttributeLists (line 23) | public static SyntaxList AttributeLists(this Stat... method WithAttributeLists (line 28) | public static StatementSyntax WithAttributeLists(this StatementSyntax ... method AddAttributeLists (line 33) | public static StatementSyntax AddAttributeLists(this StatementSyntax s... FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/SyntaxFactoryEx.cs class SyntaxFactoryEx (line 16) | public static class SyntaxFactoryEx method SyntaxFactoryEx (line 29) | static SyntaxFactoryEx() method PositionalPatternClause (line 259) | public static PositionalPatternClauseSyntaxWrapper PositionalPatternCl... method PositionalPatternClause (line 264) | public static PositionalPatternClauseSyntaxWrapper PositionalPatternCl... method PropertyPatternClause (line 269) | public static PropertyPatternClauseSyntaxWrapper PropertyPatternClause... method PropertyPatternClause (line 274) | public static PropertyPatternClauseSyntaxWrapper PropertyPatternClause... method TupleElement (line 279) | public static TupleElementSyntaxWrapper TupleElement(TypeSyntax type) method TupleElement (line 284) | public static TupleElementSyntaxWrapper TupleElement(TypeSyntax type, ... method TupleExpression (line 289) | public static TupleExpressionSyntaxWrapper TupleExpression(SeparatedSy... method TupleExpression (line 294) | public static TupleExpressionSyntaxWrapper TupleExpression(SyntaxToken... method TupleType (line 299) | public static TupleTypeSyntaxWrapper TupleType(SeparatedSyntaxListWrap... method TupleType (line 304) | public static TupleTypeSyntaxWrapper TupleType(SyntaxToken openParenTo... method ThrowNotSupportedOnFallback (line 309) | private static Func ThrowNotSupportedOnFallback ThrowNotSupportedOnFallback ThrowNotSupportedOnFallback method Wrap (line 18) | public abstract TNode Wrap(SyntaxNode node); method Unwrap (line 20) | public abstract SyntaxNode Unwrap(TNode node); method FindDefaultSyntaxWrapper (line 22) | private static SyntaxWrapper FindDefaultSyntaxWrapper() class DirectCastSyntaxWrapper (line 32) | private sealed class DirectCastSyntaxWrapper : SyntaxWrapper method Unwrap (line 34) | public override SyntaxNode Unwrap(TNode node) method Wrap (line 39) | public override TNode Wrap(SyntaxNode node) class ConversionSyntaxWrapper (line 45) | private sealed class ConversionSyntaxWrapper : SyntaxWrapper method ConversionSyntaxWrapper (line 50) | public ConversionSyntaxWrapper() method Unwrap (line 65) | public override SyntaxNode Unwrap(TNode node) method Wrap (line 70) | public override TNode Wrap(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.ShimLayer.Lightup/WrapperHelper.cs class WrapperHelper (line 14) | public static class WrapperHelper method WrapperHelper (line 18) | static WrapperHelper() method GetWrappedType (line 36) | internal static Type GetWrappedType(Type wrapperType) FILE: analyzers/src/SonarAnalyzer.ShimLayer/Common/ISyntaxWrapper.cs type ISyntaxWrapper (line 22) | public interface ISyntaxWrapper where T : SyntaxNode FILE: analyzers/src/SonarAnalyzer.ShimLayer/Common/SyntaxNodeTypes.cs class SyntaxNodeTypes (line 23) | internal static class SyntaxNodeTypes method LatestType (line 25) | public static Type LatestType(Type wrapper) FILE: analyzers/src/SonarAnalyzer.ShimLayer/PartialTypes/BaseNamespaceDeclarationSyntaxWrapper.cs type BaseNamespaceDeclarationSyntaxWrapper (line 23) | public partial struct BaseNamespaceDeclarationSyntaxWrapper method WithUsings (line 29) | public BaseNamespaceDeclarationSyntaxWrapper WithUsings(SyntaxList CreateOperationPropertyAcc... method CreateOperationListPropertyAccessor (line 212) | internal static Func> CreateOpe... method CreateStaticPropertyAccessor (line 271) | internal static Func CreateStaticPropertyAccessor CreateSyntaxPropertyAccessor CreateSyntaxPropertyAcc... method CreateTryGetValueAccessor (line 420) | internal static TryGetValueAccessor CreateTryGe... method CreateTryGetValueAccessor (line 499) | internal static TryGetValueAccessor ... method CreateTryGetValueAccessor (line 590) | internal static TryGetValueAccessor> C... method CreateSyntaxWithPropertyAccessor (line 753) | internal static Func CreateSyntaxWithProp... method CreateSeparatedSyntaxListWithPropertyAccessor (line 819) | internal static Func, T... method ValidatePropertyType (line 889) | private static bool ValidatePropertyType(Type returnType, Type actualT... FILE: analyzers/src/SonarAnalyzer.ShimLayer/TemporaryLightUp/SeparatedSyntaxListWrapper`1.cs class SeparatedSyntaxListWrapper (line 17) | public abstract class SeparatedSyntaxListWrapper : IEquatable Add(TNode node) method AddRange (line 88) | public SeparatedSyntaxListWrapper AddRange(IEnumerable n... method Any (line 91) | public abstract bool Any(); method Contains (line 93) | public abstract bool Contains(TNode node); method Equals (line 95) | public bool Equals(SeparatedSyntaxListWrapper other) method Equals (line 100) | public override bool Equals(object obj) method First (line 105) | public abstract TNode First(); method FirstOrDefault (line 107) | public abstract TNode FirstOrDefault(); method GetEnumerator (line 109) | public Enumerator GetEnumerator() method GetEnumerator (line 114) | IEnumerator IEnumerable.GetEnumerator() method GetEnumerator (line 119) | IEnumerator IEnumerable.GetEnumerator() method GetHashCode (line 124) | public override abstract int GetHashCode(); method GetSeparator (line 126) | public abstract SyntaxToken GetSeparator(int index); method GetSeparators (line 128) | public abstract IEnumerable GetSeparators(); method GetWithSeparators (line 130) | public abstract SyntaxNodeOrTokenList GetWithSeparators(); method IndexOf (line 132) | public abstract int IndexOf(Func predicate); method IndexOf (line 134) | public abstract int IndexOf(TNode node); method Insert (line 136) | public abstract SeparatedSyntaxListWrapper Insert(int index, TN... method InsertRange (line 138) | public abstract SeparatedSyntaxListWrapper InsertRange(int inde... method Last (line 140) | public abstract TNode Last(); method LastIndexOf (line 142) | public abstract int LastIndexOf(Func predicate); method LastIndexOf (line 144) | public abstract int LastIndexOf(TNode node); method LastOrDefault (line 146) | public abstract TNode LastOrDefault(); method Remove (line 148) | public abstract SeparatedSyntaxListWrapper Remove(TNode node); method RemoveAt (line 150) | public abstract SeparatedSyntaxListWrapper RemoveAt(int index); method Replace (line 152) | public abstract SeparatedSyntaxListWrapper Replace(TNode nodeIn... method ReplaceRange (line 154) | public abstract SeparatedSyntaxListWrapper ReplaceRange(TNode n... method ReplaceSeparator (line 156) | public abstract SeparatedSyntaxListWrapper ReplaceSeparator(Syn... method ToFullString (line 158) | public abstract string ToFullString(); method ToString (line 160) | public override abstract string ToString(); type Enumerator (line 162) | public struct Enumerator : IEnumerator method Enumerator (line 168) | public Enumerator(SeparatedSyntaxListWrapper wrapper) method Equals (line 179) | public override bool Equals(object obj) method GetHashCode (line 192) | public override int GetHashCode() method Dispose (line 202) | public void Dispose() method MoveNext (line 206) | public bool MoveNext() method Reset (line 224) | public void Reset() class AutoWrapSeparatedSyntaxList (line 231) | internal sealed class AutoWrapSeparatedSyntaxList : Separated... method AutoWrapSeparatedSyntaxList (line 236) | public AutoWrapSeparatedSyntaxList() method AutoWrapSeparatedSyntaxList (line 241) | public AutoWrapSeparatedSyntaxList(SeparatedSyntaxList synt... method Any (line 264) | public override bool Any() method Contains (line 267) | public override bool Contains(TNode node) method First (line 270) | public override TNode First() method FirstOrDefault (line 273) | public override TNode FirstOrDefault() method GetHashCode (line 276) | public override int GetHashCode() method GetSeparator (line 279) | public override SyntaxToken GetSeparator(int index) method GetSeparators (line 282) | public override IEnumerable GetSeparators() method GetWithSeparators (line 285) | public override SyntaxNodeOrTokenList GetWithSeparators() method IndexOf (line 288) | public override int IndexOf(TNode node) method IndexOf (line 291) | public override int IndexOf(Func predicate) method Insert (line 294) | public override SeparatedSyntaxListWrapper Insert(int index, ... method InsertRange (line 297) | public override SeparatedSyntaxListWrapper InsertRange(int in... method Last (line 300) | public override TNode Last() method LastIndexOf (line 303) | public override int LastIndexOf(TNode node) method LastIndexOf (line 306) | public override int LastIndexOf(Func predicate) method LastOrDefault (line 309) | public override TNode LastOrDefault() method Remove (line 312) | public override SeparatedSyntaxListWrapper Remove(TNode node) method RemoveAt (line 315) | public override SeparatedSyntaxListWrapper RemoveAt(int index) method Replace (line 318) | public override SeparatedSyntaxListWrapper Replace(TNode node... method ReplaceRange (line 321) | public override SeparatedSyntaxListWrapper ReplaceRange(TNode... method ReplaceSeparator (line 324) | public override SeparatedSyntaxListWrapper ReplaceSeparator(S... method ToFullString (line 327) | public override string ToFullString() method ToString (line 330) | public override string ToString() class UnsupportedSyntaxList (line 334) | private sealed class UnsupportedSyntaxList : SeparatedSyntaxListWrappe... method UnsupportedSyntaxList (line 338) | public UnsupportedSyntaxList() method Any (line 360) | public override bool Any() method Contains (line 363) | public override bool Contains(TNode node) method First (line 366) | public override TNode First() method FirstOrDefault (line 369) | public override TNode FirstOrDefault() method GetHashCode (line 372) | public override int GetHashCode() method GetSeparator (line 375) | public override SyntaxToken GetSeparator(int index) method GetSeparators (line 378) | public override IEnumerable GetSeparators() method GetWithSeparators (line 381) | public override SyntaxNodeOrTokenList GetWithSeparators() method IndexOf (line 384) | public override int IndexOf(TNode node) method IndexOf (line 387) | public override int IndexOf(Func predicate) method Insert (line 390) | public override SeparatedSyntaxListWrapper Insert(int index, ... method InsertRange (line 395) | public override SeparatedSyntaxListWrapper InsertRange(int in... method Last (line 400) | public override TNode Last() method LastIndexOf (line 403) | public override int LastIndexOf(TNode node) method LastIndexOf (line 406) | public override int LastIndexOf(Func predicate) method LastOrDefault (line 409) | public override TNode LastOrDefault() method Remove (line 412) | public override SeparatedSyntaxListWrapper Remove(TNode node) method RemoveAt (line 417) | public override SeparatedSyntaxListWrapper RemoveAt(int index) method Replace (line 422) | public override SeparatedSyntaxListWrapper Replace(TNode node... method ReplaceRange (line 427) | public override SeparatedSyntaxListWrapper ReplaceRange(TNode... method ReplaceSeparator (line 432) | public override SeparatedSyntaxListWrapper ReplaceSeparator(S... method ToFullString (line 437) | public override string ToFullString() method ToString (line 440) | public override string ToString() FILE: analyzers/src/SonarAnalyzer.ShimLayer/TemporaryLightUp/SyntaxWrapper`1.cs class SyntaxWrapper (line 15) | public abstract class SyntaxWrapper method Wrap (line 19) | public abstract TNode Wrap(SyntaxNode node); method Unwrap (line 21) | public abstract SyntaxNode Unwrap(TNode node); method FindDefaultSyntaxWrapper (line 23) | private static SyntaxWrapper FindDefaultSyntaxWrapper() class DirectCastSyntaxWrapper (line 33) | private sealed class DirectCastSyntaxWrapper : SyntaxWrapper method Unwrap (line 35) | public override SyntaxNode Unwrap(TNode node) method Wrap (line 40) | public override TNode Wrap(SyntaxNode node) class ConversionSyntaxWrapper (line 46) | private sealed class ConversionSyntaxWrapper : SyntaxWrapper method ConversionSyntaxWrapper (line 51) | public ConversionSyntaxWrapper() method Unwrap (line 66) | public override SyntaxNode Unwrap(TNode node) method Wrap (line 71) | public override TNode Wrap(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.SourceGenerators/RuleCatalogGenerator.cs class RuleCatalogGenerator (line 27) | [Generator] method Initialize (line 35) | public void Initialize(IncrementalGeneratorInitializationContext context) method CancelableExecute (line 52) | private static T CancelableExecute(Func func, CancellationToken ct) method RspecFiles (line 61) | private static IncrementalValuesProvider RspecFiles(In... method RuleDescriptorArguments (line 67) | private static string[] RuleDescriptorArguments(AdditionalText jsonFil... method GenerateSource (line 85) | private static string GenerateSource(string namespacePrefix, Immutable... method Encode (line 109) | private static string Encode(string value) => FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Common/DescriptorFactory.cs class DescriptorFactory (line 22) | public static class DescriptorFactory method Create (line 24) | public static DiagnosticDescriptor Create(string id, string messageFor... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Extensions/ICompilationReportExtensions.cs class ICompilationReportExtensions (line 21) | public static class ICompilationReportExtensions method ReportIssue (line 25) | public void ReportIssue(DiagnosticDescriptor rule, SyntaxNode location... method ReportIssue (line 28) | public void ReportIssue(DiagnosticDescriptor rule, SyntaxToken locatio... method ReportIssue (line 31) | public void ReportIssue(DiagnosticDescriptor rule, Location location, ... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Extensions/ISymbolExtensions.cs class ISymbolExtensions (line 20) | public static class ISymbolExtensions method extension (line 22) | extension(ISymbol symbol) method GetDescendantNodes (line 28) | public static IEnumerable GetDescendantNodes(Location loca... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Extensions/SonarAnalysisContextExtensions.cs class SonarAnalysisContextExtensions (line 20) | public static class SonarAnalysisContextExtensions method extension (line 22) | extension(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Extensions/SonarCompilationStartAnalysisContextExtensions.cs class SonarCompilationStartAnalysisContextExtensions (line 20) | public static class SonarCompilationStartAnalysisContextExtensions method extension (line 22) | extension(SonarCompilationStartAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Extensions/SonarParametrizedAnalysisContextExtensions.cs class SonarParametrizedAnalysisContextExtensions (line 20) | public static class SonarParametrizedAnalysisContextExtensions method extension (line 22) | extension(SonarParametrizedAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Extensions/SonarSyntaxNodeReportingContextExtensions.cs class SonarSyntaxNodeReportingContextExtensions (line 20) | public static class SonarSyntaxNodeReportingContextExtensions method extension (line 22) | extension(SonarSyntaxNodeReportingContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Facade/Implementation/VisualBasicSyntaxFacade.cs class VisualBasicSyntaxFacade (line 22) | internal sealed class VisualBasicSyntaxFacade : SyntaxFacade method AreEquivalent (line 24) | public override bool AreEquivalent(SyntaxNode firstNode, SyntaxNode se... method ArgumentExpressions (line 27) | public override IEnumerable ArgumentExpressions(SyntaxNode... method ArgumentList (line 30) | public override IReadOnlyList ArgumentList(SyntaxNode node... method ArgumentIndex (line 33) | public override int? ArgumentIndex(SyntaxNode argument) => method ArgumentNameColon (line 36) | public override SyntaxToken? ArgumentNameColon(SyntaxNode argument) => method AssignmentLeft (line 39) | public override SyntaxNode AssignmentLeft(SyntaxNode assignment) => method AssignmentRight (line 42) | public override SyntaxNode AssignmentRight(SyntaxNode assignment) => method AssignmentTargets (line 45) | public override ImmutableArray AssignmentTargets(SyntaxNod... method BinaryExpressionLeft (line 48) | public override SyntaxNode BinaryExpressionLeft(SyntaxNode binary) => method BinaryExpressionRight (line 51) | public override SyntaxNode BinaryExpressionRight(SyntaxNode binary) => method CastType (line 54) | public override SyntaxNode CastType(SyntaxNode cast) => method CastExpression (line 57) | public override SyntaxNode CastExpression(SyntaxNode cast) => method ComparisonKind (line 60) | public override ComparisonKind ComparisonKind(SyntaxNode node) => method EnumMembers (line 65) | public override IEnumerable EnumMembers(SyntaxNode @enum) => method FieldDeclarationIdentifiers (line 68) | public override ImmutableArray FieldDeclarationIdentifier... method HasExactlyNArguments (line 71) | public override bool HasExactlyNArguments(SyntaxNode invocation, int c... method InvocationIdentifier (line 74) | public override SyntaxToken? InvocationIdentifier(SyntaxNode invocatio... method IsAnyKind (line 77) | public override bool IsAnyKind(SyntaxNode node, ISet synta... method IsAnyKind (line 79) | [Obsolete("Either use '.Kind() is A or B' or the overload with the ISe... method IsAnyKind (line 82) | public override bool IsAnyKind(SyntaxTrivia trivia, ISet s... method IsInExpressionTree (line 84) | public override bool IsInExpressionTree(SemanticModel model, SyntaxNod... method IsKind (line 87) | public override bool IsKind(SyntaxNode node, SyntaxKind kind) => node.... method IsKind (line 89) | public override bool IsKind(SyntaxToken token, SyntaxKind kind) => tok... method IsKind (line 91) | public override bool IsKind(SyntaxTrivia trivia, SyntaxKind kind) => t... method IsKnownAttributeType (line 93) | public override bool IsKnownAttributeType(SemanticModel model, SyntaxN... method IsMemberAccessOnKnownType (line 96) | public override bool IsMemberAccessOnKnownType(SyntaxNode memberAccess... method IsNullLiteral (line 99) | public override bool IsNullLiteral(SyntaxNode node) => method IsPartOfBinaryNegationOrCondition (line 102) | public override bool IsPartOfBinaryNegationOrCondition(SyntaxNode node... method IsStatic (line 105) | public override bool IsStatic(SyntaxNode node) => method IsWrittenTo (line 109) | public override bool IsWrittenTo(SyntaxNode expression, SemanticModel ... method Kind (line 112) | public override SyntaxKind Kind(SyntaxNode node) => node.Kind(); method LiteralText (line 114) | public override string LiteralText(SyntaxNode literal) => method LocalDeclarationIdentifiers (line 117) | public override ImmutableArray LocalDeclarationIdentifier... method ModifierKinds (line 120) | public override SyntaxKind[] ModifierKinds(SyntaxNode node) => method NodeExpression (line 125) | public override SyntaxNode NodeExpression(SyntaxNode node) => method NodeIdentifier (line 138) | public override SyntaxToken? NodeIdentifier(SyntaxNode node) => method ObjectCreationTypeIdentifier (line 141) | public override SyntaxToken? ObjectCreationTypeIdentifier(SyntaxNode o... method RemoveConditionalAccess (line 144) | public override SyntaxNode RemoveConditionalAccess(SyntaxNode node) method RemoveParentheses (line 154) | public override SyntaxNode RemoveParentheses(SyntaxNode node) => method StringValue (line 157) | public override string StringValue(SyntaxNode node, SemanticModel mode... method InterpolatedTextValue (line 160) | public override string InterpolatedTextValue(SyntaxNode node, Semantic... method Operands (line 163) | public override Pair Operands(SyntaxNode invoc... method ParseExpression (line 166) | public override SyntaxNode ParseExpression(string expression) => FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Facade/Implementation/VisualBasicSyntaxKindFacade.cs class VisualBasicSyntaxKindFacade (line 20) | internal sealed class VisualBasicSyntaxKindFacade : ISyntaxKindFacade FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Facade/VisualBasicFacade.cs class VisualBasicFacade (line 24) | public sealed class VisualBasicFacade : ILanguageFacade method VisualBasicFacade (line 44) | private VisualBasicFacade() { } method CreateDescriptor (line 46) | public DiagnosticDescriptor CreateDescriptor(string id, string message... method FindConstantValue (line 49) | public object FindConstantValue(SemanticModel model, SyntaxNode node) => method MethodParameterLookup (line 52) | public IMethodParameterLookup MethodParameterLookup(SyntaxNode invocat... method MethodParameterLookup (line 64) | public IMethodParameterLookup MethodParameterLookup(SyntaxNode invocat... method GetName (line 69) | public string GetName(SyntaxNode expression) => FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/ArgumentListSyntaxExtensions.cs class ArgumentListSyntaxExtensions (line 20) | public static class ArgumentListSyntaxExtensions method Get (line 22) | public static ExpressionSyntax Get(this ArgumentListSyntax argumentLis... method ArgumentValuesForParameter (line 32) | public static ImmutableArray ArgumentValuesForParameter(th... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/ArgumentSyntaxExtensions.cs class ArgumentSyntaxExtensions (line 20) | public static class ArgumentSyntaxExtensions method GetArgumentIndex (line 22) | internal static int? GetArgumentIndex(this ArgumentSyntax argument) => method GetSymbolsOfKnownType (line 25) | internal static IEnumerable GetSymbolsOfKnownType(this Separa... method GetArgumentsOfKnownType (line 29) | private static IEnumerable GetArgumentsOfKnownType(thi... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/AttributeSyntaxExtensions.cs class AttributeSyntaxExtensions (line 20) | internal static class AttributeSyntaxExtensions method IsKnownType (line 24) | public static bool IsKnownType(this AttributeSyntax attribute, KnownTy... method GetShortNameWithoutAttributeSuffix (line 28) | private static string GetShortNameWithoutAttributeSuffix(KnownType kno... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/ExpressionSyntaxExtensions.Roslyn.cs class ExpressionSyntaxExtensions (line 9) | [ExcludeFromCodeCoverage] method IsWrittenTo (line 20) | public static bool IsWrittenTo(this ExpressionSyntax expression, Seman... method IsOnlyWrittenTo (line 69) | public static bool IsOnlyWrittenTo(this ExpressionSyntax expression) method IsRightSideOfDot (line 101) | public static bool IsRightSideOfDot(this ExpressionSyntax expression) method IsSimpleMemberAccessExpressionName (line 108) | public static bool IsSimpleMemberAccessExpressionName(this ExpressionS... method IsRightSideOfQualifiedName (line 115) | public static bool IsRightSideOfQualifiedName(this ExpressionSyntax ex... method IsInRefContext (line 122) | public static bool IsInRefContext(this ExpressionSyntax expression, Se... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/ExpressionSyntaxExtensions.cs class ExpressionSyntaxExtensions (line 20) | public static class ExpressionSyntaxExtensions method extension (line 32) | extension(ExpressionSyntax expression) method RemoveParentheses (line 70) | public ExpressionSyntax RemoveParentheses() => method NameIs (line 73) | public bool NameIs(string name) => method HasConstantValue (line 76) | public bool HasConstantValue(SemanticModel model) => method IsOn (line 79) | private bool IsOn(SyntaxKind onKind) => FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/InterpolatedStringExpressionSyntaxExtensions.cs class InterpolatedStringExpressionSyntaxExtensions (line 20) | public static class InterpolatedStringExpressionSyntaxExtensions method ContentsText (line 22) | public static string ContentsText(this InterpolatedStringExpressionSyn... method InterpolatedTextValue (line 25) | public static string InterpolatedTextValue(this InterpolatedStringExpr... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/InvocationExpressionSyntaxExtensions.cs class InvocationExpressionSyntaxExtensions (line 20) | public static class InvocationExpressionSyntaxExtensions method IsMemberAccessOnKnownType (line 22) | public static bool IsMemberAccessOnKnownType(this InvocationExpression... method GetArgumentSymbolsOfKnownType (line 26) | public static IEnumerable GetArgumentSymbolsOfKnownType(this ... method HasExactlyNArguments (line 29) | public static bool HasExactlyNArguments(this InvocationExpressionSynta... method Operands (line 34) | public static Pair Operands(this InvocationExp... method GetMethodCallIdentifier (line 39) | public static SyntaxToken? GetMethodCallIdentifier(this InvocationExpr... method IsMethodInvocation (line 42) | public static bool IsMethodInvocation(this InvocationExpressionSyntax ... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/MemberAccessExpressionSyntaxExtensions.cs class MemberAccessExpressionSyntaxExtensions (line 20) | public static class MemberAccessExpressionSyntaxExtensions method IsMemberAccessOnKnownType (line 22) | public static bool IsMemberAccessOnKnownType(this MemberAccessExpressi... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/MethodBlockBaseSyntaxExtensions.cs class MethodBlockBaseSyntaxExtensions (line 20) | public static class MethodBlockBaseSyntaxExtensions method FindIdentifierLocation (line 22) | public static Location FindIdentifierLocation(this MethodBlockBaseSynt... method GetIdentifierOrDefault (line 25) | public static SyntaxToken? GetIdentifierOrDefault(this MethodBlockBase... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/MethodBlockSyntaxExtensions.cs class MethodBlockSyntaxExtensions (line 20) | public static class MethodBlockSyntaxExtensions method IsShared (line 22) | public static bool IsShared(this MethodBlockSyntax methodBlock) => method GetIdentifierText (line 25) | public static string GetIdentifierText(this MethodBlockSyntax method) => method GetParameters (line 28) | public static SeparatedSyntaxList? GetParameters(this... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/ObjectCreationExpressionSyntaxExtensions.cs class ObjectCreationExpressionSyntaxExtensions (line 20) | internal static class ObjectCreationExpressionSyntaxExtensions method GetObjectCreationTypeIdentifier (line 22) | public static SyntaxToken? GetObjectCreationTypeIdentifier(this Object... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/StatementSyntaxExtensions.cs class StatementSyntaxExtensions (line 20) | public static class StatementSyntaxExtensions method extension (line 22) | extension(StatementSyntax currentStatement) FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/SyntaxNodeExtensions.Roslyn.cs class SyntaxNodeExtensions (line 22) | [ExcludeFromCodeCoverage] method IsParentKind (line 27) | public static bool IsParentKind(this SyntaxNode node, SyntaxKind kind) FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/SyntaxNodeExtensionsVisualBasic.cs class SyntaxNodeExtensionsVisualBasic (line 23) | public static class SyntaxNodeExtensionsVisualBasic method CreateCfg (line 27) | public static ControlFlowGraph CreateCfg(this SyntaxNode block, Semant... method IsPartOfBinaryNegationOrCondition (line 30) | public static bool IsPartOfBinaryNegationOrCondition(this SyntaxNode n... method FindConstantValue (line 51) | public static object FindConstantValue(this SyntaxNode node, SemanticM... method FindStringConstant (line 54) | public static string FindStringConstant(this SyntaxNode node, Semantic... method IsInExpressionTree (line 58) | public static bool IsInExpressionTree(this SyntaxNode node, SemanticMo... method GetIdentifier (line 75) | public static SyntaxToken? GetIdentifier(this SyntaxNode node) => method ArgumentList (line 103) | public static ArgumentListSyntax ArgumentList(this SyntaxNode node) => method GetParentConditionalAccessExpression (line 125) | public static ConditionalAccessExpressionSyntax GetParentConditionalAc... method IsAnyMemberAccessExpressionName (line 189) | public static bool IsAnyMemberAccessExpressionName(this SyntaxNode nod... method IsTrue (line 192) | public static bool IsTrue(this SyntaxNode node) => method IsFalse (line 200) | public static bool IsFalse(this SyntaxNode node) => method GetTopMostContainingMethod (line 208) | public static SyntaxNode GetTopMostContainingMethod(this SyntaxNode no... method RemoveParentheses (line 211) | public static SyntaxNode RemoveParentheses(this SyntaxNode expression) method GetSelfOrTopParenthesizedExpression (line 221) | public static SyntaxNode GetSelfOrTopParenthesizedExpression(this Synt... method HasAncestor (line 231) | public static bool HasAncestor(this SyntaxNode syntaxNode, params Synt... method IsNothingLiteral (line 234) | public static bool IsNothingLiteral(this SyntaxNode syntaxNode) => method IsAnyKind (line 237) | [Obsolete("Either use '.Kind() is A or B' or the overload with the ISe... method IsAnyKind (line 241) | public static bool IsAnyKind(this SyntaxNode syntaxNode, ISet method StringValue (line 250) | public static string StringValue(this SyntaxNode node, SemanticModel m... method AnyOfKind (line 258) | public static bool AnyOfKind(this IEnumerable nodes, Synta... class ControlFlowGraphCache (line 261) | private sealed class ControlFlowGraphCache : ControlFlowGraphCacheBase method IsLocalFunction (line 263) | protected override bool IsLocalFunction(SyntaxNode node) => method HasNestedCfg (line 266) | protected override bool HasNestedCfg(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/SyntaxTokenExtensions.cs class SyntaxTokenExtensions (line 20) | public static class SyntaxTokenExtensions method IsAnyKind (line 22) | public static bool IsAnyKind(this SyntaxToken token, ISet ... method ToComparisonKind (line 25) | public static ComparisonKind ToComparisonKind(this SyntaxToken token) => FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/SyntaxTriviaExtensions.cs class SyntaxTriviaExtensions (line 20) | public static class SyntaxTriviaExtensions method IsAnyKind (line 29) | public static bool IsAnyKind(this SyntaxTrivia trivia, ISet FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Extensions/VisualBasicCompilationExtensions.cs class VisualBasicCompilationExtensions (line 20) | public static class VisualBasicCompilationExtensions method IsAtLeastLanguageVersion (line 22) | public static bool IsAtLeastLanguageVersion(this Compilation compilati... method VB (line 25) | public static VisualBasicCompilation VB(this Compilation compilation) ... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Utilities/SafeVisualBasicSyntaxWalker.cs class SafeVisualBasicSyntaxWalker (line 20) | public class SafeVisualBasicSyntaxWalker : VisualBasicSyntaxWalker, ISaf... method SafeVisit (line 22) | public bool SafeVisit(SyntaxNode syntaxNode) FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Utilities/VisualBasicAttributeParameterLookup.cs class VisualBasicAttributeParameterLookup (line 20) | internal class VisualBasicAttributeParameterLookup(SeparatedSyntaxList method GetNameColonIdentifier (line 25) | protected override SyntaxToken? GetNameColonIdentifier(ArgumentSyntax ... method GetNameEqualsIdentifier (line 28) | protected override SyntaxToken? GetNameEqualsIdentifier(ArgumentSyntax... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Utilities/VisualBasicEquivalenceChecker.cs class VisualBasicEquivalenceChecker (line 20) | public static class VisualBasicEquivalenceChecker method AreEquivalent (line 22) | public static bool AreEquivalent(SyntaxNode node1, SyntaxNode node2) => method AreEquivalent (line 26) | public static bool AreEquivalent(SyntaxList nodeList1, Syn... class VisualBasicSyntaxNodeEqualityComparer (line 31) | public class VisualBasicSyntaxNodeEqualityComparer : IEqualityCompare... method Equals (line 34) | public bool Equals(T x, T y) => method Equals (line 37) | public bool Equals(SyntaxList x, SyntaxList y) => method GetHashCode (line 40) | public int GetHashCode(T obj) => method GetHashCode (line 43) | public int GetHashCode(SyntaxList obj) => FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Utilities/VisualBasicExpressionNumericConverter.cs class VisualBasicExpressionNumericConverter (line 20) | internal class VisualBasicExpressionNumericConverter : ExpressionNumeric... method TokenValue (line 28) | protected override object TokenValue(LiteralExpressionSyntax literalEx... method Operand (line 31) | protected override SyntaxNode Operand(UnaryExpressionSyntax unaryExpre... method IsSupportedOperator (line 34) | protected override bool IsSupportedOperator(UnaryExpressionSyntax unar... method IsMinusOperator (line 37) | protected override bool IsMinusOperator(UnaryExpressionSyntax unaryExp... method RemoveParentheses (line 40) | protected override SyntaxNode RemoveParentheses(SyntaxNode expression) => FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Utilities/VisualBasicGeneratedCodeRecognizer.cs class VisualBasicGeneratedCodeRecognizer (line 20) | public sealed class VisualBasicGeneratedCodeRecognizer : GeneratedCodeRe... method VisualBasicGeneratedCodeRecognizer (line 24) | private VisualBasicGeneratedCodeRecognizer() method IsTriviaComment (line 33) | protected override bool IsTriviaComment(SyntaxTrivia trivia) => method GetAttributeName (line 36) | protected override string GetAttributeName(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Utilities/VisualBasicMethodParameterLookup.cs class VisualBasicMethodParameterLookup (line 20) | public class VisualBasicMethodParameterLookup : MethodParameterLookupBas... method VisualBasicMethodParameterLookup (line 22) | public VisualBasicMethodParameterLookup(InvocationExpressionSyntax inv... method VisualBasicMethodParameterLookup (line 25) | public VisualBasicMethodParameterLookup(InvocationExpressionSyntax inv... method VisualBasicMethodParameterLookup (line 28) | public VisualBasicMethodParameterLookup(ArgumentListSyntax argumentLis... method VisualBasicMethodParameterLookup (line 31) | public VisualBasicMethodParameterLookup(ArgumentListSyntax argumentLis... method GetNameColonIdentifier (line 34) | protected override SyntaxToken? GetNameColonIdentifier(ArgumentSyntax ... method GetNameEqualsIdentifier (line 37) | protected override SyntaxToken? GetNameEqualsIdentifier(ArgumentSyntax... method Expression (line 40) | protected override SyntaxNode Expression(ArgumentSyntax argument) => FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Utilities/VisualBasicRemovableDeclarationCollector.cs class VisualBasicRemovableDeclarationCollector (line 22) | public class VisualBasicRemovableDeclarationCollector : RemovableDeclara... method VisualBasicRemovableDeclarationCollector (line 24) | public VisualBasicRemovableDeclarationCollector(INamedTypeSymbol named... method IsNodeStructOrClassDeclaration (line 26) | public static bool IsNodeStructOrClassDeclaration(SyntaxNode node) => method IsNodeContainerTypeDeclaration (line 29) | public static bool IsNodeContainerTypeDeclaration(SyntaxNode node) => method MatchingDeclarations (line 32) | protected override IEnumerable MatchingDeclarations(NodeAn... method RemovableFieldLikeDeclarations (line 35) | public override IEnumerable RemovableFieldLikeDecl... method OwnerOfSubnodes (line 47) | public override TypeBlockSyntax OwnerOfSubnodes(TypeStatementSyntax no... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Utilities/VisualBasicStringInterpolationConstantValueResolver.cs class VisualBasicStringInterpolationConstantValueResolver (line 20) | public class VisualBasicStringInterpolationConstantValueResolver : Strin... method Contents (line 32) | protected override IEnumerable Conten... method TextToken (line 35) | protected override SyntaxToken TextToken(InterpolatedStringTextSyntax ... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Syntax/Utilities/VisualBasicSyntaxClassifier.cs class VisualBasicSyntaxClassifier (line 22) | public sealed class VisualBasicSyntaxClassifier : SyntaxClassifierBase method VisualBasicSyntaxClassifier (line 28) | private VisualBasicSyntaxClassifier() { } method MemberAccessExpression (line 30) | public override SyntaxNode MemberAccessExpression(SyntaxNode node) => method IsStatement (line 33) | protected override bool IsStatement(SyntaxNode node) => method ParentLoopCondition (line 36) | protected override SyntaxNode ParentLoopCondition(SyntaxNode node) => method IsCfgBoundary (line 47) | protected override bool IsCfgBoundary(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Trackers/VisualBasicArgumentTracker.cs class VisualBasicArgumentTracker (line 22) | public class VisualBasicArgumentTracker : ArgumentTracker method ArgumentList (line 28) | protected override IReadOnlyCollection ArgumentList(Syntax... method Position (line 33) | protected override int? Position(SyntaxNode argumentNode) => method ArgumentRefKind (line 38) | protected override RefKind? ArgumentRefKind(SyntaxNode argumentNode) => method InvocationMatchesMemberKind (line 41) | protected override bool InvocationMatchesMemberKind(SyntaxNode invoked... method InvokedMemberMatches (line 51) | protected override bool InvokedMemberMatches(SemanticModel model, Synt... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Trackers/VisualBasicAssignmentFinder.cs class VisualBasicAssignmentFinder (line 22) | public class VisualBasicAssignmentFinder : AssignmentFinder method GetTopMostContainingMethod (line 24) | protected override SyntaxNode GetTopMostContainingMethod(SyntaxNode no... method IsAssignmentToIdentifier (line 28) | protected override bool IsAssignmentToIdentifier(SyntaxNode node, stri... method IsIdentifierDeclaration (line 41) | protected override bool IsIdentifierDeclaration(SyntaxNode node, strin... method IsLoop (line 56) | protected override bool IsLoop(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Trackers/VisualBasicBaseTypeTracker.cs class VisualBasicBaseTypeTracker (line 22) | public class VisualBasicBaseTypeTracker : BaseTypeTracker method GetBaseTypeNodes (line 27) | protected override IEnumerable GetBaseTypeNodes(SyntaxNode... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Trackers/VisualBasicBuilderPatternCondition.cs class VisualBasicBuilderPatternCondition (line 22) | public class VisualBasicBuilderPatternCondition : BuilderPatternConditio... method VisualBasicBuilderPatternCondition (line 24) | public VisualBasicBuilderPatternCondition(bool constructorIsSafe, para... method GetExpression (line 29) | protected override SyntaxNode GetExpression(InvocationExpressionSyntax... method GetIdentifierName (line 32) | protected override string GetIdentifierName(InvocationExpressionSyntax... method IsMemberAccess (line 35) | protected override bool IsMemberAccess(SyntaxNode node, out SyntaxNode... method IsObjectCreation (line 46) | protected override bool IsObjectCreation(SyntaxNode node) => method IsIdentifier (line 49) | protected override bool IsIdentifier(SyntaxNode node, out string ident... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Trackers/VisualBasicConstantValueFinder.cs class VisualBasicConstantValueFinder (line 22) | public class VisualBasicConstantValueFinder : ConstantValueFinder method InitializerValue (line 29) | protected override SyntaxNode InitializerValue(VariableDeclaratorSynta... method VariableDeclarator (line 32) | protected override VariableDeclaratorSyntax VariableDeclarator(SyntaxN... method IsPtrZero (line 35) | protected override bool IsPtrZero(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Trackers/VisualBasicElementAccessTracker.cs class VisualBasicElementAccessTracker (line 22) | public class VisualBasicElementAccessTracker : ElementAccessTracker method ArgumentAtIndexEquals (line 32) | public override Condition ArgumentAtIndexEquals(int index, string valu... method MatchSetter (line 37) | public override Condition MatchSetter() => method MatchProperty (line 40) | public override Condition MatchProperty(MemberDescriptor member) => FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Trackers/VisualBasicFieldAccessTracker.cs class VisualBasicFieldAccessTracker (line 22) | public class VisualBasicFieldAccessTracker : FieldAccessTracker method WhenRead (line 32) | public override Condition WhenRead() => method MatchSet (line 35) | public override Condition MatchSet() => method AssignedValueIsConstant (line 38) | public override Condition AssignedValueIsConstant() => method IsIdentifierWithinMemberAccess (line 45) | protected override bool IsIdentifierWithinMemberAccess(SyntaxNode expr... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Trackers/VisualBasicInvocationTracker.cs class VisualBasicInvocationTracker (line 22) | public class VisualBasicInvocationTracker : InvocationTracker method ArgumentAtIndexIsStringConstant (line 27) | public override Condition ArgumentAtIndexIsStringConstant(int index) => method ArgumentAtIndexIsAny (line 31) | public override Condition ArgumentAtIndexIsAny(int index, params strin... method ArgumentAtIndexIs (line 35) | public override Condition ArgumentAtIndexIs(int index, Func method ConstArgumentForParameter (line 47) | public override object ConstArgumentForParameter(InvocationContext con... method NodeExpression (line 56) | protected override SyntaxNode NodeExpression(SyntaxNode node) => method ExpectedExpressionIdentifier (line 64) | protected override SyntaxToken? ExpectedExpressionIdentifier(SyntaxNod... method ArgumentAtIndexConformsTo (line 67) | private static Condition ArgumentAtIndexConformsTo(int index, Func method GetMethodIdentifier (line 56) | protected override SyntaxToken? GetMethodIdentifier(SyntaxNode methodD... method HasImplementation (line 70) | private static bool HasImplementation(MethodBlockSyntax methodBlock) => FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Trackers/VisualBasicObjectCreationTracker.cs class VisualBasicObjectCreationTracker (line 22) | public class VisualBasicObjectCreationTracker : ObjectCreationTracker method ConstArgumentForParameter (line 31) | public override object ConstArgumentForParameter(ObjectCreationContext... FILE: analyzers/src/SonarAnalyzer.VisualBasic.Core/Trackers/VisualBasicPropertyAccessTracker.cs class VisualBasicPropertyAccessTracker (line 22) | public class VisualBasicPropertyAccessTracker : PropertyAccessTracker method MatchGetter (line 37) | public override Condition MatchGetter() => method MatchSetter (line 40) | public override Condition MatchSetter() => method AssignedValueIsConstant (line 43) | public override Condition AssignedValueIsConstant() => method IsIdentifierWithinMemberAccess (line 46) | protected override bool IsIdentifierWithinMemberAccess(SyntaxNode expr... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Metrics/VisualBasicCognitiveComplexityMetric.cs class VisualBasicCognitiveComplexityMetric (line 22) | public static class VisualBasicCognitiveComplexityMetric method GetComplexity (line 24) | public static CognitiveComplexity GetComplexity(SyntaxNode node) class CognitiveWalker (line 32) | private class CognitiveWalker : SafeVisualBasicSyntaxWalker method VisitBinaryConditionalExpression (line 36) | public override void VisitBinaryConditionalExpression(BinaryConditio... method VisitBinaryExpression (line 42) | public override void VisitBinaryExpression(BinaryExpressionSyntax node) method VisitCatchBlock (line 67) | public override void VisitCatchBlock(CatchBlockSyntax node) method VisitDoLoopBlock (line 73) | public override void VisitDoLoopBlock(DoLoopBlockSyntax node) method VisitElseIfStatement (line 79) | public override void VisitElseIfStatement(ElseIfStatementSyntax node) method VisitElseStatement (line 85) | public override void VisitElseStatement(ElseStatementSyntax node) method VisitForEachBlock (line 91) | public override void VisitForEachBlock(ForEachBlockSyntax node) method VisitForBlock (line 97) | public override void VisitForBlock(ForBlockSyntax node) method VisitGoToStatement (line 103) | public override void VisitGoToStatement(GoToStatementSyntax node) method VisitInvocationExpression (line 109) | public override void VisitInvocationExpression(InvocationExpressionS... method VisitMethodBlock (line 138) | public override void VisitMethodBlock(MethodBlockSyntax node) method VisitMultiLineIfBlock (line 150) | public override void VisitMultiLineIfBlock(MultiLineIfBlockSyntax node) method VisitMultiLineLambdaExpression (line 156) | public override void VisitMultiLineLambdaExpression(MultiLineLambdaE... method VisitSelectBlock (line 159) | public override void VisitSelectBlock(SelectBlockSyntax node) method VisitSingleLineIfStatement (line 165) | public override void VisitSingleLineIfStatement(SingleLineIfStatemen... method VisitSingleLineLambdaExpression (line 171) | public override void VisitSingleLineLambdaExpression(SingleLineLambd... method VisitTernaryConditionalExpression (line 174) | public override void VisitTernaryConditionalExpression(TernaryCondit... method VisitWhileBlock (line 180) | public override void VisitWhileBlock(WhileBlockSyntax node) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Metrics/VisualBasicExecutableLinesMetric.cs class VisualBasicExecutableLinesMetric (line 20) | public static class VisualBasicExecutableLinesMetric method GetLineNumbers (line 22) | public static ImmutableArray GetLineNumbers(SyntaxTree syntaxTree... class ExecutableLinesWalker (line 30) | private class ExecutableLinesWalker : SafeVisualBasicSyntaxWalker method ExecutableLinesWalker (line 35) | public ExecutableLinesWalker(SemanticModel semanticModel) method DefaultVisit (line 42) | public override void DefaultVisit(SyntaxNode node) method HasExcludedAttribute (line 50) | private static bool HasExcludedAttribute(AttributeSyntax attribute) method FindExecutableLines (line 60) | private bool FindExecutableLines(SyntaxNode node) method HasExcludedCodeAttribute (line 150) | private bool HasExcludedCodeAttribute(T node, Func method ComputeCyclomaticComplexity (line 72) | public override int ComputeCyclomaticComplexity(SyntaxNode node) => method IsClass (line 75) | protected override bool IsClass(SyntaxNode node) method IsCommentTrivia (line 90) | protected override bool IsCommentTrivia(SyntaxTrivia trivia) => trivia... method IsEndOfFile (line 92) | protected override bool IsEndOfFile(SyntaxToken token) => method IsFunction (line 95) | protected override bool IsFunction(SyntaxNode node) method IsNoneToken (line 112) | protected override bool IsNoneToken(SyntaxToken token) => method IsStatement (line 115) | protected override bool IsStatement(SyntaxNode node) => method IsComplexityIncreasingKind (line 118) | private static bool IsComplexityIncreasingKind(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/AllBranchesShouldNotHaveSameImplementation.cs class AllBranchesShouldNotHaveSameImplementation (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) class IfStatementAnalyzer (line 48) | private class IfStatementAnalyzer : IfStatementAnalyzerBase GetStatements(ElseBlockSy... method GetIfBlocksStatements (line 55) | protected override IEnumerable> GetIfBlocksS... method GetLocation (line 64) | protected override Location GetLocation(MultiLineIfBlockSyntax topLe... class TernaryStatementAnalyzer (line 68) | private class TernaryStatementAnalyzer : TernaryStatementAnalyzerBase<... method GetWhenFalse (line 70) | protected override SyntaxNode GetWhenFalse(TernaryConditionalExpress... method GetWhenTrue (line 73) | protected override SyntaxNode GetWhenTrue(TernaryConditionalExpressi... method GetLocation (line 76) | protected override Location GetLocation(TernaryConditionalExpression... class SingleLineIfStatementAnalyzer (line 80) | private class SingleLineIfStatementAnalyzer : IfStatementAnalyzerBase<... method GetIfBlocksStatements (line 82) | protected override IEnumerable> GetIfBlocksS... method GetStatements (line 89) | protected override IEnumerable GetStatements(SingleLineE... method IsLastElseInChain (line 92) | protected override bool IsLastElseInChain(SingleLineElseClauseSyntax... method GetLocation (line 94) | protected override Location GetLocation(SingleLineIfStatementSyntax ... class SelectCaseStatementAnalyzer (line 98) | private class SelectCaseStatementAnalyzer : SwitchStatementAnalyzerBas... method AreEquivalent (line 100) | protected override bool AreEquivalent(CaseBlockSyntax section1, Case... method GetSections (line 103) | protected override IEnumerable GetSections(SelectBl... method HasDefaultLabel (line 106) | protected override bool HasDefaultLabel(SelectBlockSyntax switchStat... method GetLocation (line 109) | protected override Location GetLocation(SelectBlockSyntax switchStat... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/AlwaysSetDateTimeKind.cs class AlwaysSetDateTimeKind (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ArrayCreationLongSyntax.cs class ArrayCreationLongSyntax (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => method HasSizeSpecifier (line 59) | private static bool HasSizeSpecifier(ArrayCreationExpressionSyntax arr... method AllTypesAreConvertible (line 62) | private static bool AllTypesAreConvertible(SemanticModel semanticModel... method AtLeastOneExactTypeMatch (line 67) | private static bool AtLeastOneExactTypeMatch(SemanticModel semanticMod... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ArrayCreationLongSyntaxCodeFix.cs class ArrayCreationLongSyntaxCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.VisualBasic)] method RegisterCodeFixesAsync (line 27) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ArrayDesignatorOnVariable.cs class ArrayDesignatorOnVariable (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ArrayDesignatorOnVariableCodeFix.cs class ArrayDesignatorOnVariableCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.VisualBasic)] method RegisterCodeFixesAsync (line 27) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ArrayInitializationMultipleStatements.cs class ArrayInitializationMultipleStatements (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method GetAssignedIndexes (line 82) | private static IEnumerable GetAssignedIndexes(IEnumerable GetFollowingStatements(Syn... method GetConstantArgumentValue (line 137) | private static int? GetConstantArgumentValue(ArgumentSyntax argument, ... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ArrayPassedAsParams.cs class ArrayPassedAsParams (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method LastArgumentIfArrayCreation (line 31) | protected override ArgumentSyntax LastArgumentIfArrayCreation(SyntaxNo... method ArrayElementType (line 38) | protected override ITypeSymbol ArrayElementType(ArgumentSyntax argumen... method ArgumentList (line 46) | private static ArgumentListSyntax ArgumentList(SyntaxNode expression) => method IsArrayCreation (line 54) | private static bool IsArrayCreation(ExpressionSyntax expression) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/AspNet/BackslashShouldBeAvoidedInAspNetRoutes.cs class BackslashShouldBeAvoidedInAspNetRoutes (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsNamedAttributeArgument (line 27) | protected override bool IsNamedAttributeArgument(SyntaxNode node) => f... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/AspNet/RouteTemplateShouldNotStartWithSlash.cs class RouteTemplateShouldNotStartWithSlash (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/AvoidDateTimeNowForBenchmarking.cs class AvoidDateTimeNowForBenchmarking (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method ContainsDateTimeArgument (line 25) | protected override bool ContainsDateTimeArgument(InvocationExpressionS... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/AvoidUnsealedAttributes.cs class AvoidUnsealedAttributes (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/BeginInvokePairedWithEndInvoke.cs class BeginInvokePairedWithEndInvoke (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method VisitInvocation (line 47) | protected override void VisitInvocation(EndInvokeContext context) => method IsInvalidCallback (line 50) | protected override bool IsInvalidCallback(SyntaxNode callbackArg, Sema... method FindCallback (line 62) | private static SyntaxNode FindCallback(SyntaxNode callbackArg, Semanti... method LookupIdentifierInitializer (line 86) | private static SyntaxNode LookupIdentifierInitializer(IdentifierNameSy... class InvocationWalker (line 92) | private class InvocationWalker : SafeVisualBasicSyntaxWalker method InvocationWalker (line 96) | public InvocationWalker(EndInvokeContext context) => method Visit (line 99) | public override void Visit(SyntaxNode node) method VisitInvocationExpression (line 107) | public override void VisitInvocationExpression(InvocationExpressionS... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/BinaryOperationWithIdenticalExpressions.cs class BinaryOperationWithIdenticalExpressions (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 45) | protected override void Initialize(SonarAnalysisContext context) method ReportIfExpressionsMatch (line 64) | private static void ReportIfExpressionsMatch(SonarSyntaxNodeReportingC... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/BooleanCheckInverted.cs class BooleanCheckInverted (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 45) | protected override void Initialize(SonarAnalysisContext context) => method IsUnsafeInversionOperation (line 55) | protected override bool IsUnsafeInversionOperation(BinaryExpressionSyn... method LogicalNotNode (line 64) | protected override SyntaxNode LogicalNotNode(BinaryExpressionSyntax ex... method SuggestedReplacement (line 69) | protected override string SuggestedReplacement(BinaryExpressionSyntax ... method IsConditionalAccessExpression (line 72) | private static bool IsConditionalAccessExpression(ExpressionSyntax exp... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/BooleanLiteralUnnecessary.cs class BooleanLiteralUnnecessary (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetOperatorToken (line 25) | protected override SyntaxToken? GetOperatorToken(SyntaxNode node) => (... method IsTrue (line 27) | protected override bool IsTrue(SyntaxNode syntaxNode) => syntaxNode.Is... method IsFalse (line 29) | protected override bool IsFalse(SyntaxNode syntaxNode) => syntaxNode.I... method GetLeftNode (line 31) | protected override SyntaxNode GetLeftNode(SyntaxNode node) => ((Binary... method GetRightNode (line 33) | protected override SyntaxNode GetRightNode(SyntaxNode node) => ((Binar... method Initialize (line 35) | protected override void Initialize(SonarAnalysisContext context) method CheckLogicalNot (line 48) | private void CheckLogicalNot(SonarSyntaxNodeReportingContext context) method CheckConditional (line 58) | private void CheckConditional(SonarSyntaxNodeReportingContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/BypassingAccessibility.cs class BypassingAccessibility (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method BypassingAccessibility (line 25) | public BypassingAccessibility() : base(AnalyzerConfiguration.AlwaysEna... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/CatchRethrow.cs class CatchRethrow (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method ContainsOnlyThrow (line 27) | protected override bool ContainsOnlyThrow(CatchBlockSyntax currentCatc... method AllCatches (line 30) | protected override CatchBlockSyntax[] AllCatches(SyntaxNode node) => method DeclarationType (line 33) | protected override SyntaxNode DeclarationType(CatchBlockSyntax catchCl... method HasFilter (line 36) | protected override bool HasFilter(CatchBlockSyntax catchClause) => method Initialize (line 39) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/CertificateValidationCheck.cs class CertificateValidationCheck (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method CreateParameterLookup (line 37) | internal override MethodParameterLookupBase CreatePara... method Initialize (line 45) | protected override void Initialize(SonarAnalysisContext context) method ExpressionLocation (line 58) | protected override Location ExpressionLocation(SyntaxNode expression) => method SplitAssignment (line 62) | protected override void SplitAssignment(AssignmentStatementSyntax assi... method CreateNodeEqualityComparer (line 68) | protected override IEqualityComparer CreateNodeEqual... method FindRootTypeDeclaration (line 71) | protected override SyntaxNode FindRootTypeDeclaration(SyntaxNode node) method FindReturnAndThrowExpressions (line 80) | protected override ExpressionSyntax[] FindReturnAndThrowExpressions(In... method IsTrueLiteral (line 94) | protected override bool IsTrueLiteral(ExpressionSyntax expression) => method VariableInitializer (line 97) | protected override ExpressionSyntax VariableInitializer(ModifiedIdenti... method LambdaLocations (line 100) | protected override ImmutableArray LambdaLocations(Inspection... method LocalVariableScope (line 110) | protected override SyntaxNode LocalVariableScope(ModifiedIdentifierSyn... method ExtractArgumentExpressionNode (line 113) | protected override SyntaxNode ExtractArgumentExpressionNode(SyntaxNode... method SyntaxFromReference (line 121) | protected override SyntaxNode SyntaxFromReference(SyntaxReference refe... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/CheckFileLicense.cs class CheckFileLicense (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ClassNamedException.cs class ClassNamedException (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ClassNotInstantiatable.cs class ClassNotInstantiatable (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method CollectRemovableDeclarations (line 25) | protected override IEnumerable CollectRemovableDec... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ClassShouldNotBeEmpty.cs class ClassShouldNotBeEmpty (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsEmptyAndNotPartial (line 25) | protected override bool IsEmptyAndNotPartial(SyntaxNode node) => method GetIfHasDeclaredBaseClassOrInterface (line 29) | protected override TypeBlockSyntax GetIfHasDeclaredBaseClassOrInterfac... method HasInterfaceOrGenericBaseClass (line 34) | protected override bool HasInterfaceOrGenericBaseClass(TypeBlockSyntax... method HasAnyAttribute (line 38) | protected override bool HasAnyAttribute(SyntaxNode node) => method HasConditionalCompilationDirectives (line 41) | protected override bool HasConditionalCompilationDirectives(SyntaxNode... method DeclarationTypeKeyword (line 48) | protected override string DeclarationTypeKeyword(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/CognitiveComplexity.cs class CognitiveComplexity (line 22) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 27) | protected override void Initialize(SonarParametrizedAnalysisContext co... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/CollectionEmptinessChecking.cs class CollectionEmptinessChecking (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/CommentKeyword.cs class CommentKeyword (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsComment (line 25) | protected override bool IsComment(SyntaxTrivia trivia) => trivia.IsCom... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/CommentLineEnd.cs class CommentLineEnd (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 36) | protected override void Initialize(SonarAnalysisContext context) method CheckTokenComments (line 48) | private void CheckTokenComments(SonarSyntaxTreeReportingContext contex... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/CommentsShouldNotBeEmpty.cs class CommentsShouldNotBeEmpty (line 22) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsValidTriviaType (line 27) | protected override bool IsValidTriviaType(SyntaxTrivia trivia) => method GetCommentText (line 30) | protected override string GetCommentText(SyntaxTrivia trivia) => method GetText (line 38) | private static string GetText(SyntaxTrivia trivia) method GetDocumentationText (line 42) | private static string GetDocumentationText(SyntaxTrivia trivia) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ConditionalStructureSameCondition.cs class ConditionalStructureSameCondition (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => method CheckConditionAt (line 42) | private void CheckConditionAt(SonarSyntaxNodeReportingContext context,... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ConditionalStructureSameImplementation.cs class ConditionalStructureSameImplementation (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method CheckStatementsAt (line 77) | private static void CheckStatementsAt(SonarSyntaxNodeReportingContext ... method ReportIssue (line 101) | private static void ReportIssue(SonarSyntaxNodeReportingContext contex... method IsApprovedStatement (line 115) | private static bool IsApprovedStatement(StatementSyntax statement) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ConstructorArgumentValueShouldExist.cs class ConstructorArgumentValueShouldExist (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetFirstAttributeArgument (line 25) | protected override SyntaxNode GetFirstAttributeArgument(AttributeSynta... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DangerousGetHandleShouldNotBeCalled.cs class DangerousGetHandleShouldNotBeCalled (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DateAndTimeShouldNotBeUsedasTypeForPrimaryKey.cs class DateAndTimeShouldNotBeUsedAsTypeForPrimaryKey (line 22) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method TypeNodesOfTemporalKeyProperties (line 27) | protected override IEnumerable TypeNodesOfTemporalKeyPrope... method IsTemporalType (line 38) | protected override bool IsTemporalType(string propertyTypeName) => method PropertyDeclarationsInClass (line 42) | private static IEnumerable PropertyDeclaratio... method IsCandidateProperty (line 47) | private static bool IsCandidateProperty(PropertyStatementSyntax proper... method IsKeyProperty (line 52) | private bool IsKeyProperty(PropertyStatementSyntax property, string cl... method HasKeyAttribute (line 59) | private bool HasKeyAttribute(PropertyStatementSyntax property) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DateTimeFormatShouldNotBeHardcoded.cs class DateTimeFormatShouldNotBeHardcoded (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method HardCodedArgumentLocation (line 25) | protected override Location HardCodedArgumentLocation(InvocationExpres... method HasInvalidFirstArgument (line 31) | protected override bool HasInvalidFirstArgument(InvocationExpressionSy... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DebuggerDisplayUsesExistingMembers.cs class DebuggerDisplayUsesExistingMembers (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method AttributeTarget (line 25) | protected override SyntaxNode AttributeTarget(SimpleArgumentSyntax att... method ResolvableIdentifiers (line 28) | protected override ImmutableArray ResolvableIdentifiers(Sy... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DeclareTypesInNamespaces.cs class DeclareTypesInNamespaces (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetTypeIdentifier (line 33) | protected override SyntaxToken GetTypeIdentifier(SyntaxNode declaration) method IsException (line 48) | protected override bool IsException(SyntaxNode node) => false; method IsInnerTypeOrWithinNamespace (line 50) | protected override bool IsInnerTypeOrWithinNamespace(SyntaxNode declar... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DoNotCheckZeroSizeCollection.cs class DoNotCheckZeroSizeCollection (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DoNotHardcodeCredentials.cs class DoNotHardcodeCredentials (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method InitializeActions (line 25) | protected override void InitializeActions(SonarParametrizedAnalysisCon... method IsSecureStringAppendCharFromConstant (line 55) | protected override bool IsSecureStringAppendCharFromConstant(SyntaxNod... class VariableDeclarationBannedWordsFinder (line 69) | private sealed class VariableDeclarationBannedWordsFinder : Credential... method VariableDeclarationBannedWordsFinder (line 71) | public VariableDeclarationBannedWordsFinder(DoNotHardcodeCredentials... method AssignedValue (line 73) | protected override string AssignedValue(VariableDeclaratorSyntax syn... method VariableName (line 76) | protected override string VariableName(VariableDeclaratorSyntax synt... method ShouldHandle (line 79) | protected override bool ShouldHandle(VariableDeclaratorSyntax syntax... class AssignmentExpressionBannedWordsFinder (line 86) | private sealed class AssignmentExpressionBannedWordsFinder : Credentia... method AssignmentExpressionBannedWordsFinder (line 88) | public AssignmentExpressionBannedWordsFinder(DoNotHardcodeCredential... method AssignedValue (line 90) | protected override string AssignedValue(AssignmentStatementSyntax sy... method VariableName (line 93) | protected override string VariableName(AssignmentStatementSyntax syn... method ShouldHandle (line 96) | protected override bool ShouldHandle(AssignmentStatementSyntax synta... class StringLiteralBannedWordsFinder (line 108) | private sealed class StringLiteralBannedWordsFinder : CredentialWordsF... method StringLiteralBannedWordsFinder (line 110) | public StringLiteralBannedWordsFinder(DoNotHardcodeCredentialsBase method RightHandSide (line 60) | protected override SyntaxNode RightHandSide(SyntaxNode node) => method IdentifierAndValue (line 71) | private static IdentifierValuePair IdentifierAndValue(ExpressionSyntax... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DoNotInstantiateSharedClasses.cs class DoNotInstantiateSharedClasses (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 27) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DoNotLockOnSharedResource.cs class DoNotLockOnSharedResource (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 27) | protected override void Initialize(SonarAnalysisContext context) method IsLockOnThis (line 44) | private static bool IsLockOnThis(ExpressionSyntax expression) => method IsLockOnStringLiteral (line 47) | private static bool IsLockOnStringLiteral(ExpressionSyntax expression) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DoNotLockWeakIdentityObjects.cs class DoNotLockWeakIdentityObjects (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DoNotNestTernaryOperators.cs class DoNotNestTernaryOperators (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 27) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DoNotOverwriteCollectionElements.cs class DoNotOverwriteCollectionElements (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 43) | protected override void Initialize(SonarAnalysisContext context) => method GetCollectionIdentifier (line 49) | protected override SyntaxNode GetCollectionIdentifier(StatementSyntax ... method GetIndexOrKey (line 57) | protected override SyntaxNode GetIndexOrKey(StatementSyntax statement) method IsIdentifierOrLiteral (line 65) | protected override bool IsIdentifierOrLiteral(SyntaxNode node) => method GetInvocation (line 69) | private static InvocationExpressionSyntax GetInvocation(StatementSynta... method GetInvokedMethodContainer (line 89) | private static SyntaxNode GetInvokedMethodContainer(InvocationExpressi... method GetFirstArgumentExpression (line 128) | private static ExpressionSyntax GetFirstArgumentExpression(InvocationE... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DoNotThrowFromDestructors.cs class DoNotThrowFromDestructors (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) method IsFinalizer (line 42) | private bool IsFinalizer(MethodBlockSyntax methodBlockSyntax) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DoNotUseByVal.cs class DoNotUseByVal (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) method IsByVal (line 44) | public static bool IsByVal(SyntaxToken modifier) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DoNotUseByValCodeFix.cs class DoNotUseByValCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.VisualBasic)] method RegisterCodeFixesAsync (line 28) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DoNotUseDateTimeNow.cs class DoNotUseDateTimeNow (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsInsideNameOf (line 25) | protected override bool IsInsideNameOf(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DoNotUseIIf.cs class DoNotUseIIf (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 33) | protected override void Initialize(SonarAnalysisContext context) => method IsIIf (line 46) | private static bool IsIIf(IMethodSymbol method) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/DoNotUseIIfCodeFix.cs class DoNotUseIIfCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.VisualBasic)] method RegisterCodeFixesAsync (line 29) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/EmptyMethod.cs class EmptyMethod (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method CheckMethod (line 31) | protected override void CheckMethod(SonarSyntaxNodeReportingContext co... method ContainsComments (line 42) | private static bool ContainsComments(IEnumerable trivias... method ShouldMethodBeExcluded (line 45) | private static bool ShouldMethodBeExcluded(SonarSyntaxNodeReportingCon... method IsDllImport (line 63) | private static bool IsDllImport(SemanticModel model, MethodStatementSy... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/EmptyNestedBlock.cs class EmptyNestedBlock (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method EmptyBlocks (line 57) | protected override IEnumerable EmptyBlocks(SyntaxNode node) method VisitDoLoopBlock (line 98) | private static IEnumerable VisitDoLoopBlock(DoLoopBlockSyn... method VisitForBlock (line 106) | private static IEnumerable VisitForBlock(ForBlockSyntax node) method VisitForEachBlock (line 114) | private static IEnumerable VisitForEachBlock(ForEachBlockS... method VisitMultiLineIfBlock (line 122) | private static IEnumerable VisitMultiLineIfBlock(MultiLine... method VisitSelectBlock (line 154) | private static IEnumerable VisitSelectBlock(SelectBlockSyn... method VisitTryBlock (line 162) | private static IEnumerable VisitTryBlock(TryBlockSyntax node) method VisitUsingBlock (line 188) | private static IEnumerable VisitUsingBlock(UsingBlockSynta... method VisitWhileBlock (line 196) | private static IEnumerable VisitWhileBlock(WhileBlockSynta... method VisitWithBlock (line 204) | private static IEnumerable VisitWithBlock(WithBlockSyntax ... method VerifyIfAndMostElseIfBlocks (line 212) | private static IEnumerable VerifyIfAndMostElseIfBlocks(Mul... method VerifyIfBlock (line 224) | private static IEnumerable VerifyIfBlock(MultiLineIfBlockS... method VerifyElseIfBlock (line 232) | private static IEnumerable VerifyElseIfBlock(ElseIfBlockSy... method VerifyElseBlock (line 240) | private static IEnumerable VerifyElseBlock(ElseBlockSyntax... method VerifyTryAndMostCatches (line 248) | private static IEnumerable VerifyTryAndMostCatches(TryBloc... method VerifyTryBlock (line 260) | private static IEnumerable VerifyTryBlock(TryBlockSyntax n... method VerifyCatchBlock (line 268) | private static IEnumerable VerifyCatchBlock(CatchBlockSynt... method VerifyFinallyBlock (line 276) | private static IEnumerable VerifyFinallyBlock(FinallyBlock... method NoCommentsOrConditionalCompilationBefore (line 284) | private static bool NoCommentsOrConditionalCompilationBefore(SyntaxNod... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/EncryptionAlgorithmsShouldBeSecure.cs class EncryptionAlgorithmsShouldBeSecure (line 22) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method EncryptionAlgorithmsShouldBeSecure (line 27) | public EncryptionAlgorithmsShouldBeSecure() : base(AnalyzerConfigurati... method IsInsideObjectInitializer (line 29) | protected override TrackerBase.Cond... method HasPkcs1PaddingArgument (line 32) | protected override TrackerBase.Conditio... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/EndStatementUsage.cs class EndStatementUsage (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/EnumNameHasEnumSuffix.cs class EnumNameHasEnumSuffix (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/EventNameContainsBeforeOrAfter.cs class EventNameContainsBeforeOrAfter (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 36) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ExceptionsShouldBePublic.cs class ExceptionsShouldBePublic (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ExcludeFromCodeCoverageAttributesNeedJustification.cs class ExcludeFromCodeCoverageAttributesNeedJustification (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetJustificationExpression (line 25) | protected override SyntaxNode GetJustificationExpression(SyntaxNode no... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ExitStatementUsage.cs class ExitStatementUsage (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ExpectedExceptionAttributeShouldNotBeUsed.cs class ExpectedExceptionAttributeShouldNotBeUsed (line 22) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method FindExpectedExceptionAttribute (line 27) | protected override SyntaxNode FindExpectedExceptionAttribute(SyntaxNod... method HasMultiLineBody (line 30) | protected override bool HasMultiLineBody(SyntaxNode node) => method AssertInCatchFinallyBlock (line 33) | protected override bool AssertInCatchFinallyBlock(SyntaxNode node) class CatchFinallyAssertion (line 46) | private sealed class CatchFinallyAssertion : SafeVisualBasicSyntaxWalker method VisitInvocationExpression (line 50) | public override void VisitInvocationExpression(InvocationExpressionS... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ExpressionComplexity.cs class ExpressionComplexity (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method ExpressionChildren (line 40) | protected override SyntaxNode[] ExpressionChildren(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ExtensionMethodShouldNotExtendObject.cs class ExtensionMethodShouldNotExtendObject (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsExtensionMethod (line 25) | protected override bool IsExtensionMethod(MethodStatementSyntax declar... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/FieldShadowsParentField.cs class FieldShadowsParentField (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/FieldShouldNotBePublic.cs class FieldShouldNotBePublic (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Variables (line 25) | protected override IEnumerable Variables(Fie... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/FileLines.cs class FileLines (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsEndOfFileToken (line 30) | protected override bool IsEndOfFileToken(SyntaxToken token) => token.I... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/FindInsteadOfFirstOrDefault.cs class FindInsteadOfFirstOrDefault (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/FlagsEnumWithoutInitializer.cs class FlagsEnumWithoutInitializer (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsInitialized (line 25) | protected override bool IsInitialized(EnumMemberDeclarationSyntax memb... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/FlagsEnumZeroMember.cs class FlagsEnumZeroMember (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/FunctionComplexity.cs class FunctionComplexity (line 22) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 30) | protected override void Initialize(SonarParametrizedAnalysisContext co... method GetComplexity (line 56) | protected override int GetComplexity(SyntaxNode node, SemanticModel se... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/FunctionNestingDepth.cs class FunctionNestingDepth (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 25) | protected override void Initialize(SonarParametrizedAnalysisContext co... class NestingDepthWalker (line 40) | private class NestingDepthWalker : SafeVisualBasicSyntaxWalker method NestingDepthWalker (line 44) | public NestingDepthWalker(int maximumNestingDepth, Action method VisitForEachBlock (line 53) | public override void VisitForEachBlock(ForEachBlockSyntax node) => method VisitWhileBlock (line 56) | public override void VisitWhileBlock(WhileBlockSyntax node) => method VisitDoLoopBlock (line 59) | public override void VisitDoLoopBlock(DoLoopBlockSyntax node) => method VisitSelectBlock (line 62) | public override void VisitSelectBlock(SelectBlockSyntax node) => method VisitTryBlock (line 65) | public override void VisitTryBlock(TryBlockSyntax node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/GenericInheritanceShouldNotBeRecursive.cs class GenericInheritanceShouldNotBeRecursive (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetKeyword (line 31) | protected override SyntaxToken GetKeyword(TypeBlockSyntax declaration) => method GetLocation (line 34) | protected override Location GetLocation(TypeBlockSyntax declaration) => method GetNamedTypeSymbol (line 37) | protected override INamedTypeSymbol GetNamedTypeSymbol(TypeBlockSyntax... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/GotoStatement.cs class GotoStatement (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Hotspots/CommandPath.cs class CommandPath (line 22) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method CommandPath (line 27) | public CommandPath() : this(AnalyzerConfiguration.Hotspot) { } method CommandPath (line 29) | internal /*for testing*/ CommandPath(IAnalyzerConfiguration configurat... method FirstArgument (line 31) | protected override string FirstArgument(InvocationContext context) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Hotspots/ConfiguringLoggers.cs class ConfiguringLoggers (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method ConfiguringLoggers (line 25) | public ConfiguringLoggers() : this(AnalyzerConfiguration.Hotspot) { } method ConfiguringLoggers (line 28) | internal ConfiguringLoggers(IAnalyzerConfiguration configuration) : ba... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Hotspots/CreatingHashAlgorithms.cs class CreatingHashAlgorithms (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method CreatingHashAlgorithms (line 25) | public CreatingHashAlgorithms() : this(AnalyzerConfiguration.Hotspot) { } method CreatingHashAlgorithms (line 27) | internal /*for testing*/ CreatingHashAlgorithms(IAnalyzerConfiguration... method IsUnsafeAlgorithm (line 29) | protected override bool IsUnsafeAlgorithm(SyntaxNode argumentNode, Sem... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Hotspots/DeliveringDebugFeaturesInProduction.cs class DeliveringDebugFeaturesInProduction (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method DeliveringDebugFeaturesInProduction (line 25) | public DeliveringDebugFeaturesInProduction() : this(AnalyzerConfigurat... method DeliveringDebugFeaturesInProduction (line 27) | internal /*for testing*/ DeliveringDebugFeaturesInProduction(IAnalyzer... method IsDevelopmentCheckInvoked (line 29) | protected override bool IsDevelopmentCheckInvoked(SyntaxNode node, Sem... method IsInDevelopmentContext (line 33) | protected override bool IsInDevelopmentContext(SyntaxNode node) => method IsDevelopmentCheck (line 38) | private bool IsDevelopmentCheck(SyntaxNode node, SemanticModel semanti... method FindCondition (line 42) | private static ExpressionSyntax FindCondition(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Hotspots/DisablingRequestValidation.cs class DisablingRequestValidation (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method DisablingRequestValidation (line 25) | public DisablingRequestValidation() : this(AnalyzerConfiguration.Hotsp... method DisablingRequestValidation (line 27) | public DisablingRequestValidation(IAnalyzerConfiguration analyzerConfi... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Hotspots/ExecutingSqlQueries.cs class ExecutingSqlQueries (line 22) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method ExecutingSqlQueries (line 27) | public ExecutingSqlQueries() : this(AnalyzerConfiguration.Hotspot) { } method ExecutingSqlQueries (line 29) | internal /*for testing*/ ExecutingSqlQueries(IAnalyzerConfiguration co... method GetArgumentAtIndex (line 31) | protected override ExpressionSyntax GetArgumentAtIndex(InvocationConte... method GetArgumentAtIndex (line 36) | protected override ExpressionSyntax GetArgumentAtIndex(ObjectCreationC... method GetSetValue (line 41) | protected override ExpressionSyntax GetSetValue(PropertyAccessContext ... method IsTracked (line 46) | protected override bool IsTracked(ExpressionSyntax expression, SyntaxB... method IsSensitiveExpression (line 49) | protected override bool IsSensitiveExpression(ExpressionSyntax express... method SecondaryLocationForExpression (line 54) | protected override Location SecondaryLocationForExpression(ExpressionS... method IsInvocationOfInterest (line 87) | private static bool IsInvocationOfInterest(InvocationExpressionSyntax ... method IsConcatenation (line 91) | private static bool IsConcatenation(ExpressionSyntax expression, Seman... method AllConstants (line 96) | private static bool AllConstants(List arguments, Seman... method IsConcatenationOperator (line 99) | private static bool IsConcatenationOperator(SyntaxNode node) => method IsConcatenationOfConstants (line 103) | private static bool IsConcatenationOfConstants(BinaryExpressionSyntax ... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Hotspots/ExpandingArchives.cs class ExpandingArchives (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method ExpandingArchives (line 25) | public ExpandingArchives() : this(AnalyzerConfiguration.Hotspot) { } method ExpandingArchives (line 27) | internal /*for testing*/ ExpandingArchives(IAnalyzerConfiguration conf... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Hotspots/HardcodedIpAddress.cs class HardcodedIpAddress (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method HardcodedIpAddress (line 25) | public HardcodedIpAddress() : this(AnalyzerConfiguration.Hotspot) { } method HardcodedIpAddress (line 27) | public HardcodedIpAddress(IAnalyzerConfiguration analyzerConfiguration... method HasAttributes (line 29) | protected override bool HasAttributes(SyntaxNode literalExpression) => method GetAssignedVariableName (line 32) | protected override string GetAssignedVariableName(SyntaxNode stringLit... method IsVariableIdentifier (line 35) | private static bool IsVariableIdentifier(SyntaxNode syntaxNode) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Hotspots/PubliclyWritableDirectories.cs class PubliclyWritableDirectories (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method PubliclyWritableDirectories (line 25) | public PubliclyWritableDirectories() : this(AnalyzerConfiguration.Hots... method PubliclyWritableDirectories (line 27) | internal PubliclyWritableDirectories(IAnalyzerConfiguration configurat... method IsGetTempPathAssignment (line 29) | private protected override bool IsGetTempPathAssignment(InvocationExpr... method IsInsecureEnvironmentVariableRetrieval (line 33) | private protected override bool IsInsecureEnvironmentVariableRetrieval... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Hotspots/RequestsWithExcessiveLength.cs class RequestsWithExcessiveLength (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method RequestsWithExcessiveLength (line 25) | public RequestsWithExcessiveLength() : this(SonarAnalyzer.Core.Common.... method RequestsWithExcessiveLength (line 27) | public RequestsWithExcessiveLength(IAnalyzerConfiguration analyzerConf... method IsInvalidRequestFormLimits (line 29) | protected override AttributeSyntax IsInvalidRequestFormLimits(Attribut... method IsInvalidRequestSizeLimit (line 39) | protected override AttributeSyntax IsInvalidRequestSizeLimit(Attribute... method GetMethodLocalFunctionOrClassDeclaration (line 49) | protected override SyntaxNode GetMethodLocalFunctionOrClassDeclaration... method AttributeName (line 52) | protected override string AttributeName(AttributeSyntax attribute) => method IsMultipartBodyLengthLimit (line 55) | private bool IsMultipartBodyLengthLimit(ArgumentSyntax argument) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Hotspots/SpecifyTimeoutOnRegex.cs class SpecifyTimeoutOnRegex (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method SpecifyTimeoutOnRegex (line 25) | public SpecifyTimeoutOnRegex() : this(AnalyzerConfiguration.Hotspot) { } method SpecifyTimeoutOnRegex (line 27) | internal /*for testing*/ SpecifyTimeoutOnRegex(IAnalyzerConfiguration ... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Hotspots/UsingNonstandardCryptography.cs class UsingNonstandardCryptography (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method UsingNonstandardCryptography (line 27) | public UsingNonstandardCryptography() : this(AnalyzerConfiguration.Hot... method UsingNonstandardCryptography (line 29) | public UsingNonstandardCryptography(IAnalyzerConfiguration analyzerCon... method DeclaredSymbol (line 31) | protected override INamedTypeSymbol DeclaredSymbol(TypeBlockSyntax typ... method Location (line 34) | protected override Location Location(TypeBlockSyntax typeDeclarationSy... method DerivesOrImplementsAny (line 42) | protected override bool DerivesOrImplementsAny(TypeBlockSyntax typeDec... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/IfChainWithoutElse.cs class IfChainWithoutElse (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsElseIfWithoutElse (line 27) | protected override bool IsElseIfWithoutElse(MultiLineIfBlockSyntax ifS... method IssueLocation (line 31) | protected override Location IssueLocation(SonarSyntaxNodeReportingCont... method IsEmptyBlock (line 34) | private static bool IsEmptyBlock(MultiLineIfBlockSyntax multiLineIfBlo... method IsCommentOrDisabledText (line 39) | private static bool IsCommentOrDisabledText(SyntaxTrivia trivia) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/IfCollapsible.cs class IfCollapsible (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 27) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ImplementSerializationMethodsCorrectly.cs class ImplementSerializationMethodsCorrectly (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetIdentifierLocation (line 30) | protected override Location GetIdentifierLocation(IMethodSymbol method... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/IndexOfCheckAgainstZero.cs class IndexOfCheckAgainstZero (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Left (line 27) | protected override SyntaxNode Left(BinaryExpressionSyntax binaryExpres... method OperatorToken (line 30) | protected override SyntaxToken OperatorToken(BinaryExpressionSyntax bi... method Right (line 33) | protected override SyntaxNode Right(BinaryExpressionSyntax binaryExpre... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/IndexedPropertyWithMultipleParameters.cs class IndexedPropertyWithMultipleParameters (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/InsecureEncryptionAlgorithm.cs class InsecureEncryptionAlgorithm (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Location (line 27) | protected override Location Location(SyntaxNode objectCreation) => method ArgumentList (line 30) | protected override ArgumentListSyntax ArgumentList(InvocationExpressio... method Arguments (line 33) | protected override SeparatedSyntaxList Arguments(Argum... method IsStringLiteralArgument (line 36) | protected override bool IsStringLiteralArgument(ArgumentSyntax argumen... method Expression (line 39) | protected override SyntaxNode Expression(ArgumentSyntax argument) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/InsecureTemporaryFilesCreation.cs class InsecureTemporaryFilesCreation (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/InsteadOfAny.cs class InsteadOfAny (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsSimpleEqualityCheck (line 25) | protected override bool IsSimpleEqualityCheck(InvocationExpressionSynt... method HasValidBinaryOperands (line 38) | private bool HasValidBinaryOperands(string lambdaVariableName, SyntaxN... method IsNullOrValueTypeOrString (line 42) | private static bool IsNullOrValueTypeOrString(SyntaxNode node, Semanti... method AreValidOperands (line 45) | protected override bool AreValidOperands(string lambdaVariable, Syntax... method GetArgumentExpression (line 54) | protected override SyntaxNode GetArgumentExpression(InvocationExpressi... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/InvalidCastToInterface.cs class InvalidCastToInterface (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/JwtSigned.cs class JwtSigned (line 23) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method JwtSigned (line 28) | public JwtSigned() : base(AnalyzerConfiguration.AlwaysEnabled) { } method CreateBuilderPatternCondition (line 30) | protected override BuilderPatternCondition method IsNTAccountWithEveryone (line 67) | private static bool IsNTAccountWithEveryone(ObjectCreationExpressionSy... method IsSecurityIdentifierWithEveryone (line 72) | private static bool IsSecurityIdentifierWithEveryone(ObjectCreationExp... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/MarkAssemblyWithAssemblyVersionAttribute.cs class MarkAssemblyWithAssemblyVersionAttribute (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/MarkAssemblyWithClsCompliantAttribute.cs class MarkAssemblyWithClsCompliantAttribute (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/MarkAssemblyWithComVisibleAttribute.cs class MarkAssemblyWithComVisibleAttribute (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/MarkWindowsFormsMainWithStaThread.cs class MarkWindowsFormsMainWithStaThread (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetLocation (line 30) | protected override Location GetLocation(MethodBlockSyntax method) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/MethodOverloadsShouldBeGrouped.cs class MethodOverloadsShouldBeGrouped (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method CreateMemberInfo (line 32) | protected override MemberInfo CreateMemberInfo(SonarSyntaxNodeReportin... method MemberDeclarations (line 55) | protected override IEnumerable MemberDeclarations(Syn... method IsStaticStatement (line 58) | private static bool IsStaticStatement(MethodBaseSyntax statement) => method IsAbstractStatement (line 61) | private static bool IsAbstractStatement(MethodBaseSyntax statement) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/MethodParameterUnused.cs class MethodParameterUnused (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) => method HasAnyParameter (line 71) | private static bool HasAnyParameter(MethodBlockBaseSyntax method) => method IsEmptyMethod (line 75) | private static bool IsEmptyMethod(MethodBlockBaseSyntax method) => method IsVirtualOrOverride (line 78) | private static bool IsVirtualOrOverride(MethodBlockBaseSyntax method) => method IsInterfaceImplementation (line 81) | private static bool IsInterfaceImplementation(MethodBlockSyntax method... method IsWithEventsHandler (line 84) | private static bool IsWithEventsHandler(MethodBlockSyntax method) => method HasAnyAttribute (line 87) | private static bool HasAnyAttribute(MethodBlockBaseSyntax method) => method OnlyThrowsNotImplementedException (line 90) | private static bool OnlyThrowsNotImplementedException(MethodBlockBaseS... method GetUnusedParameters (line 100) | private static List GetUnusedParameters(MethodBlockBa... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/MethodsShouldNotHaveIdenticalImplementations.cs class MethodsShouldNotHaveIdenticalImplementations (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetMethodDeclarations (line 27) | protected override IEnumerable GetMethodDeclaration... method AreDuplicates (line 30) | protected override bool AreDuplicates(SemanticModel model, MethodBlock... method GetMethodIdentifier (line 38) | protected override SyntaxToken GetMethodIdentifier(MethodBlockSyntax m... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/MethodsShouldNotHaveTooManyLines.cs class MethodsShouldNotHaveTooManyLines (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetMethodTokens (line 41) | protected override IEnumerable GetMethodTokens(MethodBloc... method GetMethodIdentifierToken (line 44) | protected override SyntaxToken? GetMethodIdentifierToken(MethodBlockBa... method GetMethodKindAndName (line 47) | protected override string GetMethodKindAndName(SyntaxToken identifierT... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/MultipleVariableDeclaration.cs class MultipleVariableDeclaration (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/MultipleVariableDeclarationCodeFix.cs class MultipleVariableDeclarationCodeFix (line 22) | [ExportCodeFixProvider(LanguageNames.VisualBasic)] method CalculateNewRoot (line 25) | protected override SyntaxNode CalculateNewRoot(SyntaxNode root, Syntax... method CreateNewNodes (line 30) | private static IEnumerable CreateNewNodes(VariableDeclarat... method CreateNewNodes (line 38) | private static IEnumerable CreateNewNodes(FieldDeclaration... method CreateNewNodes (line 41) | private static IEnumerable CreateNewNodes(LocalDeclaration... method CreateFieldDeclarationSyntax (line 44) | private static FieldDeclarationSyntax CreateFieldDeclarationSyntax(Fie... method CreateLocalDeclarationStatementSyntax (line 47) | private static LocalDeclarationStatementSyntax CreateLocalDeclarationS... method GetConvertedDeclarators (line 50) | private static IEnumerable GetConvertedDecla... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/NameOfShouldBeUsed.cs class NameOfShouldBeUsed (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method MethodSyntax (line 32) | protected override MethodBlockBaseSyntax MethodSyntax(SyntaxNode node) => method IsStringLiteral (line 35) | protected override bool IsStringLiteral(SyntaxToken t) => method GetParameterNames (line 38) | protected override IEnumerable GetParameterNames(MethodBlockBa... method LeastLanguageVersionMatches (line 46) | protected override bool LeastLanguageVersionMatches(SonarSyntaxNodeRep... method IsArgumentExceptionCallingNameOf (line 49) | protected override bool IsArgumentExceptionCallingNameOf(SyntaxNode no... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/ClassName.cs class ClassName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 33) | protected override void Initialize(SonarParametrizedAnalysisContext co... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/EnumNameShouldFollowRegex.cs class EnumNameShouldFollowRegex (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/EnumerationValueName.cs class EnumerationValueName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 33) | protected override void Initialize(SonarParametrizedAnalysisContext co... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/EventHandlerName.cs class EventHandlerName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsEventHandler (line 34) | internal static bool IsEventHandler(MethodStatementSyntax declaration,... method Initialize (line 45) | protected override void Initialize(SonarParametrizedAnalysisContext co... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/EventName.cs class EventName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 33) | protected override void Initialize(SonarParametrizedAnalysisContext co... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/FieldNameChecker.cs class FieldNameChecker (line 20) | public abstract class FieldNameChecker : ParametrizedDiagnosticAnalyzer method IsCandidateSymbol (line 24) | protected abstract bool IsCandidateSymbol(IFieldSymbol symbol); method Initialize (line 26) | protected sealed override void Initialize(SonarParametrizedAnalysisCon... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/FunctionName.cs class FunctionName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 33) | protected override void Initialize(SonarParametrizedAnalysisContext co... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/InterfaceName.cs class InterfaceName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 34) | protected override void Initialize(SonarParametrizedAnalysisContext co... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/LocalVariableName.cs class LocalVariableName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 33) | protected override void Initialize(SonarParametrizedAnalysisContext co... method ProcessLoop (line 40) | private void ProcessLoop(SonarSyntaxNodeReportingContext context, T... method ProcessVariableDeclarator (line 51) | private void ProcessVariableDeclarator(SonarSyntaxNodeReportingContext... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/NamespaceName.cs class NamespaceName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 34) | protected override void Initialize(SonarParametrizedAnalysisContext co... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/ParameterName.cs class ParameterName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 33) | protected override void Initialize(SonarParametrizedAnalysisContext co... method HasPredefinedName (line 46) | private static bool HasPredefinedName(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/PrivateConstantFieldName.cs class PrivateConstantFieldName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsCandidateSymbol (line 33) | protected override bool IsCandidateSymbol(IFieldSymbol symbol) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/PrivateFieldName.cs class PrivateFieldName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsCandidateSymbol (line 33) | protected override bool IsCandidateSymbol(IFieldSymbol symbol) => symb... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/PrivateSharedReadonlyFieldName.cs class PrivateSharedReadonlyFieldName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsCandidateSymbol (line 33) | protected override bool IsCandidateSymbol(IFieldSymbol symbol) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/PropertyName.cs class PropertyName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 33) | protected override void Initialize(SonarParametrizedAnalysisContext co... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/PublicConstantFieldName.cs class PublicConstantFieldName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsCandidateSymbol (line 33) | protected override bool IsCandidateSymbol(IFieldSymbol symbol) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/PublicFieldName.cs class PublicFieldName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsCandidateSymbol (line 33) | protected override bool IsCandidateSymbol(IFieldSymbol symbol) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/PublicSharedReadonlyFieldName.cs class PublicSharedReadonlyFieldName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsCandidateSymbol (line 33) | protected override bool IsCandidateSymbol(IFieldSymbol symbol) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Naming/TypeParameterName.cs class TypeParameterName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 39) | protected override void Initialize(SonarParametrizedAnalysisContext co... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/NegatedIsExpression.cs class NegatedIsExpression (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/NegatedIsExpressionCodeFix.cs class NegatedIsExpressionCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.VisualBasic)] method RegisterCodeFixesAsync (line 27) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method ChangeToIsNotAsync (line 47) | private static async Task ChangeToIsNotAsync(Document docume... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/NoExceptionsInFinally.cs class NoExceptionsInFinally (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => class ThrowInFinallyWalker (line 35) | private class ThrowInFinallyWalker : SafeVisualBasicSyntaxWalker method ThrowInFinallyWalker (line 40) | public ThrowInFinallyWalker(SonarSyntaxNodeReportingContext context,... method VisitThrowStatement (line 46) | public override void VisitThrowStatement(ThrowStatementSyntax node) => method VisitFinallyBlock (line 49) | public override void VisitFinallyBlock(FinallyBlockSyntax node) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/NonAsyncTaskShouldNotReturnNull.cs class NonAsyncTaskShouldNotReturnNull (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method IsParentReturnOrReturnTernary (line 53) | private static bool IsParentReturnOrReturnTernary(SyntaxNode node) method GetEnclosingMember (line 73) | private static SyntaxNode GetEnclosingMember(LiteralExpressionSyntax l... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ObsoleteAttributes.cs class ObsoleteAttributes (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetExplanationExpression (line 25) | protected override SyntaxNode GetExplanationExpression(SyntaxNode node... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/OnErrorStatement.cs class OnErrorStatement (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/OptionExplicitOn.cs class OptionExplicitOn (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/OptionStrictOn.cs class OptionStrictOn (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/OptionalParameter.cs class OptionalParameter (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetReportLocation (line 33) | protected override Location GetReportLocation(ParameterSyntax paramete... method GetParameters (line 36) | protected override IEnumerable GetParameters(MethodBa... method IsOptional (line 39) | protected override bool IsOptional(ParameterSyntax parameter) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/OptionalParameterNotPassedToBaseCall.cs class OptionalParameterNotPassedToBaseCall (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetArgumentCount (line 29) | protected override int GetArgumentCount(InvocationExpressionSyntax inv... method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ParameterAssignedTo.cs class ParameterAssignedTo (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsAssignmentToCatchVariable (line 25) | protected override bool IsAssignmentToCatchVariable(ISymbol symbol, Sy... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ParameterNameMatchesOriginal.cs class ParameterNameMatchesOriginal (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method ParameterIdentifiers (line 26) | protected override IEnumerable ParameterIdentifiers(Metho... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ParametersCorrectOrder.cs class ParametersCorrectOrder (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method PrimaryLocation (line 31) | protected override Location PrimaryLocation(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/PartCreationPolicyShouldBeUsedWithExportAttribute.cs class PartCreationPolicyShouldBeUsedWithExportAttribute (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetTypeDeclaration (line 29) | protected override ClassStatementSyntax GetTypeDeclaration(AttributeSy... method Initialize (line 32) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/PreferGuidEmpty.cs class PreferGuidEmpty (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/PropertiesAccessCorrectField.cs class PropertiesAccessCorrectField (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method FindFieldAssignments (line 25) | protected override IEnumerable FindFieldAssignments(IProper... method FindFieldReads (line 69) | protected override IEnumerable FindFieldReads(IPropertySymb... method ShouldIgnoreAccessor (line 104) | protected override bool ShouldIgnoreAccessor(IMethodSymbol accessorMet... method ImplementsExplicitGetterOrSetter (line 118) | protected override bool ImplementsExplicitGetterOrSetter(IPropertySymb... method SingleReturn (line 122) | private static ExpressionSyntax SingleReturn(StatementSyntax body) method SingleInvocation (line 128) | private static ExpressionSyntax SingleInvocation(StatementSyntax body) method ExtractFieldFromRefArgument (line 142) | private static FieldData? ExtractFieldFromRefArgument(ArgumentSyntax a... method ExtractFieldFromExpression (line 158) | private static FieldData? ExtractFieldFromExpression(AccessorKind acce... method IsLeftSideOfAssignment (line 203) | private static bool IsLeftSideOfAssignment(ExpressionSyntax expression) method HasExplicitAccessor (line 210) | private static bool HasExplicitAccessor(ISymbol symbol) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/PropertyGetterWithThrow.cs class PropertyGetterWithThrow (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsGetter (line 30) | protected override bool IsGetter(AccessorBlockSyntax propertyGetter) => method IsIndexer (line 33) | protected override bool IsIndexer(AccessorBlockSyntax propertyGetter) method GetThrowExpression (line 44) | protected override SyntaxNode GetThrowExpression(SyntaxNode syntaxNode... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/PropertyWithArrayType.cs class PropertyWithArrayType (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/PropertyWriteOnly.cs class PropertyWriteOnly (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsWriteOnlyProperty (line 26) | protected override bool IsWriteOnlyProperty(PropertyStatementSyntax pr... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ProvideDeserializationMethodsForOptionalFields.cs class ProvideDeserializationMethodsForOptionalFields (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetNamedTypeIdentifierLocation (line 25) | protected override Location GetNamedTypeIdentifierLocation(SyntaxNode ... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/PublicConstantField.cs class PublicConstantField (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetReportLocation (line 31) | protected override Location GetReportLocation(ModifiedIdentifierSyntax... method GetVariables (line 34) | protected override IEnumerable GetVariables(... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/PublicMethodWithMultidimensionalArray.cs class PublicMethodWithMultidimensionalArray (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetIssueLocation (line 28) | protected override Location GetIssueLocation(SyntaxNode node) => method GetType (line 33) | protected override string GetType(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/PureAttributeOnVoidMethod.cs class PureAttributeOnVoidMethod (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/RedundantExitSelect.cs class RedundantExitSelect (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/RedundantNullCheck.cs class RedundantNullCheck (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) method GetLeftNode (line 43) | protected override SyntaxNode GetLeftNode(BinaryExpressionSyntax binar... method GetRightNode (line 45) | protected override SyntaxNode GetRightNode(BinaryExpressionSyntax bina... method GetNullCheckVariable (line 47) | protected override SyntaxNode GetNullCheckVariable(SyntaxNode node) method GetNonNullCheckVariable (line 58) | protected override SyntaxNode GetNonNullCheckVariable(SyntaxNode node) method GetIsOperatorCheckVariable (line 74) | protected override SyntaxNode GetIsOperatorCheckVariable(SyntaxNode node) method GetInvertedIsOperatorCheckVariable (line 83) | protected override SyntaxNode GetInvertedIsOperatorCheckVariable(Synta... method AreEquivalent (line 97) | protected override bool AreEquivalent(SyntaxNode node1, SyntaxNode nod... method RemoveParentheses (line 99) | private SyntaxNode RemoveParentheses(SyntaxNode syntaxNode) => syntaxN... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/RedundantParentheses.cs class RedundantParentheses (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetExpression (line 30) | protected override SyntaxNode GetExpression(ParenthesizedExpressionSyn... method GetOpenParenToken (line 32) | protected override SyntaxToken GetOpenParenToken(ParenthesizedExpressi... method GetCloseParenToken (line 34) | protected override SyntaxToken GetCloseParenToken(ParenthesizedExpress... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/RegularExpressions/RegexMustHaveValidSyntax.cs class RegexMustHaveValidSyntax (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ReversedOperators.cs class ReversedOperators (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 27) | protected override void Initialize(SonarAnalysisContext context) => method GetOperatorToken (line 34) | protected override SyntaxToken GetOperatorToken(UnaryExpressionSyntax ... method IsEqualsToken (line 36) | protected override bool IsEqualsToken(SyntaxToken token) => token.IsKi... method IsMinusToken (line 38) | protected override bool IsMinusToken(SyntaxToken token) => token.IsKin... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/SecurityPInvokeMethodShouldNotBeCalled.cs class SecurityPInvokeMethodShouldNotBeCalled (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsImportFromInteropDll (line 25) | protected override bool IsImportFromInteropDll(IMethodSymbol symbol, S... method GetMethodName (line 30) | protected override string GetMethodName(ISymbol symbol, SemanticModel ... method MethodSymbolForInvalidInvocation (line 36) | protected override IMethodSymbol MethodSymbolForInvalidInvocation(Synt... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/SelfAssignment.cs class SelfAssignment (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/SetPropertiesInsteadOfMethods.cs class SetPropertiesInsteadOfMethods (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method HasCorrectArgumentCount (line 25) | protected override bool HasCorrectArgumentCount(InvocationExpressionSy... method TryGetOperands (line 29) | protected override bool TryGetOperands(InvocationExpressionSyntax invo... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ShiftDynamicNotInteger.cs class ShiftDynamicNotInteger (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method ShouldRaise (line 25) | protected override bool ShouldRaise(SemanticModel model, SyntaxNode le... method CanBeConvertedTo (line 28) | protected override bool CanBeConvertedTo(SyntaxNode expression, ITypeS... method IsObject (line 32) | private static bool IsObject(SyntaxNode expression, SemanticModel mode... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ShouldImplementExportedInterfaces.cs class ShouldImplementExportedInterfaces (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetAttributeArguments (line 25) | protected override SeparatedSyntaxList? GetAttributeAr... method GetAttributeName (line 28) | protected override SyntaxNode GetAttributeName(AttributeSyntax attribu... method IsClassOrRecordSyntax (line 31) | protected override bool IsClassOrRecordSyntax(SyntaxNode syntaxNode) => method GetTypeOfOrGetTypeExpression (line 34) | protected override SyntaxNode GetTypeOfOrGetTypeExpression(SyntaxNode ... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/SimpleDoLoop.cs class SimpleDoLoop (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/SingleStatementPerLine.cs class SingleStatementPerLine (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method StatementShouldBeExcluded (line 27) | protected override bool StatementShouldBeExcluded(StatementSyntax stat... method StatementIsSingleInLambda (line 30) | private static bool StatementIsSingleInLambda(StatementSyntax st) => method StatementIsBlock (line 35) | private static bool StatementIsBlock(StatementSyntax st) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/StringConcatenationInLoop.cs class StringConcatenationInLoop (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method LeftMostExpression (line 45) | protected override SyntaxNode LeftMostExpression(SyntaxNode expression... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/StringConcatenationWithPlus.cs class StringConcatenationWithPlus (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/StringConcatenationWithPlusCodeFix.cs class StringConcatenationWithPlusCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.VisualBasic)] method RegisterCodeFixesAsync (line 27) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... method CalculateNewRoot (line 47) | private static SyntaxNode CalculateNewRoot(SyntaxNode root, BinaryExpr... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/StringLiteralShouldNotBeDuplicated.cs class StringLiteralShouldNotBeDuplicated (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsMatchingMethodParameterName (line 31) | protected override bool IsMatchingMethodParameterName(LiteralExpressio... method IsInnerInstance (line 38) | protected override bool IsInnerInstance(SonarSyntaxNodeReportingContex... method FindLiteralExpressions (line 41) | protected override IEnumerable FindLiteralExp... method LiteralToken (line 46) | protected override SyntaxToken LiteralToken(LiteralExpressionSyntax li... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/SwitchCasesMinimumThree.cs class SwitchCasesMinimumThree (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 28) | protected override void Initialize(SonarAnalysisContext context) method HasAtLeastThreeLabels (line 42) | private static bool HasAtLeastThreeLabels(SelectBlockSyntax node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/SwitchSectionShouldNotHaveTooManyStatements.cs class SwitchSectionShouldNotHaveTooManyStatements (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 28) | protected override void Initialize(SonarParametrizedAnalysisContext co... method GetInnerStatements (line 51) | private IEnumerable GetInnerStatements(StatementSynta... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/SwitchShouldNotBeNested.cs class SwitchShouldNotBeNested (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 29) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/SwitchWithoutDefault.cs class SwitchWithoutDefault (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method TryGetDiagnostic (line 31) | protected override bool TryGetDiagnostic(SyntaxNode node, out Diagnost... method HasDefaultLabel (line 44) | private static bool HasDefaultLabel(SelectBlockSyntax node) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/TabCharacter.cs class TabCharacter (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/TestsShouldNotUseThreadSleep.cs class TestsShouldNotUseThreadSleep (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method MethodDeclaration (line 25) | protected override SyntaxNode MethodDeclaration(MethodBlockSyntax meth... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ThreadResumeOrSuspendShouldNotBeCalled.cs class ThreadResumeOrSuspendShouldNotBeCalled (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ThrowReservedExceptions.cs class ThrowReservedExceptions (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ToStringShouldNotReturnNull.cs class ToStringShouldNotReturnNull (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Conditionals (line 27) | protected override IEnumerable Conditionals(SyntaxNode exp... method IsLocalOrLambda (line 32) | protected override bool IsLocalOrLambda(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/TooManyLabelsInSwitch.cs class TooManyLabelsInSwitch (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetExpression (line 64) | protected override SyntaxNode GetExpression(SelectStatementSyntax stat... method GetSectionsCount (line 67) | protected override int GetSectionsCount(SelectStatementSyntax statemen... method AllSectionsAreOneLiners (line 70) | protected override bool AllSectionsAreOneLiners(SelectStatementSyntax ... method GetKeywordLocation (line 73) | protected override Location GetKeywordLocation(SelectStatementSyntax s... method HasOneLine (line 76) | private static bool HasOneLine(CaseBlockSyntax switchSection) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/TooManyParameters.cs class TooManyParameters (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method UserFriendlyNameForNode (line 45) | protected override string UserFriendlyNameForNode(SyntaxNode node) => method CountParameters (line 48) | protected override int CountParameters(ParameterListSyntax parameterLi... method CanBeChanged (line 51) | protected override bool CanBeChanged(SyntaxNode node, SemanticModel se... method BaseParameterCount (line 55) | protected override int BaseParameterCount(SyntaxNode node) => method MyBaseNewParameterCount (line 61) | private static int MyBaseNewParameterCount(StatementSyntax statement) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UnaryPrefixOperatorRepeated.cs class UnaryPrefixOperatorRepeated (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetOperand (line 35) | protected override SyntaxNode GetOperand(UnaryExpressionSyntax unarySy... method GetOperatorToken (line 38) | protected override SyntaxToken GetOperatorToken(UnaryExpressionSyntax ... method SameOperators (line 41) | protected override bool SameOperators(UnaryExpressionSyntax expression... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UnconditionalJumpStatement.cs class UnconditionalJumpStatement (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetWalker (line 35) | protected override LoopWalkerBase GetWalk... class LoopWalker (line 38) | private class LoopWalker : LoopWalkerBase method LoopWalker (line 71) | public LoopWalker(SonarSyntaxNodeReportingContext context, ISet method TryGetTryAncestorStatements (line 82) | protected override bool TryGetTryAncestorStatements(StatementSyntax ... class VbLoopwalker (line 96) | private class VbLoopwalker : SafeVisualBasicSyntaxWalker method VbLoopwalker (line 100) | public VbLoopwalker(LoopWalker loopWalker) method VisitContinueStatement (line 105) | public override void VisitContinueStatement(ContinueStatementSynta... method VisitExitStatement (line 111) | public override void VisitExitStatement(ExitStatementSyntax node) method VisitReturnStatement (line 117) | public override void VisitReturnStatement(ReturnStatementSyntax node) method VisitThrowStatement (line 123) | public override void VisitThrowStatement(ThrowStatementSyntax node) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UnnecessaryBitwiseOperation.cs class UnnecessaryBitwiseOperation (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 25) | protected override void Initialize(SonarAnalysisContext context) method CheckBinary (line 37) | private void CheckBinary(SonarSyntaxNodeReportingContext context, int ... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UnnecessaryBitwiseOperationCodeFix.cs class UnnecessaryBitwiseOperationCodeFix (line 23) | [ExportCodeFixProvider(LanguageNames.VisualBasic)] method CreateNewRoot (line 26) | protected override Func CreateNewRoot(SyntaxNode root, Tex... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UnsignedTypesUsage.cs class UnsignedTypesUsage (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UnusedStringBuilder.cs class UnusedStringBuilder (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Scope (line 27) | protected override SyntaxNode Scope(VariableDeclaratorSyntax declarato... method RetrieveStringBuilderObject (line 32) | protected override ILocalSymbol RetrieveStringBuilderObject(SemanticMo... method StringBuilderReadExpression (line 43) | protected override SyntaxNode StringBuilderReadExpression(SemanticMode... method DescendIntoChildren (line 57) | protected override bool DescendIntoChildren(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UriShouldNotBeHardcoded.cs class UriShouldNotBeHardcoded (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetRelevantAncestor (line 28) | protected override SyntaxNode GetRelevantAncestor(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UseCharOverloadOfStringMethods.cs class UseCharOverloadOfStringMethods (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method HasCorrectArguments (line 25) | protected override bool HasCorrectArguments(InvocationExpressionSyntax... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UseDateTimeOffsetInsteadOfDateTime.cs class UseDateTimeOffsetInsteadOfDateTime (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UseFindSystemTimeZoneById.cs class UseFindSystemTimeZoneById (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UseIFormatProviderForParsingDateAndTime.cs class UseIFormatProviderForParsingDateAndTime (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UseIndexingInsteadOfLinqMethods.cs class UseIndexingInsteadOfLinqMethods (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetArgumentCount (line 25) | protected override int GetArgumentCount(InvocationExpressionSyntax inv... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UseLambdaParameterInConcurrentDictionary.cs class UseLambdaParameterInConcurrentDictionary (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetArguments (line 25) | protected override SeparatedSyntaxList GetArguments(In... method IsLambdaAndContainsIdentifier (line 28) | protected override bool IsLambdaAndContainsIdentifier(ArgumentSyntax a... method TryGetKeyName (line 32) | protected override bool TryGetKeyName(ArgumentSyntax argument, out str... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UseReturnStatement.cs class UseReturnStatement (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 31) | protected override void Initialize(SonarAnalysisContext context) => class IdentifierWalker (line 39) | private class IdentifierWalker : SafeVisualBasicSyntaxWalker method IdentifierWalker (line 44) | public IdentifierWalker(SonarSyntaxNodeReportingContext context, str... method VisitIdentifierName (line 50) | public override void VisitIdentifierName(IdentifierNameSyntax node) method VisitImplementsClause (line 58) | public override void VisitImplementsClause(ImplementsClauseSyntax no... method VisitAttributeList (line 60) | public override void VisitAttributeList(AttributeListSyntax node) { ... method IsImplicitReturnValue (line 62) | private bool IsImplicitReturnValue(IdentifierNameSyntax node) => method IsExcluded (line 66) | private static bool IsExcluded(SyntaxNode node) => method IsAssignmentStatement (line 82) | private static bool IsAssignmentStatement(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UseShortCircuitingOperator.cs class UseShortCircuitingOperator (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetSuggestedOpName (line 25) | protected override string GetSuggestedOpName(BinaryExpressionSyntax no... method GetCurrentOpName (line 28) | protected override string GetCurrentOpName(BinaryExpressionSyntax node... method GetOperator (line 31) | protected override SyntaxToken GetOperator(BinaryExpressionSyntax expr... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UseShortCircuitingOperatorCodeFix.cs class UseShortCircuitingOperatorCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.VisualBasic)] method IsCandidateExpression (line 23) | internal override bool IsCandidateExpression(BinaryExpressionSyntax ex... method GetShortCircuitingExpressionNode (line 28) | protected override BinaryExpressionSyntax GetShortCircuitingExpression... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UseTestableTimeProvider.cs class UseTestableTimeProvider (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Ignore (line 25) | protected override bool Ignore(SyntaxNode ancestor, SemanticModel sema... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UseTrueForAll.cs class UseTrueForAll (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UseUnixEpoch.cs class UseUnixEpoch (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsDateTimeKindUtc (line 25) | protected override bool IsDateTimeKindUtc(MemberAccessExpressionSyntax... method IsGregorianCalendar (line 28) | protected override bool IsGregorianCalendar(SyntaxNode node) => method IsZeroTimeOffset (line 31) | protected override bool IsZeroTimeOffset(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UseUnixEpochCodeFix.cs class UseUnixEpochCodeFix (line 20) | [ExportCodeFixProvider(LanguageNames.VisualBasic)] method ReplaceConstructorWithField (line 23) | protected override SyntaxNode ReplaceConstructorWithField(SyntaxNode r... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UseWhereBeforeOrderBy.cs class UseWhereBeforeOrderBy (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/UseWithStatement.cs class UseWithStatement (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 44) | protected override void Initialize(SonarParametrizedAnalysisContext co... method CheckExpression (line 74) | private bool CheckExpression(SonarSyntaxNodeReportingContext context, ... method IsCandidateForExtraction (line 114) | private static bool IsCandidateForExtraction(SonarSyntaxNodeReportingC... method GetParentStatement (line 122) | private static ExecutableStatementSyntax GetParentStatement(Expression... method IsCandidateStatement (line 135) | private static bool IsCandidateStatement(ExecutableStatementSyntax sta... method ContainsEmptyMemberAccess (line 143) | private static bool ContainsEmptyMemberAccess(ExecutableStatementSynta... method IsAllowedStatement (line 150) | private static bool IsAllowedStatement(ExecutableStatementSyntax state... method ContainsExpression (line 155) | private static bool ContainsExpression(ExecutableStatementSyntax conta... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Utilities/AnalysisWarningAnalyzer.cs class AnalysisWarningAnalyzer (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Utilities/CopyPasteTokenAnalyzer.cs class CopyPasteTokenAnalyzer (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsUsingDirective (line 25) | protected override bool IsUsingDirective(SyntaxNode node) => method GetCpdValue (line 28) | protected override string GetCpdValue(SyntaxToken token) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Utilities/FileMetadataAnalyzer.cs class FileMetadataAnalyzer (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Utilities/LogAnalyzer.cs class LogAnalyzer (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method LanguageVersion (line 25) | protected override string LanguageVersion(Compilation compilation) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Utilities/MetricsAnalyzer.cs class MetricsAnalyzer (line 23) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetMetrics (line 28) | protected override MetricsBase GetMetrics(SyntaxTree syntaxTree, Seman... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Utilities/SymbolReferenceAnalyzer.cs class SymbolReferenceAnalyzer (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetBindableParent (line 25) | protected override SyntaxNode GetBindableParent(SyntaxToken token) => method CreateDeclarationReferenceInfo (line 28) | protected override ReferenceInfo[] CreateDeclarationReferenceInfo(Synt... method GetDeclarations (line 43) | protected override IList GetDeclarations(SyntaxNode node) method CreateDeclarationReferenceInfo (line 50) | private static ReferenceInfo[] CreateDeclarationReferenceInfo(LocalDec... method CreateDeclarationReferenceInfo (line 53) | private static ReferenceInfo[] CreateDeclarationReferenceInfo(FieldDec... method CreateDeclarationReferenceInfo (line 56) | private static ReferenceInfo[] CreateDeclarationReferenceInfo(Variable... method CreateDeclarationReferenceInfo (line 59) | private static ReferenceInfo CreateDeclarationReferenceInfo(SyntaxNode... class DeclarationsFinder (line 62) | private sealed class DeclarationsFinder : SafeVisualBasicSyntaxWalker method Visit (line 83) | public override void Visit(SyntaxNode node) FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Utilities/TelemetryAnalyzer.cs class TelemetryAnalyzer (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method LanguageVersion (line 25) | protected override string LanguageVersion(Compilation compilation) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Utilities/TestMethodDeclarationsAnalyzer.cs class TestMethodDeclarationsAnalyzer (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetMethodDeclarations (line 25) | protected override IEnumerable GetMethodDeclarations(Synta... method GetTypeDeclarations (line 28) | protected override IEnumerable GetTypeDeclarations(SyntaxN... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/Utilities/TokenTypeAnalyzer.cs class TokenTypeAnalyzer (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetTokenClassifier (line 25) | protected override TokenClassifierBase GetTokenClassifier(SemanticMode... method GetTriviaClassifier (line 28) | protected override TriviaClassifierBase GetTriviaClassifier() => class TokenClassifier (line 31) | private sealed class TokenClassifier : TokenClassifierBase method TokenClassifier (line 33) | public TokenClassifier(SemanticModel semanticModel, bool skipIdentif... method GetBindableParent (line 35) | protected override SyntaxNode GetBindableParent(SyntaxToken token) => method IsIdentifier (line 38) | protected override bool IsIdentifier(SyntaxToken token) => method IsKeyword (line 41) | protected override bool IsKeyword(SyntaxToken token) => method IsNumericLiteral (line 44) | protected override bool IsNumericLiteral(SyntaxToken token) => method IsStringLiteral (line 47) | protected override bool IsStringLiteral(SyntaxToken token) => class TriviaClassifier (line 55) | private sealed class TriviaClassifier : TriviaClassifierBase method IsRegularComment (line 57) | protected override bool IsRegularComment(SyntaxTrivia trivia) => method IsDocComment (line 60) | protected override bool IsDocComment(SyntaxTrivia trivia) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/ValueTypeShouldImplementIEquatable.cs class ValueTypeShouldImplementIEquatable (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/VariableUnused.cs class VariableUnused (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method IsExcludedDeclaration (line 25) | protected override bool IsExcludedDeclaration(SyntaxNode node) => FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/WcfNonVoidOneWay.cs class WcfNonVoidOneWay (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method GetReturnTypeLocation (line 33) | protected override Location GetReturnTypeLocation(MethodStatementSynta... FILE: analyzers/src/SonarAnalyzer.VisualBasic/Rules/WeakSslTlsProtocols.cs class WeakSslTlsProtocols (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] FILE: analyzers/tests/FrameworkMocks/src/Mscorlib3.5Mock/Debugger.cs class Debugger (line 4) | public class Debugger method Debugger (line 6) | public Debugger() method Foo (line 11) | public string Foo() FILE: analyzers/tests/FrameworkMocks/src/Mscorlib4.0Mock/Debugger.cs class Debugger (line 4) | public class Debugger method Debugger (line 6) | [Obsolete] FILE: analyzers/tests/FrameworkMocks/src/Mscorlib4.0MockWithIo/Debugger.cs class Debugger (line 4) | public class Debugger method Debugger (line 6) | [Obsolete] FILE: analyzers/tests/FrameworkMocks/src/Mscorlib4.0MockWithIo/UnmanagedMemoryStream.cs class UnmanagedMemoryStream (line 3) | public class UnmanagedMemoryStream FILE: analyzers/tests/FrameworkMocks/src/Mscorlib4.8Mock/Debugger.cs class Debugger (line 4) | public class Debugger method Debugger (line 6) | [Obsolete] FILE: analyzers/tests/FrameworkMocks/src/Mscorlib4.8Mock/UnmanagedMemoryStream.cs class UnmanagedMemoryStream (line 3) | public class UnmanagedMemoryStream method FlushAsync (line 5) | public void FlushAsync() { } FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Extensions/BaseArgumentListSyntaxExtensionsTest.cs class BaseArgumentListSyntaxExtensionsTest (line 20) | [TestClass] method GivenEmptyList_GetArgumentByName_ReturnsNull (line 23) | [TestMethod] method GivenListWithAnotherNamedArgument_GetArgumentByName_ReturnsNull (line 27) | [TestMethod] method GivenListWithNamedArgument_GetArgumentByName_ReturnsArgument (line 31) | [TestMethod] method GivenListWithMultipleNamedArguments_GetArgumentByName_ReturnsArgument (line 35) | [TestMethod] method GivenListWithNotNamedArguments_GetArgumentByName_ReturnsNull (line 39) | [TestMethod] method GivenListWithMixedNotNamedAndNamedArguments_GetArgumentByName_ReturnsNull (line 50) | [TestMethod] method CreateNamedArgumentList (line 62) | private static ArgumentListSyntax CreateNamedArgumentList(params strin... method CreateNamedArgument (line 65) | private static ArgumentSyntax CreateNamedArgument(string name) => method CreateNotNamedArgument (line 68) | private static ArgumentSyntax CreateNotNamedArgument(string identifier... FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Extensions/BaseMethodDeclarationSyntaxExtensionsTest.cs class BaseMethodDeclarationSyntaxExtensionsTest (line 22) | [TestClass] method GivenNullMethodDeclaration_GetBodyDescendantNodes_ThrowsArgumentNullException (line 25) | [TestMethod] method HasBodyOrExpressionBody (line 41) | [TestMethod] method GetBodyOrExpressionBody (line 56) | [TestMethod] method GetMethodDeclarationsAndExpectedBody (line 61) | private static IEnumerable GetMethodDeclarationsAndExpectedB... FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Extensions/ISymbolExtensionsTest.cs class ISymbolExtensionsTest (line 22) | [TestClass] method IsPrimaryConstructor (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Extensions/TypeDeclarationSyntaxExtensionsTest.cs class TypeDeclarationSyntaxExtensionsTest (line 20) | [TestClass] method GetMethodDeclarations_EmptyClass_ReturnsEmpty (line 23) | [TestMethod] method GetMethodDeclarations_SingleMethod_ReturnsMethod (line 31) | [TestMethod] method GetMethodDeclarations_MultipleMethodsWithLocalFunctions_ReturnsMethodsAndFunctions (line 48) | [TestMethod] method ParameterList_ReturnsList (line 88) | [TestMethod] method ParameterList_Interface (line 109) | [TestMethod] method PrimaryConstructor_NoPrimaryConstructor (line 118) | [TestMethod] method PrimaryConstructor_PrimaryConstructorRecord (line 142) | [TestMethod] method PrimaryConstructor_PrimaryConstructorOnClass (line 160) | [TestMethod] method PrimaryConstructor_EmptyPrimaryConstructor (line 181) | [TestMethod] method PrimaryConstructor_EmptyPrimaryConstructor_SecondConstructor (line 192) | [TestMethod] method PrimaryConstructor_EmptyPrimaryConstructorAndStaticConstructor (line 208) | [TestMethod] method PrimaryConstructor_ArglistPrimaryConstructor (line 225) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Extensions/TypeSyntaxExtensionsTest.cs class TypeSyntaxExtensionsTest (line 20) | [TestClass] method Unwrap (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Facade/CSharpFacadeTest.cs class CSharpFacadeTest (line 20) | [TestClass] method MethodParameterLookup_ForInvocation (line 23) | [TestMethod] method MethodParameterLookup_SemanticModelOverload (line 42) | [TestMethod] method MethodParameterLookup_ForObjectCreation (line 57) | [TestMethod] method MethodParameterLookup_ForImplicitObjectCreation (line 78) | [TestMethod] method MethodParameterLookup_ForArgumentList (line 99) | [TestMethod] method MethodParameterLookup_UnsupportedSyntaxKind (line 118) | [TestMethod] method MethodParameterLookup_Null (line 137) | [TestMethod] method MethodParameterLookup_Null_SemanticModelOverload (line 155) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Facade/Implementation/CSharpSyntaxFacadeTest.cs class CSharpSyntaxFacadeTest (line 23) | [TestClass] method EnumMembers_Null_CS (line 28) | [TestMethod] method InvocationIdentifier_Null_CS (line 32) | [TestMethod] method ObjectCreationTypeIdentifier_Null_CS (line 36) | [TestMethod] method InvocationIdentifier_UnexpectedTypeThrows_CS (line 40) | [TestMethod] method ModifierKinds_Null_CS (line 44) | [TestMethod] method NodeExpression_Null_CS (line 48) | [TestMethod] method NodeExpression_UnexpectedTypeThrows_CS (line 52) | [TestMethod] method NodeIdentifier_Null_CS (line 56) | [TestMethod] method NodeIdentifier_Unexpected_Returns_Null_CS (line 60) | [TestMethod] method StringValue_UnexpectedType_CS (line 64) | [TestMethod] method StringValue_NodeIsNull_CS (line 68) | [TestMethod] method RemoveConditionalAccess_Null_CS (line 72) | [TestMethod] method RemoveConditionalAccess_SimpleInvocation_CS (line 76) | [TestMethod] method ArgumentNameColon_CS_WithNameColon (line 86) | [TestMethod] method ArgumentNameColon_CS_WithoutNameColon (line 94) | [TestMethod] method ArgumentNameColon_CS_UnsupportedSyntaxKind (line 102) | [TestMethod] method ComparisonKind_BinaryExpression_CS (line 109) | [TestMethod] method ComparisonKind_NonBinaryExpression_CS (line 116) | [TestMethod] method ComparisonKind_Null_CS (line 120) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/RegularExpressions/MessageTemplateParserTest.cs class MessageTemplateParserTest (line 20) | [TestClass] method Parse_NoPlaceholder (line 23) | [TestMethod] method Parse_Placeholder (line 39) | [TestMethod] method Parse_Placeholder_Named_Alignment_Format (line 66) | [TestMethod] method Parse_Placeholder_Multiple (line 92) | [TestMethod] method Parse_Placeholder_Failure (line 115) | [TestMethod] method ShouldBeSuccess (line 135) | private static void ShouldBeSuccess(MessageTemplatesParser.ParseResult... method ShouldBe (line 142) | private static void ShouldBe(MessageTemplatesParser.Placeholder actual... FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/ArgumentSyntaxExtensionsTest.cs class ArgumentSyntaxExtensionsTest (line 23) | [TestClass] method IsInTupleAssignmentTarget_IsTrue (line 26) | [TestMethod] method IsInTupleAssignmentTarget_IsFalse (line 47) | [TestMethod] method OutermostTuple_DifferentPositions (line 75) | [TestMethod] method GetTupleArgumentAtMarker (line 120) | private static ArgumentSyntax GetTupleArgumentAtMarker(ref string code) FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/AssignmentExpressionSyntaxExtensionsTest.cs class AssignmentExpressionSyntaxExtensionsTest (line 20) | [TestClass] method MapAssignmentArguments_TupleElementsAreExtracted (line 23) | [TestMethod] method MapAssignmentArguments_SimpleAssignmentReturnsSingleElementArray (line 39) | [TestMethod] method MapAssignmentArguments_NestedDeconstruction (line 50) | [TestMethod] method MapAssignmentArguments_RightSideNotATupleExpression (line 81) | [TestMethod] method MapAssignmentArguments_LeftSideNotATupleExpression (line 92) | [TestMethod] method MapAssignmentArguments_SimpleDeconstructionAssignment (line 103) | [TestMethod] method MapAssignmentArguments_NestedDeconstructionAssignment (line 119) | [TestMethod] method MapAssignmentArguments_MisalignedDeconstructionAssignment (line 145) | [TestMethod] method MapAssignmentArguments_MisalignedDeconstructionAssignmentInNestedTuple (line 174) | [TestMethod] method MapAssignmentArguments_MixedAssignment (line 202) | [TestMethod] method MapAssignmentArguments_MisalignedLeft (line 218) | [TestMethod] method MapAssignmentArguments_MisalignedRight (line 229) | [TestMethod] method MapAssignmentArguments_MisalignedNested1 (line 240) | [TestMethod] method MapAssignmentArguments_MisalignedNested2 (line 265) | [TestMethod] method MapAssignmentArguments_DifferentConventions (line 291) | [TestMethod] method MapAssignmentArguments_DataTest (line 334) | [TestMethod] method AssignmentTargets_DeconstructTargets (line 365) | [TestMethod] method AssertMapAssignmentArguments (line 392) | private static void AssertMapAssignmentArguments(string code, T[] e... method WithDesignation (line 398) | private static object WithDesignation(string identifier) => method WithIdentifier (line 401) | private static object WithIdentifier(string identifier) => method WithToken (line 404) | private static object WithToken(string identifier) => method WithTokenArguments (line 407) | private static object WithTokenArguments(params string[] tokens) => method WithDesignationArguments (line 410) | private static object WithDesignationArguments(params string[] designa... method WithIdentifierVariables (line 413) | private static object WithIdentifierVariables(params string[] identifi... method ParseAssignmentExpression (line 416) | private static AssignmentExpressionSyntax ParseAssignmentExpression(st... FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/AttributeDataExtensionsTest.cs class AttributeDataExtensionsTest (line 23) | [TestClass] method HasName (line 26) | [TestMethod] method HasAnyName (line 44) | [TestMethod] method HasAnyNameThrowsForNull (line 57) | [TestMethod] method TryGetAttributeValue_Arguments (line 61) | [TestMethod] method TryGetAttributeValue_ConstructorArgumentAndNamedArgumentNamedTheSame (line 105) | [TestMethod] method TryGetAttributeValue_DateTimeConversion (line 114) | [TestMethod] method TryGetAttributeValue_ObjectConversion (line 123) | [TestMethod] method HasAttributeUsageInherited_InheritedSpecified (line 139) | [TestMethod] method HasAttributeUsageInherited_InheritedUnSpecified (line 156) | [TestMethod] method HasAttributeUsageInherited_NoUsageAttribute (line 171) | [TestMethod] method HasAttributeUsageInherited_UsageInherited (line 185) | [TestMethod] method HasAttributeUsageInherited_DuplicateAttributeUsage (line 205) | [TestMethod] method CompileAttribute (line 221) | private static AttributeData CompileAttribute(string code, bool ignore... method AttributeDataWithName (line 224) | private static AttributeDataMock AttributeDataWithName(string attribut... method AttributeDataWithArguments (line 231) | private static AttributeData AttributeDataWithArguments(Dictionary FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/AttributeSyntaxExtensionsTest.cs class AttributeSyntaxExtensionsTest (line 20) | [TestClass] method IsKnownType_ChecksAttributeType (line 23) | [TestMethod] method IsKnownType_TypeNotAnAttribute (line 38) | [TestMethod] method IsKnownType_EmptyImmutableArray_ReturnsFalse (line 48) | [TestMethod] method CreateCompilation (line 58) | private static CSharpCompilation CreateCompilation(string code) => FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/AwaitExpressionSyntaxExtensionsTest.cs class AwaitExpressionSyntaxExtensionsTest (line 22) | [TestClass] method AwaitedExpressionWithoutConfigureAwait (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/BlockSyntaxExtensionsTest.cs class BlockSyntaxExtensionsTest (line 22) | [TestClass] method IsEmpty_BlockMethodEmpty (line 25) | [TestMethod] method IsEmpty_BlockMethodWithCode (line 35) | [TestMethod] method IsEmpty_ArgumentExceptionOnNull (line 45) | [TestMethod] method IsEmpty_BlockMethodWithComment_Singleline_On (line 60) | [TestMethod] method IsEmpty_BlockMethodWithComment_Singleline_Off (line 70) | [TestMethod] method IsEmpty_BlockMethodWithComment_Empty_On (line 80) | [TestMethod] method IsEmpty_BlockMethodWithComment_Multiline_On (line 90) | [TestMethod] method IsEmpty_BlockMethodWithComment_Multiline_Off (line 100) | [TestMethod] method IsEmpty_BlockMethodWithConditionalCompilation_WithDisabledCode_On (line 110) | [TestMethod] method IsEmpty_BlockMethodWithConditionalCompilation_WithDisabledCode_Off (line 122) | [TestMethod] method IsEmpty_BlockMethodWithConditionalCompilation_WithEmptyRegion_On (line 134) | [TestMethod] method IsEmpty_BlockMethodWithConditionalCompilation_WithEmptyConditional_On (line 145) | [TestMethod] method IsEmpty_BlockMethodCombinations_CommentInConditional (line 156) | [TestMethod] method IsEmpty_TrailingTriviaOnOpenBrace_Comment (line 179) | [TestMethod] method IsEmpty_LeadingTriviaOnCloseBrace_Comment (line 186) | [TestMethod] method IsEmpty_TrailingTriviaOnOpenBrace_ConditionalCompilation (line 193) | [TestMethod] method IsEmpty_LeadingTriviaOnCloseBrace_ConditionalCompilation (line 200) | [TestMethod] method CreateTriviaListWithComment (line 207) | private static SyntaxTriviaList CreateTriviaListWithComment() => method CreateTriviaListWithConditionalCompilation (line 210) | private static SyntaxTriviaList CreateTriviaListWithConditionalCompila... method CreateBlock (line 216) | private static BlockSyntax CreateBlock(SyntaxTriviaList beforeOpen = d... method MethodDeclarationForBlock (line 222) | private static MethodDeclarationSyntax MethodDeclarationForBlock(strin... method WrapInClass (line 225) | private static string WrapInClass(string methodBlockOrArrow) => $@" method MethodDeclaration (line 232) | private static MethodDeclarationSyntax MethodDeclaration(string source) FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/DiagnosticDescriptorExtensionsTest.cs class DiagnosticDescriptorExtensionsTest (line 20) | [TestClass] method IsSecurityHotspot_IsHotspot (line 23) | [TestMethod] method IsSecurityHotspot_NonexistentId (line 30) | [TestMethod] method IsSecurityHotspot_NotHotspot (line 37) | [TestMethod] method IsEnabled_NullSyntaxTreeOptionsProvider_DoesNotThrow (line 48) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/ExpressionSyntaxExtensionsTest.cs class ExpressionSyntaxExtensionsTest (line 20) | [TestClass] method CanBeNull (line 23) | [TestMethod] method ExtractMemberIdentifier (line 35) | [TestMethod] method GetLeftMostInMemberAccess (line 68) | [TestMethod] method IsDefaultLiteral (line 94) | [TestMethod] method IsDefaultLiteral_Null (line 113) | [TestMethod] method Compile (line 117) | private static (ExpressionSyntax Expression, SemanticModel Model) Comp... FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/ITupleOperationWrapperExtensionsTest.cs class ITupleOperationWrapperExtensionsTest (line 23) | [TestClass] method AllElements_ElementsOfFirstFoundTupleAreExtracted (line 26) | [TestMethod] method AllElements_Performance_DeepNesting (line 51) | [TestMethod] method AllElements_Performance_LargeTuple (line 73) | [TestMethod] method AssertAllElementsExecutionTimeBeLessThan (line 93) | private static void AssertAllElementsExecutionTimeBeLessThan(string tu... method CompileFirstTupleOperation (line 103) | private static ITupleOperationWrapper CompileFirstTupleOperation(strin... method WrapInMethod (line 116) | private static string WrapInMethod(string code) => FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/InterpolatedStringExpressionSyntaxExtensionsTest.cs class InterpolatedStringExpressionSyntaxExtensionsTest (line 20) | [TestClass] method TryGetGetInterpolatedTextValue_UnsupportedSyntaxKinds_ReturnsFalse_CS (line 23) | [TestMethod] method TryGetGetInterpolatedTextValue_SupportedSyntaxKinds_ReturnsTrue_CS (line 35) | [TestMethod] method CompileCS (line 46) | private static (InterpolatedStringExpressionSyntax InterpolatedStringE... FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/InvocationExpressionSyntaxExtensionsTest.cs class InvocationExpressionSyntaxExtensionsTest (line 22) | [TestClass] method TryGetOperands_InvocationNode_ShouldReturnsTrue_CS (line 25) | [TestMethod] method TryGetOperands_InvocationNodeDoesNotContainMemberAccess_ShouldReturnsFalse_CS (line 51) | [TestMethod] method HasExactlyNArguments_Null_CS (line 75) | [TestMethod] method GetMethodCallIdentifier_Null_CS (line 79) | [TestMethod] method NodeBetweenMarkers (line 83) | private static SyntaxNode NodeBetweenMarkers(string code, string langu... FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/ObjectCreationExpressionSyntaxExtensionsTest.cs class ObjectCreationExpressionSyntaxExtensionsTest (line 20) | [TestClass] method IsKnownType_ChecksCtorType (line 23) | [TestMethod] method GetObjectCreationTypeIdentifier_Null_CS (line 37) | [TestMethod] method CreateCompilation (line 41) | private static CSharpCompilation CreateCompilation(string code) => FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/PatternSyntaxWrapperExtensionsTest.cs class PatternSyntaxWrapperExtensionsTest (line 22) | [TestClass] method IsNull_ForNullPattern_ReturnsTrue (line 25) | [TestMethod] method IsNull_ForDifferentPattern_ReturnsFalse (line 32) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/PropertyDeclarationSyntaxExtensionsTest.cs class PropertyDeclarationSyntaxExtensionsTest (line 20) | [TestClass] method IsAutoProperty_AccessorWithBody_ReturnsFalse (line 23) | [TestMethod] method IsAutoProperty_AccessorWithExpressionBody_ReturnsFalse (line 34) | [TestMethod] method IsAutoProperty_ExpressionBody_ReturnsFalse (line 48) | [TestMethod] method IsAutoProperty_AccessorsWithoutBody_ReturnsTrue (line 59) | [TestMethod] method GetPropertyDeclaration (line 70) | private static PropertyDeclarationSyntax GetPropertyDeclaration(string... FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/StatementSyntaxExtensionsTest.cs class StatementSyntaxExtensionsTest (line 20) | [TestClass] method PrecedingStatement (line 23) | [TestMethod] method FollowingStatement (line 35) | [TestMethod] method PrecedingStatementTopLevelStatements (line 47) | [TestMethod] method FirstNonBlockStatement_NoBlock (line 66) | [TestMethod] method DescendantNodes (line 78) | private static IEnumerable DescendantNodes() method DescendantNodes (line 107) | private static IEnumerable DescendantNodes(string source) => FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/SyntaxNodeExtensionsCSharpTest.cs class SyntaxNodeExtensionsCSharpTest (line 20) | [TestClass] method NameIs (line 23) | [TestMethod] method NameIsOrNames (line 42) | [TestMethod] method NameIs_CultureSensitivity (line 54) | [TestMethod] method NameIsOrNames_CultureSensitivity (line 65) | [TestMethod] method NameIsOrNamesNodeWithoutName (line 77) | [TestMethod] method ChangeSyntaxElement_ReturnsNewNodeAndModel (line 84) | [TestMethod] method ChangeSyntaxElement_FailsForUnsupportedSyntaxKind (line 123) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/SyntaxTokenExtensionsTest.cs class SyntaxTokenExtensionsTest (line 23) | [TestClass] method ToComparisonKind (line 26) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/SyntaxTreeExtensionsTest.cs class SyntaxTreeExtensionsTest (line 23) | [TestClass] method IsGenerated_On_GeneratedTree (line 26) | [TestMethod] method IsGenerated_On_GeneratedLocalFunctionTree (line 46) | [TestMethod] method IsGenerated_On_NonGeneratedTree (line 69) | [TestMethod] method IsGenerated (line 84) | private static bool IsGenerated(string content, GeneratedCodeRecognize... FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/TupleExpressionSyntaxExtensionsTest.cs class TupleExpressionSyntaxExtensionsTest (line 20) | [TestClass] method TupleExpressionSyntaxExtensions_FlatteningTests (line 23) | [TestMethod] method WrapInMethod (line 38) | private static string WrapInMethod(string code) => FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/TypeExtensionsTest.cs class TypeExtensionsTest (line 23) | [TestClass] method AnalyzerTargetLanguage_NotSupportedType (line 26) | [TestMethod] method AnalyzerTargetLanguage_MultiLanguage (line 35) | [TestMethod] method AnalyzerTargetLanguage_SingleLanguage (line 44) | [TestMethod] class SingleLanguageAnalyzer (line 52) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 57) | protected override void Initialize(SonarAnalysisContext context) => ... class MultiLanguageAnalyzer (line 60) | [DiagnosticAnalyzer(LanguageNames.CSharp, LanguageNames.VisualBasic)] method Initialize (line 65) | protected override void Initialize(SonarAnalysisContext context) => ... FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Extensions/VariableDesignationSyntaxWrapperTest.cs class VariableDesignationSyntaxWrapperTest (line 20) | [TestClass] method VariableDesignationSyntaxWrapper_DifferentDesignations (line 23) | [TestMethod] method WrapInMethod (line 38) | private static string WrapInMethod(string code) => FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Syntax/Utilities/SafeCSharpSyntaxWalkerTest.cs class SafeCSharpSyntaxWalkerTest (line 20) | [TestClass] method GivenSyntaxNodeWithReasonableDepth_SafeVisit_ReturnsTrue (line 23) | [TestMethod] method GivenSyntaxNodeWithHighDepth_SafeVisit_ReturnsFalse (line 27) | [TestMethod] class Walker (line 49) | private class Walker : SafeCSharpSyntaxWalker { } FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Trackers/FieldAccessTrackerTest.cs class FieldAccessTrackerTest (line 22) | [TestClass] method MatchSet_CS (line 25) | [TestMethod] method AssignedValueIsConstant_CS (line 36) | [TestMethod] method CreateContext (line 50) | private static FieldAccessContext CreateContext(string fieldName) FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Wrappers/MethodDeclarationFactoryTest.cs class MethodDeclarationFactoryTest (line 20) | [TestClass] method MethodDeclarationFactory_WithMethodDeclaration (line 23) | [TestMethod] method MethodDeclarationFactory_WithLocalFunctionDeclaration (line 42) | [TestMethod] method MethodDeclarationFactory_WithMethodDeclaration_NoImplementation (line 65) | [TestMethod] method MethodDeclarationFactory_Throws_WhenNull (line 79) | [TestMethod] method MethodDeclarationFactory_Throws_WhenNotMethodOrLocalFunction (line 86) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Core.Test/Wrappers/ObjectCreationFactoryTest.cs class ObjectCreationFactoryTest (line 20) | [TestClass] method ObjectCreationSyntax (line 25) | [TestMethod] method ObjectCreationEmptyInitializerSyntax (line 53) | [TestMethod] method ImplicitObjectCreationSyntax (line 75) | [TestMethod] method ImplicitObjectCreationEmptyInitializerSyntax (line 104) | [TestMethod] method GivenImplicitObjectCreationSyntaxWithMissingType_HasEmptyType (line 126) | [TestMethod] method ImplicitObjectCreation_UserDefinedNullable_DoesNotCrash (line 146) | [TestMethod] method GivenNull_ThrowsException (line 164) | [TestMethod] method GivenNonConstructor_ThrowsException (line 168) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Common/StylingRuleTest.cs class StylingRuleTest (line 24) | [TestClass] method StylingRuleTestScaffolding_FindsAnalyzers (line 29) | [TestMethod] method Analyzers_InheritStylingAnalyzer (line 33) | [TestMethod] method RuleIDs_AreUnique (line 42) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Common/StylingVerifierBuilder.cs class StylingVerifierBuilder (line 22) | public static class StylingVerifierBuilder method Create (line 25) | public static VerifierBuilder Create() where TAnalyzer : Di... method Verify (line 29) | public static void Verify() where TAnalyzer : DiagnosticAna... FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/AllArgumentsOnSameLineTest.cs class AllArgumentsOnSameLineTest (line 20) | [TestClass] method AllArgumentsOnSameLine (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/AllParametersOnSameColumnTest.cs class AllParametersOnSameColumnTest (line 20) | [TestClass] method AllParametersOnSameColumn (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/AllParametersOnSameLineTest.cs class AllParametersOnSameLineTest (line 20) | [TestClass] method AllParametersOnSameLine (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/ArrowLocationTest.cs class ArrowLocationTest (line 20) | [TestClass] method ArrowLocation (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/AvoidArrangeActAssertCommentTest.cs class AvoidArrangeActAssertCommentTest (line 20) | [TestClass] method AvoidArrangeActAssertComment (line 23) | [TestMethod] method AvoidArrangeActAssertComment_NonTestProject (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/AvoidDeconstructionTest.cs class AvoidDeconstructionTest (line 20) | [TestClass] method AvoidDeconstruction (line 23) | [TestMethod] method AvoidDeconstruction_TopLevelStatement (line 27) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/AvoidGetTest.cs class AvoidGetTest (line 20) | [TestClass] method AvoidGet (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/AvoidListForEachTest.cs class AvoidListForEachTest (line 20) | [TestClass] method AvoidListForEach (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/AvoidNullableTest.cs class AvoidNullableTest (line 20) | [TestClass] method AvoidNullable (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/AvoidPrimaryConstructorTest.cs class AvoidPrimaryConstructorTest (line 20) | [TestClass] method AvoidPrimaryConstructor (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/AvoidUnusedInterpolationTest.cs class AvoidUnusedInterpolationTest (line 20) | [TestClass] method AvoidUnusedInterpolation (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/AvoidValueTupleTest.cs class AvoidValueTupleTest (line 20) | [TestClass] method AvoidValueTuple (line 25) | [TestMethod] method AvoidValueTuple_TestCode (line 29) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/AvoidVarPatternTest.cs class AvoidVarPatternTest (line 20) | [TestClass] method AvoidVarPattern (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/FieldOrderingTest.cs class FieldOrderingTest (line 20) | [TestClass] method FieldOrdering (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/FileScopeNamespaceTest.cs class FileScopeNamespaceTest (line 22) | [TestClass] method FileScopeNamespace (line 29) | [TestMethod] method FileScopeNamespace_TestCode (line 33) | [TestMethod] method FileScopeNamespace_Compliant (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/HelperInTypeNameTest.cs class HelperInTypeNameTest (line 20) | [TestClass] method HelperInTypeName (line 25) | [TestMethod] method HelperInTypeName_FileScopedNamespace (line 29) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/IndentArgumentTest.cs class IndentArgumentTest (line 20) | [TestClass] method IndentArgument (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/IndentInvocationTest.cs class IndentInvocationTest (line 20) | [TestClass] method IndentInvocation (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/IndentOperatorTest.cs class IndentOperatorTest (line 20) | [TestClass] method IndentOperator (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/IndentRawStringTest.cs class IndentRawStringTest (line 20) | [TestClass] method IndentRawString (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/IndentTernaryTest.cs class IndentTernaryTest (line 20) | [TestClass] method IndentTernary (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/InitializerLineTest.cs class InitializerLineTest (line 20) | [TestClass] method InitializerLine (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/LambdaParameterNameTest.cs class LambdaParameterNameTest (line 20) | [TestClass] method LambdaParameterName (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/LocalFunctionLocationTest.cs class LocalFunctionLocationTest (line 20) | [TestClass] method LocalFunctionLocation (line 23) | [TestMethod] method LocalFunctionLocation_TopLevelStatements (line 27) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/MemberAccessLineTest.cs class MemberAccessLineTest (line 20) | [TestClass] method MemberAccessLine (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/MemberVisibilityOrderingTest.cs class MemberVisibilityOrderingTest (line 20) | [TestClass] method MemberVisibilityOrdering (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/MethodExpressionBodyLineTest.cs class MethodExpressionBodyLineTest (line 20) | [TestClass] method MethodExpressionBodyLine (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/MoveMethodToDedicatedExtensionClassTest.cs class MoveMethodToDedicatedExtensionClassTest (line 20) | [TestClass] method MoveMethodToDedicatedExtensionClass (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/NamespaceNameTest.cs class NamespaceNameTest (line 20) | [TestClass] method NamespaceName_Compliant (line 28) | [TestMethod] method NamespaceName_Noncompliant (line 37) | [TestMethod] method NamespaceName_NoncompliantLocation (line 49) | [TestMethod] method NamespaceName_ExpectedWithUsing (line 59) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/NullPatternMatchingTest.cs class NullPatternMatchingTest (line 20) | [TestClass] method NullPatternMatching (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/OperatorLocationTest.cs class OperatorLocationTest (line 20) | [TestClass] method OperatorLocation (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/PropertyOrderingTest.cs class PropertyOrderingTest (line 20) | [TestClass] method PropertyOrdering (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/ProtectedFieldsCaseTest.cs class ProtectedFieldsCaseTest (line 20) | [TestClass] method ProtectedFieldsCase (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/SeparateDeclarationsTest.cs class SeparateDeclarationsTest (line 20) | [TestClass] method SeparateDeclarations (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/TernaryLineTest.cs class TernaryLineTest (line 20) | [TestClass] method TernaryLine (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/TypeMemberOrderingTest.cs class TypeMemberOrderingTest (line 20) | [TestClass] method TypeMemberOrdering (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/UseDifferentMemberTest.cs class UseDifferentMemberTest (line 20) | [TestClass] method UseIsExtension (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/UseFieldTest.cs class UseFieldTest (line 20) | [TestClass] method UseField (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/UseInnermostRegistrationContextTest.cs class UseInnermostRegistrationContextTest (line 24) | [TestClass] method UseInnermostRegistrationContext (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/UseLinqExtensionsTest.cs class UseLinqExtensionsTest (line 20) | [TestClass] method UseLinqExtensions (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/UseNullInsteadOfDefaultTest.cs class UseNullInsteadOfDefaultTest (line 20) | [TestClass] method UseNullInsteadOfDefault (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/UsePositiveLogicTest.cs class UsePositiveLogicTest (line 20) | [TestClass] method UsePositiveLogic (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/UseRawStringTest.cs class UseRawStringTest (line 20) | [TestClass] method UseRawString (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/UseRegexSafeIsMatchTest.cs class UseRegexSafeIsMatchTest (line 22) | [TestClass] method UseRegexSafeIsMatch (line 25) | [TestMethod] method UseRegexSafeIsMatchWithoutRegexExtensions (line 29) | [TestMethod] method UseRegexSafeIsMatchWithRegexExtensionOnlyIsMatch (line 49) | [TestMethod] method UseRegexSafeIsMatchWithRegexExtensionOnlyMatch (line 81) | [TestMethod] method UseRegexSafeIsMatchWithRegexExtensionOnlyMatches (line 107) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/UseShortNameTest.cs class UseShortNameTest (line 20) | [TestClass] method UseShortName (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/Rules/UseVarTest.cs class UseVarTest (line 20) | [TestClass] method UseVar (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/AllArgumentsOnSameLine.cs class IAmObsolete (line 5) | [Obsolete( class AlsoObolete (line 11) | [Obsolete("Yes", true, DiagnosticId = "ID0001")] class LastOneObsolete (line 14) | [Obsolete( class ILiedObsolete (line 20) | [Obsolete("Yes", // Noncompliant {{All arguments should be on the same l... class ArgumentsOnSameLine (line 26) | class ArgumentsOnSameLine method Method (line 28) | static object Method(params object[] args) => null; method TypedMethod (line 30) | static void TypedMethod() { } method RefOutInMethod (line 32) | static void RefOutInMethod(int a, in int b, ref int c, out int d) { d ... method OptionalParameters (line 33) | static void OptionalParameters(int a = 0, int b = 0, int c = 0, int d ... method Compliant (line 37) | void Compliant(List list, int a) method NonCompliant (line 126) | void NonCompliant(List list, int a) method LocalFunction (line 202) | void LocalFunction() method Lambdas (line 216) | void Lambdas(Func predicate, Action action, p... method RegisterSomethingAnalysisContext (line 338) | protected void RegisterSomethingAnalysisContext(Action... class SonarWhateverAnalysisContext (line 344) | public class SonarWhateverAnalysisContext { } class SonarWhateverReportingContext (line 345) | public class SonarWhateverReportingContext { } class SomethingAnalysisContext (line 346) | public class SomethingAnalysisContext { } class SonarSomething (line 348) | public class SonarSomething { } class SomethingReportingContext (line 349) | public class SomethingReportingContext { } class SonarSomethingContext (line 350) | public class SonarSomethingContext { } FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/AllParametersOnSameColumn.cs class MyClass (line 4) | abstract class MyClass method MyClass (line 46) | MyClass(int a, method SameLine (line 50) | void SameLine(int a, int b, int c) method Aligned (line 56) | protected abstract void Aligned(int a, method AlignedNewLine (line 60) | protected abstract void AlignedNewLine( method MiddleNotAligned (line 65) | protected abstract void MiddleNotAligned(int a, method NotAligned (line 69) | void NotAligned(int a, method RefParameter (line 78) | protected abstract void RefParameter(ref int a, method RefParameter (line 81) | protected abstract void RefParameter(ref long a, method OutParameter (line 86) | protected abstract void OutParameter(out int a, method OutParameter (line 89) | protected abstract void OutParameter(out long a, method MixedParameter (line 93) | protected abstract void MixedParameter(int a, method MixedParameter2 (line 97) | protected abstract void MixedParameter2(int a, method AttributeParameter (line 101) | protected abstract void AttributeParameter([CallerMemberName] string a... method AttributeParameter2 (line 105) | protected abstract void AttributeParameter2([CallerMemberName] string ... method ValidTypeParameter (line 109) | protected abstract void ValidTypeParameter(T1 a, T2 b, T3 c); method AlignedTypeParameter (line 113) | protected abstract void AlignedTypeParameter(T1 a, method TypeParameter (line 117) | protected abstract void TypeParameter(T1 a, class FunctionPointer (line 127) | unsafe class FunctionPointer FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/AllParametersOnSameLine.cs class Sample (line 3) | public abstract class Sample method Empty (line 5) | public abstract void Empty(); method SingleParam (line 6) | public abstract void SingleParam(int param); method DoubleParam1 (line 7) | public abstract void DoubleParam1(int a, int b); method DoubleParam2 (line 8) | public abstract void DoubleParam2(int a, method DoubleParam3 (line 10) | public abstract void DoubleParam3( method CompliantSingleLineMethod (line 14) | public abstract void CompliantSingleLineMethod(string first, string se... method CompliantMultiLineMethod (line 16) | public abstract void CompliantMultiLineMethod(string first, // Compliant method NonCompliantMethod (line 21) | public abstract void NonCompliantMethod(string first, string second, s... method NonCompliantMethodStart (line 24) | public abstract void NonCompliantMethodStart(string first, string second, method NonCompliantMethodMiddle (line 29) | public abstract void NonCompliantMethodMiddle(string first, method NonCompliantMethodEnd (line 34) | public abstract void NonCompliantMethodEnd(string first, method Foo (line 39) | public abstract void Foo( method Foo1 (line 45) | public abstract void Foo1( method Foo2 (line 49) | public abstract void Foo2( // Compliant method Foo3 (line 54) | public abstract void Foo3(string first method Foo4 (line 57) | public abstract void Foo4(string first // Compliant method Foo5 (line 61) | public abstract void Foo5( // Compliant method Foo6 (line 68) | public abstract void Foo6( // Compliant method Foo7 (line 75) | public abstract void Foo7( method Ame (line 98) | public void Ame() method lfs (line 108) | public void lfs() method EndOfLineInParameter (line 118) | public abstract void EndOfLineInParameter(int x, string y, params // C... method EndOfLineEndParameters (line 123) | public abstract void EndOfLineEndParameters(int x, string y, params in... method CommaInParams1 (line 126) | public abstract void CommaInParams1((int, method CommaInParams2 (line 129) | public abstract void CommaInParams2((int, int) x, int y, int z); method CommaInParams3 (line 131) | public abstract void CommaInParams3( method CommaInParams4 (line 135) | public abstract void CommaInParams4( method CommaInParams5 (line 138) | public abstract void CommaInParams5((int, method CommaInParams6 (line 142) | public abstract void CommaInParams6( method CommaInParams7 (line 147) | public abstract void CommaInParams7( method CommaInParams8 (line 152) | public abstract void CommaInParams8( class Example (line 159) | public unsafe class Example class cdsC (line 167) | public class cdsC(int a, int b, int c) { } class cdsNC (line 168) | public class cdsNC(int a, type sdsC (line 173) | public struct sdsC(int a, int b, int c) { } type sdsNC (line 174) | public struct sdsNC(int a, type ICompliant (line 179) | public interface ICompliant // Compliant type INoncompliant (line 181) | public interface INoncompliant method Region (line 114) | public int Region() => method Directive (line 119) | public int Directive() => method LocalFunction (line 126) | public void LocalFunction() method SwitchExpression (line 133) | public int SwitchExpression(object arg) method CompliantCases (line 162) | public CompliantCases() => method Generic (line 168) | public int Generic() where T : struct method WrongParenthesis (line 171) | public int WrongParenthesis( method DoSomething (line 176) | public void DoSomething() { } class ReturnValueSameLine (line 181) | public class ReturnValueSameLine method WithOneParameter (line 185) | public int WithOneParameter(int a) => 0; method WithMultilineParameters (line 187) | public int WithMultilineParameters(int a, method Generic (line 191) | public int Generic() where T : struct => 0; method WrongParenthesis (line 193) | public int WrongParenthesis( class ReturnValueNextLine (line 197) | public class ReturnValueNextLine method WithOneParameter (line 202) | public int WithOneParameter(int a) => method WithMultilineParameters (line 205) | public int WithMultilineParameters(int a, method Generic (line 210) | public int Generic() where T : struct => method WrongParenthesis (line 213) | public int WrongParenthesis( class Lambdas (line 218) | public class Lambdas method Method (line 220) | public void Method() method Method (line 247) | public void Method(Func lambda) { } method Method (line 248) | public void Method(Func lambda) { } method Method (line 249) | public void Method(Func lambda) { } class Others (line 252) | public class Others method Comparison (line 254) | public void Comparison(int a, int b) FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/AvoidArrangeActAssertComment.cs class TestClass (line 7) | public class TestClass method TestMethod (line 9) | public void TestMethod() method Multiline_Comment (line 70) | public void Multiline_Comment(string input) method DifferentCase (line 90) | public void DifferentCase() method AreEqual (line 106) | private void AreEqual(object expected, object actual) { } class NotATestClassInTestProject (line 112) | public class NotATestClassInTestProject method Method (line 118) | public void Method() FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/AvoidDeconstruction.cs class Sample (line 3) | public class Sample method Basic (line 7) | public void Basic(string expected) method Nested (line 36) | public void Nested() method Usages (line 62) | public void Usages() method Lambda (line 108) | public string Lambda(Person[] list) method SwitchExpressionVar (line 116) | public object SwitchExpressionVar(object o) => method SwitchExpressionDiscard (line 124) | public object SwitchExpressionDiscard(object o) => method MayReturnPerson (line 131) | public object MayReturnPerson(object arg = null) => null; type Person (line 134) | public record Person(string Name, Address Address); type Address (line 136) | public record Address(City City, string Street); type City (line 138) | public record City(string Country, string Name, string Code); FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/AvoidGet.cs class Sample (line 2) | public class Sample method GetName (line 4) | public string GetName() => "Lorem ipsum"; method GetValue (line 6) | public int GetValue() => 42; method Get2items (line 7) | public int Get2items() => 2; method Getvalue (line 9) | public int Getvalue() => 42; method getValue (line 10) | public int getValue() => 42; method Get (line 11) | public int Get() => 42; method FindGetGetterGet (line 13) | public object FindGetGetterGet() => null; method Getter (line 14) | public object Getter() => null; method Getaway (line 15) | public object Getaway() => null; method Getup (line 16) | public object Getup() => null; method GetLier (line 18) | public void GetLier() { } method GetIsTrue (line 20) | public bool GetIsTrue(bool value) // Noncompliant method Parameter (line 25) | public int Parameter(int GetSometing) => 42; method LocalFunction (line 27) | public string LocalFunction() class Nested (line 42) | private class Nested method GetValue (line 44) | public int GetValue() => 42; class Base (line 48) | public abstract class Base method GetValue (line 50) | public abstract int GetValue(); method GetName (line 53) | public virtual string GetName() => null; class Derived (line 56) | public class Derived : Base method GetValue (line 58) | public override int GetValue() => 42; method GetName (line 60) | public override string GetName() => "Lorem"; type IGet (line 63) | public interface IGet method GetValue (line 66) | int GetValue(); class ImplicitInterface (line 69) | public class ImplicitInterface : IGet method GetValue (line 71) | public int GetValue() => 42; class ExplicitInterface (line 75) | public class ExplicitInterface : IGet method GetValue (line 77) | int IGet.GetValue() => 42; class GetGettingGetter (line 81) | public class GetGettingGetter method GetGettingGetter (line 83) | public GetGettingGetter() { } class Partial (line 86) | public partial class Partial method GetValue (line 88) | public partial int GetValue(); method GetValue (line 93) | public partial int GetValue() => 42; class Partial (line 91) | public partial class Partial method GetValue (line 88) | public partial int GetValue(); method GetValue (line 93) | public partial int GetValue() => 42; FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/AvoidListForEach.cs class Sample (line 3) | public class Sample method Method (line 5) | public void Method(List list, CustomList custom, Sample otherType) method Errors (line 17) | public void Errors(List list) method ErrorNoExpression (line 25) | public void ErrorNoExpression() method ForEach (line 30) | public void ForEach() { } class CustomList (line 33) | public class CustomList : List { } FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/AvoidPrimaryConstructor.cs class Class (line 3) | public class Class(string param1, int param2); class AbstractClass (line 5) | public abstract class AbstractClass(); class SealedClass (line 7) | public sealed class SealedClass(string param1, int param2); class Box (line 8) | public class Box(string param1, int param2); class PartialClass (line 9) | public partial class PartialClass(string param1, int param2); class PartialClass (line 10) | public partial class PartialClass; class BothConstructor (line 12) | class BothConstructor(string param1, int param2) // Nonco... method BothConstructor (line 14) | BothConstructor(int param2) : this("", param2) { } type Struct (line 17) | public struct Struct(string param1, int param2); type ReadonlyStruct (line 19) | public readonly struct ReadonlyStruct(string param1, int param2); type RefStruct (line 20) | public ref struct RefStruct(string param1, int param2); type ReadonlyRefStruct (line 21) | public readonly ref struct ReadonlyRefStruct(string param1, int param2); type RecordClass (line 23) | public record class RecordClass(string param1, int param2); type RecordStruct (line 24) | public record struct RecordStruct(string param1, int param2); type Record (line 25) | public record Record(string param1, int param2); class StaticClass (line 27) | public static class StaticClass(string param1, int param2); type Interface (line 29) | public interface Interface class NormalConstructor (line 31) | class NormalConstructor method NormalConstructor (line 35) | NormalConstructor(string param1, int param2) method Method (line 40) | void Method(string param1, int param2) FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/AvoidUnusedInterpolation.cs class Sample (line 2) | public class Sample method ToRemove (line 4) | public void ToRemove() method ToReduce (line 26) | public void ToReduce(int value) FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/AvoidValueTuple.cs class Sample (line 3) | public class Sample method ReturnedType (line 5) | public (string, int) ReturnedType() // Noncompliant {{Do not use Value... method NamedReturnedType (line 12) | public (string Name, int Count) NamedReturnedType() => // Noncompliant method Use (line 15) | public void Use() method ExplicitType (line 24) | public System.Tuple ExplicitType() // Complaint method SwitchExpression (line 29) | public int SwitchExpression(int a, int b) method SwitchStatement (line 40) | public int SwitchStatement(int a, int b) method PositionalPatternMatching (line 53) | public int PositionalPatternMatching(Sample s) => s switch method Deconstruct (line 59) | void Deconstruct(out int i, out int j) FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/AvoidVarPattern.cs class Sample (line 3) | public class Sample method Method (line 8) | public void Method() method Arrow (line 65) | public bool Arrow() => method Lambda (line 71) | public void Lambda(Pair[] list) method Invocation (line 78) | private static Pair Invocation() => null; type Pair (line 81) | public record Pair(string Name, int Count) FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/FieldOrdering.cs class AllValid (line 1) | public class AllValid class SomeValid (line 22) | public class SomeValid class ProtectedInternal (line 39) | public class ProtectedInternal class ProtectedPrivate (line 45) | public class ProtectedPrivate class AllWrong (line 51) | public class AllWrong type R (line 68) | public record R type RS (line 75) | public record struct RS type S (line 82) | public struct S FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/FileScopeNamespace.Compliant.cs class NotRelevant (line 3) | public class NotRelevant FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/FileScopeNamespace.cs class NotRelevant (line 5) | public class NotRelevant FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/HelperInTypeName.cs class SonarHelper (line 4) | class SonarHelper // Noncompliant {{Do not use 'Helper' in type names.}} method HelperMethod (line 9) | void HelperMethod() class HelperSonarContext (line 15) | class HelperSonarContext // Noncompliant class SonarHelperContext (line 19) | class SonarHelperContext // Noncompliant type ISonarHelper (line 23) | interface ISonarHelper // Noncompliant method MethodHelper (line 25) | void MethodHelper(); type ValueTypeHelper (line 28) | struct ValueTypeHelper // Noncompliant type EnumHelper (line 33) | enum EnumHelper // Noncompliant type RecordHelper (line 37) | record RecordHelper // Noncompliant type RecordStructHelper (line 41) | record struct RecordStructHelper // Noncompliant class SatchelPerks (line 45) | class SatchelPerks type IMonsterWhelpEradicator (line 50) | interface IMonsterWhelpEradicator FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/IndentArgument.cs class Sample (line 4) | public class Sample method Method (line 6) | public void Method() method ArrowNoncompliant (line 107) | public bool ArrowNoncompliant() => method ArrowCompliant (line 112) | public bool ArrowCompliant() => method ArrowNotInScope (line 118) | public bool ArrowNotInScope() => method ReturnNoncompliant (line 121) | public bool ReturnNoncompliant() method ReturnCompliant (line 128) | public bool ReturnCompliant() method ReturnNested (line 135) | public Builder ReturnNested() method FluentChainArguments (line 143) | public Builder FluentChainArguments() method FluentChainArgumentsNoncompliant (line 152) | public Builder FluentChainArgumentsNoncompliant() method FluentChainArgumentsMultiple (line 160) | public Builder FluentChainArgumentsMultiple() method LongFluentChainWithCollectionExpression (line 172) | public void LongFluentChainWithCollectionExpression() method FluentChainWithConstructor (line 219) | public void FluentChainWithConstructor() method TargetTypedNewExpression (line 253) | public void TargetTypedNewExpression() method Invocations (line 274) | public void Invocations() method ObjectInitializer (line 347) | public void ObjectInitializer() method CollectionExpression (line 358) | public void CollectionExpression() method InsideTernary (line 374) | public void InsideTernary() method Lambdas (line 391) | public void Lambdas(int[] list, int[] longer) method If (line 418) | public void If() method While (line 437) | public void While() method For (line 451) | public void For() method ConditionalAccess (line 465) | public void ConditionalAccess(Builder builder) method Global (line 484) | public void Global() method SwitchExpressions (line 495) | public void SwitchExpressions(object arg) method OtherSyntaxes (line 508) | public void OtherSyntaxes() method Invocation (line 522) | public static bool Invocation(params object[] args) => true; method ReturnString (line 523) | public static string ReturnString(string arg) => arg; method RegisterNodeAction (line 524) | public void RegisterNodeAction(Action action, params object[] ... method AcceptFunc (line 525) | public void AcceptFunc(Func func, params object[] args... method PrepareProjectZip (line 526) | public static Builder PrepareProjectZip(Builder arg) => new Builder(); method Coverage (line 528) | [Obsolete(ReturnString("For coverage"))] // Error [CS0182] An attri... class Builder (line 532) | public class Builder method Builder (line 534) | public Builder(params object[] args) { } method Build (line 539) | public Builder Build(params object[] args) => this; method Should (line 540) | public Builder Should() => this; method AllSatisfy (line 541) | public Builder AllSatisfy(Func predicate) => this; method Contain (line 542) | public Builder Contain(params object[] args) => this; method ContainKey (line 543) | public Builder ContainKey(object key) => this; method ContainSingle (line 544) | public Builder ContainSingle() => this; method BeEquivalentTo (line 545) | public Builder BeEquivalentTo(params object[] args) => this; method BeOfType (line 546) | public Builder BeOfType() => this; method Select (line 547) | public Builder Select(Func selector) => this; class WithProperty (line 550) | public class WithProperty FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/IndentInvocation.cs class Sample (line 4) | public class Sample method Method (line 8) | public void Method() method ArrowNoncompliant (line 58) | public Builder ArrowNoncompliant() => method ArrowCompliant (line 62) | public Builder ArrowCompliant() => method ArrowNotInScope (line 68) | public Builder ArrowNotInScope() => method ArrowInInvocationArgument (line 71) | public object ArrowInInvocationArgument() => method ArrowInConstructorArgument (line 76) | public object ArrowInConstructorArgument() => method ReturnNoncompliant (line 81) | public Builder ReturnNoncompliant() method ReturnCompliant (line 88) | public Builder ReturnCompliant() method ReturnNestedExpressions (line 97) | public bool ReturnNestedExpressions() method ArrowNestedExpressions (line 106) | public bool ArrowNestedExpressions() => method ArrowNestedExpressionTernary (line 113) | public object ArrowNestedExpressionTernary() => method Invocations (line 121) | public void Invocations() method ObjectInitializer (line 172) | public void ObjectInitializer() method Lambdas (line 183) | public void Lambdas(int[] list, int[] longer) method If (line 209) | public void If() method While (line 229) | public void While() method For (line 243) | public void For() method ConditionalAccess (line 257) | public void ConditionalAccess() method Global (line 273) | public void Global() method NestedClasses (line 281) | public void NestedClasses() method SwitchExpressions (line 293) | public void SwitchExpressions(object arg) method Something (line 310) | public static bool Something(object arg, object another = null) => true; class Builder (line 313) | public class Builder method Build (line 319) | public Builder Build() => this; method Build (line 320) | public Builder Build(object arg) => this; method StaticMethod (line 321) | public static Builder StaticMethod() => null; method IsTrue (line 322) | public bool IsTrue() => true; class NestedOnce (line 324) | public class NestedOnce method StaticMethod (line 326) | public static Builder StaticMethod() => null; class NestedTwice (line 328) | public class NestedTwice method StaticMethod (line 330) | public static Builder StaticMethod() => null; FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/IndentOperator.cs class Sample (line 4) | public class Sample method Method (line 9) | public void Method() method ArrowNoncompliant (line 40) | public bool ArrowNoncompliant() => method ArrowCompliant (line 45) | public bool ArrowCompliant() => method ArrowNullCoalescing (line 51) | public object ArrowNullCoalescing() => method ArrowNotInScope (line 57) | public bool ArrowNotInScope() => method ArrowInInvocationArgument (line 60) | public object ArrowInInvocationArgument() => method ArrowInInvocationArgumentStartsOnNextLIne (line 66) | public object ArrowInInvocationArgumentStartsOnNextLIne() => method ArrowInConstructorArgument (line 73) | public object ArrowInConstructorArgument() => method ReturnNoncompliant (line 78) | public bool ReturnNoncompliant() method ReturnCompliant (line 84) | public bool ReturnCompliant() method ReturnTernary (line 91) | public bool ReturnTernary() method Invocations (line 99) | public void Invocations() method ObjectInitializer (line 142) | public void ObjectInitializer() method CollectionExpression (line 153) | public void CollectionExpression() method Lambdas (line 170) | public void Lambdas(int[] list, int[] longer) method If (line 200) | public void If() method While (line 219) | public void While() method For (line 233) | public void For() method Nested (line 265) | public void Nested() method ConditionalAccess (line 313) | public void ConditionalAccess(Builder builder) method SwitchExpressions (line 332) | public void SwitchExpressions(object arg) method Something (line 366) | public static bool Something(bool arg, object another = null) => true; class Operators (line 369) | class Operators method LogicalOperator (line 373) | void LogicalOperator(bool a, bool b) method Ternary (line 388) | void Ternary() method Coelesce (line 428) | void Coelesce(object o1, object o2, object o3) method AsIs (line 437) | void AsIs(object o) method Pattern (line 446) | void Pattern(object o1, object o2) method Arithmetic (line 456) | void Arithmetic(int a, int b, string str) method Comparison (line 472) | void Comparison(int a, int b) method Shift (line 488) | void Shift(int a, int b) method Range (line 498) | void Range() class WithProperty (line 506) | public class WithProperty class Coverage (line 511) | public class Coverage method BinaryAndPatterns (line 513) | [Obsolete("For" + " coverage", true is true or true)] // Error [CS01... method RangeOperator (line 516) | [Obsolete(1..2)] // Error [CS1503] Argument 1: cannot convert from ... class Builder (line 520) | public class Builder method Build (line 522) | public Builder Build(params object[] args) => this; FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/IndentRawString.cs class Sample (line 5) | public class Sample method Method (line 7) | public void Method() method ArrowNoncompliant (line 56) | public string ArrowNoncompliant() => method ArrowCompliant (line 61) | public string ArrowCompliant() => method ArrowInterpolatedNoncompliant (line 66) | public string ArrowInterpolatedNoncompliant(string value) => method ArrowInterpolatedCompliant (line 71) | public string ArrowInterpolatedCompliant(string value) => method ArrowInInvocationArgument (line 76) | public object ArrowInInvocationArgument() => method ArrowInConstructorArgument (line 81) | public object ArrowInConstructorArgument() => method ArrowInConstructorArgumentImplicit (line 86) | public Exception ArrowInConstructorArgumentImplicit() => method ArrowBuilderArgument (line 91) | public object ArrowBuilderArgument() => method ReturnNoncompliant (line 101) | public string ReturnNoncompliant() method ReturnCompliant (line 108) | public string ReturnCompliant() method Assignment (line 128) | public void Assignment() method Invocations (line 141) | public void Invocations() method ObjectInitializer (line 220) | public void ObjectInitializer() method CollectionExpression (line 233) | public void CollectionExpression() method Constructors (line 258) | public void Constructors() method Lambdas (line 306) | public void Lambdas(int[] list) method If (line 337) | public void If() method While (line 355) | public void While() method For (line 369) | public void For() method ConditionalAccess (line 383) | public void ConditionalAccess(Builder builder) method SwitchExpressions (line 410) | public void SwitchExpressions(object arg) method Throw (line 426) | public void Throw(bool condition, object arg) method Builders (line 449) | public void Builders() method ArgumentWithInvocation (line 474) | public void ArgumentWithInvocation() method CollectionInitializer (line 493) | public void CollectionInitializer() method Ternary (line 517) | public void Ternary(bool condition) method Invocation (line 552) | public static bool Invocation(params object[] args) => true; method Coverage (line 554) | [Obsolete(""" class Builder (line 560) | public class Builder method Builder (line 562) | public Builder(params object[] args) { } method Build (line 563) | public Builder Build(params object[] args) => this; class WithProperty (line 566) | public class WithProperty class WithThreeArguments (line 572) | public class WithThreeArguments method WithThreeArguments (line 574) | public WithThreeArguments(string a, string b, string c) { } FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/IndentTernary.cs class Sample (line 4) | public class Sample method Method (line 8) | public void Method() method ArrowNoncompliant (line 57) | public bool ArrowNoncompliant() => method ArrowCompliant (line 62) | public bool ArrowCompliant() => method ArrowLongerCondition (line 67) | public bool ArrowLongerCondition() => method ArrowNotInScope (line 73) | public bool ArrowNotInScope() => method ArrowInInvocationArgument (line 76) | public object ArrowInInvocationArgument() => method ArrowInInvocationArgumentLongerCondition (line 81) | public object ArrowInInvocationArgumentLongerCondition() => method ArrowInConstructorArgument (line 87) | public object ArrowInConstructorArgument() => method ReturnNoncompliant (line 92) | public bool ReturnNoncompliant() method ReturnCompliant (line 99) | public bool ReturnCompliant() method ReturnLongerCondition (line 106) | public bool ReturnLongerCondition() method Invocations (line 118) | public void Invocations() method ObjectInitializer (line 179) | public void ObjectInitializer() method CollectionExpression (line 189) | public void CollectionExpression() method Lambdas (line 204) | public void Lambdas(int[] list, int[] longer) method If (line 235) | public void If() method While (line 260) | public void While() method For (line 274) | public void For() method ConditionalAccess (line 288) | public void ConditionalAccess(Builder builder) method SwitchExpressions (line 307) | public void SwitchExpressions(object arg) method Something (line 324) | [Obsolete(true // Not supported, used for coverage class Builder (line 330) | public class Builder method Build (line 332) | public Builder Build(params object[] args) => this; class WithProperty (line 335) | public class WithProperty FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/InitializerLine.cs class Fields (line 4) | public class Fields method Compute (line 71) | private static int Compute() => 42; class Properties (line 88) | public class Properties FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/LambdaParameterName.cs class Sample (line 5) | public class Sample method SimpleLambdas (line 7) | public void SimpleLambdas() method ParenthesizedLambdas (line 30) | public void ParenthesizedLambdas() method Errors (line 39) | public void Errors() method Method (line 60) | private void Method(Func f) { } method Method (line 61) | private void Method(Func f) { } method Method (line 62) | private void Method(Func f) { } method Method (line 64) | private void Method(Action a) { } method Method (line 65) | private void Method(Action a) { } method Method (line 66) | private void Method(Action a) { } class RuleRegistration (line 69) | public class RuleRegistration method Initialize (line 71) | public void Initialize() method RegisterSonarWhateverAnalysisContext (line 83) | protected void RegisterSonarWhateverAnalysisContext(Action action) { } method RegisterSomethingAnalysisContext (line 86) | protected void RegisterSomethingAnalysisContext(Action this; method StaticMethod (line 133) | public static Builder StaticMethod() => null; method IsTrue (line 134) | public bool IsTrue() => true; method Should (line 140) | public Builder Should() => null; method BeSomething (line 141) | public Builder BeSomething() => null; class NestedOnce (line 143) | public class NestedOnce class NestedTwice (line 145) | public class NestedTwice method StaticMethod (line 147) | public static Builder StaticMethod() => null; FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/MemberVisibilityOrdering.cs class ValidOrder (line 3) | public class ValidOrder class AbovePrivate (line 22) | public class AbovePrivate class AboveProtected (line 38) | public class AboveProtected class AboveProtectedInternal (line 46) | public class AboveProtectedInternal class AboveProtectedPrivate (line 54) | public class AboveProtectedPrivate class CompliantClassFull (line 62) | public abstract class CompliantClassFull type Enum1 (line 67) | public enum Enum1 type Enum2 (line 73) | private enum Enum2 method AbstractMethod1 (line 85) | public abstract int AbstractMethod1(); method AbstractMethod2 (line 87) | protected abstract int AbstractMethod2(); method CompliantClassFull (line 105) | public CompliantClassFull() { } method CompliantClassFull (line 106) | private CompliantClassFull(int arg) { } method Method1 (line 110) | public void Method1() { } method Method2 (line 111) | private void Method2() { } class Nested1 (line 113) | public class Nested1 { } type Nested2 (line 114) | private struct Nested2 { } type Nested3 (line 115) | public record Nested3 { } type Nested4 (line 116) | protected record struct Nested4 { } type Nested5 (line 117) | public record Nested5 { } type Nested6 (line 118) | public struct Nested6 { } class Nested7 (line 119) | public class Nested7 { } class AllWrong (line 123) | public abstract class AllWrong type Enum1 (line 128) | private enum Enum1 // Secondary [Enum] type Enum2 (line 134) | public enum Enum2 // Noncompliant [Enum] {{Move ... method AbstractMethod1 (line 146) | protected abstract int AbstractMethod1(); method AbstractMethod2 (line 148) | public abstract int AbstractMethod2(); method AllWrong (line 166) | private AllWrong() { } method AllWrong (line 167) | public AllWrong(int arg) { } method Method1 (line 169) | private void Method1() { } method Method2 (line 170) | public void Method2() { } type R (line 173) | public record R type RS (line 179) | public record struct RS type S (line 185) | public record struct S class ExtensionBlockCompliant (line 191) | public static class ExtensionBlockCompliant method extension (line 193) | extension(string s) method PublicMethod (line 199) | public void PublicMethod() { } method PrivateMethod (line 200) | private void PrivateMethod() { } class ExtensionBlockWrong (line 204) | public static class ExtensionBlockWrong method extension (line 206) | extension(string s) method PrivateMethod (line 211) | private void PrivateMethod() { } method PublicMethod (line 212) | public void PublicMethod() { } FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/MethodExpressionBodyLine.cs class Sample (line 4) | public class Sample method Sample (line 8) | public Sample() => field = new Exception(); method MemberAccess (line 11) | public object MemberAccess() => field.Message; method Invocation (line 14) | public object Invocation() => Expression(); method Expression (line 15) | public object Expression() => 1 + 2; method SingleName (line 22) | public object SingleName() => field; method Simple_Null (line 23) | public object Simple_Null() => null; method Simple_Bool (line 24) | public object Simple_Bool() => true; method Simple_Int (line 25) | public object Simple_Int() => 42; method Simple_Decimal (line 26) | public object Simple_Decimal() => 42.42D; method ComplexCompliant (line 28) | public bool ComplexCompliant() => method WithBody (line 31) | public void WithBody() type IBase (line 37) | public interface IBase method FromInterface (line 39) | object FromInterface(); class Base (line 42) | public abstract class Base method FromAbstractClass (line 44) | public abstract object FromAbstractClass(); method FromVirtualMethod (line 45) | public virtual object FromVirtualMethod() => 42; class TestStub (line 48) | public class TestStub : Base, IBase method NewMethod (line 50) | public object NewMethod() => throw new NotImplementedException(); method FromAbstractClass (line 53) | public override object FromAbstractClass() => throw new NotImplemented... method FromVirtualMethod (line 54) | public override object FromVirtualMethod() => throw new NotSupportedEx... method FromInterface (line 55) | public object FromInterface() => throw new NotImplementedException(); class UnexpectedExceptionType (line 58) | public class UnexpectedExceptionType : IBase method FromInterface (line 60) | public object FromInterface() => throw new ArgumentException("This is ... FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/MoveMethodToDedicatedExtensionClass.cs class StringExtensions (line 7) | static class StringExtensions method ToUpperCase (line 9) | public static string ToUpperCase(this string str) method String (line 14) | public static string String(this System.String str) => str; method Generic (line 16) | public static string Generic(this System.String str, T other) => st... method ToLowerCase (line 18) | public static string ToLowerCase(this MyString str) => str.ToLower(); method Short (line 20) | public static short Short(this short nb) => nb; method Int (line 22) | public static int Int(this int nb) => nb; method Long (line 24) | public static long Long(this long nb) => nb; method Int16 (line 26) | public static short Int16(this System.Int16 nb) => nb; method Int32 (line 27) | public static int Int32(this System.Int32 nb) => nb; method Int64 (line 28) | public static long Int64(this System.Int64 nb) => nb; method Int128 (line 29) | public static System.Int128 Int128(this System.Int128 nb) => nb; method ValueTuple (line 31) | public static void ValueTuple(this (int, int) tuple) { } method ValueTruple (line 32) | public static void ValueTruple(this (int, int, int) truple) { } method FunWithTuples (line 33) | public static void FunWithTuples(this (int, ExplodedNode, System.Int64... method FunWithTwoples (line 34) | public static void FunWithTwoples(this (string, ExplodedNode, System.I... class Generic (line 37) | class Generic { } class GenericExtensions (line 39) | static class GenericExtensions method Generic (line 41) | public static T Generic(this T t) => t; method Generic (line 42) | public static T[] Generic(this T[] t) => t; method ConstrainedGeneric (line 44) | public static T ConstrainedGeneric(this T t) where T : Generic => t; method InvalidConstrainedGeneric (line 47) | public static T InvalidConstrainedGeneric(this T t) where T : class... class IEnumerableExtensions (line 50) | static class IEnumerableExtensions method ToEnumerable (line 52) | public static IEnumerable ToEnumerable(this T item) //... method GenericExtension (line 57) | public static IEnumerable GenericExtension(this IEnumerable e... method ComplexConstrainedGeneric (line 59) | public static T ComplexConstrainedGeneric(this T t) where T : class... method TwoConstrainedGeneric (line 61) | public static T TwoConstrainedGeneric(this T t) where T : class, IE... class ICloneableExtensions (line 64) | static class ICloneableExtensions method TwoConstrainedGeneric (line 66) | public static T TwoConstrainedGeneric(this T t) where T : struct, I... class NotClonableNorEnumerableExtensions (line 69) | static class NotClonableNorEnumerableExtensions method TwoConstrainedGeneric (line 71) | public static T TwoConstrainedGeneric(this T t) where T : class, IE... method DifferentOrder (line 72) | public static T DifferentOrder(this T t) where T : class, ICloneabl... class DictionaryExtensions (line 75) | static class DictionaryExtensions method GenericExtension (line 77) | public static Dictionary GenericExtension(this Dictionary<... class NotAnExtensionClass (line 80) | class NotAnExtensionClass // Error [CS1106] method Int (line 82) | public static int Int(this int nb) => nb; class IntExtensions (line 85) | class IntExtensions // Error [CS1106] method Int (line 87) | public static int Int(this int nb) => nb; method Int (line 92) | public static int Int(this int nb) => nb; class IntExtensions (line 90) | class IntExtensions // Error [CS1106] method Int (line 87) | public static int Int(this int nb) => nb; method Int (line 92) | public static int Int(this int nb) => nb; class InvalidExtensions (line 95) | static class InvalidExtensions method Dynamic (line 98) | public static void Dynamic(this dynamic dynamic) { } method Pointer (line 101) | unsafe public static void Pointer(this int* pointer) { } class ExplodedNode (line 104) | public class ExplodedNode { } class ExplodedNodeExtensions (line 106) | static class ExplodedNodeExtensions method FromIEnumerable (line 108) | public static void FromIEnumerable(this IEnumerable node... method FromDictionaryValue (line 109) | public static void FromDictionaryValue(this Dictionary(this Dictionary(this Dictionary action) { } class SomeOtherExtensions (line 116) | static class SomeOtherExtensions method FromIEnumerable (line 118) | public static void FromIEnumerable(this IEnumerable node... method FromDictionaryValue (line 119) | public static void FromDictionaryValue(this Dictionary(this Dictionary(this Dictionary(this Dictionary action) { } class ListExtensions (line 127) | static class ListExtensions method GenericList (line 129) | public static void GenericList(this List items) { } method NestedGeneric (line 130) | public static void NestedGeneric(this List(this GenericIntermediateType gene... method NestedGeneric (line 138) | public static void NestedGeneric(this List(this List { } class NoncompliantCSharp14Extensions (line 143) | static class NoncompliantCSharp14Extensions method extension (line 145) | extension(IEnumerable nodes) method extension (line 150) | extension(IEnumerable) class Compliant (line 156) | public class Compliant { } class CompliantExtensions (line 158) | static class CompliantExtensions method extension (line 160) | extension(IEnumerable nodes) method extension (line 165) | extension(IEnumerable) FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/NullPatternMatching.cs class Sample (line 4) | public class Sample method Method (line 6) | public void Method(object o, int a, int b, object another) method Invocation (line 45) | private object Invocation() => null; method Use (line 47) | private void Use(bool b) { } method CustomOperator (line 49) | public void CustomOperator() method ExpressionTree (line 58) | public void ExpressionTree(object x) class IsPattern (line 74) | public class IsPattern method Method (line 76) | public void Method(object value, Exception ex) method Compliant (line 84) | public void Compliant(object value, string str, Exception ex) method Value (line 96) | private object Value() => null; FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/OperatorLocation.cs class MyClass (line 9) | class MyClass method Compliant (line 11) | void Compliant(int a, int b, int c, object o, List list) method LogicalOperator (line 54) | void LogicalOperator(bool a, bool b) method Ternary (line 79) | void Ternary(bool a, bool b) method Coelesce (line 97) | void Coelesce(object o1, object o2) method AsIs (line 112) | void AsIs(object o) method Pattern (line 128) | void Pattern(object o1, object o2) method Arithmetic (line 144) | void Arithmetic(int a, int b, string str) method Comparison (line 185) | void Comparison(int a, int b) method Shift (line 225) | void Shift(int a, int b) method Unary (line 248) | void Unary(int a, bool b) method Range (line 287) | void Range() method MemberAccess (line 299) | void MemberAccess(object o) method QualifiedName (line 329) | void QualifiedName() FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/PropertyOrdering.cs class AllValid (line 1) | public class AllValid class SomeValid (line 26) | public class SomeValid class ProtectedInternal (line 43) | public class ProtectedInternal class ProtectedPrivate (line 49) | public class ProtectedPrivate class AllWrong (line 55) | public class AllWrong type R (line 79) | public record R type RS (line 86) | public record struct RS type Str (line 92) | public struct Str FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/ProtectedFieldsCase.cs class Sample (line 2) | public class Sample FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/SeparateDeclarations.cs class PrecededByParenthesis (line 5) | public class PrecededByParenthesis() { } class Adjacent (line 6) | public class Adjacent { } class CompliantClassFull (line 11) | public abstract class CompliantClassFull type Enum1 (line 16) | public enum Enum1 type Enum2 (line 22) | public enum Enum2 type Enum3 (line 28) | private enum Enum3 { None, Any, All } method AbstractMethod1 (line 35) | public abstract int AbstractMethod1(); method AbstractMethod2 (line 37) | public abstract int AbstractMethod2(); method CompliantClassFull (line 61) | public CompliantClassFull() { } method CompliantClassFull (line 63) | private CompliantClassFull(int arg) { } method Method1 (line 67) | private void Method1() { } method Method2 (line 69) | public void Method2() { } class Nested1 (line 79) | public class Nested1 { } type Nested2 (line 81) | private struct Nested2 { } type Nested3 (line 83) | public record Nested3 { } type Nested4 (line 85) | protected record struct Nested4 { } type Nested5 (line 87) | public record Nested5 { } type Nested6 (line 89) | public struct Nested6 { } class Nested7 (line 91) | public class Nested7 { } class AllWrong (line 94) | public abstract class AllWrong type Enum1 (line 98) | public enum Enum1 // Noncompliant type Enum2 (line 103) | private enum Enum2 // Noncompliant type Enum3 (line 109) | private enum Enum3 { None } method AbstractMethod1 (line 114) | public abstract int AbstractMethod1(); method AllWrong (line 129) | public AllWrong() { } method AllWrong (line 130) | private AllWrong(int arg) { } method Method1 (line 132) | private void Method1() { } method Method2 (line 133) | public void Method2() { } class Nested1 (line 138) | public class Nested1 { } type Nested2 (line 139) | private struct Nested2 { } type Nested3 (line 140) | public record Nested3 { } type Nested4 (line 141) | protected record struct Nested4 { } class Comments (line 144) | public class Comments class Compliant (line 146) | public class Compliant { } class CompliantSingleSingleLine (line 149) | public class CompliantSingleSingleLine { } class CompliantTwoSeparatedSingleLine (line 153) | public class CompliantTwoSeparatedSingleLine { } class CompliantSingleMultiLine1 (line 158) | public class CompliantSingleMultiLine1 { } class CompliantSingleMultiLine2 (line 161) | public class CompliantSingleMultiLine2 { } class CompliantMultipleMultiLine (line 165) | public class CompliantMultipleMultiLine { } class CompliantDocumentation (line 170) | public class CompliantDocumentation { } class CompliantDocumentationInterrupted (line 176) | public class CompliantDocumentationInterrupted { } class CompliantMultilineDocumentation (line 183) | public class CompliantMultilineDocumentation { } class ProblemsStartBelowThisLine (line 185) | public class ProblemsStartBelowThisLine { } class SingleSingleLine (line 187) | public class SingleSingleLine { } class MultipleSingleLine (line 190) | public class MultipleSingleLine { } class SingleMultiLine1 (line 194) | public class SingleMultiLine1 { } class SingleMultiLine2 (line 196) | public class SingleMultiLine2 { } class MultipleMultiLine (line 199) | public class MultipleMultiLine { } class Documentation (line 203) | public class Documentation { } class InterruptedDocumentation (line 208) | public class InterruptedDocumentation { } class MultilineDocumentation (line 214) | public class MultilineDocumentation { } class MultiLines (line 217) | public class MultiLines type ISomething (line 274) | public interface ISomething method SayHello (line 276) | void SayHello(); method DoSomething (line 278) | int DoSomething(); method DoNothing (line 284) | void DoNothing(); method DoNothingAtAll (line 285) | void DoNothingAtAll(); FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/TernaryLine.cs class Sample (line 2) | public class Sample method Method (line 7) | public void Method() FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/TypeMemberOrdering.cs class CompliantClassSmall (line 4) | public class CompliantClassSmall method Method (line 12) | public void Method() { } class CompliantClassFull (line 15) | public abstract class CompliantClassFull type Enum1 (line 20) | public enum Enum1 type Enum2 (line 26) | private enum Enum2 method AbstractMethod1 (line 38) | public abstract int AbstractMethod1(); method AbstractMethod2 (line 40) | public abstract int AbstractMethod2(); method CompliantClassFull (line 59) | public CompliantClassFull() { } method CompliantClassFull (line 60) | private CompliantClassFull(int arg) { } method Method1 (line 64) | private void Method1() { } method Method2 (line 65) | public void Method2() { } class Nested1 (line 72) | public class Nested1 { } type Nested2 (line 73) | private struct Nested2 { } type Nested3 (line 74) | public record Nested3 { } type Nested4 (line 75) | protected record struct Nested4 { } type Nested5 (line 76) | public record Nested5 { } type Nested6 (line 77) | public struct Nested6 { } class Nested7 (line 78) | public class Nested7 { } class WhenMemberShouldBeFirst (line 81) | public class WhenMemberShouldBeFirst method WhenMemberShouldBeFirst (line 83) | public WhenMemberShouldBeFirst() { } method Method (line 85) | public void Method() { } class Nested (line 89) | public class Nested { } class WhenMemberShouldBeLast (line 92) | public class WhenMemberShouldBeLast class Nested (line 96) | public class Nested { } method WhenMemberShouldBeLast (line 98) | public WhenMemberShouldBeLast() { } method Method (line 101) | public void Method() { } class WhenMembersAreSwapped (line 104) | public class WhenMembersAreSwapped method Method (line 108) | public void Method() { } method WhenMembersAreSwapped (line 110) | public WhenMembersAreSwapped() { } class Nested (line 112) | public class Nested { } class WhenLessMembersAreSwapped (line 115) | public class WhenLessMembersAreSwapped method Method1 (line 119) | public void Method1() { } method Method2 (line 120) | public void Method2() { } method WhenLessMembersAreSwapped (line 123) | public WhenLessMembersAreSwapped() { } class Nested (line 126) | public class Nested { } class InterleavedViolations (line 129) | public class InterleavedViolations method Method1 (line 134) | void Method1() { } method Method2 (line 136) | void Method2() { } method Method3 (line 138) | void Method3() { } class AllWrong (line 142) | public abstract class AllWrong class Nested (line 144) | public class Nested { } method Method (line 147) | public void Method() { } method Method2 (line 150) | public void Method2() { } method AllWrong (line 164) | public AllWrong() { } method Abstract (line 168) | public abstract int Abstract(); type Enum (line 186) | public enum Enum { None, All } type R (line 193) | public record R (string Name) type S (line 199) | public struct S method DoNothing (line 201) | public void DoNothing() { } type RS (line 205) | public record struct RS type ISomething (line 211) | public interface ISomething method DoNothing (line 213) | public void DoNothing(); class AbstractClassValid (line 217) | public class AbstractClassValid method Go (line 219) | public void Go() { } class NestedClassBefore (line 221) | protected class NestedClassBefore(); class NestedAbstract (line 222) | protected abstract class NestedAbstract { } class NestedClassAfter (line 223) | protected class NestedClassAfter(); class AbstractClassWrong (line 226) | public class AbstractClassWrong class Nested (line 228) | protected abstract class Nested { } method Go (line 230) | public void Go() { } class ExtensionBlockCompliant (line 233) | public static class ExtensionBlockCompliant method extension (line 235) | extension(string s) class ExtensionBlockWrong (line 243) | public static class ExtensionBlockWrong method extension (line 245) | extension(string s) FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/UseDifferentMember.cs class UseIsExtension (line 7) | internal class UseIsExtension method Test (line 9) | public void Test(IMethodSymbol methodSymbol) method IsExtensionMethod (line 20) | private void IsExtensionMethod() class Inner (line 25) | class Inner class IMethodSymbolExtensions (line 31) | public static class IMethodSymbolExtensions method extension (line 33) | extension(IMethodSymbol methodSymbol) FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/UseField.cs class Sample (line 1) | public class Sample class Abstract (line 40) | public abstract class Abstract class Override (line 45) | public abstract class Override : Abstract FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/UseInnermostRegistrationContext.cs class UseInnermostRegistrationContext (line 8) | class UseInnermostRegistrationContext method SonarAnalysisContext (line 10) | void SonarAnalysisContext(SonarAnalysisContext context) => method SonarCompilationStartAnalysisContext (line 14) | void SonarCompilationStartAnalysisContext(SonarCompilationStartAnalysi... method SonarCodeBlockStartAnalysisContext (line 18) | void SonarCodeBlockStartAnalysisContext(SonarCodeBlockStartAnalysisCon... method SonarSymbolStartAnalysisContext (line 21) | void SonarSymbolStartAnalysisContext(SonarSymbolStartAnalysisContext s... method SonarParametrizedAnalysisContext (line 24) | void SonarParametrizedAnalysisContext(SonarParametrizedAnalysisContext... method NestedAndDuplicated (line 27) | void NestedAndDuplicated(SonarAnalysisContext context) method TwoContextInOutterScope (line 56) | void TwoContextInOutterScope(SonarAnalysisContext context, SonarCompil... FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/UseLinqExtensions.cs class Sample (line 4) | public class Sample method Query (line 6) | public IEnumerable Query(IEnumerable list) => method Extensions (line 11) | public IEnumerable Extensions(IEnumerable list) => FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/UseNullInsteadOfDefault.cs class UseNullInsteadOfDefault (line 4) | class UseNullInsteadOfDefault method Method (line 6) | void Method() method Use (line 55) | void Use(string s) { } method OptionalWithNull (line 56) | void OptionalWithNull(string name = null) { } method OptionalWithDefault (line 57) | void OptionalWithDefault(string name = default) { } method OptionalWithNull (line 58) | void OptionalWithNull(int? name = null) { } method OptionalWithDefault (line 59) | void OptionalWithDefault(int name = default) { } method OptionalWithDefault (line 60) | void OptionalWithDefault(int? name = default) { } method GenericMethod (line 62) | void GenericMethod() method GenericMethodClassConstraint (line 96) | void GenericMethodClassConstraint() method GenericMethodStructConstraint (line 134) | void GenericMethodStructConstraint() method GenericMethodEnumConstraint (line 143) | void GenericMethodEnumConstraint() method GenericMethodStructEnumConstraint (line 152) | void GenericMethodStructEnumConstraint() FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/UsePositiveLogic.cs class Sample (line 1) | public class Sample method Not (line 5) | public object Not(object value) method NotEquals (line 67) | public object NotEquals(object left, object right) method NotEqualsBool (line 88) | public object NotEqualsBool(bool left, bool right) method Ternary (line 109) | public void Ternary(object value) method NotAndChain (line 120) | public void NotAndChain(object value) method PatternMatching (line 155) | public void PatternMatching(object value) method ConditionAndPatternChain_Simple (line 187) | public void ConditionAndPatternChain_Simple(object value) method ConditionAndPatternChain_Long (line 206) | public void ConditionAndPatternChain_Long(object value) FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/UseRawString.cs class Sample (line 1) | public class Sample method Method (line 3) | public void Method() method SingleLine (line 41) | public void SingleLine() method Binary (line 55) | public void Binary() FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/UseRegexSafeIsMatch.cs class UseRegexSafeIsMatchNonCompliant (line 7) | class UseRegexSafeIsMatchNonCompliant method InstanceRegex (line 12) | void InstanceRegex(string content) class UseRegexSafeIsMatchCompliant (line 43) | class UseRegexSafeIsMatchCompliant class Regex (line 45) | private class Regex method IsMatch (line 47) | public bool IsMatch(string input) => false; method Matches (line 48) | public MatchCollection Matches(string input) => null; method Match (line 49) | public Match Match(string input) => null; method IsMatch (line 50) | public static bool IsMatch(string input, string pattern) => false; method Matches (line 51) | public static MatchCollection Matches(string input, string pattern) ... method Match (line 52) | public static Match Match(string input, string pattern) => null; method InstanceRegex (line 57) | void InstanceRegex(string content) class RegexExtensions (line 71) | public static class RegexExtensions method SafeIsMatch (line 73) | public static bool SafeIsMatch(this Regex regex, string input) => method SafeMatch (line 75) | public static Match SafeMatch(this Regex regex, string input) => method SafeIsMatch (line 77) | public static bool SafeIsMatch(this Regex regex, string input, bool ti... method SafeMatches (line 79) | public static MatchCollection SafeMatches(this Regex regex, string inp... FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/UseShortName.cs class Sample (line 3) | public class Sample method SuggestedNames (line 5) | public void SuggestedNames(SyntaxNode node, SyntaxTree tree, SemanticM... method OtherNames (line 6) | public void OtherNames(SyntaxNode song, SyntaxTree wood, SemanticModel... method LongName1 (line 8) | public void LongName1(SyntaxNode syntaxNode) { } method LongName2 (line 10) | public void LongName2(SyntaxNode prefixedSyntaxNode) { } method LongName3 (line 11) | public void LongName3(SyntaxNode syntaxNodeCount) { } method LongName4 (line 12) | public void LongName4(SyntaxTree syntaxTree) { } method LongName5 (line 13) | public void LongName5(SyntaxTree firstSyntaxTreeCount) { } method LongName6 (line 14) | public void LongName6(CancellationToken cancellationToken) { } method TypedDeclarations (line 34) | public void TypedDeclarations() method VarDeclarations (line 48) | public void VarDeclarations() method UnexpectedType (line 63) | public void UnexpectedType(SyntaxNode syntaxTree) // Wrong, but comp... method CreateNode (line 69) | private SyntaxNode CreateNode() => null; method CreateTree (line 70) | private SyntaxTree CreateTree() => null; method CreateModel (line 71) | private SemanticModel CreateModel() => null; method CreateCancel (line 72) | private CancellationToken CreateCancel() => default; class NestedWithPublicFields (line 74) | private class NestedWithPublicFields class ArrowProperty (line 82) | public class ArrowProperty class BodyProperty (line 87) | public class BodyProperty class Methods (line 96) | public class Methods method SyntaxNode (line 99) | public void SyntaxNode() { } method SyntaxTree (line 100) | public void SyntaxTree() { } method SemanticModel (line 101) | public void SemanticModel() { } method CancellationToken (line 102) | public void CancellationToken() { } class Base (line 105) | public abstract class Base method DoSomething (line 107) | protected abstract void DoSomething(SyntaxNode syntaxNode); class Inherited (line 110) | public class Inherited : Base method DoSomething (line 112) | protected override void DoSomething(SyntaxNode syntaxNode) // Complian... type IInterface (line 117) | public interface IInterface method DoSomething (line 119) | void DoSomething(SyntaxNode syntaxNode); class Implemented (line 122) | public class Implemented : IInterface method DoSomething (line 124) | public void DoSomething(SyntaxNode syntaxNode) // Compliant so we don'... class Partial (line 129) | public partial class Partial method DoSomething (line 131) | public partial void DoSomething(SyntaxNode syntaxNode); method DoSomething (line 136) | public partial void DoSomething(SyntaxNode syntaxNode) // Compliant so... class Partial (line 134) | public partial class Partial method DoSomething (line 131) | public partial void DoSomething(SyntaxNode syntaxNode); method DoSomething (line 136) | public partial void DoSomething(SyntaxNode syntaxNode) // Compliant so... class SyntaxNode (line 142) | public class SyntaxNode { } class SyntaxToken (line 143) | public class SyntaxToken { } class SyntaxTree (line 144) | public class SyntaxTree { } class SyntaxTrivia (line 145) | public class SyntaxTrivia { } class SemanticModel (line 146) | public class SemanticModel { } class DiagnosticDescriptor (line 147) | public class DiagnosticDescriptor { } FILE: analyzers/tests/SonarAnalyzer.CSharp.Styling.Test/TestCases/UseVar.cs class UseVar (line 3) | public class UseVar method FromMethod (line 8) | List FromMethod() => new(); method Method (line 10) | List Method(bool condition, List optional = new()) // ... FILE: analyzers/tests/SonarAnalyzer.Core.Test/AnalysisContext/IssueReporterTest.cs class IssueReporterTest (line 24) | [TestClass] method ReportIssueCore_DesignTimeDiagnostic_ExcludedRule (line 30) | [TestMethod] method ReportIssueCore_DesignTimeDiagnostic_HasMappedPath_True (line 49) | [TestMethod] method ReportIssueCore_DesignTimeDiagnostic_HasMappedPath_False (line 57) | [TestMethod] method ReportIssueCore_DesignTimeDiagnostic_RoslynVersion_1000_0_0 (line 65) | [TestMethod] method ReportIssueCore_DesignTimeDiagnostic_RoslynVersion_Greater_Than_Current (line 73) | [TestMethod] method ReportIssueCore_DesignTimeDiagnostic_RoslynVersion_Less_Than_Current (line 84) | [TestMethod] method ReportIssueCore_MinimumRoslyVersion_Is_4_9_2 (line 105) | [TestMethod] method IsTextMatchingVbcErrorPattern_ReturnsExpected (line 109) | [TestMethod] method ReportDiagnostic (line 134) | private Diagnostic ReportDiagnostic(string filePath, bool hasMappedPat... method GetTree (line 152) | private static SyntaxTree GetTree(string filePath) method GetDiagnostic (line 163) | private static Diagnostic GetDiagnostic(string diagnosticId, SyntaxTre... method GetLocation (line 170) | private static Location GetLocation(SyntaxTree tree, bool hasMappedPath) method GetPosition (line 179) | private static FileLinePositionSpan GetPosition(bool hasMappedPath) class DummyReportingContext (line 193) | private class DummyReportingContext(DummyDiagnosticReporter reporter, ... class DummyDiagnosticReporter (line 196) | private class DummyDiagnosticReporter method ReportDiagnostic (line 201) | public void ReportDiagnostic(Diagnostic diagnostic) FILE: analyzers/tests/SonarAnalyzer.Core.Test/AnalysisContext/SonarCodeBlockReportingContextTest.cs class SonarCodeBlockReportingContextTest (line 22) | [TestClass] method Properties_ArePropagated (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/AnalysisContext/SonarCodeBlockStartAnalysisContextTest.cs class SonarCodeBlockStartAnalysisContextTest (line 22) | [TestClass] method Properties_ArePropagated (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/AnalysisContext/SonarCodeFixContextTest.cs class SonarCodeFixContextTest (line 24) | [TestClass] method SonarCodeFixContext_Properties_ReturnRoslynCodeFixContextProperties (line 27) | [TestMethod] method SonarCodeFixContext_RegisterDocumentCodeFix_CodeFixRegistered (line 43) | [TestMethod] method SonarCodeFixContext_RegisterSolutionCodeFix_CodeFixRegistered (line 55) | [TestMethod] method CreateProject (line 67) | private static ProjectBuilder CreateProject() => FILE: analyzers/tests/SonarAnalyzer.Core.Test/AnalysisContext/SonarCompilationReportingContextTest.cs class SonarCompilationReportingContextTest (line 20) | [TestClass] method Properties_ArePropagated (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/AnalysisContext/SonarCompilationStartAnalysisContextTest.cs class SonarCompilationStartAnalysisContextTest (line 20) | [TestClass] method Properties_ArePropagated (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/AnalysisContext/SonarSemanticModelReportingContextTest.cs class SonarSemanticModelReportingContextTest (line 23) | [TestClass] method Properties_ArePropagated (line 26) | [TestMethod] method RegistrationIsExecuted_SonarAnalysisContext_CS (line 42) | [TestMethod] method RegistrationIsNotExecuted_SonarAnalysisContext_TestScope_CS (line 52) | [TestMethod] method RegistrationIsNotExecuted_SonarAnalysisContext_GeneratedCode_CS (line 63) | [TestMethod] method RegistrationIsExecuted_SonarAnalysisContext_VB (line 74) | [TestMethod] method RegistrationInAllFilesIsExecuted_SonarCompilationStartAnalysisContext_CS (line 84) | [TestMethod] method RegistrationIsNotExecuted_SonarCompilationStartAnalysisContext_TestScope_CS (line 113) | [TestMethod] method RegistrationIsNotExecuted_SonarCompilationStartAnalysisContext_GeneratedCode_CS (line 125) | [TestMethod] method RegistrationIsExecuted_SonarCompilationStartAnalysisContext_VB (line 136) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/AnalysisContext/SonarSymbolReportingContextTest.cs class SonarSymbolReportingContextTest (line 23) | [TestClass] method Properties_ArePropagated (line 26) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/AnalysisContext/SonarSyntaxNodeReportingContextTest.cs class SonarSyntaxNodeReportingContextTest (line 23) | [TestClass] method Properties_ArePropagated (line 26) | [TestMethod] method ReportIssue_TreeNotInCompilation_DoNotReport (line 48) | [TestMethod] method IsRedundantPrimaryConstructorBaseTypeContext_ReturnsTrueForTypeDeclaration (line 83) | [TestMethod] class TestAnalyzer (line 105) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method TestAnalyzer (line 116) | public TestAnalyzer(SyntaxKind[] syntaxKinds, Func FILE: analyzers/tests/SonarAnalyzer.Core.Test/AnalysisContext/SonarSyntaxTreeReportingContextTest.cs class SonarSyntaxTreeReportingContextTest (line 20) | [TestClass] method Properties_ArePropagated (line 23) | [TestMethod] method ReportIssue_IgnoreSecondaryLocationOutsideCompilation (line 38) | [TestMethod] method ReportIssue_NullArguments_Throws (line 59) | [TestMethod] method ReportIssue_PropertiesAndSecondaryLocations_Combine (line 72) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Analyzers/DiagnosticDescriptorFactoryTest.cs class DiagnosticDescriptorFactoryTest (line 20) | [TestClass] method GetUtilityDescriptor_Should_Contain_NotConfigurable_CustomTag (line 23) | [TestMethod] method Create_ConfiguresProperties_CS (line 34) | [TestMethod] method Create_ConfiguresProperties_VB (line 50) | [TestMethod] method Create_FadeOutCode_HasUnnecessaryTag_HasInfoSeverity (line 66) | [TestMethod] method Create_CompilationEndDiagnostic (line 75) | [TestMethod] method Create_HasCorrectSonarWayTag (line 91) | [TestMethod] method Create_HasCorrectScopeTags (line 101) | [TestMethod] method Create_UnexpectedType_Throws (line 112) | [TestMethod] method Create_ComputesCategory (line 120) | [TestMethod] method CreateRuleDescriptor (line 135) | private static RuleDescriptor CreateRuleDescriptor(SourceScope scope, ... FILE: analyzers/tests/SonarAnalyzer.Core.Test/Common/AnalyzerAdditionalFileTest.cs class AnalyzerAdditionalFileTest (line 20) | [TestClass] method AnalyzerAdditionalFile_GetText (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Common/AnalyzerConfigurationTest.cs class AnalyzerConfigurationTest (line 23) | [TestClass] method Initialize (line 34) | [TestInitialize] method AlwaysEnabled_WhenNotInitialized_ReturnsTrue (line 42) | [TestMethod] method AlwaysEnabled_AnyValue_ReturnsTrue (line 46) | [TestMethod] method ForceSonarCfg_DisabledByDefault (line 54) | [TestMethod] method ForceSonarCfg_DisabledByDefault_ExistExceptionalConfig (line 61) | [TestMethod] method AlwaysEnabled_IgnoresInitialize (line 69) | [TestMethod] method HotspotConfiguration_WhenInitializeIsCalledWithDifferentSonarLintPaths_UpdatesEnabledRules (line 78) | [TestMethod] method HotspotConfiguration_WhenInitializedTwiceWithTheSameFile_DoesNotUpdateEnabledRules (line 101) | [TestMethod] method HotspotConfiguration_WhenInitializeIsSecondTimeWithNonSonarLint_DoesNotUpdateEnabledRules (line 115) | [TestMethod] method HotspotConfiguration_WhenIsEnabledWithoutInitialized_ThrowException (line 129) | [TestMethod] method HotspotConfiguration_WhenIsInitializedWithNull_ThrowsException (line 136) | [TestMethod] method HotspotConfiguration_GivenDifferentFileName_WillNotFinishInitialization (line 143) | [TestMethod] method Initialize (line 152) | private static void Initialize(HotspotConfiguration sut, string path, ... method GetAdditionalFiles (line 155) | private static ImmutableArray GetAdditionalFiles(strin... FILE: analyzers/tests/SonarAnalyzer.Core.Test/Common/AnalyzerLanguageTest.cs class AnalyzerLanguageTest (line 20) | [TestClass] method ToString_ReturnsLanguageName (line 23) | [TestMethod] method FromPath_CS (line 30) | [TestMethod] method FromPath_VB (line 41) | [TestMethod] method FromPath_UnexpectedThrows (line 50) | [TestMethod] method FromName (line 60) | [TestMethod] method FromName_UnexpectedThrows (line 67) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Common/BidirectionalDictionaryTest.cs class BidirectionalDictionaryTest (line 20) | [TestClass] method Initialize (line 25) | [TestInitialize] method AddKeyA_AlreadyExists_Throws (line 29) | [TestMethod] method AddKeyB_AlreadyExists_Throws (line 36) | [TestMethod] method Keys_ReturnsCorrectKeys (line 43) | [TestMethod] method GetByA_ElementExists_ReturnsCorrectElement (line 56) | [TestMethod] method GetByB_ElementExists_ReturnsCorrectElement (line 63) | [TestMethod] method GetByA_ElementDoesNotExist_ThrowsException (line 70) | [TestMethod] method GetByB_ElementDoesNotExist_ThrowsException (line 74) | [TestMethod] method ContainsKeyByA_ElementExists_ReturnsTrue (line 78) | [TestMethod] method ContainsKeyByB_ElementExists_ReturnsTrue (line 85) | [TestMethod] method ContainsKeyByA_ElementDoesNotExist_ReturnsFalse (line 92) | [TestMethod] method ContainsKeyByB_ElementDoesNotExist_ReturnsFalse (line 99) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Common/DisjointSetsTest.cs class DisjointSetsTest (line 20) | [TestClass] method FindRootAndUnion_AreConsistent (line 25) | [TestMethod] method GetAllSetsAndUnion_AreConsistent (line 53) | [TestMethod] method GetAllSetsAndUnion_OfNestedTrees (line 74) | [TestMethod] method GetAllSets_ReturnsSortedSets (line 88) | [TestMethod] method AssertSets (line 97) | private static void AssertSets(List> expected, DisjointSe... FILE: analyzers/tests/SonarAnalyzer.Core.Test/Common/FixAllProviders/DocumentBasedFixAllProviderTest.cs class DocumentBasedFixAllProviderTest (line 23) | [TestClass] method GetFixAsync_ForSupportedScope_HasCorrectTitle (line 26) | [TestMethod] method GetFixAsync_ForUnsupportedScope_ReturnsNull (line 39) | [TestMethod] method GetFixAsync_ForDocument_OnlyTheDocumentChanged (line 49) | [TestMethod] method GetFixAsync_ForProjectAndSolution_AllFilesAreFixed (line 80) | [TestMethod] method CreateProject (line 113) | private static ProjectBuilder CreateProject() => FILE: analyzers/tests/SonarAnalyzer.Core.Test/Common/HashCodeTest.cs class HashCodeTest (line 24) | [TestClass] method Combine_ProducesDifferentResults (line 27) | [TestMethod] method DictionaryContentHash_StableForImmutableDictionary (line 43) | [TestMethod] method EnumerableUnorderedContentHash_Empty (line 54) | [TestMethod] method EnumerableUnorderedContentHash_Order (line 65) | [TestMethod] method EnumerableUnorderedContentHash_DifferentLength (line 76) | [TestMethod] method EnumerableOrderedContentHash_Empty (line 85) | [TestMethod] method EnumerableOrderedContentHash_Order (line 96) | [TestMethod] method EnumerableOrderedContentHash_DifferentLength (line 109) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Common/MultiValueDictionaryTest.cs class MultiValueDictionaryTest (line 20) | [TestClass] method MultiValueDictionary_Add (line 23) | [TestMethod] method MultiValueDictionary_Add_Set (line 37) | [TestMethod] method MultiValueDictionary_AddRange (line 49) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Common/NaturalLanguageDetectorTest.cs class NaturalLanguageDetectorTest (line 20) | [TestClass] method CalculateHumanLanguageScore (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Common/RuleLoaderTest.cs class RuleLoaderTest (line 22) | [TestClass] method GivenNonXmlFile_RuleLoader_Throws (line 25) | [TestMethod] method GivenSonarLintXml_RuleLoader_LoadsActiveRules (line 32) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Common/ShannonEntropyTest.cs class ShannonEntropyTest (line 20) | [TestClass] method Calculate_Entropy (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Common/UnexpectedLanguageExceptionTest.cs class UnexpectedLanguageExceptionTest (line 20) | [TestClass] method Message_String_Ctor (line 23) | [TestMethod] method Message_CS (line 27) | [TestMethod] method Message_VB (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Configuration/AnalysisConfigReaderTest.cs class AnalysisConfigReaderTest (line 20) | [TestClass] method MissingFile_ReturnsEmpty (line 25) | [TestMethod] method UnexpectedXml_Throws (line 33) | [TestMethod] method MissingContent (line 45) | [TestMethod] method UnchangedFiles_NotPresent_ReturnsEmpty (line 59) | [TestMethod] method UnchangedFiles_Empty_ReturnsEmpty (line 67) | [TestMethod] method UnchangedFiles_Present_ReturnsContent (line 75) | [TestMethod] method IsSonarCloud (line 83) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Configuration/FilesToAnalyzeProviderTest.cs class FilesToAnalyzeProviderTest (line 23) | [TestClass] method FileNameWithMixedCapitalizationAndMixedSlashes_FindFilesWithFileName_ReturnsAllWebConfigFiles (line 31) | [TestMethod] method FileNameWithMixedCapitalizationAndMixedSlashes_FindFilesWithRegex_ReturnsAllWebConfigFiles (line 40) | [TestMethod] method FileWithInvalidValues_FindFilesWithFileName_ReturnsValidValue (line 51) | [TestMethod] method FileWithInvalidValues_FindFilesWithRegex_ReturnsValidValue (line 61) | [TestMethod] method EmptyFile_FindFiles_ReturnsEmptyEnumerable (line 79) | [TestMethod] method InvalidPath_FindFiles_ReturnsEmptyEnumerable (line 88) | [TestMethod] method FileWithValidValues_FindFilesRequestingAnyFile_AllValuesFromTheFileAreReturned (line 101) | [TestMethod] method UnableToOpenFile_FindFiles_ReturnsEmptyEnumerable (line 118) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Configuration/ProjectConfigReaderTest.cs class ProjectConfigReaderTest (line 23) | [TestClass] method AllPropertiesAreSet (line 28) | [TestMethod] method WhenAllValuesAreSet_LoadsExpectedValues (line 41) | [TestMethod] method WithVariousPathFormats_ReturnsValueAsIs (line 54) | [TestMethod] method WhenHasMissingFilesToAnalyzePath_ReturnsCorrectValue (line 61) | [TestMethod] method WhenHasUnexpectedProjectType_FallsBackToProduct (line 73) | [TestMethod] method WhenHasMissingValues_FilesToAnalyzePath_ReturnsCorrectValue (line 77) | [TestMethod] method WhenInvalid_FilesToReturnPath_ThrowsException (line 86) | [TestMethod] method FilesToAnalyze_LoadsFileFromConfig (line 94) | [TestMethod] method AnalysisConfig_LoadsConfigFromDisk (line 107) | [TestMethod] method CreateProjectConfigReader (line 115) | private static ProjectConfigReader CreateProjectConfigReader(string re... FILE: analyzers/tests/SonarAnalyzer.Core.Test/Configuration/ProjectTypeCacheTest.cs class ProjectTypeCacheTest (line 20) | [TestClass] method TestReference_ShouldBeSynchronized (line 23) | [TestMethod] method IsTest_ReturnsTrueForTestFrameworks (line 51) | [TestMethod] method IsTest_ReturnsFalse (line 78) | [TestMethod] method IsTest_Compilation (line 86) | [TestMethod] method IsTest (line 94) | private static bool IsTest(IEnumerable additionalRe... method CreateSemanticModel (line 97) | private static SemanticModel CreateSemanticModel(IEnumerable sett... method AssertRules (line 54) | private static void AssertRules(List rules) method AssertKeyValuePair (line 75) | private static void AssertKeyValuePair(SonarLintXmlKeyValuePair pair, ... FILE: analyzers/tests/SonarAnalyzer.Core.Test/Extensions/BasicBlockExtensionsTest.cs class BasicBlockExtensionsTest (line 23) | [TestClass] method IsEnclosedIn_ReturnsTrueForLocalLifeTime (line 26) | [TestMethod] method IsEnclosedIn_IgnoresLocalLifeTimeForOtherKinds (line 44) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Extensions/CompilationExtensionsTest.cs class CompilationExtensionsTest (line 20) | [TestClass] method IsMemberAvailable_WithoutTypeCheck (line 33) | [TestMethod] method IsMemberAvailable_WithPredicate (line 46) | [TestMethod] method ReferencesAny_ShouldBeTrue (line 58) | [TestMethod] method ReferencesAny_ShouldBeFalse (line 69) | [TestMethod] method ReferencesAny_ShouldThrow (line 79) | [TestMethod] method ReferencesAny_ShouldBe (line 90) | private static void ReferencesAny_ShouldBe(bool expected, IEnumerable<... FILE: analyzers/tests/SonarAnalyzer.Core.Test/Extensions/ControlFlowGraphExtensionsTest.cs class ControlFlowGraphExtensionsTest (line 24) | [TestClass] method FindLocalFunctionCfgInScope_ThrowForUnexpectedSymbol (line 27) | [TestMethod] method FindLocalFunctionCfgInScope_ThrowForNullSymbol (line 44) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Extensions/DictionaryExtensionsTest.cs class DictionaryExtensionsTest (line 20) | [TestClass] method DictionaryEquals_Different (line 23) | [TestMethod] method DictionaryEquals_SameContent (line 38) | [TestMethod] method DictionaryEquals_SameContent_DifferentOrdering (line 47) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Extensions/IEnumerableExtensionsTest.cs class IEnumerableExtensionsTest (line 25) | [TestClass] method TestAreEqual_01 (line 28) | [TestMethod] method TestAreEqual_02 (line 37) | [TestMethod] method TestAreEqual_03 (line 46) | [TestMethod] method TestAreEqual_04 (line 55) | [TestMethod] method TestAreEqual_05 (line 64) | [TestMethod] method TestAreEqual_06 (line 73) | [TestMethod] method JoinStr_T_String (line 82) | [TestMethod] method JoinStr_T_Int (line 98) | [TestMethod] method JoinStr_String (line 112) | [TestMethod] method JoinStr_Int (line 121) | [TestMethod] method JoinNonEmpty (line 130) | [TestMethod] method WhereNotNull_Class (line 147) | [TestMethod] method WhereNotNull_NullableStruct (line 157) | [TestMethod] method JoinAndNull (line 167) | [TestMethod] method JoinAndStrings (line 171) | [TestMethod] method JoinAndInts (line 185) | [TestMethod] method JoinAndDateTime (line 194) | [TestMethod] method JoinAndMixedClasses (line 205) | [TestMethod] method ToSecondary_NullMessage (line 219) | [TestMethod] method ToSecondary_MessageArgs (line 237) | [TestMethod] method ToSecondary_MessageFormat (line 257) | [TestMethod] method ToSecondarySecondary_SyntaxNode_NullMessage (line 277) | [TestMethod] method ToSecondarySecondary_SyntaxNode_MessageArgs (line 294) | [TestMethod] method ToSecondarySecondary_SyntaxNode_MessageFormat (line 313) | [TestMethod] method ToSecondarySecondary_SyntaxToken_NullMessage (line 332) | [TestMethod] method ToSecondarySecondary_SyntaxToken_MessageArgs (line 349) | [TestMethod] method ToSecondarySecondary_SyntaxToken_MessageFormat (line 368) | [TestMethod] type StructType (line 387) | private struct StructType method StructType (line 391) | public StructType(int count) FILE: analyzers/tests/SonarAnalyzer.Core.Test/Extensions/IXmlLineInfoExtensionsTest.cs class IXmlLineInfoExtensionsTest (line 23) | [TestClass] method Element_Simple (line 26) | [TestMethod] method Element_WithNamespace (line 35) | [TestMethod] method Element_WithDefaultNamespace (line 52) | [TestMethod] method Attribute_WithNamespace (line 67) | [TestMethod] method Element_WithNestedNamespaces (line 83) | [TestMethod] method Element_WithRedefinition (line 107) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Extensions/RegexExtensionsTest.cs class RegexExtensionsTest (line 22) | [TestClass] method SafeIsMatch_Timeout_Fallback (line 32) | [TestMethod] method SafeMatch_Timeout (line 41) | [TestMethod] method SafeMatches_Timeout (line 52) | [TestMethod] method SafeReplace_Timeout (line 69) | [TestMethod] method SafeRegex_IsMatch_Timeout (line 81) | [TestMethod] method SafeRegex_IsMatch_TimeoutFallback (line 92) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Extensions/XAttributeExtensionsTest.cs class XAttributeExtensionsTest (line 22) | [TestClass] method CreateLocation_WithNoLineInfo_ReturnsNull (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Json/JsonNodeTest.cs class JsonNodeTest (line 24) | [TestClass] method BehavesAsValue (line 27) | [TestMethod] method UnsupportedKinds (line 43) | [TestMethod] method BehavesAsList (line 52) | [TestMethod] method BehavesAsDictionary (line 78) | [TestMethod] method UpdateEnd (line 100) | [TestMethod] method ParsedFromString (line 116) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Json/JsonSerializerTest.cs class JsonSerializerTest (line 25) | [TestClass] method Serialize_UnsupportedType (line 28) | [TestMethod] method Serialize_BasicTypes (line 32) | [TestMethod] method Serialize_Encoding (line 69) | [TestMethod] method Serialize_ObjectWithIndexer (line 77) | [TestMethod] method Serialize_IntegerTypes (line 86) | [DataRow((sbyte)42)] // sbyte method Serialize_FloatingPointTypes (line 102) | [DataRow(42.42)] // double method Serialize_DecimalType (line 119) | [TestMethod] // decimal cannot be in DataRow type TestData (line 133) | private sealed record TestData(string StringValue, class PrimitiveObjectConverter (line 145) | private sealed class PrimitiveObjectConverter : JsonConverter method Read (line 148) | public override object Read(ref Utf8JsonReader reader, Type typeToCo... method Write (line 159) | public override void Write(Utf8JsonWriter writer, object value, Json... FILE: analyzers/tests/SonarAnalyzer.Core.Test/Json/JsonWalkerTest.cs class JsonWalkerTest (line 20) | [TestClass] method VisitsAllNodes (line 23) | [TestMethod] method VisitsAtomicJson_VisitsEmpty (line 43) | [TestMethod] class JsonWalkerCollector (line 54) | private class JsonWalkerCollector : JsonWalker method VisitObject (line 59) | protected override void VisitObject(string key, JsonNode value) method VisitValue (line 65) | protected override void VisitValue(JsonNode node) FILE: analyzers/tests/SonarAnalyzer.Core.Test/Json/LexicalAnalyzerTest.cs class LexicalAnalyzerTest (line 23) | [TestClass] method IgnoresWhiteSpace (line 26) | [TestMethod] method SupportsSingleLineComments (line 35) | [TestMethod] method SupportsMultiLineComments (line 44) | [TestMethod] method ReadSpecialCharacters (line 53) | [TestMethod] method ReadNumber_Integers_ParseToDouble (line 72) | [TestMethod] method ReadNumber_Decimal (line 101) | [TestMethod] method ReadNumber_Double_ParseToDouble (line 115) | [TestMethod] method ReadString (line 138) | [TestMethod] method ReadKeyword (line 157) | [TestMethod] method InvalidInput_ThrowsJsonException (line 169) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Json/SyntaxAnalyzerTest.cs class SyntaxAnalyzerTest (line 23) | [TestClass] method StandaloneValue (line 26) | [TestMethod] method EmptyObject (line 44) | [TestMethod] method EmptyList (line 56) | [TestMethod] method ParseObject (line 68) | [TestMethod] method ParseList (line 91) | [TestMethod] method ParseNested (line 101) | [TestMethod] method InvalidSyntax_Throws (line 140) | [TestMethod] method Location (line 153) | [TestMethod] method Location_EndOfLines (line 190) | [TestMethod] method AssertLocation (line 205) | private static void AssertLocation(Expression> expressi... FILE: analyzers/tests/SonarAnalyzer.Core.Test/RegularExpressions/RegexContextTest.cs class RegexContextTest (line 22) | [TestClass] method InvalidInput_SetParseError (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/RegularExpressions/WildcardPatternMatcherTest.cs class WildcardPatternMatcherTest (line 22) | [TestClass] method IsMatch_MatchesPatternsAsExpected (line 28) | [TestMethod] method IsMatch_InvalidPattern_ReturnsFalse (line 96) | [TestMethod] method IsMatch_InputParametersArenull_DoesNotThrow (line 104) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Semantics/Extensions/IMethodSymbolExtensionsTest.cs class IMethodSymbolExtensionsTest (line 22) | [TestClass] method Compile (line 56) | [TestInitialize] method Symbol_IsExtensionOnIEnumerable (line 67) | [TestMethod] method Symbol_IsExtensionOnGenericIEnumerable (line 79) | [TestMethod] method Symbol_IsExtensionOnInt (line 93) | [TestMethod] method IsAnyAttributeInOverridingChain_WhenMethodSymbolIsNull_ReturnsFalse (line 102) | [TestMethod] method GetClassification_Method (line 106) | [TestMethod] method GetAttributesWithInherited_MethodSymbol (line 137) | [TestMethod] method IsControllerActionMethod_PublicControllerMethods_AreEntryPoints (line 239) | [TestMethod] method IsControllerActionMethod_ControllerMethods_AreEntryPoints (line 286) | [TestMethod] method IsControllerActionMethod_MethodsInClassesWithControllerAttribute_AreEntryPoints (line 314) | [TestMethod] method IsControllerActionMethod_MethodsInClassesWithNonControllerAttribute_AreNotEntryPoints (line 333) | [TestMethod] method IsControllerActionMethod_ConstructorsInClasses_AreNotEntryPoints (line 349) | [TestMethod] method IsImplementingInterfaceMember_VBRenamedExplicitImplementation (line 365) | [TestMethod] method IsImplementingInterfaceMember_Methods (line 383) | [TestMethod] method IsExtension_ExtensionMethod_ReturnsTrue_CS (line 438) | [TestMethod] method IsExtension_RegularMethod_ReturnsFalse_CS (line 455) | [TestMethod] method IsExtension_ExtensionMethod_ReturnsTrue_VB (line 465) | [TestMethod] method IsExtension_RegularMethod_ReturnsFalse_VB (line 477) | [TestMethod] method MethodSymbolForIndex (line 490) | private IMethodSymbol MethodSymbolForIndex(int index) FILE: analyzers/tests/SonarAnalyzer.Core.Test/Semantics/Extensions/INamedTypeSymbolExtensionsTest.cs class INamedTypeSymbolExtensionsTest (line 20) | [TestClass] method GetAllNamedTypesForNamedType_WhenSymbolIsNull_ReturnsEmpty (line 23) | [TestMethod] method GetClassification_NamedTypes (line 27) | [TestMethod] method GetClassification_NamedType_Unknown (line 53) | [TestMethod] method GetClassification_Record (line 66) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Semantics/Extensions/INamespaceSymbolExtensionsTest.cs class INamespaceSymbolExtensionsTest (line 22) | [TestClass] method Is_ValidNameSpaces (line 25) | [TestMethod] method Is_Global (line 43) | [TestMethod] method Is_InvalidNameSpaces (line 60) | [TestMethod] method Is_ThrowsArgumentNullExceptionForName (line 84) | [TestMethod] method Is_ReturnsFalseForNullSymbol (line 98) | [TestMethod] method GetAllNamedTypesForNamespace_WhenSymbolIsNull_ReturnsEmpty (line 108) | [TestMethod] method Symbol_GetSelfAndBaseTypes (line 112) | [TestMethod] method Symbol_GetAllNamedTypes_Type (line 132) | [TestMethod] method Symbol_GetAllNamedTypes_Namespace (line 148) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Semantics/Extensions/IParameterSymbolExtensionsTest.cs class IParameterSymbolExtensionsTest (line 20) | [TestClass] method IsType_Null (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Semantics/Extensions/IPropertySymbolExtensionsTest.cs class IPropertySymbolExtensionsTest (line 20) | [TestClass] method IsExtension_ExtensionProperty_ReturnsTrue (line 23) | [TestMethod] method IsExtension_RegularProperty_ReturnsFalse (line 43) | [TestMethod] method IsAnyAttributeInOverridingChain_WhenPropertySymbolIsNull_ReturnsFalse (line 57) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Core.Test/Semantics/Extensions/ISymbolExtensionsTest.cs class ISymbolExtensionsTest (line 24) | [TestClass] method Compile (line 82) | [TestInitialize] method IsInType_Null_KnownType (line 86) | [TestMethod] method IsInType_Null_TypeSymbol (line 90) | [TestMethod] method IsInType_Null_ArrayOfTypeSymbols (line 94) | [TestMethod] method IsAutoProperty_AutoProperty_CS (line 98) | [TestMethod] method IsAutoProperty_AutoProperty_VB (line 117) | [TestMethod] method IsAutoProperty_ExplicitProperty_CS (line 130) | [TestMethod] method IsAutoProperty_ExplicitProperty_VB (line 148) | [TestMethod] method IsAutoProperty_NonpropertySymbol_CS (line 170) | [TestMethod] method IsAutoProperty_NonpropertySymbol_VB (line 182) | [TestMethod] method Symbol_IsPublicApi (line 196) | [TestMethod] method Symbol_InterfaceMembersOrMemberOverride (line 210) | [TestMethod] method Symbol_InterfaceMembers_CrossAssemblyNullableContext (line 226) | [TestMethod] method Symbol_GetOverriddenMember (line 269) | [TestMethod] method Symbol_IsChangeable (line 286) | [TestMethod] method AnyAttributeDerivesFrom_WhenSymbolIsNull_ReturnsFalse (line 295) | [TestMethod] method AnyAttributeDerivesFromAny_WhenSymbolIsNull_ReturnsFalse (line 299) | [TestMethod] method GetAttributesForKnownType_WhenSymbolIsNull_ReturnsEmpty (line 303) | [TestMethod] method GetAttributesForKnownTypes_WhenSymbolIsNull_ReturnsEmpty (line 307) | [TestMethod] method GetParameters_WhenSymbolIsNotMethodOrProperty_ReturnsEmpty (line 311) | [TestMethod] method InterfaceMembers_WhenSymbolIsNull_ReturnsEmpty (line 319) | [TestMethod] method GetOverriddenMember_WhenSymbolIsNull_ReturnsNull (line 323) | [TestMethod] method GetEffectiveAccessibility_WhenSymbolIsNull_ReturnsNotApplicable (line 327) | [TestMethod] method GetClassification_SimpleKinds (line 331) | [TestMethod] method GetClassification_UnknowKind (line 358) | [TestMethod] method AllPartialParts_MethodSymbol_NonPartialMethod (line 370) | [TestMethod] method AllPartialParts_MethodSymbol_PartialMethodSameClass (line 387) | [TestMethod] method AllPartialParts_MethodSymbol_PartialMethodDifferentClass (line 408) | [TestMethod] method AllPartialParts_PropertySymbol_PartialPropertySameClass (line 432) | [TestMethod] method AllPartialParts_PropertySymbol_PartialPropertyDifferentClass (line 457) | [TestMethod] method AllPartialParts_OtherSymbol (line 485) | [TestMethod] method CreateSymbol (line 492) | private static ISymbol CreateSymbol(string snippet, AnalyzerLanguage l... method CreateSymbols (line 499) | private static List CreateSymbols(string snippet, AnalyzerLan... FILE: analyzers/tests/SonarAnalyzer.Core.Test/Semantics/Extensions/ITypeSymbolExtensionsTest.cs class ITypeSymbolExtensionsTest (line 22) | [TestClass] method Compile (line 50) | [TestInitialize] method IsAny_Null (line 61) | [TestMethod] method ImplementsAny_Null (line 65) | [TestMethod] method Type_DerivesOrImplementsAny (line 69) | [TestMethod] method Type_Is (line 85) | [TestMethod] method Type_GetSymbolType_Alias (line 97) | [TestMethod] method Type_DerivesOrImplements_Type (line 107) | [TestMethod] method Type_DerivesOrImplements_HalfClosed (line 138) | [TestMethod] method IsStruct_Simple_True (line 165) | [TestMethod] method IsStruct_Simple_False (line 188) | [TestMethod] method IsStruct_Generic (line 202) | [TestMethod] method IsStruct_Generic_Nullable (line 217) | [TestMethod] method IsStruct_False_Generic (line 233) | [TestMethod] method IsStruct_False_Generic_NullableReferenceType (line 256) | [TestMethod] method IsStruct_False_Generic_Derived (line 282) | [TestMethod] method IsStruct_SelfRefrencingStruct (line 295) | [TestMethod] method IsNonNullableValueType_Simple_True (line 314) | [TestMethod] method IsNonNullableValueType_Simple_False (line 335) | [TestMethod] method IsNonNullableValueType_Generic (line 351) | [TestMethod] method IsNonNullableValueType_Generic_ConstraintStruct_Nullable (line 366) | [TestMethod] method IsNonNullableValueType_Generic_Constraint_Nullable (line 381) | [TestMethod] method IsNullableValueType_Simple_True (line 412) | [TestMethod] method IsNullableValueType_Simple_False (line 426) | [TestMethod] method IsNullableValueType_Generic_ConstraintStruct_Nullable (line 449) | [TestMethod] method IsNullableValueType_Generic_Constraint_Nullable (line 468) | [TestMethod] method IsNullableValueType_Generic_ConstraintStruct_NonNullable (line 485) | [TestMethod] method IsNullableValueType_False_Generic_NullableReferenceType (line 500) | [TestMethod] method IsEnum_True (line 527) | [TestMethod] method IsEnum_False (line 545) | [TestMethod] method GetSelfAndBaseTypes_WhenSymbolIsNull_ReturnsEmpty (line 564) | [TestMethod] method GetAttributesWithInherited_TypeSymbol (line 568) | [TestMethod] method FirstFieldSymbolFromCode (line 635) | private static IFieldSymbol FirstFieldSymbolFromCode(string code) FILE: analyzers/tests/SonarAnalyzer.Core.Test/Semantics/KnownAssemblyTest.cs class KnownAssemblyTest (line 23) | [TestClass] method KnownReference_ThrowsWhenPredicateNull_1 (line 26) | [TestMethod] method KnownReference_ThrowsWhenPredicateNull_2 (line 33) | [TestMethod] method KnownReference_ThrowsWhenPredicateNull_Params (line 40) | [TestMethod] method NameIs_Test (line 47) | [TestMethod] method NameContains_Test (line 64) | [TestMethod] method NameStartsWith_Test (line 80) | [TestMethod] method NameEndsWith_Test (line 96) | [TestMethod] method Version_GreaterOrEqual_2_0 (line 112) | [TestMethod] method Version_LowerThen_2_0 (line 128) | [TestMethod] method Version_Between_2_0_and_3_5 (line 144) | [TestMethod] method PublicKeyTokenIs_c5b62af9de6d7244 (line 164) | [TestMethod] method PublicKeyTokenIs_FailsWhenKeyIsMissing (line 189) | [TestMethod] method OptionalPublicKeyTokenIs_SucceedsWhenKeyIsMissing (line 197) | [TestMethod] method Combinator_NameStartWith_Test_And_Version_Between_2_0_And_3_5 (line 205) | [TestMethod] method Combinator_StartsWith_Start_Or_EndsWith_End_1 (line 220) | [TestMethod] method Combinator_StartsWith_Start_Or_EndsWith_End_2 (line 236) | [TestMethod] method CompilationShouldNotReferenceAssemblies (line 252) | [TestMethod] method XUnitAssert_2_4 (line 270) | [TestMethod] method XUnitAssert_1_9 (line 274) | [TestMethod] method XUnitAssert_3_0 (line 278) | [TestMethod] method MSTest_V1 (line 282) | [TestMethod] method MSTest_V2 (line 286) | [TestMethod] method MSTest_MicrosoftVisualStudioQualityToolsUnitTestFramework (line 290) | [TestMethod] method FluentAssertions_6_10 (line 294) | [TestMethod] method NFluent_2_8 (line 298) | [TestMethod] method NFluent_1_0 (line 302) | [TestMethod] method NSubstitute_5_0 (line 307) | [TestMethod] method MicrosoftExtensionsLoggingAbstractions_Latest (line 311) | [TestMethod] method Serilog_Latest (line 315) | [TestMethod] method NLog_Latest (line 319) | [TestMethod] method Log4net_1_2_10 (line 323) | [TestMethod] method Log4net_2_0_8 (line 327) | [TestMethod] method CommonLoggingCore_Latest (line 331) | [TestMethod] method CastleCore_Latest (line 335) | [TestMethod] method CompilationShouldReference (line 339) | private static void CompilationShouldReference(IEnumerable strin... method IsTriviaComment (line 161) | protected override bool IsTriviaComment(SyntaxTrivia trivia) => false; FILE: analyzers/tests/SonarAnalyzer.Core.Test/Syntax/Utilities/VisualIndentComparerTest.cs class VisualIndentComparerTest (line 20) | [TestClass] method TestVisualIndent_NonTabsOnly (line 23) | [TestMethod] method TestVisualIndent_TabsOnly (line 33) | [TestMethod] method TestVisualIndent_Mix_ResultIsCertain (line 43) | [TestMethod] method TestVisualIndent_Mix_ResultIsUncertain (line 55) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Memory.Test/DotMemorySetupTest.cs class DotMemorySetupTest (line 22) | [TestClass] method EnsureDotMemoryUTsAreExecutedWithTheRightRunner (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Memory.Test/Registrations/SonarSyntaxNodeReportingContextMemoryTest.cs class SonarSyntaxNodeReportingContextMemoryTest (line 27) | [TestClass] method SonarSyntaxNodeReportingContextAllocationsPerNodeKind (line 32) | [TestMethod] method SonarSyntaxNodeReportingContextOverallAllocations (line 59) | [TestMethod] method SonarSyntaxNodeReportingContextOverallAllocationsWithoutReporting (line 104) | [TestMethod] method PrintObjectStatistics (line 131) | private void PrintObjectStatistics(IEnumerable typeTr... method PrintObjectStatistics (line 137) | private void PrintObjectStatistics(IEnumerable typeMem... method CreateCompilationWithNamespaceDeclarations (line 143) | private static CSharpCompilation CreateCompilationWithNamespaceDeclara... method CreateNamespaceDeclarations (line 146) | private static SyntaxTree CreateNamespaceDeclarations(int namespaceCou... class MarkerObject (line 153) | public class MarkerObject method Reset (line 157) | [MethodImpl(MethodImplOptions.NoInlining)] FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/FactoryTest.cs class FactoryTest (line 23) | [TestClass] method SnapshotAsync (line 27) | [TestMethod] method Run (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Model/ModelBuilderTest.cs class ModelBuilderTest (line 24) | [TestClass] method Build_NestedTypes (line 27) | [TestMethod] method Build_GenericTypes (line 35) | [TestMethod] method Build_Delegates (line 43) | [TestMethod] method Build_Enums_NoBaseline (line 51) | [TestMethod] method Build_Enums_WithBaseline (line 67) | [TestMethod] method Build_SyntaxNode_Itself (line 82) | [TestMethod] method Build_SyntaxNode_RecordDeclaration (line 90) | [TestMethod] method Build_SyntaxNode_NoCommonBaseType (line 103) | [TestMethod] method Build_SyntaxNode_ExtensionBlockDeclarationSyntax_EndToEnd (line 111) | [TestMethod] method Build_IOperation (line 124) | [TestMethod] method Build_IInvocationOperation (line 146) | [TestMethod] method Build_StaticClass (line 173) | [TestMethod] method Build_NoChangeStrategy (line 181) | [TestMethod] method Build_NoChangeStrategy_DifferentMembers (line 193) | [TestMethod] method CreateMembers_NoBaseline (line 205) | [TestMethod] method CreateMembers_WithBaseline (line 218) | [TestMethod] method CreateMembers_SkippedMembers (line 232) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Model/TypeLoaderTest.cs class TypeLoaderTest (line 20) | [TestClass] method LoadBaseline_AllAssemblies (line 25) | [TestMethod] method LoadLatest_AllAssemblies (line 36) | [TestMethod] method Load_AllTypes (line 47) | [TestMethod] method Load_InheritedMembers (line 61) | [TestMethod] method Load_ContainsInheritedInterfaces (line 73) | [TestMethod] method Load_ExplicitInterfaces_Ignored (line 82) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#AccessorDeclarationSyntax.g.cs.verified.cs class AccessorDeclarationSyntaxShimExtensions (line 28) | public static partial class AccessorDeclarationSyntaxShimExtensions method extension (line 34) | extension(AccessorDeclarationSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#AliasQualifiedNameSyntax.g.cs.verified.cs class AliasQualifiedNameSyntaxShimExtensions (line 28) | public static partial class AliasQualifiedNameSyntaxShimExtensions method extension (line 40) | extension(AliasQualifiedNameSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#AllowsConstraintClauseSyntax.g.cs.verified.cs type AllowsConstraintClauseSyntaxWrapper (line 28) | public readonly partial struct AllowsConstraintClauseSyntaxWrapper: ISyn... method AllowsConstraintClauseSyntaxWrapper (line 35) | static AllowsConstraintClauseSyntaxWrapper() method AllowsConstraintClauseSyntaxWrapper (line 42) | private AllowsConstraintClauseSyntaxWrapper(TypeParameterConstraintSyn... method IsInstance (line 89) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#AllowsConstraintSyntax.g.cs.verified.cs type AllowsConstraintSyntaxWrapper (line 28) | public readonly partial struct AllowsConstraintSyntaxWrapper: ISyntaxWra... method AllowsConstraintSyntaxWrapper (line 35) | static AllowsConstraintSyntaxWrapper() method AllowsConstraintSyntaxWrapper (line 41) | private AllowsConstraintSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 84) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#AnonymousFunctionExpressionSyntax.g.cs.verified.cs class AnonymousFunctionExpressionSyntaxShimExtensions (line 28) | public static partial class AnonymousFunctionExpressionSyntaxShimExtensions method extension (line 38) | extension(AnonymousFunctionExpressionSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#AnonymousMethodExpressionSyntax.g.cs.verified.cs class AnonymousMethodExpressionSyntaxShimExtensions (line 28) | public static partial class AnonymousMethodExpressionSyntaxShimExtensions method extension (line 36) | extension(AnonymousMethodExpressionSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ArgumentKind.g.cs.verified.cs type ArgumentKind (line 28) | public enum ArgumentKind : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ArgumentSyntax.g.cs.verified.cs class ArgumentSyntaxShimExtensions (line 28) | public static partial class ArgumentSyntaxShimExtensions method extension (line 34) | extension(ArgumentSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ArrayTypeSyntax.g.cs.verified.cs class ArrayTypeSyntaxShimExtensions (line 28) | public static partial class ArrayTypeSyntaxShimExtensions method extension (line 40) | extension(ArrayTypeSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#BaseExpressionColonSyntax.g.cs.verified.cs type BaseExpressionColonSyntaxWrapper (line 28) | public readonly partial struct BaseExpressionColonSyntaxWrapper: ISyntax... method BaseExpressionColonSyntaxWrapper (line 35) | static BaseExpressionColonSyntaxWrapper() method BaseExpressionColonSyntaxWrapper (line 42) | private BaseExpressionColonSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 89) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#BaseMethodDeclarationSyntax.g.cs.verified.cs class BaseMethodDeclarationSyntaxShimExtensions (line 28) | public static partial class BaseMethodDeclarationSyntaxShimExtensions method extension (line 34) | extension(BaseMethodDeclarationSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#BaseNamespaceDeclarationSyntax.g.cs.verified.cs type BaseNamespaceDeclarationSyntaxWrapper (line 28) | public readonly partial struct BaseNamespaceDeclarationSyntaxWrapper: IS... method BaseNamespaceDeclarationSyntaxWrapper (line 35) | static BaseNamespaceDeclarationSyntaxWrapper() method BaseNamespaceDeclarationSyntaxWrapper (line 47) | private BaseNamespaceDeclarationSyntaxWrapper(MemberDeclarationSyntax ... method IsInstance (line 104) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#BaseObjectCreationExpressionSyntax.g.cs.verified.cs type BaseObjectCreationExpressionSyntaxWrapper (line 28) | public readonly partial struct BaseObjectCreationExpressionSyntaxWrapper... method BaseObjectCreationExpressionSyntaxWrapper (line 35) | static BaseObjectCreationExpressionSyntaxWrapper() method BaseObjectCreationExpressionSyntaxWrapper (line 43) | private BaseObjectCreationExpressionSyntaxWrapper(ExpressionSyntax nod... method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#BaseParameterSyntax.g.cs.verified.cs type BaseParameterSyntaxWrapper (line 28) | public readonly partial struct BaseParameterSyntaxWrapper: ISyntaxWrappe... method BaseParameterSyntaxWrapper (line 35) | static BaseParameterSyntaxWrapper() method BaseParameterSyntaxWrapper (line 43) | private BaseParameterSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#BasicBlockKind.g.cs.verified.cs type BasicBlockKind (line 28) | public enum BasicBlockKind : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#BinaryOperatorKind.g.cs.verified.cs type BinaryOperatorKind (line 28) | public enum BinaryOperatorKind : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#BinaryPatternSyntax.g.cs.verified.cs type BinaryPatternSyntaxWrapper (line 28) | public readonly partial struct BinaryPatternSyntaxWrapper: ISyntaxWrappe... method BinaryPatternSyntaxWrapper (line 35) | static BinaryPatternSyntaxWrapper() method BinaryPatternSyntaxWrapper (line 43) | private BinaryPatternSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 98) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#BlockSyntax.g.cs.verified.cs class BlockSyntaxShimExtensions (line 28) | public static partial class BlockSyntaxShimExtensions method extension (line 34) | extension(BlockSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#BranchKind.g.cs.verified.cs type BranchKind (line 28) | public enum BranchKind : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#BreakStatementSyntax.g.cs.verified.cs class BreakStatementSyntaxShimExtensions (line 28) | public static partial class BreakStatementSyntaxShimExtensions method extension (line 34) | extension(BreakStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#CaseKind.g.cs.verified.cs type CaseKind (line 28) | public enum CaseKind : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#CasePatternSwitchLabelSyntax.g.cs.verified.cs type CasePatternSwitchLabelSyntaxWrapper (line 28) | public readonly partial struct CasePatternSwitchLabelSyntaxWrapper: ISyn... method CasePatternSwitchLabelSyntaxWrapper (line 35) | static CasePatternSwitchLabelSyntaxWrapper() method CasePatternSwitchLabelSyntaxWrapper (line 42) | private CasePatternSwitchLabelSyntaxWrapper(SwitchLabelSyntax node) => method IsInstance (line 91) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#CheckedStatementSyntax.g.cs.verified.cs class CheckedStatementSyntaxShimExtensions (line 28) | public static partial class CheckedStatementSyntaxShimExtensions method extension (line 34) | extension(CheckedStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ClassDeclarationSyntax.g.cs.verified.cs class ClassDeclarationSyntaxShimExtensions (line 28) | public static partial class ClassDeclarationSyntaxShimExtensions method extension (line 34) | extension(ClassDeclarationSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ClassOrStructConstraintSyntax.g.cs.verified.cs class ClassOrStructConstraintSyntaxShimExtensions (line 28) | public static partial class ClassOrStructConstraintSyntaxShimExtensions method extension (line 34) | extension(ClassOrStructConstraintSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#CollectionElementSyntax.g.cs.verified.cs type CollectionElementSyntaxWrapper (line 28) | public readonly partial struct CollectionElementSyntaxWrapper: ISyntaxWr... method CollectionElementSyntaxWrapper (line 35) | static CollectionElementSyntaxWrapper() method CollectionElementSyntaxWrapper (line 41) | private CollectionElementSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 84) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#CollectionExpressionSyntax.g.cs.verified.cs type CollectionExpressionSyntaxWrapper (line 28) | public readonly partial struct CollectionExpressionSyntaxWrapper: ISynta... method CollectionExpressionSyntaxWrapper (line 35) | static CollectionExpressionSyntaxWrapper() method CollectionExpressionSyntaxWrapper (line 43) | private CollectionExpressionSyntaxWrapper(ExpressionSyntax node) => method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#CommonForEachStatementSyntax.g.cs.verified.cs type CommonForEachStatementSyntaxWrapper (line 28) | public readonly partial struct CommonForEachStatementSyntaxWrapper: ISyn... method CommonForEachStatementSyntaxWrapper (line 35) | static CommonForEachStatementSyntaxWrapper() method CommonForEachStatementSyntaxWrapper (line 48) | private CommonForEachStatementSyntaxWrapper(StatementSyntax node) => method IsInstance (line 107) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ConstantPatternSyntax.g.cs.verified.cs type ConstantPatternSyntaxWrapper (line 28) | public readonly partial struct ConstantPatternSyntaxWrapper: ISyntaxWrap... method ConstantPatternSyntaxWrapper (line 35) | static ConstantPatternSyntaxWrapper() method ConstantPatternSyntaxWrapper (line 41) | private ConstantPatternSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ConstructorDeclarationSyntax.g.cs.verified.cs class ConstructorDeclarationSyntaxShimExtensions (line 28) | public static partial class ConstructorDeclarationSyntaxShimExtensions method extension (line 34) | extension(ConstructorDeclarationSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ContinueStatementSyntax.g.cs.verified.cs class ContinueStatementSyntaxShimExtensions (line 28) | public static partial class ContinueStatementSyntaxShimExtensions method extension (line 34) | extension(ContinueStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ControlFlowBranchSemantics.g.cs.verified.cs type ControlFlowBranchSemantics (line 28) | public enum ControlFlowBranchSemantics : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ControlFlowConditionKind.g.cs.verified.cs type ControlFlowConditionKind (line 28) | public enum ControlFlowConditionKind : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ControlFlowRegionKind.g.cs.verified.cs type ControlFlowRegionKind (line 28) | public enum ControlFlowRegionKind : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ConversionOperatorDeclarationSyntax.g.cs.verified.cs class ConversionOperatorDeclarationSyntaxShimExtensions (line 28) | public static partial class ConversionOperatorDeclarationSyntaxShimExten... method extension (line 36) | extension(ConversionOperatorDeclarationSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ConversionOperatorMemberCrefSyntax.g.cs.verified.cs class ConversionOperatorMemberCrefSyntaxShimExtensions (line 28) | public static partial class ConversionOperatorMemberCrefSyntaxShimExtens... method extension (line 34) | extension(ConversionOperatorMemberCrefSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#CrefParameterSyntax.g.cs.verified.cs class CrefParameterSyntaxShimExtensions (line 28) | public static partial class CrefParameterSyntaxShimExtensions method extension (line 36) | extension(CrefParameterSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#DeclarationExpressionSyntax.g.cs.verified.cs type DeclarationExpressionSyntaxWrapper (line 28) | public readonly partial struct DeclarationExpressionSyntaxWrapper: ISynt... method DeclarationExpressionSyntaxWrapper (line 35) | static DeclarationExpressionSyntaxWrapper() method DeclarationExpressionSyntaxWrapper (line 42) | private DeclarationExpressionSyntaxWrapper(ExpressionSyntax node) => method IsInstance (line 89) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#DeclarationPatternSyntax.g.cs.verified.cs type DeclarationPatternSyntaxWrapper (line 28) | public readonly partial struct DeclarationPatternSyntaxWrapper: ISyntaxW... method DeclarationPatternSyntaxWrapper (line 35) | static DeclarationPatternSyntaxWrapper() method DeclarationPatternSyntaxWrapper (line 42) | private DeclarationPatternSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 95) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#DefaultConstraintSyntax.g.cs.verified.cs type DefaultConstraintSyntaxWrapper (line 28) | public readonly partial struct DefaultConstraintSyntaxWrapper: ISyntaxWr... method DefaultConstraintSyntaxWrapper (line 35) | static DefaultConstraintSyntaxWrapper() method DefaultConstraintSyntaxWrapper (line 41) | private DefaultConstraintSyntaxWrapper(TypeParameterConstraintSyntax n... method IsInstance (line 86) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#DestructorDeclarationSyntax.g.cs.verified.cs class DestructorDeclarationSyntaxShimExtensions (line 28) | public static partial class DestructorDeclarationSyntaxShimExtensions method extension (line 34) | extension(DestructorDeclarationSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#DiscardDesignationSyntax.g.cs.verified.cs type DiscardDesignationSyntaxWrapper (line 28) | public readonly partial struct DiscardDesignationSyntaxWrapper: ISyntaxW... method DiscardDesignationSyntaxWrapper (line 35) | static DiscardDesignationSyntaxWrapper() method DiscardDesignationSyntaxWrapper (line 41) | private DiscardDesignationSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 89) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#DiscardPatternSyntax.g.cs.verified.cs type DiscardPatternSyntaxWrapper (line 28) | public readonly partial struct DiscardPatternSyntaxWrapper: ISyntaxWrapp... method DiscardPatternSyntaxWrapper (line 35) | static DiscardPatternSyntaxWrapper() method DiscardPatternSyntaxWrapper (line 41) | private DiscardPatternSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#DoStatementSyntax.g.cs.verified.cs class DoStatementSyntaxShimExtensions (line 28) | public static partial class DoStatementSyntaxShimExtensions method extension (line 34) | extension(DoStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#EmptyStatementSyntax.g.cs.verified.cs class EmptyStatementSyntaxShimExtensions (line 28) | public static partial class EmptyStatementSyntaxShimExtensions method extension (line 34) | extension(EmptyStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#EnumMemberDeclarationSyntax.g.cs.verified.cs class EnumMemberDeclarationSyntaxShimExtensions (line 28) | public static partial class EnumMemberDeclarationSyntaxShimExtensions method extension (line 34) | extension(EnumMemberDeclarationSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#EventDeclarationSyntax.g.cs.verified.cs class EventDeclarationSyntaxShimExtensions (line 28) | public static partial class EventDeclarationSyntaxShimExtensions method extension (line 34) | extension(EventDeclarationSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ExpressionColonSyntax.g.cs.verified.cs type ExpressionColonSyntaxWrapper (line 28) | public readonly partial struct ExpressionColonSyntaxWrapper: ISyntaxWrap... method ExpressionColonSyntaxWrapper (line 35) | static ExpressionColonSyntaxWrapper() method ExpressionColonSyntaxWrapper (line 42) | private ExpressionColonSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ExpressionElementSyntax.g.cs.verified.cs type ExpressionElementSyntaxWrapper (line 28) | public readonly partial struct ExpressionElementSyntaxWrapper: ISyntaxWr... method ExpressionElementSyntaxWrapper (line 35) | static ExpressionElementSyntaxWrapper() method ExpressionElementSyntaxWrapper (line 41) | private ExpressionElementSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 89) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ExpressionOrPatternSyntax.g.cs.verified.cs type ExpressionOrPatternSyntaxWrapper (line 28) | public readonly partial struct ExpressionOrPatternSyntaxWrapper: ISyntax... method ExpressionOrPatternSyntaxWrapper (line 35) | static ExpressionOrPatternSyntaxWrapper() method ExpressionOrPatternSyntaxWrapper (line 41) | private ExpressionOrPatternSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 84) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ExpressionStatementSyntax.g.cs.verified.cs class ExpressionStatementSyntaxShimExtensions (line 28) | public static partial class ExpressionStatementSyntaxShimExtensions method extension (line 34) | extension(ExpressionStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ExtensionBlockDeclarationSyntax.g.cs.verified.cs type ExtensionBlockDeclarationSyntaxWrapper (line 28) | public readonly partial struct ExtensionBlockDeclarationSyntaxWrapper: I... method ExtensionBlockDeclarationSyntaxWrapper (line 35) | static ExtensionBlockDeclarationSyntaxWrapper() method ExtensionBlockDeclarationSyntaxWrapper (line 41) | private ExtensionBlockDeclarationSyntaxWrapper(TypeDeclarationSyntax n... method IsInstance (line 98) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ExtensionMemberCrefSyntax.g.cs.verified.cs type ExtensionMemberCrefSyntaxWrapper (line 28) | public readonly partial struct ExtensionMemberCrefSyntaxWrapper: ISyntax... method ExtensionMemberCrefSyntaxWrapper (line 35) | static ExtensionMemberCrefSyntaxWrapper() method ExtensionMemberCrefSyntaxWrapper (line 45) | private ExtensionMemberCrefSyntaxWrapper(MemberCrefSyntax node) => method IsInstance (line 98) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#FieldExpressionSyntax.g.cs.verified.cs type FieldExpressionSyntaxWrapper (line 28) | public readonly partial struct FieldExpressionSyntaxWrapper: ISyntaxWrap... method FieldExpressionSyntaxWrapper (line 35) | static FieldExpressionSyntaxWrapper() method FieldExpressionSyntaxWrapper (line 41) | private FieldExpressionSyntaxWrapper(ExpressionSyntax node) => method IsInstance (line 86) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#FileScopedNamespaceDeclarationSyntax.g.cs.verified.cs type FileScopedNamespaceDeclarationSyntaxWrapper (line 28) | public readonly partial struct FileScopedNamespaceDeclarationSyntaxWrapp... method FileScopedNamespaceDeclarationSyntaxWrapper (line 35) | static FileScopedNamespaceDeclarationSyntaxWrapper() method FileScopedNamespaceDeclarationSyntaxWrapper (line 48) | private FileScopedNamespaceDeclarationSyntaxWrapper(MemberDeclarationS... method IsInstance (line 110) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#FixedStatementSyntax.g.cs.verified.cs class FixedStatementSyntaxShimExtensions (line 28) | public static partial class FixedStatementSyntaxShimExtensions method extension (line 34) | extension(FixedStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ForEachStatementSyntax.g.cs.verified.cs class ForEachStatementSyntaxShimExtensions (line 28) | public static partial class ForEachStatementSyntaxShimExtensions method extension (line 36) | extension(ForEachStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ForEachVariableStatementSyntax.g.cs.verified.cs type ForEachVariableStatementSyntaxWrapper (line 28) | public readonly partial struct ForEachVariableStatementSyntaxWrapper: IS... method ForEachVariableStatementSyntaxWrapper (line 35) | static ForEachVariableStatementSyntaxWrapper() method ForEachVariableStatementSyntaxWrapper (line 49) | private ForEachVariableStatementSyntaxWrapper(StatementSyntax node) => method IsInstance (line 113) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ForStatementSyntax.g.cs.verified.cs class ForStatementSyntaxShimExtensions (line 28) | public static partial class ForStatementSyntaxShimExtensions method extension (line 34) | extension(ForStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#FunctionPointerCallingConventionSyntax.g.cs.verified.cs type FunctionPointerCallingConventionSyntaxWrapper (line 28) | public readonly partial struct FunctionPointerCallingConventionSyntaxWra... method FunctionPointerCallingConventionSyntaxWrapper (line 35) | static FunctionPointerCallingConventionSyntaxWrapper() method FunctionPointerCallingConventionSyntaxWrapper (line 42) | private FunctionPointerCallingConventionSyntaxWrapper(CSharpSyntaxNode... method IsInstance (line 89) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#FunctionPointerParameterListSyntax.g.cs.verified.cs type FunctionPointerParameterListSyntaxWrapper (line 28) | public readonly partial struct FunctionPointerParameterListSyntaxWrapper... method FunctionPointerParameterListSyntaxWrapper (line 35) | static FunctionPointerParameterListSyntaxWrapper() method FunctionPointerParameterListSyntaxWrapper (line 43) | private FunctionPointerParameterListSyntaxWrapper(CSharpSyntaxNode nod... method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#FunctionPointerParameterSyntax.g.cs.verified.cs type FunctionPointerParameterSyntaxWrapper (line 28) | public readonly partial struct FunctionPointerParameterSyntaxWrapper: IS... method FunctionPointerParameterSyntaxWrapper (line 35) | static FunctionPointerParameterSyntaxWrapper() method FunctionPointerParameterSyntaxWrapper (line 43) | private FunctionPointerParameterSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 95) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#FunctionPointerTypeSyntax.g.cs.verified.cs type FunctionPointerTypeSyntaxWrapper (line 28) | public readonly partial struct FunctionPointerTypeSyntaxWrapper: ISyntax... method FunctionPointerTypeSyntaxWrapper (line 35) | static FunctionPointerTypeSyntaxWrapper() method FunctionPointerTypeSyntaxWrapper (line 48) | private FunctionPointerTypeSyntaxWrapper(TypeSyntax node) => method IsInstance (line 108) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#FunctionPointerUnmanagedCallingConventionListSyntax.g.cs.verified.cs type FunctionPointerUnmanagedCallingConventionListSyntaxWrapper (line 28) | public readonly partial struct FunctionPointerUnmanagedCallingConvention... method FunctionPointerUnmanagedCallingConventionListSyntaxWrapper (line 35) | static FunctionPointerUnmanagedCallingConventionListSyntaxWrapper() method FunctionPointerUnmanagedCallingConventionListSyntaxWrapper (line 43) | private FunctionPointerUnmanagedCallingConventionListSyntaxWrapper(CSh... method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#FunctionPointerUnmanagedCallingConventionSyntax.g.cs.verified.cs type FunctionPointerUnmanagedCallingConventionSyntaxWrapper (line 28) | public readonly partial struct FunctionPointerUnmanagedCallingConvention... method FunctionPointerUnmanagedCallingConventionSyntaxWrapper (line 35) | static FunctionPointerUnmanagedCallingConventionSyntaxWrapper() method FunctionPointerUnmanagedCallingConventionSyntaxWrapper (line 41) | private FunctionPointerUnmanagedCallingConventionSyntaxWrapper(CSharpS... method IsInstance (line 86) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#GeneratedKind.g.cs.verified.cs type GeneratedKind (line 28) | public enum GeneratedKind : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#GenericNameSyntax.g.cs.verified.cs class GenericNameSyntaxShimExtensions (line 28) | public static partial class GenericNameSyntaxShimExtensions method extension (line 40) | extension(GenericNameSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#GlobalStatementSyntax.g.cs.verified.cs class GlobalStatementSyntaxShimExtensions (line 28) | public static partial class GlobalStatementSyntaxShimExtensions method extension (line 36) | extension(GlobalStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#GotoStatementSyntax.g.cs.verified.cs class GotoStatementSyntaxShimExtensions (line 28) | public static partial class GotoStatementSyntaxShimExtensions method extension (line 34) | extension(GotoStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#IdentifierNameSyntax.g.cs.verified.cs class IdentifierNameSyntaxShimExtensions (line 28) | public static partial class IdentifierNameSyntaxShimExtensions method extension (line 40) | extension(IdentifierNameSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#IfStatementSyntax.g.cs.verified.cs class IfStatementSyntaxShimExtensions (line 28) | public static partial class IfStatementSyntaxShimExtensions method extension (line 34) | extension(IfStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#IgnoredDirectiveTriviaSyntax.g.cs.verified.cs type IgnoredDirectiveTriviaSyntaxWrapper (line 28) | public readonly partial struct IgnoredDirectiveTriviaSyntaxWrapper: ISyn... method IgnoredDirectiveTriviaSyntaxWrapper (line 35) | static IgnoredDirectiveTriviaSyntaxWrapper() method IgnoredDirectiveTriviaSyntaxWrapper (line 42) | private IgnoredDirectiveTriviaSyntaxWrapper(DirectiveTriviaSyntax node... method IsInstance (line 93) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ImplicitObjectCreationExpressionSyntax.g.cs.verified.cs type ImplicitObjectCreationExpressionSyntaxWrapper (line 28) | public readonly partial struct ImplicitObjectCreationExpressionSyntaxWra... method ImplicitObjectCreationExpressionSyntaxWrapper (line 35) | static ImplicitObjectCreationExpressionSyntaxWrapper() method ImplicitObjectCreationExpressionSyntaxWrapper (line 43) | private ImplicitObjectCreationExpressionSyntaxWrapper(ExpressionSyntax... method IsInstance (line 95) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ImplicitStackAllocArrayCreationExpressionSyntax.g.cs.verified.cs type ImplicitStackAllocArrayCreationExpressionSyntaxWrapper (line 28) | public readonly partial struct ImplicitStackAllocArrayCreationExpression... method ImplicitStackAllocArrayCreationExpressionSyntaxWrapper (line 35) | static ImplicitStackAllocArrayCreationExpressionSyntaxWrapper() method ImplicitStackAllocArrayCreationExpressionSyntaxWrapper (line 44) | private ImplicitStackAllocArrayCreationExpressionSyntaxWrapper(Express... method IsInstance (line 95) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#IncrementalGeneratorOutputKind.g.cs.verified.cs type IncrementalGeneratorOutputKind (line 28) | [System.FlagsAttribute] FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#IncrementalStepRunReason.g.cs.verified.cs type IncrementalStepRunReason (line 28) | public enum IncrementalStepRunReason : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#InstanceReferenceKind.g.cs.verified.cs type InstanceReferenceKind (line 28) | public enum InstanceReferenceKind : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#InstrumentationKind.g.cs.verified.cs type InstrumentationKind (line 28) | public enum InstrumentationKind : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#InterfaceDeclarationSyntax.g.cs.verified.cs class InterfaceDeclarationSyntaxShimExtensions (line 28) | public static partial class InterfaceDeclarationSyntaxShimExtensions method extension (line 34) | extension(InterfaceDeclarationSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#InterpolatedStringArgumentPlaceholderKind.g.cs.verified.cs type InterpolatedStringArgumentPlaceholderKind (line 28) | public enum InterpolatedStringArgumentPlaceholderKind : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#IsPatternExpressionSyntax.g.cs.verified.cs type IsPatternExpressionSyntaxWrapper (line 28) | public readonly partial struct IsPatternExpressionSyntaxWrapper: ISyntax... method IsPatternExpressionSyntaxWrapper (line 35) | static IsPatternExpressionSyntaxWrapper() method IsPatternExpressionSyntaxWrapper (line 43) | private IsPatternExpressionSyntaxWrapper(ExpressionSyntax node) => method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#LabeledStatementSyntax.g.cs.verified.cs class LabeledStatementSyntaxShimExtensions (line 28) | public static partial class LabeledStatementSyntaxShimExtensions method extension (line 34) | extension(LabeledStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#LambdaExpressionSyntax.g.cs.verified.cs class LambdaExpressionSyntaxShimExtensions (line 28) | public static partial class LambdaExpressionSyntaxShimExtensions method extension (line 40) | extension(LambdaExpressionSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#LanguageVersion.g.cs.verified.cs class LanguageVersionEx (line 28) | public static class LanguageVersionEx FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#LineDirectivePositionSyntax.g.cs.verified.cs type LineDirectivePositionSyntaxWrapper (line 28) | public readonly partial struct LineDirectivePositionSyntaxWrapper: ISynt... method LineDirectivePositionSyntaxWrapper (line 35) | static LineDirectivePositionSyntaxWrapper() method LineDirectivePositionSyntaxWrapper (line 45) | private LineDirectivePositionSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 98) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#LineOrSpanDirectiveTriviaSyntax.g.cs.verified.cs type LineOrSpanDirectiveTriviaSyntaxWrapper (line 28) | public readonly partial struct LineOrSpanDirectiveTriviaSyntaxWrapper: I... method LineOrSpanDirectiveTriviaSyntaxWrapper (line 35) | static LineOrSpanDirectiveTriviaSyntaxWrapper() method LineOrSpanDirectiveTriviaSyntaxWrapper (line 42) | private LineOrSpanDirectiveTriviaSyntaxWrapper(DirectiveTriviaSyntax n... method IsInstance (line 93) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#LineSpanDirectiveTriviaSyntax.g.cs.verified.cs type LineSpanDirectiveTriviaSyntaxWrapper (line 28) | public readonly partial struct LineSpanDirectiveTriviaSyntaxWrapper: ISy... method LineSpanDirectiveTriviaSyntaxWrapper (line 35) | static LineSpanDirectiveTriviaSyntaxWrapper() method LineSpanDirectiveTriviaSyntaxWrapper (line 46) | private LineSpanDirectiveTriviaSyntaxWrapper(DirectiveTriviaSyntax nod... method IsInstance (line 108) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ListPatternSyntax.g.cs.verified.cs type ListPatternSyntaxWrapper (line 28) | public readonly partial struct ListPatternSyntaxWrapper: ISyntaxWrapper<... method ListPatternSyntaxWrapper (line 35) | static ListPatternSyntaxWrapper() method ListPatternSyntaxWrapper (line 44) | private ListPatternSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 101) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#LocalDeclarationStatementSyntax.g.cs.verified.cs class LocalDeclarationStatementSyntaxShimExtensions (line 28) | public static partial class LocalDeclarationStatementSyntaxShimExtensions method extension (line 38) | extension(LocalDeclarationStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#LocalFunctionStatementSyntax.g.cs.verified.cs type LocalFunctionStatementSyntaxWrapper (line 28) | public readonly partial struct LocalFunctionStatementSyntaxWrapper: ISyn... method LocalFunctionStatementSyntaxWrapper (line 35) | static LocalFunctionStatementSyntaxWrapper() method LocalFunctionStatementSyntaxWrapper (line 50) | private LocalFunctionStatementSyntaxWrapper(StatementSyntax node) => method IsInstance (line 113) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#LockStatementSyntax.g.cs.verified.cs class LockStatementSyntaxShimExtensions (line 28) | public static partial class LockStatementSyntaxShimExtensions method extension (line 34) | extension(LockStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#LoopKind.g.cs.verified.cs type LoopKind (line 28) | public enum LoopKind : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#MemberDeclarationSyntax.g.cs.verified.cs class MemberDeclarationSyntaxShimExtensions (line 28) | public static partial class MemberDeclarationSyntaxShimExtensions method extension (line 36) | extension(MemberDeclarationSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#MetadataImportOptions.g.cs.verified.cs type MetadataImportOptions (line 28) | public enum MetadataImportOptions : System.Byte FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#MethodKind.g.cs.verified.cs class MethodKindEx (line 28) | public static class MethodKindEx FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#NameColonSyntax.g.cs.verified.cs class NameColonSyntaxShimExtensions (line 28) | public static partial class NameColonSyntaxShimExtensions method extension (line 34) | extension(NameColonSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#NameSyntax.g.cs.verified.cs class NameSyntaxShimExtensions (line 28) | public static partial class NameSyntaxShimExtensions method extension (line 40) | extension(NameSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#NamespaceDeclarationSyntax.g.cs.verified.cs class NamespaceDeclarationSyntaxShimExtensions (line 28) | public static partial class NamespaceDeclarationSyntaxShimExtensions method extension (line 36) | extension(NamespaceDeclarationSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#NullableAnnotation.g.cs.verified.cs type NullableAnnotation (line 28) | public enum NullableAnnotation : System.Byte FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#NullableContext.g.cs.verified.cs type NullableContext (line 28) | [System.FlagsAttribute] FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#NullableContextOptions.g.cs.verified.cs type NullableContextOptions (line 28) | [System.FlagsAttribute] FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#NullableDirectiveTriviaSyntax.g.cs.verified.cs type NullableDirectiveTriviaSyntaxWrapper (line 28) | public readonly partial struct NullableDirectiveTriviaSyntaxWrapper: ISy... method NullableDirectiveTriviaSyntaxWrapper (line 35) | static NullableDirectiveTriviaSyntaxWrapper() method NullableDirectiveTriviaSyntaxWrapper (line 43) | private NullableDirectiveTriviaSyntaxWrapper(DirectiveTriviaSyntax nod... method IsInstance (line 96) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#NullableFlowState.g.cs.verified.cs type NullableFlowState (line 28) | public enum NullableFlowState : System.Byte FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#NullableTypeSyntax.g.cs.verified.cs class NullableTypeSyntaxShimExtensions (line 28) | public static partial class NullableTypeSyntaxShimExtensions method extension (line 40) | extension(NullableTypeSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#OmittedTypeArgumentSyntax.g.cs.verified.cs class OmittedTypeArgumentSyntaxShimExtensions (line 28) | public static partial class OmittedTypeArgumentSyntaxShimExtensions method extension (line 40) | extension(OmittedTypeArgumentSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#OperationKind.g.cs.verified.cs class OperationKindEx (line 28) | public static class OperationKindEx FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#OperatorDeclarationSyntax.g.cs.verified.cs class OperatorDeclarationSyntaxShimExtensions (line 28) | public static partial class OperatorDeclarationSyntaxShimExtensions method extension (line 36) | extension(OperatorDeclarationSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#OperatorMemberCrefSyntax.g.cs.verified.cs class OperatorMemberCrefSyntaxShimExtensions (line 28) | public static partial class OperatorMemberCrefSyntaxShimExtensions method extension (line 34) | extension(OperatorMemberCrefSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ParenthesizedLambdaExpressionSyntax.g.cs.verified.cs class ParenthesizedLambdaExpressionSyntaxShimExtensions (line 28) | public static partial class ParenthesizedLambdaExpressionSyntaxShimExten... method extension (line 42) | extension(ParenthesizedLambdaExpressionSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ParenthesizedPatternSyntax.g.cs.verified.cs type ParenthesizedPatternSyntaxWrapper (line 28) | public readonly partial struct ParenthesizedPatternSyntaxWrapper: ISynta... method ParenthesizedPatternSyntaxWrapper (line 35) | static ParenthesizedPatternSyntaxWrapper() method ParenthesizedPatternSyntaxWrapper (line 43) | private ParenthesizedPatternSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 98) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ParenthesizedVariableDesignationSyntax.g.cs.verified.cs type ParenthesizedVariableDesignationSyntaxWrapper (line 28) | public readonly partial struct ParenthesizedVariableDesignationSyntaxWra... method ParenthesizedVariableDesignationSyntaxWrapper (line 35) | static ParenthesizedVariableDesignationSyntaxWrapper() method ParenthesizedVariableDesignationSyntaxWrapper (line 43) | private ParenthesizedVariableDesignationSyntaxWrapper(CSharpSyntaxNode... method IsInstance (line 95) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#PatternSyntax.g.cs.verified.cs type PatternSyntaxWrapper (line 28) | public readonly partial struct PatternSyntaxWrapper: ISyntaxWrapper method IsInstance (line 87) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#Platform.g.cs.verified.cs class PlatformEx (line 28) | public static class PlatformEx FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#PointerTypeSyntax.g.cs.verified.cs class PointerTypeSyntaxShimExtensions (line 28) | public static partial class PointerTypeSyntaxShimExtensions method extension (line 40) | extension(PointerTypeSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#PositionalPatternClauseSyntax.g.cs.verified.cs type PositionalPatternClauseSyntaxWrapper (line 28) | public readonly partial struct PositionalPatternClauseSyntaxWrapper: ISy... method PositionalPatternClauseSyntaxWrapper (line 35) | static PositionalPatternClauseSyntaxWrapper() method PositionalPatternClauseSyntaxWrapper (line 43) | private PositionalPatternClauseSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#PredefinedTypeSyntax.g.cs.verified.cs class PredefinedTypeSyntaxShimExtensions (line 28) | public static partial class PredefinedTypeSyntaxShimExtensions method extension (line 40) | extension(PredefinedTypeSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#PrimaryConstructorBaseTypeSyntax.g.cs.verified.cs type PrimaryConstructorBaseTypeSyntaxWrapper (line 28) | public readonly partial struct PrimaryConstructorBaseTypeSyntaxWrapper: ... method PrimaryConstructorBaseTypeSyntaxWrapper (line 35) | static PrimaryConstructorBaseTypeSyntaxWrapper() method PrimaryConstructorBaseTypeSyntaxWrapper (line 41) | private PrimaryConstructorBaseTypeSyntaxWrapper(BaseTypeSyntax node) => method IsInstance (line 87) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#PropertyPatternClauseSyntax.g.cs.verified.cs type PropertyPatternClauseSyntaxWrapper (line 28) | public readonly partial struct PropertyPatternClauseSyntaxWrapper: ISynt... method PropertyPatternClauseSyntaxWrapper (line 35) | static PropertyPatternClauseSyntaxWrapper() method PropertyPatternClauseSyntaxWrapper (line 43) | private PropertyPatternClauseSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#QualifiedNameSyntax.g.cs.verified.cs class QualifiedNameSyntaxShimExtensions (line 28) | public static partial class QualifiedNameSyntaxShimExtensions method extension (line 40) | extension(QualifiedNameSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#RangeExpressionSyntax.g.cs.verified.cs type RangeExpressionSyntaxWrapper (line 28) | public readonly partial struct RangeExpressionSyntaxWrapper: ISyntaxWrap... method RangeExpressionSyntaxWrapper (line 35) | static RangeExpressionSyntaxWrapper() method RangeExpressionSyntaxWrapper (line 43) | private RangeExpressionSyntaxWrapper(ExpressionSyntax node) => method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#RecordDeclarationSyntax.g.cs.verified.cs type RecordDeclarationSyntaxWrapper (line 28) | public readonly partial struct RecordDeclarationSyntaxWrapper: ISyntaxWr... method RecordDeclarationSyntaxWrapper (line 35) | static RecordDeclarationSyntaxWrapper() method RecordDeclarationSyntaxWrapper (line 42) | private RecordDeclarationSyntaxWrapper(TypeDeclarationSyntax node) => method IsInstance (line 101) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#RecursivePatternSyntax.g.cs.verified.cs type RecursivePatternSyntaxWrapper (line 28) | public readonly partial struct RecursivePatternSyntaxWrapper: ISyntaxWra... method RecursivePatternSyntaxWrapper (line 35) | static RecursivePatternSyntaxWrapper() method RecursivePatternSyntaxWrapper (line 44) | private RecursivePatternSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 101) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#RefExpressionSyntax.g.cs.verified.cs type RefExpressionSyntaxWrapper (line 28) | public readonly partial struct RefExpressionSyntaxWrapper: ISyntaxWrappe... method RefExpressionSyntaxWrapper (line 35) | static RefExpressionSyntaxWrapper() method RefExpressionSyntaxWrapper (line 42) | private RefExpressionSyntaxWrapper(ExpressionSyntax node) => method IsInstance (line 89) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#RefKind.g.cs.verified.cs class RefKindEx (line 28) | public static class RefKindEx FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#RefStructConstraintSyntax.g.cs.verified.cs type RefStructConstraintSyntaxWrapper (line 28) | public readonly partial struct RefStructConstraintSyntaxWrapper: ISyntax... method RefStructConstraintSyntaxWrapper (line 35) | static RefStructConstraintSyntaxWrapper() method RefStructConstraintSyntaxWrapper (line 42) | private RefStructConstraintSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#RefTypeSyntax.g.cs.verified.cs type RefTypeSyntaxWrapper (line 28) | public readonly partial struct RefTypeSyntaxWrapper: ISyntaxWrapper method IsInstance (line 105) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#RelationalPatternSyntax.g.cs.verified.cs type RelationalPatternSyntaxWrapper (line 28) | public readonly partial struct RelationalPatternSyntaxWrapper: ISyntaxWr... method RelationalPatternSyntaxWrapper (line 35) | static RelationalPatternSyntaxWrapper() method RelationalPatternSyntaxWrapper (line 42) | private RelationalPatternSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 95) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ReturnStatementSyntax.g.cs.verified.cs class ReturnStatementSyntaxShimExtensions (line 28) | public static partial class ReturnStatementSyntaxShimExtensions method extension (line 34) | extension(ReturnStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#RuntimeCapability.g.cs.verified.cs type RuntimeCapability (line 28) | public enum RuntimeCapability : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SarifVersion.g.cs.verified.cs type SarifVersion (line 28) | public enum SarifVersion : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ScopedKind.g.cs.verified.cs type ScopedKind (line 28) | public enum ScopedKind : System.Byte FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ScopedTypeSyntax.g.cs.verified.cs type ScopedTypeSyntaxWrapper (line 28) | public readonly partial struct ScopedTypeSyntaxWrapper: ISyntaxWrapper method IsInstance (line 102) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SemanticEditKind.g.cs.verified.cs class SemanticEditKindEx (line 29) | public static class SemanticEditKindEx FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SemanticModelOptions.g.cs.verified.cs type SemanticModelOptions (line 28) | [System.FlagsAttribute] FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ShebangDirectiveTriviaSyntax.g.cs.verified.cs class ShebangDirectiveTriviaSyntaxShimExtensions (line 28) | public static partial class ShebangDirectiveTriviaSyntaxShimExtensions method extension (line 34) | extension(ShebangDirectiveTriviaSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SimpleLambdaExpressionSyntax.g.cs.verified.cs class SimpleLambdaExpressionSyntaxShimExtensions (line 28) | public static partial class SimpleLambdaExpressionSyntaxShimExtensions method extension (line 40) | extension(SimpleLambdaExpressionSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SimpleNameSyntax.g.cs.verified.cs class SimpleNameSyntaxShimExtensions (line 28) | public static partial class SimpleNameSyntaxShimExtensions method extension (line 40) | extension(SimpleNameSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SingleVariableDesignationSyntax.g.cs.verified.cs type SingleVariableDesignationSyntaxWrapper (line 28) | public readonly partial struct SingleVariableDesignationSyntaxWrapper: I... method SingleVariableDesignationSyntaxWrapper (line 35) | static SingleVariableDesignationSyntaxWrapper() method SingleVariableDesignationSyntaxWrapper (line 41) | private SingleVariableDesignationSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 89) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SlicePatternSyntax.g.cs.verified.cs type SlicePatternSyntaxWrapper (line 28) | public readonly partial struct SlicePatternSyntaxWrapper: ISyntaxWrapper... method SlicePatternSyntaxWrapper (line 35) | static SlicePatternSyntaxWrapper() method SlicePatternSyntaxWrapper (line 42) | private SlicePatternSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 95) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SpecialType.g.cs.verified.cs class SpecialTypeEx (line 28) | public static class SpecialTypeEx FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SpreadElementSyntax.g.cs.verified.cs type SpreadElementSyntaxWrapper (line 28) | public readonly partial struct SpreadElementSyntaxWrapper: ISyntaxWrappe... method SpreadElementSyntaxWrapper (line 35) | static SpreadElementSyntaxWrapper() method SpreadElementSyntaxWrapper (line 42) | private SpreadElementSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#StackAllocArrayCreationExpressionSyntax.g.cs.verified.cs class StackAllocArrayCreationExpressionSyntaxShimExtensions (line 28) | public static partial class StackAllocArrayCreationExpressionSyntaxShimE... method extension (line 34) | extension(StackAllocArrayCreationExpressionSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#StatementSyntax.g.cs.verified.cs class StatementSyntaxShimExtensions (line 28) | public static partial class StatementSyntaxShimExtensions method extension (line 34) | extension(StatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#StructDeclarationSyntax.g.cs.verified.cs class StructDeclarationSyntaxShimExtensions (line 28) | public static partial class StructDeclarationSyntaxShimExtensions method extension (line 34) | extension(StructDeclarationSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SubpatternSyntax.g.cs.verified.cs type SubpatternSyntaxWrapper (line 28) | public readonly partial struct SubpatternSyntaxWrapper: ISyntaxWrapper method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SwitchExpressionArmSyntax.g.cs.verified.cs type SwitchExpressionArmSyntaxWrapper (line 28) | public readonly partial struct SwitchExpressionArmSyntaxWrapper: ISyntax... method SwitchExpressionArmSyntaxWrapper (line 35) | static SwitchExpressionArmSyntaxWrapper() method SwitchExpressionArmSyntaxWrapper (line 44) | private SwitchExpressionArmSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 95) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SwitchExpressionSyntax.g.cs.verified.cs type SwitchExpressionSyntaxWrapper (line 28) | public readonly partial struct SwitchExpressionSyntaxWrapper: ISyntaxWra... method SwitchExpressionSyntaxWrapper (line 35) | static SwitchExpressionSyntaxWrapper() method SwitchExpressionSyntaxWrapper (line 45) | private SwitchExpressionSyntaxWrapper(ExpressionSyntax node) => method IsInstance (line 98) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SwitchStatementSyntax.g.cs.verified.cs class SwitchStatementSyntaxShimExtensions (line 28) | public static partial class SwitchStatementSyntaxShimExtensions method extension (line 34) | extension(SwitchStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SymbolDisplayLocalOptions.g.cs.verified.cs class SymbolDisplayLocalOptionsEx (line 28) | public static class SymbolDisplayLocalOptionsEx FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SymbolDisplayMemberOptions.g.cs.verified.cs class SymbolDisplayMemberOptionsEx (line 28) | public static class SymbolDisplayMemberOptionsEx FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SymbolDisplayMiscellaneousOptions.g.cs.verified.cs class SymbolDisplayMiscellaneousOptionsEx (line 28) | public static class SymbolDisplayMiscellaneousOptionsEx FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SymbolDisplayParameterOptions.g.cs.verified.cs class SymbolDisplayParameterOptionsEx (line 28) | public static class SymbolDisplayParameterOptionsEx FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SymbolDisplayPartKind.g.cs.verified.cs class SymbolDisplayPartKindEx (line 28) | public static class SymbolDisplayPartKindEx FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SymbolKind.g.cs.verified.cs class SymbolKindEx (line 28) | public static class SymbolKindEx FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#SyntaxKind.g.cs.verified.cs class SyntaxKindEx (line 28) | public static class SyntaxKindEx FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ThrowExpressionSyntax.g.cs.verified.cs type ThrowExpressionSyntaxWrapper (line 28) | public readonly partial struct ThrowExpressionSyntaxWrapper: ISyntaxWrap... method ThrowExpressionSyntaxWrapper (line 35) | static ThrowExpressionSyntaxWrapper() method ThrowExpressionSyntaxWrapper (line 42) | private ThrowExpressionSyntaxWrapper(ExpressionSyntax node) => method IsInstance (line 89) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#ThrowStatementSyntax.g.cs.verified.cs class ThrowStatementSyntaxShimExtensions (line 28) | public static partial class ThrowStatementSyntaxShimExtensions method extension (line 34) | extension(ThrowStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#TryStatementSyntax.g.cs.verified.cs class TryStatementSyntaxShimExtensions (line 28) | public static partial class TryStatementSyntaxShimExtensions method extension (line 34) | extension(TryStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#TupleElementSyntax.g.cs.verified.cs type TupleElementSyntaxWrapper (line 28) | public readonly partial struct TupleElementSyntaxWrapper: ISyntaxWrapper... method TupleElementSyntaxWrapper (line 35) | static TupleElementSyntaxWrapper() method TupleElementSyntaxWrapper (line 42) | private TupleElementSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 89) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#TupleExpressionSyntax.g.cs.verified.cs type TupleExpressionSyntaxWrapper (line 28) | public readonly partial struct TupleExpressionSyntaxWrapper: ISyntaxWrap... method TupleExpressionSyntaxWrapper (line 35) | static TupleExpressionSyntaxWrapper() method TupleExpressionSyntaxWrapper (line 43) | private TupleExpressionSyntaxWrapper(ExpressionSyntax node) => method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#TupleTypeSyntax.g.cs.verified.cs type TupleTypeSyntaxWrapper (line 28) | public readonly partial struct TupleTypeSyntaxWrapper: ISyntaxWrapper method IsInstance (line 105) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#TypeDeclarationSyntax.g.cs.verified.cs class TypeDeclarationSyntaxShimExtensions (line 28) | public static partial class TypeDeclarationSyntaxShimExtensions method extension (line 34) | extension(TypeDeclarationSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#TypeKind.g.cs.verified.cs class TypeKindEx (line 28) | public static class TypeKindEx FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#TypePatternSyntax.g.cs.verified.cs type TypePatternSyntaxWrapper (line 28) | public readonly partial struct TypePatternSyntaxWrapper: ISyntaxWrapper<... method TypePatternSyntaxWrapper (line 35) | static TypePatternSyntaxWrapper() method TypePatternSyntaxWrapper (line 41) | private TypePatternSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#TypeSyntax.g.cs.verified.cs class TypeSyntaxShimExtensions (line 28) | public static partial class TypeSyntaxShimExtensions method extension (line 40) | extension(TypeSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#UnaryOperatorKind.g.cs.verified.cs type UnaryOperatorKind (line 28) | public enum UnaryOperatorKind : System.Int32 FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#UnaryPatternSyntax.g.cs.verified.cs type UnaryPatternSyntaxWrapper (line 28) | public readonly partial struct UnaryPatternSyntaxWrapper: ISyntaxWrapper... method UnaryPatternSyntaxWrapper (line 35) | static UnaryPatternSyntaxWrapper() method UnaryPatternSyntaxWrapper (line 42) | private UnaryPatternSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 95) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#UnsafeStatementSyntax.g.cs.verified.cs class UnsafeStatementSyntaxShimExtensions (line 28) | public static partial class UnsafeStatementSyntaxShimExtensions method extension (line 34) | extension(UnsafeStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#UsingDirectiveSyntax.g.cs.verified.cs class UsingDirectiveSyntaxShimExtensions (line 28) | public static partial class UsingDirectiveSyntaxShimExtensions method extension (line 38) | extension(UsingDirectiveSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#UsingStatementSyntax.g.cs.verified.cs class UsingStatementSyntaxShimExtensions (line 28) | public static partial class UsingStatementSyntaxShimExtensions method extension (line 36) | extension(UsingStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#VarPatternSyntax.g.cs.verified.cs type VarPatternSyntaxWrapper (line 28) | public readonly partial struct VarPatternSyntaxWrapper: ISyntaxWrapper method IsInstance (line 95) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#VariableDesignationSyntax.g.cs.verified.cs type VariableDesignationSyntaxWrapper (line 28) | public readonly partial struct VariableDesignationSyntaxWrapper: ISyntax... method VariableDesignationSyntaxWrapper (line 35) | static VariableDesignationSyntaxWrapper() method VariableDesignationSyntaxWrapper (line 41) | private VariableDesignationSyntaxWrapper(CSharpSyntaxNode node) => method IsInstance (line 84) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#WhenClauseSyntax.g.cs.verified.cs type WhenClauseSyntaxWrapper (line 28) | public readonly partial struct WhenClauseSyntaxWrapper: ISyntaxWrapper method IsInstance (line 89) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#WhileStatementSyntax.g.cs.verified.cs class WhileStatementSyntaxShimExtensions (line 28) | public static partial class WhileStatementSyntaxShimExtensions method extension (line 34) | extension(WhileStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#WithExpressionSyntax.g.cs.verified.cs type WithExpressionSyntaxWrapper (line 28) | public readonly partial struct WithExpressionSyntaxWrapper: ISyntaxWrapp... method WithExpressionSyntaxWrapper (line 35) | static WithExpressionSyntaxWrapper() method WithExpressionSyntaxWrapper (line 43) | private WithExpressionSyntaxWrapper(ExpressionSyntax node) => method IsInstance (line 92) | public static bool IsInstance(SyntaxNode node) => FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Snapshots/Snap#YieldStatementSyntax.g.cs.verified.cs class YieldStatementSyntaxShimExtensions (line 28) | public static partial class YieldStatementSyntaxShimExtensions method extension (line 34) | extension(YieldStatementSyntax @this) FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Strategies/NewEnumStrategyTest.cs class NewEnumStrategyTest (line 23) | [TestClass] type EnumWithExperimentalAttribute (line 26) | [Experimental("RSEXPERIMENTAL001")] // Microsoft.CodeAnalysis.Semantic... method Generate (line 33) | [TestMethod] method Generate_IgnoreExperimentalAttribute (line 80) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Strategies/NoChangeStrategyTest.cs class NoChangeStrategyTest (line 20) | [TestClass] method Generate (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Strategies/PartialEnumStrategyTest.cs class PartialEnumStrategyTest (line 22) | [TestClass] method Generate (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Strategies/SkipStrategyTest.cs class SkipStrategyTest (line 20) | [TestClass] method SkipStrategy (line 23) | [TestMethod] method ReturnTypeSnippet (line 30) | [TestMethod] method ToConversionSnippet (line 34) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Strategies/SyntaxNodeExtendStrategyTest.cs class SyntaxNodeExtendStrategyTest (line 23) | [TestClass] method Generate_TypeDeclarationSyntax_Empty (line 26) | [TestMethod] method Generate_ClassDeclarationSyntax_ParameterList (line 33) | [TestMethod] method Generate_ProcessStartInfo_GetterOnly (line 89) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.ShimLayer.Generator.Test/Strategies/SyntaxNodeWrapStrategyTest.cs class SyntaxNodeWrapStrategyTest (line 24) | [TestClass] method Generate_Empty (line 27) | [TestMethod] method Generate_RecordDeclarationSyntax (line 113) | [TestMethod] method Generate_IsPatternSyntax (line 207) | [TestMethod] method Generate_ConstantPatternSyntax (line 298) | [TestMethod] method Generate_SkippedMembers_DoNotProduceEmptyLines (line 393) | [TestMethod] method Generate_PropagateMemberAttributes (line 481) | [TestMethod] method Generate_GenericMembers (line 572) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/AnalysisContext/SonarAnalysisContextBaseTest.ShouldAnalyzeTree.cs class SonarAnalysisContextBaseTest (line 28) | public partial class SonarAnalysisContextBaseTest method ShouldAnalyzeTree_SonarLint (line 33) | [TestMethod] method ShouldAnalyzeTree_Scanner_UnchangedFiles_NotAvailable (line 41) | [TestMethod] method ShouldAnalyzeTree_Scanner_UnchangedFiles_Empty (line 49) | [TestMethod] method ShouldAnalyzeTree_Scanner_UnchangedFiles_ContainsTreeFile (line 57) | [TestMethod] method ShouldAnalyzeTree_Scanner_UnchangedFiles_ContainsOtherFile (line 65) | [TestMethod] method ShouldAnalyzeTree_Scanner_WhenRazorFileHasNotChanged_ReturnsFalseForTheAssociatedGeneratedFile (line 73) | [TestMethod] method ShouldAnalyzeTree_GeneratedFile_NoSonarLintXml (line 88) | [TestMethod] method ShouldAnalyzeTree_GeneratedFile_ShouldAnalyzeGeneratedProvider_IsCached (line 101) | [TestMethod] method ShouldAnalyzeTree_GeneratedFile_InvalidSonarLintXml (line 121) | [TestMethod] method ShouldAnalyzeTree_GeneratedFile_AnalyzeGenerated_AnalyzeAllFiles (line 139) | [TestMethod] method ShouldAnalyzeTree_CorrectSettingUsed (line 151) | [TestMethod] method ShouldAnalyzeTree_IssuesRaisedOnPartiallyGenerated_LegacyWinFormsFile (line 173) | [TestMethod] method ShouldAnalyzeTree_NoIssue_OnGeneratedFile_WithGeneratedName (line 199) | [TestMethod] method ShouldAnalyzeTree_NoIssueOnGeneratedFile_WithAutoGeneratedComment (line 222) | [TestMethod] method ShouldAnalyzeTree_NoIssueOnGeneratedFile_WithExcludedAttribute (line 282) | [TestMethod] method ShouldAnalyzeTree_NoIssueOnGeneratedAnnotatedLambda_WithExcludedAttribute (line 307) | [TestMethod] method ShouldAnalyzeTree_Exclusions_ReturnExpected (line 338) | [TestMethod] method ShouldAnalyzeTree_GlobalExclusions_ReturnExpected (line 346) | [TestMethod] method ShouldAnalyzeTree_TestExclusions_ReturnExpected (line 354) | [TestMethod] method ShouldAnalyzeTree_GlobalTestExclusions_ReturnExpected (line 362) | [TestMethod] method ShouldAnalyzeTree_Inclusions_ReturnExpected (line 370) | [TestMethod] method ShouldAnalyzeTree_TestInclusions_ReturnExpected (line 378) | [TestMethod] method ShouldAnalyzeTree_MixedInput_ProductProject_ReturnExpected (line 386) | [TestMethod] method ShouldAnalyzeTree_MixedInput_TestProject_ReturnExpected (line 394) | [TestMethod] method ShouldAnalyzeTree_WithExclusionInclusionParametersSet_ReturnsTrueForIncludedFilesOnly (line 402) | private void ShouldAnalyzeTree_WithExclusionInclusionParametersSet_Ret... method CreateOptions (line 439) | private AnalyzerOptions CreateOptions(string[] unchangedFiles) => method CreateOptions (line 442) | private static AnalyzerOptions CreateOptions(SourceText sourceText, st... method CreateDummyCompilation (line 445) | private static (Compilation Compilation, SyntaxTree Tree) CreateDummyC... method ShouldAnalyzeTree (line 454) | private static bool ShouldAnalyzeTree(AnalyzerOptions options, string ... method VerifyEmpty (line 461) | private static void VerifyEmpty(string fileName, string snippet, Diagn... class DummySourceText (line 474) | private sealed class DummySourceText : SourceText method DummySourceText (line 483) | public DummySourceText(string textToReturn) => method ToString (line 486) | public override string ToString() method CopyTo (line 492) | public override void CopyTo(int sourceIndex, char[] destination, int... FILE: analyzers/tests/SonarAnalyzer.Test/AnalysisContext/SonarAnalysisContextBaseTest.cs class SonarAnalysisContextBaseTest (line 23) | [TestClass] method HasMatchingScope_SingleDiagnostic_WithOneOrMoreScopes_SonarLint (line 34) | [TestMethod] method HasMatchingScope_SingleDiagnostic_WithOneOrMoreScopes_Scanner (line 54) | [TestMethod] method HasMatchingScope_MultipleDiagnostics_WithSingleScope_SonarLint (line 83) | [TestMethod] method HasMatchingScope_MultipleDiagnostics_WithSingleScope_Scanner (line 97) | [TestMethod] method ProjectConfiguration_LoadsExpectedValues (line 110) | [TestMethod] method ProjectConfiguration_UsesCachedValue (line 119) | [TestMethod] method ProjectConfiguration_WhenFileChanges_RebuildsCache (line 131) | [TestMethod] method ProjectConfiguration_WhenAdditionalFileNotPresent_ReturnsEmptyConfig (line 142) | [TestMethod] method ProjectConfiguration_WhenFileIsMissing_ThrowException (line 159) | [TestMethod] method ProjectConfiguration_WhenInvalidXml_ThrowException (line 170) | [TestMethod] method SonarLintFile_LoadsExpectedValues (line 181) | [TestMethod] method SonarLintFile_UsesCachedValue (line 209) | [TestMethod] method SonarLintFile_WhenFileChanges_RebuildsCache (line 221) | [TestMethod] method SonarLintFile_WhenAdditionalFileNotPresent_ReturnsDefaultValues (line 232) | [TestMethod] method SonarLintFile_WhenInvalidXml_ReturnsDefaultValues (line 244) | [TestMethod] method SonarLintFile_WhenFileIsMissing_ThrowException (line 251) | [TestMethod] method ReportIssue_Null_Throws (line 262) | [TestMethod] method ReportIssue_NullLocation_UsesEmpty (line 274) | [TestMethod] method CheckSonarLintXmlDefaultValues (line 293) | private static void CheckSonarLintXmlDefaultValues(SonarLintXmlReader ... method CreateSut (line 306) | private SonarCompilationReportingContext CreateSut(ProjectType project... method CreateSut (line 309) | private static SonarCompilationReportingContext CreateSut(AnalyzerOpti... method CreateSut (line 312) | private static SonarCompilationReportingContext CreateSut(Compilation ... FILE: analyzers/tests/SonarAnalyzer.Test/AnalysisContext/SonarAnalysisContextTest.Parametrized.cs class SonarAnalysisContextTest (line 27) | public partial class SonarAnalysisContextTest method RegisterNodeAction_UnchangedFiles_SonarParametrizedAnalysisContext (line 29) | [TestMethod] method RegisterTreeAction_UnchangedFiles_SonarParametrizedAnalysisContext (line 43) | [TestMethod] method RegisterTreeAction_Extension_SonarParametrizedAnalysisContext_CS (line 56) | [TestMethod] method RegisterTreeAction_Extension_SonarParametrizedAnalysisContext_VB (line 67) | [TestMethod] method RegisterSemanticModelAction_UnchangedFiles_SonarParametrizedAnalysisContext (line 78) | [TestMethod] method RegisterSemanticModelAction_Extension_SonarParametrizedAnalysisContext_CS (line 91) | [TestMethod] method RegisterSemanticModelAction_Extension_SonarParametrizedAnalysisContext_VB (line 102) | [TestMethod] method ExecutePostponedActions (line 113) | private static void ExecutePostponedActions(SonarParametrizedAnalysisC... FILE: analyzers/tests/SonarAnalyzer.Test/AnalysisContext/SonarAnalysisContextTest.Register.cs class SonarAnalysisContextTest (line 29) | public partial class SonarAnalysisContextTest method RegisterNodeAction_UnchangedFiles_SonarAnalysisContext (line 36) | [TestMethod] method RegisterNodeActionInAllFiles_UnchangedFiles_GeneratedFiles_AlwaysRuns (line 48) | [TestMethod] method RegisterTreeAction_UnchangedFiles_SonarAnalysisContext (line 60) | [TestMethod] method RegisterTreeAction_ScopeAndGeneratedCode (line 72) | [TestMethod] method RegisterCompilationStartAction_RegisterTreeAction_ScopeAndGeneratedCode (line 99) | [TestMethod] method RegisterSemanticModelAction_UnchangedFiles_SonarAnalysisContext (line 132) | [TestMethod] method RegisterSemanticModelAction_Extension_SonarAnalysisContext_CS (line 144) | [TestMethod] method RegisterSemanticModelAction_Extension_SonarAnalysisContext_VB (line 154) | [TestMethod] method RegisterCodeBlockStartAction_UnchangedFiles_SonarAnalysisContext (line 164) | [TestMethod] method SonarCompilationStartAnalysisContext_RegisterSemanticModel (line 176) | [TestMethod] method SonarCompilationStartAnalysisContext_RegisterCompilationEndAction (line 187) | [TestMethod] method SonarCompilationStartAnalysisContext_RegisterSymbolAction (line 198) | [TestMethod] method SonarCompilationStartAnalysisContext_RegisterNodeAction (line 209) | [TestMethod] method SonarCompilationStartAnalysisContext_RegisterCompilationEnd_ReportsIssue (line 220) | [TestMethod] method SonarCompilationStartAnalysisContext_RegisterSymbol_ReportsIssue (line 232) | [TestMethod] method SonarCompilationStartAnalysisContext_RegisterSymbolStartAction (line 244) | [TestMethod] method SonarCompilationStartAnalysisContext_RegisterCodeBlockStartAction_RegistrationIsCalled (line 263) | [TestMethod] method SonarCompilationStartAnalysisContext_RegisterCodeBlockStart_ScopeAndGeneratedCode (line 284) | [TestMethod] method SonarAnalysisContext_RegisterCodeBlockStart_ScopeAndGeneratedCode (line 317) | [TestMethod] method SonarCompilationStartAnalysisContext_RegisterSymbolStartAction_ScopeAndGeneratedCode (line 344) | [TestMethod] method SonarCompilationStartAnalysisContext_RegisterSymbolStartAction_RegisterAndReporting_ScopeAndGeneratedCode (line 372) | [TestMethod] method SonarCompilationStartAnalysisContext_RegisterSymbolStartAction_RegisterOperationAction_NotImplemented (line 417) | [TestMethod] method SonarCompilationStartAnalysisContext_RegisterSymbolStartAction_RegisterOperationBlockAction_NotImplemented (line 433) | [TestMethod] method SonarCompilationStartAnalysisContext_RegisterSymbolStartAction_RegisterOperationBlockStartAction_NotImplemented (line 449) | [TestMethod] method DisabledRules_ForRazor_DoNotRaise (line 467) | [TestMethod] method TestRules_ForRazor_DoNotRaise (line 489) | [TestMethod] method AllScopedRules_ForRazor_Raise (line 499) | [TestMethod] method RaisedIssue_WithinRazorGeneratedCode_ShouldNotBeReported (line 522) | [TestMethod] method Snippet (line 531) | private static string Snippet(string extension) method MockCompilationStartAnalysisContext (line 548) | private static CompilationStartAnalysisContext MockCompilationStartAna... class DummyAnalysisContext (line 562) | private sealed class DummyAnalysisContext : RoslynAnalysisContext method DummyAnalysisContext (line 572) | public DummyAnalysisContext(TestContext testContext, params string[]... method DelegateAction (line 578) | public void DelegateAction(T arg) => method AssertDelegateInvoked (line 581) | public void AssertDelegateInvoked(bool expected, string because = ""... method CreateSyntaxNodeAnalysisContext (line 584) | public SyntaxNodeAnalysisContext CreateSyntaxNodeAnalysisContext() => method CreateSemanticModelAnalysisContext (line 587) | public SemanticModelAnalysisContext CreateSemanticModelAnalysisConte... method CreateCodeBlockStartAnalysisContext (line 590) | public CodeBlockStartAnalysisContext CreateCodeBlockSta... method RegisterCodeBlockAction (line 595) | public override void RegisterCodeBlockAction(Action... method RegisterCompilationAction (line 601) | public override void RegisterCompilationAction(Action(Act... method RegisterSyntaxTreeAction (line 616) | public override void RegisterSyntaxTreeAction(Action : CodeBl... method DummyCodeBlockStartAnalysisContext (line 622) | public DummyCodeBlockStartAnalysisContext(DummyAnalysisContext baseC... method RegisterCodeBlockEndAction (line 624) | public override void RegisterCodeBlockEndAction(Action... method RegisterCompilationEndAction (line 658) | public override void RegisterCompilationEndAction(Action(Act... method RegisterSyntaxTreeAction (line 679) | public override void RegisterSyntaxTreeAction(Action class TestAnalyzerCS (line 700) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 705) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/tests/SonarAnalyzer.Test/AnalysisContext/SonarAnalysisContextTest.cs class SonarAnalysisContextTest (line 26) | [TestClass] method Constructor_Null (line 67) | [TestMethod] method WhenShouldAnalysisBeDisabledReturnsTrue_NoIssueReported (line 71) | [TestMethod] method ByDefault_ExecuteRule (line 91) | [TestMethod] method WhenProjectType_IsTest_RunRulesWithTestScope_SonarLint (line 103) | [TestMethod] method WhenProjectType_IsTest_RunRulesWithTestScope_Scanner (line 128) | [TestMethod] method WhenProjectType_IsTest_RunRulesWithMainScope (line 153) | [TestMethod] method WhenAnalysisDisabledBaseOnSyntaxTree_ReportIssuesForEnabledRules (line 178) | [TestMethod] method WhenReportDiagnosticActionNotNull_AllowToControlWhetherOrNotToReport (line 197) | [TestMethod] method IsTestProject_Standalone (line 242) | [TestMethod] method IsTestProject_WithConfigFile (line 254) | [TestMethod] method ReportDiagnosticIfNonGenerated_UnchangedFiles_CompilationAnalysisContext (line 266) | [TestMethod] class TestSetup (line 283) | private sealed class TestSetup method TestSetup (line 289) | public TestSetup(string testCase, SonarDiagnosticAnalyzer analyzer) ... method TestSetup (line 291) | public TestSetup(string testCase, SonarDiagnosticAnalyzer analyzer, ... FILE: analyzers/tests/SonarAnalyzer.Test/CFG/CfgSerializer/DotWriterTest.cs class DotWriterTest (line 20) | [TestClass] method WriteGraphStart (line 23) | [TestMethod] method WriteGraphEnd (line 32) | [TestMethod] method WriteSubGraphStart (line 42) | [TestMethod] method WriteSubGraphEnd (line 50) | [TestMethod] method WriteNode_WithItems (line 58) | [TestMethod] method WriteNode_WithEncoding (line 66) | [TestMethod] method WriteNode_NoItems (line 74) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/CFG/Extensions/IOperationExtensionsTest.cs class IOperationExtensionsTest (line 23) | [TestClass] method DescendantsAndSelf_Null_ReturnsNull (line 26) | [TestMethod] method OperationWrapperSonarPropertyShortcuts (line 30) | [TestMethod] method AsForEachLoop_ForEachLoop_ConvertsToWrapper (line 51) | [TestMethod] method AsForEachLoop_OtherLoop_ConvertsToWrapper (line 66) | [TestMethod] method ExtensionsMethodsUsedByArchitecture (line 81) | [TestMethod] method Operation (line 101) | private static IOperation Operation(string code) where T : SyntaxNode FILE: analyzers/tests/SonarAnalyzer.Test/CFG/Roslyn/BasicBlockTest.cs class BasicBlockTest (line 22) | [TestClass] method Wrap_ReturnsNull (line 25) | [TestMethod] method ValidateReflection (line 29) | [TestMethod] method ValidateOperations (line 126) | [TestMethod] method ValidateSwitchExpressionCase (line 152) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/CFG/Roslyn/CaptureIdTest.cs class CaptureIdTest (line 23) | [TestClass] method Null_ThrowsException (line 26) | [TestMethod] method Equals_ReturnsFalse (line 33) | [TestMethod] method ValidateReflection (line 41) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/CFG/Roslyn/CfgAllPathValidatorTest.cs class CfgAllPathValidatorTest (line 20) | [TestClass] method ValidateCfgPaths (line 23) | [TestMethod] method ValidAfterBranching (line 68) | [TestMethod] method LoopInCfg (line 107) | [TestMethod] class TestNonEntryBlockValidator (line 145) | private class TestNonEntryBlockValidator : CfgAllPathValidator method TestNonEntryBlockValidator (line 147) | public TestNonEntryBlockValidator(ControlFlowGraph cfg) : base(cfg) { } method IsValid (line 149) | protected override bool IsValid(BasicBlock block) => block.Ordinal > 0; method IsInvalid (line 151) | protected override bool IsInvalid(BasicBlock block) => false; class TestCfgValidator (line 154) | private class TestCfgValidator : CfgAllPathValidator method TestCfgValidator (line 158) | public TestCfgValidator(ControlFlowGraph cfg, params int[] validBloc... method IsValid (line 161) | protected override bool IsValid(BasicBlock block) => method IsInvalid (line 164) | protected override bool IsInvalid(BasicBlock block) => class OnlyOneBlockIsValid (line 168) | private class OnlyOneBlockIsValid : CfgAllPathValidator method OnlyOneBlockIsValid (line 172) | public OnlyOneBlockIsValid(ControlFlowGraph cfg, int validBlock) : b... method IsValid (line 175) | protected override bool IsValid(BasicBlock block) => method IsInvalid (line 178) | protected override bool IsInvalid(BasicBlock block) => false; FILE: analyzers/tests/SonarAnalyzer.Test/CFG/Roslyn/ControlFlowBranchTest.cs class ControlFlowBranchTest (line 20) | [TestClass] method ValidateReflection (line 23) | [TestMethod] method ValidateReflection_Regions (line 45) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/CFG/Roslyn/ControlFlowRegionTest.cs class ControlFlowRegionTest (line 20) | [TestClass] method ValidateReflection (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/CFG/Roslyn/RoslynCfgSerializerTest.cs class RoslynCfgSerializerTest (line 20) | [TestClass] method Serialize_MethodNameUsedInTitle (line 23) | [TestMethod] method Serialize_EmptyMethod (line 44) | [TestMethod] method Serialize_OperationSequence (line 66) | [TestMethod] method Serialize_Switch (line 100) | [TestMethod] method Serialize_If (line 147) | [TestMethod] method Serialize_Foreach_Simple (line 180) | [TestMethod] method Serialize_Foreach_TupleVarDeclaration (line 236) | [TestMethod] method Serialize_For (line 297) | [TestMethod] method Serialize_Using (line 334) | [TestMethod] method Serialize_Lock (line 384) | [TestMethod] method Serialize_Regions (line 436) | [TestMethod] method Serialize_Region_ExceptionType (line 489) | [TestMethod] method Serialize_LocalFunctions (line 526) | [TestMethod] method Serialize_Lambdas (line 584) | [TestMethod] method Serialize_CaptureId (line 627) | [TestMethod] method Serialize_InvalidOperation (line 678) | [TestMethod] method Serialize_TryCatchChain (line 703) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/CFG/Roslyn/RoslynControlFlowGraphTest.cs class RoslynControlFlowGraphTest (line 26) | [TestClass] method IsAvailable_IsTrue (line 29) | [TestMethod] method Create_ReturnsCfg_CS (line 33) | [TestMethod] method Create_ReturnsCfg_TopLevelStatements (line 48) | [TestMethod] method Create_ReturnsCfg_VB (line 61) | [TestMethod] method ValidateReflection (line 74) | [TestMethod] method FlowAnonymousFunctionOperations_FindsAll (line 105) | [TestMethod] method RoslynCfgSupportedVersions (line 128) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/CFG/Roslyn/RoslynLvaSerializerTest.cs class RoslynLvaSerializerTest (line 23) | [TestClass] method Serialize_TryCatchFinally (line 26) | [TestMethod] method Serialize_TryCatchFinallyRethrow (line 100) | [TestMethod] method Serialize_While (line 174) | [TestMethod] method Serialize_Foreach (line 214) | [TestMethod] method Serialize_IfElse (line 283) | [TestMethod] method CreateLva (line 322) | private static RoslynLiveVariableAnalysis CreateLva(string code) FILE: analyzers/tests/SonarAnalyzer.Test/CFG/Sonar/BlockIdProviderTest.cs class BlockIdProviderTest (line 22) | [TestClass] method TestInitialize (line 27) | [TestInitialize] method Get_Returns_Same_Id_For_Same_Block (line 33) | [TestMethod] method Get_Returns_Different_Id_For_Different_Block (line 43) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/CFG/Sonar/SonarCfgSerializerTest.cs class SonarCfgSerializerTest (line 22) | [TestClass] method Serialize_Empty_Method (line 25) | [TestMethod] method Serialize_Branch_Jump (line 46) | [TestMethod] method Serialize_BinaryBranch_Simple (line 89) | [TestMethod] method Serialize_Foreach_Binary_Simple (line 120) | [TestMethod] method Serialize_Foreach_Binary_VarDeclaration (line 152) | [TestMethod] method Serialize_For_Binary_Simple (line 189) | [TestMethod] method Serialize_Jump_Using (line 223) | [TestMethod] method Serialize_Lock_Simple (line 252) | [TestMethod] method Serialize_Lambda (line 281) | [TestMethod] method Serialize_Range (line 308) | [TestMethod] method Serialize_Index (line 332) | [TestMethod] method Serialize_IndexInRange (line 356) | [TestMethod] method Serialize_RangeInIndexer (line 380) | [TestMethod] method CreateMethodCfg (line 405) | private static IControlFlowGraph CreateMethodCfg(string code) FILE: analyzers/tests/SonarAnalyzer.Test/CFG/Sonar/SonarControlFlowGraphTest.cs class SonarControlFlowGraphTest (line 24) | [TestClass] method Cfg_Constructed_for_Body (line 35) | [TestMethod] method Cfg_Constructed_for_ExpressionBody (line 42) | [TestMethod] method Cfg_Constructed_for_Ctor_ComplexArguments (line 59) | [TestMethod] method Cfg_Constructed_for_Ctor_This (line 104) | [TestMethod] method Cfg_Constructed_for_Ctor_Base (line 134) | [TestMethod] method Cfg_ExtremelyNestedExpression_NotSupported_FromExpression (line 166) | [TestMethod] method Cfg_ExtremelyNestedExpression_NotSupported_FromBodyMethod (line 177) | [TestMethod] method Cfg_ExtremelyNestedExpression_NotSupported_FromArrowMethod (line 196) | [TestMethod] method Cfg_ExtremelyNestedExpression_IsSupported_InSimpleLambda (line 212) | [TestMethod] method Cfg_ExtremelyNestedExpression_IsSupported_InParenthesizedLambda (line 228) | [TestMethod] method Cfg_EmptyStatement (line 248) | [TestMethod] method Cfg_VariableDeclaration (line 259) | [TestMethod] method Cfg_If (line 272) | [TestMethod] method Cfg_If_Branch_Or_Condition (line 292) | [TestMethod] method Cfg_If_Branch_And_Condition (line 312) | [TestMethod] method Cfg_If_Branch_And_Condition_Parentheses (line 332) | [TestMethod] method Cfg_If_Else (line 352) | [TestMethod] method Cfg_If_ElseIf (line 370) | [TestMethod] method Cfg_If_ElseIf_Else (line 392) | [TestMethod] method Cfg_NestedIf (line 418) | [TestMethod] method Cfg_If_Coalesce (line 445) | [TestMethod] method Cfg_Conditional_ComplexCondition_Coalesce (line 468) | [TestMethod] method Cfg_If_Patterns_Constant_Complex_Condition (line 501) | [TestMethod] method Cfg_If_Patterns_Single_Var_Complex_Condition (line 530) | [TestMethod] method Cfg_If_Patterns_Not_Null (line 559) | [TestMethod] method Cfg_While (line 588) | [TestMethod] method Cfg_While_ComplexCondition_Or (line 609) | [TestMethod] method Cfg_While_ComplexCondition_And (line 637) | [TestMethod] method Cfg_NestedWhile (line 666) | [TestMethod] method Cfg_DoWhile_ComplexCondition (line 696) | [TestMethod] method Cfg_DoWhile (line 720) | [TestMethod] method Cfg_NestedDoWhile (line 741) | [TestMethod] method Cfg_DoWhile_Continue (line 767) | [TestMethod] method Cfg_Foreach (line 815) | [TestMethod] method Cfg_NestedForeach (line 840) | [TestMethod] method Cfg_Foreach_VarDeclaration (line 876) | [TestMethod] method Cfg_Foreach_AsyncStream (line 907) | [TestMethod] method Cfg_For (line 936) | [TestMethod] method Cfg_For_NoInitializer (line 959) | [TestMethod] method Cfg_For_NoIncrementor (line 969) | [TestMethod] method Cfg_For_Empty (line 979) | [TestMethod] method Cfg_NestedFor (line 989) | [TestMethod] method Cfg_Return (line 1033) | [TestMethod] method Cfg_Throw_Statement_InvalidThrow (line 1043) | [TestMethod] method Cfg_Throw_Statement (line 1053) | [TestMethod] method Cfg_YieldBreak (line 1064) | [TestMethod] method Cfg_Return_Value (line 1074) | [TestMethod] method Cfg_Return_JustBeforeExit (line 1081) | [TestMethod] method Cfg_Throw_Value (line 1104) | [TestMethod] method Cfg_Lock (line 1115) | [TestMethod] method Cfg_NestedLock (line 1133) | [TestMethod] method Cfg_UsingDeclaration (line 1158) | [TestMethod] method Cfg_UsingAssignment (line 1172) | [TestMethod] method Cfg_UsingExpression (line 1186) | [TestMethod] method Cfg_UsingLocalDeclaration (line 1195) | [TestMethod] method Cfg_Fixed (line 1209) | [TestMethod] method Cfg_Checked (line 1222) | [TestMethod] method Cfg_Unsafe (line 1242) | [TestMethod] method Cfg_LogicalAnd (line 1256) | [TestMethod] method Cfg_LogicalOr (line 1279) | [TestMethod] method Cfg_LogicalAnd_Multiple (line 1302) | [TestMethod] method Cfg_LogicalAnd_With_For (line 1323) | [TestMethod] method Cfg_Coalesce (line 1356) | [TestMethod] method Cfg_Coalesce_Self (line 1378) | [TestMethod] method Cfg_Coalesce_Multiple (line 1403) | [TestMethod] method Cfg_Coalesce_MultipleAssignments (line 1433) | [TestMethod] method Cfg_Coalesce_Throw (line 1467) | [TestMethod] method Cfg_Coalesce_ThrowCoalesce (line 1490) | [TestMethod] method Cfg_NullCoalescingAssignment (line 1526) | [TestMethod] method Cfg_NullCoalescingAssignment_Multiple (line 1552) | [TestMethod] method Cfg_NullCoalescingAssignment_Coalesce (line 1588) | [TestMethod] method Cfg_NullCoalescingAssignment_Conditional (line 1619) | [TestMethod] method Cfg_Conditional (line 1658) | [TestMethod] method Cfg_Conditional_ComplexCondition_Or (line 1684) | [TestMethod] method Cfg_Conditional_ComplexCondition_And (line 1714) | [TestMethod] method Cfg_ConditionalMultiple (line 1744) | [TestMethod] method Cfg_Throw_Expression_NullCoalesce (line 1775) | [TestMethod] method Cfg_Throw_Expression_Ternary (line 1783) | [TestMethod] method Cfg_Throw_Expression_MethodArgument (line 1805) | [TestMethod] method Cfg_Range_Expression (line 1827) | [TestMethod] method Cfg_Index_Expression (line 1843) | [TestMethod] method Cfg_ConditionalAccess (line 1863) | [TestMethod] method Cfg_ConditionalAccessNested (line 1887) | [TestMethod] method Cfg_ConditionalAccess_Coalesce (line 1913) | [TestMethod] method Cfg_ConditionalAccess_Conditional (line 1942) | [TestMethod] method Cfg_ConditionalAccess_is (line 1971) | [TestMethod] method Cfg_For_Break (line 2001) | [TestMethod] method Cfg_While_Break (line 2047) | [TestMethod] method Cfg_Foreach_Break (line 2076) | [TestMethod] method Cfg_Do_Break (line 2110) | [TestMethod] method Cfg_Switch_Break (line 2140) | [TestMethod] method Cfg_For_Continue (line 2176) | [TestMethod] method Cfg_While_Continue (line 2222) | [TestMethod] method Cfg_Foreach_Continue (line 2251) | [TestMethod] method Cfg_Foreach_Finally (line 2287) | [TestMethod] method Cfg_Do_Continue (line 2330) | [TestMethod] method Cfg_Try_Finally (line 2364) | [TestMethod] method Cfg_Try_CatchSome (line 2407) | [TestMethod] method Cfg_Try_CatchAll (line 2459) | [TestMethod] method Cfg_Try_CatchSome_Finally (line 2511) | [TestMethod] method Cfg_Try_CatchAll_Finally (line 2572) | [TestMethod] method Cfg_Try_CatchAll_Finally_Conditional_Return (line 2633) | [TestMethod] method Cfg_Try_CatchSome_Finally_Conditional_Return (line 2694) | [TestMethod] method Cfg_Try_CatchSome_Conditional_Return (line 2755) | [TestMethod] method Cfg_Try_CatchAll_Conditional_Return (line 2808) | [TestMethod] method Cfg_TryCatch_Exception_Filter (line 2861) | [TestMethod] method Cfg_TryCatch_ThrowInsideTry (line 2910) | [TestMethod] method Cfg_TryCatch_WithBreak_Inside_DoWhile (line 2960) | [TestMethod] method Cfg_TryCatchFinally_InsideLoop_WithBreakInsideTry_AndContinueInsideCatch (line 3021) | [TestMethod] method Cfg_TryFinally_InsideLoop_WithBreakAndContinueInsideTry (line 3091) | [TestMethod] method Cfg_TryCatch_Inside_DoWhile_WithThrow_InsideCatch (line 3165) | [TestMethod] method Cfg_TryFinally_Inside_DoWhile_WithThrow_InsideCatch (line 3243) | [TestMethod] method Cfg_TryCatchFinally_Return_Nested (line 3301) | [TestMethod] method Cfg_TryCatch_ReturnVariable_InCatch (line 3384) | [TestMethod] method Cfg_TryCatch_NestedReturnVariable_InCatch (line 3429) | [TestMethod] method Cfg_TryCatch_MultipleReturnsInTry (line 3478) | [TestMethod] method Cfg_Switch (line 3533) | [TestMethod] method Cfg_Switch_NoDefault (line 3587) | [TestMethod] method Cfg_Switch_GotoCase (line 3629) | [TestMethod] method Cfg_Switch_Null (line 3679) | [TestMethod] method Cfg_Switch_GotoDefault (line 3715) | [TestMethod] method Cfg_Switch_Patterns_Default (line 3765) | [TestMethod] method Cfg_Switch_Patterns_Two_Case_When (line 3806) | [TestMethod] method Cfg_Switch_One_Simple_Case_And_One_Case_With_When (line 3848) | [TestMethod] method Cfg_Switch_Case_With_When_And_Default (line 3889) | [TestMethod] method Cfg_SwitchExpression_Return (line 3921) | [TestMethod] method Cfg_SwitchExpression_Assignment (line 3966) | [TestMethod] method Cfg_SwitchExpression_InnerSwitch (line 4001) | [TestMethod] method Cfg_SwitchExpression_WhenClause (line 4048) | [TestMethod] method Cfg_VarPattern_InSwitchExpression_IsNotSupported (line 4098) | [TestMethod] method Cfg_VarPattern_InIf_IsNotSupported (line 4106) | [TestMethod] method Cfg_NotPattern_InIf_IsNotSupported (line 4114) | [TestMethod] method Cfg_AndPattern_InIf_IsNotSupported (line 4122) | [TestMethod] method Cfg_OrPattern_InIf_IsNotSupported (line 4130) | [TestMethod] method Cfg_ParenthesizedPattern_InIf_IsNotSupported (line 4138) | [TestMethod] method Cfg_ListPattern_InIf_IsNotSupported (line 4146) | [TestMethod] method Cfg_Switch_Patterns_NoDefault (line 4154) | [TestMethod] method Cfg_Switch_Patterns_GotoDefault (line 4195) | [TestMethod] method Cfg_Switch_Patterns_Null (line 4236) | [TestMethod] method Cfg_Switch_Patterns_Null_Default (line 4268) | [TestMethod] method Cfg_String_And_Throw (line 4308) | [TestMethod] method Cfg_Throws (line 4344) | [TestMethod] method Cfg_Enumerable_Patterns (line 4391) | [TestMethod] method Cfg_Default_Statement_First (line 4434) | [TestMethod] method Cfg_Mixed_Cases_With_The_Same_Action (line 4471) | [TestMethod] method Cfg_Goto_A (line 4526) | [TestMethod] method Cfg_Goto_B (line 4558) | [TestMethod] method Cfg_YieldReturn (line 4594) | [TestMethod] method Cfg_NonBranchingExpressions (line 4611) | [TestMethod] method Cfg_Stackalloc (line 4774) | [TestMethod] method Cfg_Stackalloc_Initializer (line 4782) | [TestMethod] method Cfg_Stackalloc_Implicit (line 4790) | [TestMethod] method Cfg_NonRemovedCalls (line 4798) | [TestMethod] method Cfg_Ref_Arg_Should_Be_Last_Instruction (line 4814) | [TestMethod] method Cfg_Ref_Arg_Should_Be_Last_Instruction_WithMethodCallOnObject (line 4823) | [TestMethod] method Cfg_PropertyPatternClause_Simple (line 4836) | [TestMethod] method Cfg_PropertyPatternClause_MultipleProperties (line 4854) | [TestMethod] method Cfg_PropertyPatternClause_WithSingleVariableDesignation (line 4872) | [TestMethod] method Cfg_PropertyPatternClause_InsideIf (line 4890) | [TestMethod] method Cfg_PropertyPatternClause_InsideIf_WithSingleVariableDesignation (line 4914) | [TestMethod] method Cfg_PropertyPatternClause_InsideSwitch (line 4938) | [TestMethod] method Cfg_PropertyPatternClause_Nested (line 4972) | [TestMethod] method Cfg_New (line 4994) | [TestMethod] method Cfg_New_TargetTyped (line 5003) | [TestMethod] method Cfg_Tuple_Create (line 5014) | [TestMethod] method Cfg_Tuple_ComplexExpression (line 5023) | [TestMethod] method Cfg_Tuple_InDeclaration (line 5039) | [TestMethod] method Cfg_Tuple_AssignmentTarget (line 5048) | [TestMethod] method CompileWithMethodBody (line 5074) | internal static (MethodDeclarationSyntax Method, SemanticModel Model) ... method ExtremelyNestedExpression (line 5080) | internal static string ExtremelyNestedExpression() method FirstConstructorBody (line 5099) | private static SyntaxNode FirstConstructorBody(SyntaxTree tree) => method FirstMethod (line 5102) | private static MethodDeclarationSyntax FirstMethod(SyntaxTree tree) => method VerifyForStatement (line 5109) | private static void VerifyForStatement(IControlFlowGraph cfg) method VerifyInstructions (line 5130) | private static void VerifyInstructions(Block block, int fromIndex, par... method VerifyAllInstructions (line 5139) | private static void VerifyAllInstructions(Block block, params string[]... method VerifyNoInstruction (line 5145) | private static void VerifyNoInstruction(Block block) => method VerifyCfg (line 5148) | private static void VerifyCfg(IControlFlowGraph cfg, int numberOfBlocks) method VerifyMinimalCfg (line 5166) | private static void VerifyMinimalCfg(IControlFlowGraph cfg) method VerifyEmptyCfg (line 5173) | private static void VerifyEmptyCfg(IControlFlowGraph cfg) => method VerifyBasicCfgProperties (line 5176) | private static void VerifyBasicCfgProperties(IControlFlowGraph cfg) method VerifyForStatementNoInitializer (line 5186) | private static void VerifyForStatementNoInitializer(IControlFlowGraph ... method VerifyForStatementNoIncrementor (line 5209) | private static void VerifyForStatementNoIncrementor(IControlFlowGraph ... method VerifyForStatementEmpty (line 5231) | private static void VerifyForStatementEmpty(IControlFlowGraph cfg) method VerifySimpleJumpBlock (line 5251) | private static void VerifySimpleJumpBlock(IControlFlowGraph cfg, Synta... method VerifyJumpWithNoExpression (line 5264) | private static void VerifyJumpWithNoExpression(IControlFlowGraph cfg, ... method VerifyJumpWithExpression (line 5280) | private static void VerifyJumpWithExpression(IControlFlowGraph cfg, Sy... FILE: analyzers/tests/SonarAnalyzer.Test/Common/ConcurrentExecutionTest.cs class ConcurrentExecutionTest (line 22) | [TestClass] method Verify_ConcurrentExecutionIsEnabledByDefault (line 25) | [TestMethod] method Verify_ConcurrentExecutionIsExplicitlyEnabled (line 34) | [TestMethod] method Verify_ConcurrentExecutionIsExplicitlyDisabled (line 48) | [TestMethod] method VerifyNoExceptionThrown (line 61) | private static void VerifyNoExceptionThrown(string path, DiagnosticAna... class ConcurrentExecutionReader (line 71) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 79) | protected override void Initialize(SonarAnalysisContext context) => FILE: analyzers/tests/SonarAnalyzer.Test/Common/MetricsTest.cs class MetricsTest (line 24) | [TestClass] method LinesOfCode (line 27) | [TestMethod] method CommentsWithoutHeaders (line 52) | [TestMethod] method CommentsWithHeaders (line 108) | [TestMethod] method Classes (line 164) | [TestMethod] method Accessors (line 191) | [TestMethod] method Statements (line 237) | [TestMethod] method Functions_CSharp (line 303) | [TestMethod] method Functions_VisualBasic (line 344) | [TestMethod] method Complexity (line 359) | [TestMethod] method CognitiveComplexity (line 519) | [TestMethod] method WrongMetrics_CSharp (line 536) | [TestMethod] method WrongMetrics_VisualBasic (line 543) | [TestMethod] method ExecutableLinesMetricsIsPopulated_CSharp (line 550) | [TestMethod] method ExecutableLinesMetricsIsPopulated_VB (line 555) | [TestMethod] method LinesOfCode (line 567) | private static ISet LinesOfCode(AnalyzerLanguage language, string... method CommentsWithoutHeaders (line 570) | private static FileComments CommentsWithoutHeaders(AnalyzerLanguage la... method CommentsWithHeaders (line 573) | private static FileComments CommentsWithHeaders(AnalyzerLanguage langu... method Classes (line 576) | private static int Classes(AnalyzerLanguage language, string text) => method Statements (line 579) | private static int Statements(AnalyzerLanguage language, string text) => method Functions (line 582) | private static int Functions(AnalyzerLanguage language, string text) => method Complexity (line 585) | private static int Complexity(AnalyzerLanguage language, string text) => method CognitiveComplexity (line 588) | private static int CognitiveComplexity(AnalyzerLanguage language, stri... method ExecutableLines (line 591) | private static ICollection ExecutableLines(AnalyzerLanguage langu... method MetricsFor (line 594) | private static MetricsBase MetricsFor(AnalyzerLanguage language, strin... FILE: analyzers/tests/SonarAnalyzer.Test/Common/ParameterLoaderTest.cs class ParameterLoaderTest (line 25) | [TestClass] method SetParameterValues_WithInvalidSonarLintPath_DoesNotPopulateParameters (line 30) | [TestMethod] method SetParameterValues_WithValidSonarLintPath_PopulatesProperties (line 46) | [TestMethod] method SetParameterValues_SonarLintFileWithIntParameterType_PopulatesProperties (line 62) | [TestMethod] method SetParameterValues_SonarLintFileWithStringParameterType_PopulatesProperty (line 76) | [TestMethod] method SetParameterValues_SonarLintFileWithBooleanParameterType_PopulatesProperty (line 92) | [TestMethod] method SetParameterValues_SonarLintFileWithoutRuleParameters_DoesNotPopulateProperties (line 108) | [TestMethod] method SetParameterValues_CalledTwiceAfterChangeInConfigFile_UpdatesProperties (line 122) | [TestMethod] method SetParameterValues_WithMalformedXml_DoesNotPopulateProperties (line 162) | [TestMethod] method SetParameterValues_SonarLintFileWithStringInsteadOfIntParameterType_PopulatesProperty (line 179) | [TestMethod] method SetParameterValues_SonarLintFileWithStringInsteadOfBooleanParameterType_PopulatesProperty (line 195) | [TestMethod] method CreateCompilationWithOption (line 211) | private static SonarCompilationReportingContext CreateCompilationWithO... method GenerateSonarLintXmlWithParametrizedRule (line 221) | private string GenerateSonarLintXmlWithParametrizedRule(string ruleId,... FILE: analyzers/tests/SonarAnalyzer.Test/Common/RuleCatalogTest.cs class RuleCatalogTest (line 24) | [TestClass] method RuleCatalog_HasAllFieldsSet_CS (line 27) | [TestMethod] method RuleCatalog_HasAllFieldsSet_VB (line 31) | [TestMethod] method Type_IsGenerated (line 35) | [TestMethod] method SourceScope_IsGenerated (line 45) | [TestMethod] method Description_TakesFirstParagraph (line 55) | [TestMethod] method Description_TagsAreRemoved (line 63) | [TestMethod] method Description_HtmlIsDecoded (line 67) | [TestMethod] method Description_NewLinesAreSpaces (line 71) | [TestMethod] method AssertRuleS103 (line 78) | private static void AssertRuleS103(RuleDescriptor rule) method ValidateDescription (line 90) | private static void ValidateDescription(string id, string assertedSour... FILE: analyzers/tests/SonarAnalyzer.Test/Common/SecurityHotspotTest.cs class SecurityHotspotTest (line 25) | [TestClass] method SecurityHotspotRules_DoNotRaiseIssues_CS (line 28) | [TestMethod] method SecurityHotspotRules_DoNotRaiseIssues_VB (line 32) | [TestMethod] method VerifyNoIssues (line 36) | private static void VerifyNoIssues(AnalyzerLanguage language, Immutabl... method CreateHotspotAnalyzers (line 60) | private static IEnumerable CreateHotspotAnaly... method IsSecurityHotspot (line 70) | private static bool IsSecurityHotspot(DiagnosticAnalyzer analyzer) => method TestCaseFileName (line 73) | private static string TestCaseFileName(string analyzerName) => method AdditionalReferences (line 93) | private static IEnumerable AdditionalReferences(str... FILE: analyzers/tests/SonarAnalyzer.Test/Common/UnchangedFilesTest.cs class UnchangedFilesTest (line 22) | [TestClass] method UnchangedFiles_SymbolBasedRule (line 27) | [TestMethod] method UnchangedFiles_SyntaxNodesBasedRule (line 36) | [TestMethod] method UnchangedFiles_SyntaxTreeBasedRule (line 45) | [TestMethod] method UnchangedFiles_CompilationStartBasedRule (line 54) | [TestMethod] method UnchangedFiles_ReportDiagnosticIfNonGeneratedBasedRule (line 63) | [TestMethod] method UnchangedFiles_Verify (line 72) | private void UnchangedFiles_Verify(VerifierBuilder builder, string unc... FILE: analyzers/tests/SonarAnalyzer.Test/Common/UniqueQueueTest.cs class UniqueQueueTest (line 23) | [TestClass] method Enqueue_UniqueItems (line 26) | [TestMethod] method Dequeue_UniqueItems (line 36) | [TestMethod] method GetEnumerator (line 52) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Common/XUnitVersions.cs class XUnitVersions (line 20) | public static class XUnitVersions FILE: analyzers/tests/SonarAnalyzer.Test/Extensions/ICompilationReportExtensionsTests.cs class ICompilationReportExtensionsTests (line 24) | [TestClass] method ReportIssue_SonarSymbolAnalysisContext_CS (line 29) | [TestMethod] method ReportIssue_SonarSymbolAnalysisContext_VB (line 46) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Extensions/StringExtensionsTest.cs class StringExtensionsTest (line 22) | [TestClass] method TestSplitCamelCaseToWords (line 25) | [TestMethod] method AssertSplitEquivalent (line 47) | private static void AssertSplitEquivalent(string name, params string[]... FILE: analyzers/tests/SonarAnalyzer.Test/Extensions/SyntaxNodeExtensionsTest.cs class SyntaxNodeExtensionsTest (line 36) | [TestClass] method GetPreviousStatementsCurrentBlockOfNotAStatement (line 43) | [TestMethod] method GetPreviousStatementsCurrentBlockOfFirstStatement (line 54) | [TestMethod] method GetPreviousStatementsCurrentBlockOfSecondStatement (line 65) | [TestMethod] method GetPreviousStatementsCurrentBlockRetrievesOnlyForCurrentBlock (line 76) | [TestMethod] method ContainsGetOrSetOnDependencyProperty_SymbolIsNull_ReturnsFalse (line 87) | [TestMethod] method ContainsGetOrSetOnDependencyProperty_NotOnDependencyObject_ReturnsFalse (line 105) | [TestMethod] method ArrowExpressionBody_WithNotExpectedNode_ReturnsNull (line 129) | [TestMethod] method GetDeclarationTypeName_UnknownType (line 137) | [TestMethod] method GetDeclarationTypeName_Class (line 146) | public void GetDeclarationTypeName_Class() => method GetDeclarationTypeName_Constructor (line 149) | [TestMethod] method GetDeclarationTypeName_Delegate (line 153) | [TestMethod] method GetDeclarationTypeName_Destructor (line 157) | [TestMethod] method GetDeclarationTypeName_Enum (line 161) | [TestMethod] method GetDeclarationTypeName_EnumMember (line 165) | [TestMethod] method GetDeclarationTypeName_Event (line 169) | [TestMethod] method GetDeclarationTypeName_EventField (line 173) | [TestMethod] method GetDeclarationTypeName_Field (line 177) | [TestMethod] method GetDeclarationTypeName_Indexer (line 181) | [TestMethod] method GetDeclarationTypeName_Interface (line 185) | [TestMethod] method GetDeclarationTypeName_LocalFunction (line 189) | [TestMethod] method GetDeclarationTypeName_Method (line 193) | [TestMethod] method GetDeclarationTypeName_Property (line 197) | [TestMethod] method GetDeclarationTypeName_Record (line 201) | [TestMethod] method GetDeclarationTypeName_RecordStruct (line 205) | [TestMethod] method GetDeclarationTypeName_Struct (line 210) | [TestMethod] method CreateCfg_MethodDeclaration_ReturnsCfg_CS (line 214) | [TestMethod] method CreateCfg_PropertyDeclaration_ReturnsCfg_CS (line 229) | [TestMethod] method CreateCfg_PropertyDeclarationWithoutExpressionBody_ReturnsNull_CS (line 241) | [TestMethod] method CreateCfg_IndexerDeclaration_ReturnsCfg_CS (line 253) | [TestMethod] method CreateCfg_FieldInitializerWithoutOperation_ReturnsCfg_CS (line 266) | [TestMethod] method CreateCfg_MethodBlock_ReturnsCfg_VB (line 278) | [TestMethod] method CreateCfg_AnyNode_ReturnsCfg_CS (line 291) | [TestMethod] method CreateCfg_AnyNode_ReturnsCfg_VB (line 306) | [TestMethod] method CreateCfg_LambdaInsideQuery_CS (line 319) | [TestMethod] method CreateCfg_LambdaInsideQuery_VB (line 336) | [TestMethod] method CreateCfg_NestingChain_CS (line 349) | [TestMethod] method CreateCfg_NestingChain_VB (line 403) | [TestMethod] method CreateCfg_UndefinedSymbol_ReturnsCfg_CS (line 439) | [TestMethod] method CreateCfg_UndefinedSymbol_ReturnsNull_VB (line 456) | [TestMethod] method CreateCfg_InvalidSyntax_ReturnsCfg_CS (line 471) | [TestMethod] method CreateCfg_Performance_UsesCache_CS (line 483) | [TestMethod] method CreateCfg_Performance_UsesCache_VB (line 517) | [TestMethod] method CreateCfg_SameNode_DifferentCompilation_DoesNotCache (line 547) | [TestMethod] method FindAssignmentComplement_Tests (line 568) | [TestMethod] method IsInExpressionTree_CS (line 667) | [TestMethod] method IsInExpressionTree_VB (line 689) | [TestMethod] method GetParentConditionalAccessExpression_CS (line 708) | [TestMethod] method GetParentConditionalAccessExpression_VB (line 740) | [TestMethod] method GetRootConditionalAccessExpression_CS (line 776) | [TestMethod] method Kind_Null_ReturnsNone (line 807) | [TestMethod] method GetMappedFilePath (line 811) | [TestMethod] method ArgumentList_CS_InvocationObjectCreation (line 820) | [TestMethod] method ArgumentList_CS_ConstructorInitializer (line 839) | [TestMethod] method ArgumentList_CS_PrimaryConstructorBaseType (line 860) | [TestMethod] method ArgumentList_CS_NoList (line 873) | [TestMethod] method ArgumentList_CS_Null (line 888) | [TestMethod] method ArgumentList_CS_UnsupportedNodeKinds (line 892) | [TestMethod] method ArgumentList_VB_Invocations (line 909) | [TestMethod] method ArgumentList_VB_Mid (line 937) | [TestMethod] method ArgumentList_VB_Attribute (line 955) | [TestMethod] method ArgumentList_VB_ArrayBounds (line 969) | [TestMethod] method ArgumentList_VB_Call (line 989) | [TestMethod] method ArgumentList_VB_Null (line 1003) | [TestMethod] method ArgumentList_VB_UnsupportedNodeKinds (line 1007) | [TestMethod] method ParameterList_Methods (line 1023) | [TestMethod] method ParameterList_NestedMethods (line 1043) | [TestMethod] method ParameterList_Destructor (line 1067) | [TestMethod] method ParameterList_PrimaryConstructors (line 1081) | [TestMethod] method ParameterList_ReturnsNull (line 1105) | [TestMethod] method GetIdentifier_Members (line 1121) | [TestMethod] method TypeSyntax_Members (line 1220) | [TestMethod] method TypeSyntax_UsingDirective (line 1295) | [TestMethod] method GetIdentifier_CompilationUnit (line 1307) | [TestMethod] method GetIdentifier_PrimaryConstructor (line 1329) | [TestMethod] method EnclosingScope_Members (line 1353) | [TestMethod] method EnclosingScope_TopLevelStatements (line 1400) | [TestMethod] method EnclosingScope_QueryExpressionSyntax (line 1412) | [TestMethod] method Symbol_IsKnownType (line 1445) | [TestMethod] method ToSecondaryLocation_NullMessage (line 1462) | [TestMethod] method ToSecondaryLocation_MessageArgs (line 1473) | [TestMethod] method ToSecondaryLocation_MessageFormat (line 1486) | [TestMethod] method PerformanceSensitiveAttribute (line 1499) | [TestMethod] method PerformanceSensitiveAttribute_NullNode (line 1524) | [TestMethod] method PerformanceSensitiveAttribute_AnonymousAndLocalMethods (line 1528) | [TestMethod] method PerformanceSensitiveAttribute_InvalidAttributeTarget (line 1552) | [TestMethod] method PerformanceSensitiveAttribute_DoNotCompile (line 1575) | [TestMethod] method PerformanceSensitiveAttribute_NoPerformanceSensitiveAttribute (line 1598) | [TestMethod] method GetFirstTokenOfKind (line 1623) | private static SyntaxToken GetFirstTokenOfKind(SyntaxTree tree, Syntax... method GetSyntaxTree (line 1626) | private static SyntaxTree GetSyntaxTree(string content, string fileNam... method CreateCfgCS (line 1635) | private static ControlFlowGraph CreateCfgCS(string code) where T : ... method CreateCfgVB (line 1641) | private static ControlFlowGraph CreateCfgVB(string code) where T : ... FILE: analyzers/tests/SonarAnalyzer.Test/Extensions/SyntaxTokenExtensionsSharedTest.cs class SyntaxTokenExtensionsSharedTest (line 23) | [TestClass] method GetBindableParent_ForEmptyToken_ReturnsNull (line 26) | [TestMethod] method GetBindableParent_ForInterpolatedStringTextTokenInInterpolatedStringTextToken_ReturnsInterpolatedStringExpression (line 34) | [TestMethod] method GetBindableParent_ForOpenBraceInsideInterpolatedStringTextToken_ReturnsInterpolation (line 46) | [TestMethod] method GetBindableParent_ForMemberAccessExpressionSyntax_ReturnsTheExpression (line 58) | [TestMethod] method GetBindableParent_ForObjectCreationExpressionSyntax_ReturnsArgumentList (line 70) | [TestMethod] method GetFirstTokenOfKind (line 82) | private static SyntaxToken GetFirstTokenOfKind(SyntaxTree syntaxTree, ... FILE: analyzers/tests/SonarAnalyzer.Test/LiveVariableAnalysis/RoslynLiveVariableAnalysisTest.FlowCaptureOperation.cs class RoslynLiveVariableAnalysisTest (line 20) | public partial class RoslynLiveVariableAnalysisTest method FlowCaptrure_NullCoalescingAssignment (line 22) | [TestMethod] method FlowCaptrure_NullCoalescingOperator (line 46) | [TestMethod] method FlowCaptrure_ConditionalAccess (line 73) | [TestMethod] method FlowCaptrure_Ternary (line 100) | [TestMethod] method FlowCaptrure_ReuseCaptures (line 127) | [TestMethod] method FlowCaptrure_NullCoalescingOperator_ConsequentCalls (line 171) | [TestMethod] method FlowCaptrure_NullCoalescingOperator_ConsequentCalls_Assignment (line 209) | [TestMethod] method FlowCaptrure_NullCoalescingOperator_Nested (line 231) | [TestMethod] method FlowCaptrure_NullCoalescingOperator_Overwrite (line 280) | [TestMethod] method FlowCaptrure_SwitchStatement (line 311) | [TestMethod] method FlowCaptrure_ForEachCompundAssignment (line 335) | [TestMethod] method FlowCaptrure_ImplicDictionaryCreation (line 357) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/LiveVariableAnalysis/RoslynLiveVariableAnalysisTest.LocalFunction.cs class RoslynLiveVariableAnalysisTest (line 20) | public partial class RoslynLiveVariableAnalysisTest method StaticLocalFunction_Expression_LiveIn (line 22) | [TestMethod] method StaticLocalFunction_Expression_NotLiveIn_NotLiveOut (line 35) | [TestMethod] method StaticLocalFunction_LiveIn (line 48) | [TestMethod] method StaticLocalFunction_NotLiveIn_NotLivOut (line 64) | [TestMethod] method StaticLocalFunction_Recursive (line 80) | [TestMethod] method LocalFunctionInvocation_LiveIn (line 100) | [TestMethod] method LocalFunctionInvocation_FunctionDeclaredBeforeCode_LiveIn (line 117) | [TestMethod] method LocalFunctionInvocation_Generic_LiveIn (line 134) | [TestMethod] method LocalFunctionInvocation_NestedGeneric_LiveIn (line 151) | [TestMethod] method LocalFunctionInvocation_NotLiveIn (line 173) | [TestMethod] method LocalFunctionInvocation_NestedArgument_NotLiveIn (line 194) | [TestMethod] method LocalFunctionInvocation_NestedVariable_NotLiveIn_NotCaptured (line 207) | [TestMethod] method LocalFunctionInvocation_Recursive_LiveIn_WithoutFlowCapture (line 224) | [TestMethod] method LocalFunctionInvocation_Recursive_LiveIn_FlowCapture (line 246) | [TestMethod] method LocalFunctionInvocation_Recursive_WhenAnalyzingLocalFunctionItself_LiveIn (line 263) | [TestMethod] method LocalFunctionInvocation_CrossReference_LiveIn (line 282) | [TestMethod] method LocalFunctionInvocation_CrossReference_WhenAnalyzingLocalFunctionItself_LiveIn (line 303) | [TestMethod] method LocalFunctionInvocation_Nested_LiveIn (line 323) | [TestMethod] method LocalFunctionInvocation_TryCatchFinally_LiveIn (line 345) | [TestMethod] method LocalFunctionReference_LiveIn (line 383) | [TestMethod] method LocalFunctionReference_Recursive_LiveIn (line 401) | [TestMethod] method LocalFunctionReference_Recursive_WhenAnalyzingLocalFunctionItself_LiveIn (line 427) | [TestMethod] method LocalFunctionCapture_CapturedLocalFunction_Captured (line 445) | [TestMethod] method LocalFunctionCapture_AnonymousFunction_FlowCapture_Captured (line 464) | [TestMethod] method LocalFunctionReference_FlowCapture_LiveIn (line 481) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/LiveVariableAnalysis/RoslynLiveVariableAnalysisTest.TryCatchFinally.cs class RoslynLiveVariableAnalysisTest (line 23) | public partial class RoslynLiveVariableAnalysisTest method Using_LiveInUntilTheEnd (line 25) | [TestMethod] method Using_Nested_Block_LiveInUntilTheEnd (line 62) | [TestMethod] method Using_Nested_Declaration_LiveInUntilTheEnd (line 92) | [TestMethod] method Catch_LiveIn (line 121) | [TestMethod] method VariableBeforeTry_LiveOut (line 143) | [TestMethod] method NestedCatch_LiveOutOuterCatch (line 166) | [TestMethod] method NestedCatch_LiveOutOuterCatch_NestedTwice (line 201) | [TestMethod] method NestedCatch_LiveOutOuterCatch_ForEach (line 247) | [TestMethod] method NestedCatch_LiveOutOuterFilterHandler_FromInnerCatch (line 288) | [TestMethod] method NestedCatch_LiveOutOuterCatch_FromInnerFilterHandler (line 321) | [TestMethod] method NestedCatch_LiveOutOuterCatch_FromFilterHandler (line 354) | [TestMethod] method NestedCatch_LiveOutOuterCatch_CanThrowFromFilterHandler (line 387) | [TestMethod] method NestedCatch_LiveOut_ConsecutiveOuterCatch (line 420) | [TestMethod] method Catch_TryHasLocalLifetimeRegion_LiveIn (line 464) | [TestMethod] method Catch_VariableUsedAfter_LiveIn_LiveOut (line 487) | [TestMethod] method Catch_WithThrowStatement_LiveIn (line 509) | [TestMethod] method Catch_WithThrowStatement_Conditional_LiveIn (line 542) | [TestMethod] method Catch_Rethrow_LiveIn (line 571) | [TestMethod] method Catch_NotLiveIn_NotLiveOut (line 594) | [TestMethod] method Catch_Nested_LiveIn (line 617) | [TestMethod] method Catch_InvalidSyntax_LiveIn (line 651) | [TestMethod] method Catch_Loop_Propagates_LiveIn_LiveOut (line 679) | [TestMethod] method Catch_ExVariable_LiveIn (line 708) | [TestMethod] method Catch_SingleType_LiveIn (line 734) | [TestMethod] method Catch_SingleTypeWhenCondition_LiveIn (line 759) | [TestMethod] method Catch_SingleTypeWhenConditionReferencingArgument_LiveIn (line 784) | [TestMethod] method Catch_MultipleTypes_LiveIn (line 806) | [TestMethod] method Catch_AssignedInTry_LiveOut (line 840) | [TestMethod] method Catch_When_AssignedInTry_LiveOut (line 865) | [TestMethod] method Catch_Loop_Propagates_LiveIn (line 891) | [TestMethod] method Throw_NestedCatch_LiveOut (line 924) | [TestMethod] method Throw_NestedCatch_LiveInInConsecutiveOuterCatch (line 956) | [TestMethod] method Throw_NestedCatch_LiveInInConsecutiveOuterCatchNewThrow (line 1000) | [TestMethod] method Throw_NestedCatch_OuterCatchRethrows_LiveOutOuterCatch (line 1039) | [TestMethod] method Finally_LiveIn (line 1081) | [TestMethod] method Finally_VariableUsedAfter_LiveIn_LiveOut (line 1103) | [TestMethod] method Finally_VariableUsedAfter_FinallyHasLocalLifetimeRegion_LiveIn_LiveOut (line 1125) | [TestMethod] method Finally_WithThrowStatement_LiveIn (line 1148) | [TestMethod] method Finally_WithThrowStatementAsSingleExit_LiveIn (line 1174) | [TestMethod] method Finally_WithThrowStatement_Conditional_LiveIn (line 1198) | [TestMethod] method Finally_WithThrowStatementInTry_LiveOut (line 1227) | [TestMethod] method Finally_WithThrowStatementInTry_LiveOut_FilteredCatch (line 1252) | [TestMethod] method Finally_WithThrowStatementInTry_LiveOut_CatchAll (line 1280) | [TestMethod] method Finally_NotLiveIn_NotLiveOut (line 1314) | [TestMethod] method Finally_Nested_LiveIn (line 1337) | [TestMethod] method Finally_Nested_NoInstructionBetweenFinally_LiveIn (line 1371) | [TestMethod] method NestedFinally_LiveOut_OuterCatch (line 1404) | [TestMethod] method NestedFinally_LiveOut_NestedTryInOuterCatch (line 1439) | [TestMethod] method NestedFinally_LiveOut_NestedFinallyInOuterCatch (line 1482) | [TestMethod] method NestedFinally_LiveOut_NestedFinallyInOuter_ConsecutiveCatch (line 1526) | [TestMethod] method NestedFinally_LiveOutNestedFinallyInOuter_FinallyHasLocalLifetime (line 1575) | [TestMethod] method Finally_ForEach_LiveIn (line 1618) | [TestMethod] method Finally_InvalidSyntax_LiveIn (line 1645) | [TestMethod] method Finally_Loop_Propagates_LiveIn_LiveOut (line 1673) | [TestMethod] method Finally_Loop_Propagates_FinallyHasLocalLifetimeRegion_LiveIn_LiveOut (line 1701) | [TestMethod] method Finally_AssignedInTry_LiveOut (line 1730) | [TestMethod] method TryCatchFinally_LiveIn (line 1755) | [TestMethod] method TryCatchFinally_Rethrow_ValueLivesOut (line 1786) | [TestMethod] method TryCatchFinally_Rethrow_ValueLivesOut_FinallyHasLocalLifetimeRegion (line 1814) | [TestMethod] method TryCatchFinally_RethrowOuterFinally (line 1840) | [TestMethod] method TryCatchFinally_RethrowOuterCatchFinally (line 1872) | [TestMethod] method TryCatchFinally_RethrowOuterCatchRethrowFinally (line 1908) | [TestMethod] method TryCatchFinally_RethrowCatchRethrowOuterFinally (line 1945) | [TestMethod] method TryCatchFinally_ConsecutiveCatchAllThrowRethrowFinally (line 1981) | [TestMethod] method TryCatchFinally_ConsecutiveCatchRethrow (line 2016) | [TestMethod] method TryCatchFinally_FilteredCatchRethrowFinally (line 2044) | [TestMethod] method TryCatchFinally_MultipleFilteredCatchRethrowFinally (line 2072) | [TestMethod] method TryCatchFinally_MultipleFilteredCatchNewThrowFinally (line 2107) | [TestMethod] method Throw_NestedCatch_LiveInInConsecutiveOuterCatchFinally (line 2142) | [TestMethod] method Throw_NestedCatch_OuterCatchRethrows_LiveOutOuterCatchFinally (line 2191) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/LiveVariableAnalysis/RoslynLiveVariableAnalysisTest.cs class RoslynLiveVariableAnalysisTest (line 29) | [TestClass] type ExpectedKind (line 32) | private enum ExpectedKind method WriteOnly (line 40) | [TestMethod] method ProcessParameterReference_LiveIn (line 51) | [TestMethod] method ProcessParameterReference_UsedAsOutArgument_NotLiveIn_NotLiveOut (line 63) | [TestMethod] method ProcessParameterReference_InNameOf_NotLiveIn_NotLiveOut (line 72) | [TestMethod] method ProcessParameterReference_Assigned_NotLiveIn_LiveOut (line 79) | [TestMethod] method ProcessParameterReference_MemberBinding_LiveIn (line 93) | [TestMethod] method ProcessParameterReference_MemberBindingByReference_LiveIn (line 102) | [TestMethod] method ProcessParameterReference_MemberBindingByReference_DifferentCfgOnNetFx_LiveIn (line 111) | [TestMethod] method ProcessParameterReference_Reassigned_LiveIn (line 128) | [TestMethod] method ProcessParameterReference_SelfAssigned_LiveIn (line 143) | [TestMethod] method UsedAfterBranch_LiveOut (line 156) | [TestMethod] method Captured_NotLiveIn_NotLiveOut (line 178) | [TestMethod] method Captured_StaticLambda_NotLiveIn_NotLiveOut (line 211) | [TestMethod] method Assigned_NotLiveIn_NotLiveOut (line 226) | [TestMethod] method LongPropagationChain_LiveIn_LiveOut (line 251) | [TestMethod] method BranchedPropagationChain_LiveIn_LiveOut_CS (line 290) | [TestMethod] method BranchedPropagationChain_LiveIn_LiveOut_VB (line 395) | [TestMethod] method ProcessBlockInternal_EvaluationOrder_UsedBeforeAssigned_LiveIn (line 491) | [TestMethod] method ProcessBlockInternal_EvaluationOrder_UsedBeforeAssignedInSubexpression_LiveIn (line 505) | [TestMethod] method ProcessBlockInternal_EvaluationOrder_AssignedBeforeUsed_NotLiveIn (line 519) | [TestMethod] method ProcessBlockInternal_EvaluationOrder_AssignedBeforeUsedInSubexpression_NotLiveIn (line 533) | [TestMethod] method ProcessLocalReference_InNameOf_NotLiveIn_NotLiveOut (line 547) | [TestMethod] method ProcessLocalReference_LocalScopeSymbol_LiveIn (line 561) | [TestMethod] method ProcessLocalReference_ReassignedBeforeLastBlock_LiveIn (line 575) | [TestMethod] method ProcessLocalReference_ReassignedInLastBlock_NotLiveIn (line 590) | [TestMethod] method ProcessLocalReference_GlobalScopeSymbol_NotLiveIn_NotLiveOut (line 605) | [TestMethod] method ProcessLocalReference_UndefinedSymbol_NotLiveIn_NotLiveOut (line 615) | [TestMethod] method ProcessLocalReference_UsedAsOutArgument_NotLiveIn (line 622) | [TestMethod] method ProcessLocalReference_NotAssigned_LiveIn_LiveOut (line 638) | [TestMethod] method ProcessLocalReference_VariableDeclarator_NotLiveIn_LiveOut (line 653) | [TestMethod] method ProcessLocalReference_MemberBinding_LiveIn (line 668) | [TestMethod] method ProcessLocalReference_MemberBindingByReference_LiveIn (line 681) | [TestMethod] method ProcessLocalReference_Reassigned_LiveIn (line 694) | [TestMethod] method ProcessLocalReference_SelfAssigned_LiveIn (line 713) | [TestMethod] method ProcessSimpleAssignment_Discard_NotLiveIn_NotLiveOut (line 729) | [TestMethod] method ProcessSimpleAssignment_UndefinedSymbol_NotLiveIn_NotLiveOut (line 738) | [TestMethod] method ProcessSimpleAssignment_GlobalScoped_NotLiveIn_NotLiveOut (line 751) | [TestMethod] method ProcessSimpleAssignment_LocalScoped_NotLiveIn_LiveOut (line 764) | [TestMethod] method ProcessVariableInForeach_Declared_LiveIn_LiveOut (line 779) | [TestMethod] method NestedImplicitFinally_Lock_ForEach_LiveIn (line 815) | [TestMethod] method NestedImplicitFinally_ForEach_ForEach_LiveIn (line 841) | [TestMethod] method Loop_Propagates_LiveIn_LiveOut (line 867) | [TestMethod] method InvokedDelegate_LiveIn (line 887) | [TestMethod] method ReturningDelegate_LiveIn (line 896) | [TestMethod] method ReturningDelegate_NestedByReference_LiveIn (line 911) | [TestMethod] method ReturningDelegate_Nested_LiveIn (line 935) | [TestMethod] method PropertyWithWriteOnly (line 954) | [TestMethod] method AnonyomousFunctionWriteOnly (line 966) | [TestMethod] method ConstructorWriteOnly (line 983) | [TestMethod] method CreateContextCS (line 999) | private static Context CreateContextCS(string methodBody, string local... method CreateContextVB (line 1029) | private static Context CreateContextVB(string methodBody) method LiveIn (line 1060) | private static Expected LiveIn(params string[] names) => method LiveOut (line 1063) | private static Expected LiveOut(params string[] names) => method Captured (line 1066) | private static Expected Captured(params string[] names) => type Expected (line 1069) | private record Expected(string[] Names, ExpectedKind Kind); class Context (line 1071) | private class Context method Context (line 1076) | public Context(string code, AnalyzerLanguage language, string localF... method Context (line 1092) | public Context(string code, SyntaxKind syntaxKind) method ValidateAllEmpty (line 1100) | public void ValidateAllEmpty() method ValidateEntry (line 1108) | public void ValidateEntry(params Expected[] expected) => method ValidateExit (line 1111) | public void ValidateExit(params Expected[] expected) method Validate (line 1117) | public void Validate(string withSyntax, params Expected[] expected) method Validate (line 1123) | public void Validate(string withSyntax, params Expected[... method Validate (line 1129) | public void Validate(BasicBlock block, params Expected[] expected) => method Validate (line 1132) | public void Validate(BasicBlock block, string blockSuffix, params Ex... FILE: analyzers/tests/SonarAnalyzer.Test/LiveVariableAnalysis/SonarLiveVariableAnalysisTest.cs class SonarLiveVariableAnalysisTest (line 27) | [TestClass] method WriteOnly (line 30) | [TestMethod] method UsedBeforeAssigned_LiveIn (line 42) | [TestMethod] method UsedAfterBranch_LiveOut (line 53) | [TestMethod] method Captured_NotLiveIn_NotLiveOut (line 79) | [TestMethod] method Assigned_NotLiveIn_NotLiveOut (line 106) | [TestMethod] method LongPropagationChain_LiveIn_LiveOut (line 132) | [TestMethod] method BranchedPropagationChain_LiveIn_LiveOut (line 170) | [TestMethod] method ProcessIdentifier_InNameOf_NotLiveIn_NotLiveOut (line 275) | [TestMethod] method ProcessIdentifier_LocalScopeSymbol_LiveIn (line 283) | [TestMethod] method ProcessIdentifier_GlobalScopeSymbol_NotLiveIn_NotLiveOut (line 296) | [TestMethod] method ProcessIdentifier_UndefinedSymbol_NotLiveIn_NotLiveOut (line 307) | [TestMethod] method ProcessIdentifier_RefOutArgument_NotLiveIn_LiveOut (line 315) | [TestMethod] method ProcessIdentifier_Assigned_NotLiveIn_LiveOut (line 326) | [TestMethod] method ProcessIdentifier_NotAssigned_LiveIn_LiveOut (line 341) | [TestMethod] method ProcessSimpleAssignment_Discard_NotLiveIn_NotLiveOut (line 356) | [TestMethod] method ProcessSimpleAssignment_UndefinedSymbol_NotLiveIn_NotLiveOut (line 364) | [TestMethod] method ProcessSimpleAssignment_GlobalScoped_NotLiveIn_NotLiveOut (line 376) | [TestMethod] method ProcessSimpleAssignment_LocalScoped_NotLiveIn_LiveOut (line 388) | [TestMethod] method ProcessVariableDeclarator_NotLiveIn_LiveOut (line 401) | [TestMethod] method ProcessVariableInForeach_Declared_LiveIn_LiveOut (line 414) | [TestMethod] method ProcessVariableInForeach_Reused_LiveIn_LiveOut (line 438) | [TestMethod] method StaticLocalFunction_ExpressionLiveIn (line 454) | [TestMethod] method StaticLocalFunction_ExpressionNotLiveIn (line 465) | [TestMethod] method StaticLocalFunction_LiveIn (line 476) | [TestMethod] method StaticLocalFunction_NotLiveIn (line 490) | [TestMethod] method StaticLocalFunction_Recursive (line 504) | [TestMethod] method UsingBlock_LiveInUntilTheEnd (line 521) | [TestMethod] method UsingVar_NotSupported (line 553) | [TestMethod] method LocalFunctionInvocation_LiveIn (line 579) | [TestMethod] method LocalFunctionInvocation_Generic_LiveIn (line 596) | [TestMethod] method LocalFunctionInvocation_NotLiveIn (line 613) | [TestMethod] class Context (line 634) | private class Context method Context (line 639) | public Context(string methodBody, string localFunctionName = null) method Block (line 679) | public Block Block(string withInstruction = null) where TBlo... method Validate (line 683) | public void Validate(Block block, params Expected[] expected) class Expected (line 695) | private abstract class Expected method Expected (line 699) | protected Expected(string[] names) => class LiveIn (line 703) | private class LiveIn : Expected method LiveIn (line 705) | public LiveIn(params string[] names) : base(names) { } class LiveOut (line 708) | private class LiveOut : Expected method LiveOut (line 710) | public LiveOut(params string[] names) : base(names) { } class Captured (line 713) | private class Captured : Expected method Captured (line 715) | public Captured(params string[] names) : base(names) { } FILE: analyzers/tests/SonarAnalyzer.Test/Metrics/CSharpExecutableLinesMetricTest.cs class CSharpExecutableLinesMetricTest (line 23) | [TestClass] method GetLineNumbers_NoExecutableLines (line 28) | [TestMethod] method GetLineNumbers_Class (line 44) | [TestMethod] method GetLineNumbers_CheckedUnchecked (line 51) | [TestMethod] method GetLineNumbers_Blocks (line 67) | [TestMethod] method GetLineNumbers_Statements (line 81) | [TestMethod] method GetLineNumbers_Loops (line 93) | [TestMethod] method GetLineNumbers_Conditionals (line 109) | [TestMethod] method GetLineNumbers_Conditionals2 (line 130) | [TestMethod] method GetLineNumbers_Yields (line 150) | [TestMethod] method GetLineNumbers_AccessAndInvocation (line 167) | [TestMethod] method GetLineNumbers_Initialization (line 179) | [TestMethod] method GetLineNumbers_PropertySet (line 199) | [TestMethod] method GetLineNumbers_PropertyGet (line 212) | [TestMethod] method GetLineNumbers_Lambdas (line 225) | [TestMethod] method GetLineNumbers_TryCatch (line 242) | [TestMethod] method GetLineNumbers_MultipleStatementsSameLine (line 266) | [TestMethod] method GetLineNumbers_DoWhile (line 278) | [TestMethod] method GetLineNumbers_ClassExcluded (line 298) | [TestMethod] method GetLineNumbers_AttributeOnLocalFunctionExcluded (line 329) | [TestMethod] method GetLineNumbers_ExcludeFromCodeCoverage_AttributeVariants (line 352) | [TestMethod] method GetLineNumbers_RecordExcluded (line 371) | [TestMethod] method GetLineNumbers_RecordStructExcluded (line 384) | [TestMethod] method GetLineNumbers_StructExcluded (line 397) | [TestMethod] method GetLineNumbers_ConstructorExcluded (line 413) | [TestMethod] method GetLineNumbers_PropertyExcluded (line 435) | [TestMethod] method GetLineNumbers_EventExcluded (line 479) | [TestMethod] method GetLineNumbers_PartialClassesExcluded (line 508) | [TestMethod] method GetLineNumbers_PartialMethodsExcluded (line 534) | [TestMethod] method GetLineNumbers_AttributeAreIgnored (line 566) | [TestMethod] method GetLineNumbers_OnlyAttributeAreIgnored (line 573) | [TestMethod] method GetLineNumbers_AttributeOnLambdaIsIgnored (line 588) | [TestMethod] method GetLineNumbers_ExpressionsAreCounted (line 606) | [TestMethod] method GetLineNumbers_MultiLineLoop (line 620) | [TestMethod] method GetLineNumbers_SwitchStatementWithMultipleCases (line 638) | [TestMethod] method GetLineNumbers_SwitchExpressionWithMultipleCases (line 659) | [TestMethod] method GetLineNumbers_MultiLineInterpolatedString (line 682) | [TestMethod] method GetLineNumbers_MultiLineInterpolatedStringWithMultipleLineExpressions (line 697) | [TestMethod] method GetLineNumbers_UsingDeclaration (line 714) | [TestMethod] method GetLineNumbers_LocalFunctions (line 725) | [TestMethod] method GetLineNumbers_IndicesAndRanges (line 750) | [TestMethod] method GetLineNumbers_NullCoalescingAssignment (line 779) | [TestMethod] method GetLineNumbers_AssignmentAndDeclarationInTheSameDeconstruction (line 795) | [TestMethod] method GetLineNumbers_NullCoalescingOperator (line 811) | [TestMethod] method GetLineNumbers_SingleLinePatternMatching (line 826) | [TestMethod] method GetLineNumbers_MultiLinePatternMatching (line 835) | [TestMethod] method GetLineNumbers_MultiLineInvocation (line 855) | [TestMethod] method GetLineNumbers_PartialProperties (line 871) | [TestMethod] method GetLineNumbers_PartialProperties_Excluded (line 889) | [TestMethod] method GetLineNumbers_PartialIndexers_Excluded (line 908) | [TestMethod] method GetLineNumbers_Razor_NoExecutableLines (line 929) | [TestMethod] method GetLineNumbers_Razor_FieldReference (line 942) | [TestMethod] method GetLineNumbers_Razor_MethodReferenceAndCall (line 961) | [TestMethod] method GetLineNumbers_Razor_PropertyReference (line 988) | [TestMethod] method GetLineNumbers_Razor_Html (line 1002) | [TestMethod] method GetLineNumbers_Razor_AssignmentAndDeclarationInTheSameDeconstruction (line 1020) | [TestMethod] method GetLineNumbers_Razor_MultiLineInvocation (line 1032) | [TestMethod] method GetLineNumbers_Razor_NullCoalescingAssignment (line 1046) | [TestMethod] method GetLineNumbers_Razor_MultiLinePatternMatching (line 1058) | [TestMethod] method GetLineNumbers_Razor_NullCoalescingOperator (line 1076) | [TestMethod] method GetLineNumbers_Razor_LocalFunctions (line 1088) | [TestMethod] method AssertLineNumbersOfExecutableLines (line 1103) | private static void AssertLineNumbersOfExecutableLines(string code, pa... method AssertLineNumbersOfExecutableLinesRazor (line 1109) | private static void AssertLineNumbersOfExecutableLinesRazor(string cod... FILE: analyzers/tests/SonarAnalyzer.Test/Metrics/VisualBasicExecutableLinesMetricTest.cs class VisualBasicExecutableLinesMetricTest (line 22) | [TestClass] method AttributeList (line 25) | [TestMethod] method SyncLockStatement (line 35) | [TestMethod] method UsingStatement (line 47) | [TestMethod] method DoUntilStatement (line 57) | [TestMethod] method DoWhileStatement (line 68) | [TestMethod] method ForEachStatement (line 79) | [TestMethod] method ForStatement (line 89) | [TestMethod] method WhileStatement (line 99) | [TestMethod] method IfStatement (line 109) | [TestMethod] method SelectStatement (line 125) | [TestMethod] method ConditionalAccessExpression (line 140) | [TestMethod] method BinaryConditionalExpression (line 149) | [TestMethod] method TernaryConditionalExpression (line 158) | [TestMethod] method GoToStatement (line 167) | [TestMethod] method ThrowStatement (line 177) | [TestMethod] method ReturnStatement (line 186) | [TestMethod] method ExitDoStatement (line 195) | [TestMethod] method ExitForStatement (line 208) | [TestMethod] method ExitWhileStatement (line 219) | [TestMethod] method ContinueDoStatement (line 230) | [TestMethod] method ContinueForStatement (line 241) | [TestMethod] method SimpleMemberAccessExpression (line 252) | [TestMethod] method InvocationExpression (line 261) | [TestMethod] method SingleLineSubLambdaExpression (line 273) | [TestMethod] method SingleLineFunctionLambdaExpression (line 282) | [TestMethod] method MultiLineSubLambdaExpression (line 291) | [TestMethod] method MultiLineFunctionLambdaExpression (line 302) | [TestMethod] method StructureStatement (line 313) | [TestMethod] method ClassStatement (line 319) | [TestMethod] method ModuleStatement (line 325) | [TestMethod] method FunctionStatement (line 331) | [TestMethod] method SubStatement (line 340) | [TestMethod] method SubNewStatement (line 348) | [TestMethod] method PropertyStatement (line 356) | [TestMethod] method EventStatement (line 363) | [TestMethod] method AddHandlerAccessorStatement (line 370) | [TestMethod] method RemoveHandlerAccessorStatement (line 385) | [TestMethod] method SetAccessorStatement (line 400) | [TestMethod] method GetAccessorStatement (line 413) | [TestMethod] method Assignments (line 423) | [TestMethod] method ExcludedFromCodeCoverage_Class (line 436) | [TestMethod] method ExcludedFromCodeCoverage_Methods (line 450) | [TestMethod] method AssertLinesOfCode (line 467) | private static void AssertLinesOfCode(string code, params int[] expect... FILE: analyzers/tests/SonarAnalyzer.Test/Operations/Utilities/OperationExecutionOrderTest.cs class OperationExecutionOrderTest (line 25) | [TestClass] method Linear (line 28) | [TestMethod] method Nested (line 63) | [TestMethod] method InterruptedEvaluation (line 93) | [TestMethod] method AsIEnumerable (line 112) | [TestMethod] method ValidateOrder (line 120) | private static void ValidateOrder(string code, string[] expected, bool... method Compile (line 138) | private static OperationExecutionOrder Compile(string methodBody, bool... FILE: analyzers/tests/SonarAnalyzer.Test/Operations/Utilities/OperationFinderTest.cs class OperationFinderTest (line 24) | [TestClass] method ValidateFinder (line 27) | [TestMethod] class FirstNumericLiteralFinder (line 50) | private class FirstNumericLiteralFinder : OperationFinder method TryFindOperation (line 52) | protected override bool TryFindOperation(IOperationWrapperSonar oper... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AbstractClassToInterfaceTest.cs class AbstractClassToInterfaceTest (line 22) | [TestClass] method ClassShouldNotBeAbstract (line 27) | [TestMethod] method ClassShouldNotBeAbstract_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AbstractTypesShouldNotHaveConstructorsTest.cs class AbstractTypesShouldNotHaveConstructorsTest (line 22) | [TestClass] method AbstractTypesShouldNotHaveConstructors (line 27) | [TestMethod] method AbstractTypesShouldNotHaveConstructors_TopLevelStatements (line 31) | [TestMethod] method AbstractTypesShouldNotHaveConstructors_Latest (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AllBranchesShouldNotHaveSameImplementationTest.cs class AllBranchesShouldNotHaveSameImplementationTest (line 23) | [TestClass] method AllBranchesShouldNotHaveSameImplementation_CSharp8 (line 28) | [TestMethod] method AllBranchesShouldNotHaveSameImplementation_CSharp9 (line 34) | [TestMethod] method AllBranchesShouldNotHaveSameImplementation_VB (line 40) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AlwaysSetDateTimeKindTest.cs class AlwaysSetDateTimeKindTest (line 23) | [TestClass] method AlwaysSetDateTimeKind_CS (line 28) | [TestMethod] method AlwaysSetDateTimeKind_VB (line 32) | [TestMethod] method AlwaysSetDateTimeKind_CSharp9 (line 36) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AnonymousDelegateEventUnsubscribeTest.cs class AnonymousDelegateEventUnsubscribeTest (line 22) | [TestClass] method AnonymousDelegateEventUnsubscribe (line 27) | [TestMethod] method AnonymousDelegateEventUnsubscribe_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ArgumentSpecifiedForCallerInfoParameterTest.cs class ArgumentSpecifiedForCallerInfoParameterTest (line 22) | [TestClass] method ArgumentSpecifiedForCallerInfoParameter (line 27) | [TestMethod] method ArgumentSpecifiedForCallerInfoParameter_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ArrayCovarianceTest.cs class ArrayCovarianceTest (line 22) | [TestClass] method ArrayCovariance (line 27) | [TestMethod] method ArrayCovariance_CSharp9 (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ArrayCreationLongSyntaxTest.cs class ArrayCreationLongSyntaxTest (line 22) | [TestClass] method ArrayCreationLongSyntax (line 27) | [TestMethod] method ArrayCreationLongSyntax_CodeFix (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ArrayDesignatorOnVariableTest.cs class ArrayDesignatorOnVariableTest (line 22) | [TestClass] method ArrayDesignatorOnVariable (line 27) | [TestMethod] method ArrayDesignatorOnVariable_CodeFix (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ArrayInitializationMultipleStatementsTest.cs class ArrayInitializationMultipleStatementsTest (line 22) | [TestClass] method ArrayInitializationMultipleStatements (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ArrayPassedAsParamsTest.cs class ArrayPassedAsParamsTest (line 23) | [TestClass] method ArrayPassedAsParams_CS (line 29) | [TestMethod] method ArrayPassedAsParams_CS_Latest (line 33) | [TestMethod] method ArrayPassedAsParams_VB (line 40) | [TestMethod] method ArrayPassedAsParams_VBCollectionInitializerSyntaxTests (line 44) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AspNet/AnnotateApiActionsWithHttpVerbTest.cs class AnnotateApiActionsWithHttpVerbTest (line 23) | [TestClass] method AnnotateApiActionsWithHttpVerb_CS (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AspNet/ApiControllersShouldNotDeriveDirectlyFromControllerTest.cs class ApiControllersShouldNotDeriveDirectlyFromControllerTest (line 22) | [TestClass] method ApiControllersShouldNotDeriveDirectlyFromController_CS (line 37) | [TestMethod] method ApiControllersShouldNotDeriveDirectlyFromController_DoesNotRaiseWithViewFunctionality (line 41) | [DataRow("""View()""")] method ApiControllersShouldNotDeriveDirectlyFromController_DoesNotRaiseWithVoidInvocations (line 76) | [DataRow("""OnActionExecuted(default(ActionExecutedContext))""")] method ApiControllersShouldNotDeriveDirectlyFromController_DoesNotRaiseInDifferentConstructs (line 91) | [DataRow("public Test() => foo = View();", DisplayName = "Constructor")] method ApiControllersShouldNotDeriveDirectlyFromController_CodeFix (line 109) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AspNet/AvoidUnderPostingTest.cs class AvoidUnderPostingTest (line 24) | [TestClass] method AvoidUnderPosting_CSharp (line 37) | [TestMethod] method AvoidUnderPosting_Latest (line 41) | [TestMethod] method AvoidUnderPosting_EnclosingTypes_CSharp (line 47) | [TestMethod] method AvoidUnderPosting_HttpHandlers_CSharp (line 72) | [TestMethod] method AvoidUnderPosting_ModelInDifferentProject_CSharp (line 93) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AspNet/BackslashShouldBeAvoidedInAspNetRoutesTest.cs class BackslashShouldBeAvoidedInAspNetRoutesTest (line 27) | [TestClass] method AttributesWithAllTypesOfStringsDisplayNameProvider (line 59) | public static string AttributesWithAllTypesOfStringsDisplayNameProvide... method AspNet4xReferences (line 67) | private static IEnumerable AspNet4xReferences(strin... method BackslashShouldBeAvoidedInAspNetRoutes_AspNet4x_CS (line 71) | [TestMethod] method BackslashShouldBeAvoidedInAspNetRoutes_AspNet4x_CS_Latest (line 79) | [TestMethod] method BackslashShouldBeAvoidedInAspNetRoutes_AspNet4x_VB (line 109) | [TestMethod] method AspNetCore2xReferences (line 127) | private static IEnumerable AspNetCore2xReferences(s... method BackslashShouldBeAvoidedInAspNetRoutes_CrossFilePartialClass_DoesNotThrow (line 145) | [TestMethod] method BackslashShouldBeAvoidedInAspNetRoutes_AspNetCore2x_CS (line 178) | [TestMethod] method BackslashShouldBeAvoidedInAspNetRoutes_AspNetCore2x_Route_CS_Latest (line 186) | [TestMethod] method BackslashShouldBeAvoidedInAspNetRoutes_AspNetCore2x_HttpMethods_CS_Latest (line 197) | [TestMethod] method BackslashShouldBeAvoidedInAspNetRoutes_AspNetCore3AndAbove_Route_CS_Latest (line 208) | [TestMethod] method BackslashShouldBeAvoidedInAspNetRoutes_AspNetCore3AndAbove_HttpMethods_CS_Latest (line 219) | [TestMethod] method BackslashShouldBeAvoidedInAspNetRoutes_AspNetCore2x_VB (line 230) | [TestMethod] method BackslashShouldBeAvoidedInAspNetRoutes_AspNetCore2x_CS_Latest (line 238) | [TestMethod] method BackslashShouldBeAvoidedInAspNetRoutes_AspNetCore3AndAbove_CS (line 247) | [TestMethod] method BackslashShouldBeAvoidedInAspNetRoutes_AspNetCore3AndAbove_CS_Latest (line 254) | [TestMethod] method BackslashShouldBeAvoidedInAspNetRoutes_AspNetCore3AndAbove_VB (line 262) | [TestMethod] method BackslashShouldBeAvoidedInAspNetRoutes_AspNetCore8AndAbove_CS_Latest (line 269) | [TestMethod] method BackslashShouldBeAvoidedInAspNetRoutes_AspNetCore8AndAbove_VB (line 277) | [TestMethod] method TestAspNetCoreAttributeDeclaration (line 284) | private static void TestAspNetCoreAttributeDeclaration(VerifierBuilder... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AspNet/CallModelStateIsValidTest.cs class CallModelStateIsValidTest (line 24) | [TestClass] method CallModelStateIsValid_CS (line 36) | [TestMethod] method CallModelStateIsValid_CS_Latest (line 40) | [TestMethod] method CallModelStateIsValid_AssemblyLevelControllerAttribute_CS (line 44) | [TestMethod] method CallModelStateIsValid_FluentValidation_CS (line 68) | [TestMethod] method CallModelStateIsValid_ValidatingState_CS (line 140) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AspNet/ControllersHaveMixedResponsibilitiesTest.cs class ControllersHaveMixedResponsibilitiesTest (line 25) | [TestClass] method ControllersHaveMixedResponsibilities_CS (line 40) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AspNet/ControllersReuseClientTest.cs class ControllersReuseClientTest (line 24) | [TestClass] method ControllersReuseClient_CS (line 39) | [TestMethod] method ControllersReuseClient_CS8 (line 45) | [TestMethod] method ControllersReuseClient_CS9 (line 52) | [TestMethod] method ControllersReuseClient_CS12 (line 59) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AspNet/RouteTemplateShouldNotStartWithSlashTest.cs class RouteTemplateShouldNotStartWithSlashTest (line 23) | [TestClass] method RouteTemplateShouldNotStartWithSlash_CS (line 30) | [TestMethod] method RouteTemplateShouldNotStartWithSlash_RouteAttributes (line 38) | [DataRow("""[HttpGet("/Index1")]""", "", false)] method RouteTemplateShouldNotStartWithSlash_Attributes (line 73) | [DataRow("""[Route(template: @"/[action]", Name = "a", Order = 42)]""")] method RouteTemplateShouldNotStartWithSlash_WithAllTypesOfStrings (line 101) | [DataRow("""(@"/[action]")""", false)] method RouteTemplateShouldNotStartWithSlash_VB (line 141) | [TestMethod] method RouteTemplateShouldNotStartWithSlash_CSharp12 (line 148) | [TestMethod] method AspNet4xReferences (line 162) | private static IEnumerable AspNet4xReferences(strin... method RouteTemplateShouldNotStartWithSlash_CS (line 166) | [TestMethod] method RouteTemplateShouldNotStartWithSlash_VB (line 175) | [TestMethod] method RouteTemplateShouldNotStartWithSlash_WithHttpAttribute (line 183) | [DataRow("/Index2", false)] method RouteTemplateShouldNotStartWithSlash_WithAttributeSyntaxVariations (line 211) | [DataRow("""[Route(template: @"/[action]", Name = "a", Order = 42)]"""... method RouteTemplateShouldNotStartWithSlash_WithAllTypesOfStrings (line 242) | [DataRow("""(@"/[action]")""", false)] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AspNet/SpecifyRouteAttributeTest.cs class SpecifyRouteAttributeTest (line 24) | [TestClass] method SpecifyRouteAttribute_CSharp12 (line 36) | [TestMethod] method SpecifyRouteAttribute_PartialClasses_CSharp12 (line 40) | [TestMethod] method SpecifyRouteAttribute_PartialClasses_OneGenerated_CSharp12 (line 59) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AspNet/UseAspNetModelBindingTest.cs class UseAspNetModelBindingTest (line 24) | [TestClass] method UseAspNetModelBinding_NoRegistrationIfNotAspNet (line 39) | [TestMethod] method UseAspNetModelBinding_AspNetCore_CS_Latest (line 43) | [TestMethod] method UseAspNetModelBinding_AspNetCore_FormFileAccess (line 47) | [TestMethod] method UseAspNetModelBinding_NonCompliantAccess (line 85) | [TestMethod] method UseAspNetModelBinding_CompliantAccess (line 135) | [TestMethod] method UseAspNetModelBinding_DottedExpressions (line 164) | [TestMethod] method UseAspNetModelBinding_PocoController (line 214) | [TestMethod] method UseAspNetModelBinding_NoController (line 237) | [TestMethod] method UseAspNetModelBinding_NoController_Properties (line 259) | [TestMethod] method UseAspNetModelBinding_InheritanceAccess (line 293) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AssertionArgsShouldBePassedInCorrectOrderTest.cs class AssertionArgsShouldBePassedInCorrectOrderTest (line 25) | [TestClass] method AssertionArgsShouldBePassedInCorrectOrder_MsTest (line 30) | [TestMethod] method AssertionArgsShouldBePassedInCorrectOrder_MsTest_Static (line 39) | [TestMethod] method AssertionArgsShouldBePassedInCorrectOrder_NUnit (line 47) | [TestMethod] method AssertionArgsShouldBePassedInCorrectOrder_NUnit4 (line 55) | [TestMethod] method AssertionArgsShouldBePassedInCorrectOrder_NUnit_Static (line 61) | [TestMethod] method AssertionArgsShouldBePassedInCorrectOrder_XUnit (line 70) | [TestMethod] method AssertionArgsShouldBePassedInCorrectOrder_XUnitV3 (line 79) | [TestMethod] method AssertionArgsShouldBePassedInCorrectOrder_XUnit_Static (line 90) | [TestMethod] method AssertionArgsShouldBePassedInCorrectOrder_NUnit4_AliasedNamespace (line 100) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AssertionsShouldBeCompleteTest.cs class AssertionsShouldBeCompleteTest (line 23) | [TestClass] method AssertionsShouldBeCompleteTest (line 41) | public AssertionsShouldBeCompleteTest() => method AssertionsShouldBeComplete_FluentAssertions_CSharp7 (line 47) | [TestMethod] method AssertionsShouldBeComplete_FluentAssertions_MissingParen (line 55) | [TestMethod] method AssertionsShouldBeComplete_FluentAssertions_CS_Latest (line 71) | [TestMethod] method AssertionsShouldBeComplete_NFluent_CSharp (line 79) | [TestMethod] method AssertionsShouldBeComplete_NFluent_CS_Latest (line 83) | [TestMethod] method AssertionsShouldBeComplete_NSubstitute_CS (line 87) | [TestMethod] method AssertionsShouldBeComplete_AllFrameworks_CS (line 91) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AssignmentInsideSubExpressionTest.cs class AssignmentInsideSubExpressionTest (line 22) | [TestClass] method AssignmentInsideSubExpression (line 27) | [TestMethod] method AssignmentInsideSubExpression_TopLevelStatements (line 31) | [TestMethod] method AssignmentInsideSubExpression_Latest (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AsyncAwaitIdentifierTest.cs class AsyncAwaitIdentifierTest (line 22) | [TestClass] method AsyncAwaitIdentifier (line 27) | [TestMethod] method AsyncAwaitIdentifier_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AsyncVoidMethodTest.cs class AsyncVoidMethodTest (line 24) | [TestClass] method AsyncVoidMethod (line 29) | [TestMethod] method AsyncVoidMethod_CS_Latest (line 34) | [TestMethod] method AsyncVoidMethod_MsTestTestFramework (line 41) | [TestMethod] method AsyncVoidMethod_VsUtFramework (line 53) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AvoidDateTimeNowForBenchmarkingTest.cs class AvoidDateTimeNowForBenchmarkingTest (line 23) | [TestClass] method AvoidDateTimeNowForBenchmarking_CS (line 26) | [TestMethod] method AvoidDateTimeNowForBenchmarking_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AvoidExcessiveClassCouplingTest.cs class AvoidExcessiveClassCouplingTest (line 22) | [TestClass] method AvoidExcessiveClassCoupling (line 28) | [TestMethod] method AvoidExcessiveClassCoupling_Generic_No_Constraints (line 32) | [TestMethod] method AvoidExcessiveClassCoupling_Generic_With_Constraints (line 43) | [TestMethod] method AvoidExcessiveClassCoupling_Generic_Bounded (line 58) | [TestMethod] method AvoidExcessiveClassCoupling_Generic_Bounded_Deep_Nesting (line 71) | [TestMethod] method AvoidExcessiveClassCoupling_Task_Not_Counted (line 85) | [TestMethod] method AvoidExcessiveClassCoupling_Action_Not_Counted (line 95) | [TestMethod] method AvoidExcessiveClassCoupling_Func_Not_Counted (line 105) | [TestMethod] method AvoidExcessiveClassCoupling_Pointers_Not_Counted (line 115) | [TestMethod] method AvoidExcessiveClassCoupling_Enums_Not_Counted (line 125) | [TestMethod] method AvoidExcessiveClassCoupling_Lazy_Not_Counted (line 135) | [TestMethod] method AvoidExcessiveClassCoupling_Fields_Are_Counted (line 146) | [TestMethod] method AvoidExcessiveClassCoupling_Properties_Are_Counted (line 162) | [TestMethod] method AvoidExcessiveClassCoupling_Indexers_Are_Counted (line 193) | [TestMethod] method AvoidExcessiveClassCoupling_Events_Are_Counted (line 209) | [TestMethod] method AvoidExcessiveClassCoupling_Methods_Are_Counted (line 238) | [TestMethod] method AvoidExcessiveClassCoupling_Inner_Classes_And_Structs_Are_Not_Counted (line 267) | [TestMethod] method AvoidExcessiveClassCoupling_Interface_Declaration (line 292) | [TestMethod] method AvoidExcessiveClassCoupling_Self_Reference (line 304) | [TestMethod] method AvoidExcessiveClassCoupling_Base_Classes_Interfaces_NotCounted (line 315) | [TestMethod] method AvoidExcessiveClassCoupling_Catch_Statements (line 328) | [TestMethod] method AvoidExcessiveClassCoupling_Attributes (line 343) | [TestMethod] method AvoidExcessiveClassCoupling_Nameof (line 357) | [TestMethod] method AvoidExcessiveClassCoupling_InRecord_Enums_Not_Counted (line 370) | [TestMethod] method AvoidExcessiveClassCoupling_Base_Records_Interfaces_NotCounted (line 380) | [TestMethod] method AvoidExcessiveClassCoupling_Primitive_Types_Not_Counted (line 395) | [TestMethod] method AvoidExcessiveClassCoupling_Implicit_Explicit_Operators (line 411) | [TestMethod] method AvoidExcessiveClassCoupling_UserDefined_Delegates (line 423) | [TestMethod] method AvoidExcessiveClassCoupling_Extension_Methods (line 435) | [TestMethod] method AvoidExcessiveClassCoupling_Extension_Method_Container_Not_Counted_On_Invocation (line 445) | [TestMethod] method AvoidExcessiveClassCoupling_Latest (line 459) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AvoidExcessiveInheritanceTest.cs class AvoidExcessiveInheritanceTest (line 22) | [TestClass] method AvoidExcessiveInheritance_DefaultValues (line 27) | [TestMethod] method AvoidExcessiveInheritance_DefaultValues_Records (line 36) | [TestMethod] method AvoidExcessiveInheritance_DefaultValues_FileScopedTypes (line 46) | [TestMethod] method AvoidExcessiveInheritance_CustomValuesFullyNamedFilteredClass (line 52) | [TestMethod] method AvoidExcessiveInheritance_CustomValuesWildcardFilteredClass (line 60) | [TestMethod] method AvoidExcessiveInheritance_CustomValuesWildcardFilteredRecord (line 68) | [TestMethod] method FilteredClasses_ByDefault_ShouldBeEmpty (line 77) | [TestMethod] method CreateAnalyzerWithFilter (line 81) | private static AvoidExcessiveInheritance CreateAnalyzerWithFilter(stri... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AvoidLambdaExpressionInLoopsInBlazorTest.cs class AvoidLambdaExpressionInLoopsInBlazorTest (line 24) | [TestClass] method AvoidLambdaExpressionInLoopsInBlazor_Blazor (line 31) | [TestMethod] method AvoidLambdaExpressionInLoopsInBlazor_BlazorLoopsWithNoBody (line 37) | [TestMethod] method AvoidLambdaExpressionInLoopsInBlazor_UsingRenderFragment (line 43) | [TestMethod] method AvoidLambdaExpressionInLoopsInBlazor_CS (line 49) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/AvoidUnsealedAttributesTest.cs class AvoidUnsealedAttributesTest (line 23) | [TestClass] method AvoidUnsealedAttributes_CS (line 26) | [TestMethod] method AvoidUnsealedAttributes_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/BeginInvokePairedWithEndInvokeTest.cs class BeginInvokePairedWithEndInvokeTest (line 23) | [TestClass] method BeginInvokePairedWithEndInvoke_CS (line 29) | [TestMethod] method BeginInvokePairedWithEndInvoke_CS_Latest (line 33) | [TestMethod] method BeginInvokePairedWithEndInvoke_VB (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/BinaryOperationWithIdenticalExpressionsTest.cs class BinaryOperationWithIdenticalExpressionsTest (line 23) | [TestClass] method BinaryOperationWithIdenticalExpressions_CS (line 29) | [TestMethod] method BinaryOperationWithIdenticalExpressions_TestProject_CS (line 33) | [TestMethod] method BinaryOperationWithIdenticalExpressions_VB (line 39) | [TestMethod] method BinaryOperationWithIdenticalExpressions_TestProject_VB (line 43) | [TestMethod] method BinaryOperationWithIdenticalExpressions_CS_Latest (line 49) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/BlazorQueryParameterRoutableComponentTest.cs class BlazorQueryParameterRoutableComponentTest (line 22) | [TestClass] method BlazorQueryParameterRoutableComponent_Blazor (line 29) | [TestMethod] method BlazorQueryParameterRoutableComponent_BlazorNoRoute (line 35) | [TestMethod] method BlazorQueryParameterRoutableComponent_Partial (line 41) | [TestMethod] method BlazorQueryParameterRoutableComponent_CS (line 51) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/BooleanCheckInvertedTest.cs class BooleanCheckInvertedTest (line 23) | [TestClass] method BooleanCheckInverted_CS (line 28) | [TestMethod] method BooleanCheckInverted_CS_CodeFix (line 32) | [TestMethod] method BooleanCheckInverted_VB (line 39) | [TestMethod] method BooleanCheckInverted_CS_Latest (line 43) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/BooleanLiteralUnnecessaryTest.cs class BooleanLiteralUnnecessaryTest (line 23) | [TestClass] method BooleanLiteralUnnecessary_CS (line 28) | [TestMethod] method BooleanLiteralUnnecessary_CodeFix_CS (line 32) | [TestMethod] method BooleanLiteralUnnecessary_Latest (line 39) | [TestMethod] method BooleanLiteralUnnecessary_CodeFix_Latest (line 45) | [TestMethod] method BooleanLiteralUnnecessary_VB (line 53) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/BreakOutsideSwitchTest.cs class BreakOutsideSwitchTest (line 22) | [TestClass] method BreakOutsideSwitch (line 27) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/BypassingAccessibilityTest.cs class BypassingAccessibilityTest (line 23) | [TestClass] method BypassingAccessibility_CS (line 29) | [TestMethod] method BypassingAccessibility_CSharp_Latest (line 33) | [TestMethod] method BypassingAccessibility_VB (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CallToAsyncMethodShouldNotBeBlockingTest.cs class CallToAsyncMethodShouldNotBeBlockingTest (line 22) | [TestClass] method CallToAsyncMethodShouldNotBeBlocking (line 27) | [TestMethod] method CallToAsyncMethodShouldNotBeBlocking_TopLevelStatements (line 31) | [TestMethod] method CallToAsyncMethodShouldNotBeBlocking_CS_Latest (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CallerInformationParametersShouldBeLastTest.cs class CallerInformationParametersShouldBeLastTest (line 23) | [TestClass] method CallerInformationParametersShouldBeLast (line 28) | [TestMethod] method CallerInformationParametersShouldBeLast_CS_Latest (line 32) | [TestMethod] method CallerInformationParametersShouldBeLastInvalidSyntax (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CastConcreteTypeToInterfaceTest.cs class CastConcreteTypeToInterfaceTest (line 22) | [TestClass] method CastConcreteTypeToInterface (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CastShouldNotBeDuplicatedTest.cs class CastShouldNotBeDuplicatedTest (line 22) | [TestClass] method CastShouldNotBeDuplicated (line 29) | [TestMethod] method CastShouldNotBeDuplicated_CS_Latest (line 33) | [TestMethod] method CastShouldNotBeDuplicated_MvcView (line 41) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CatchEmptyTest.cs class CatchEmptyTest (line 22) | [TestClass] method CatchEmpty (line 27) | [TestMethod] method CatchEmpty_InTest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CatchRethrowTest.cs class CatchRethrowTest (line 23) | [TestClass] method CatchRethrow (line 28) | [TestMethod] method CatchRethrow_CodeFix (line 32) | [TestMethod] method CatchRethrow_VB (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CertificateValidationCheckTest.cs class CertificateValidationCheckTest (line 23) | [TestClass] method CertificateValidationCheck_CS (line 33) | [TestMethod] method CertificateValidationCheck_CS_Latest (line 37) | [TestMethod] method CertificateValidationCheck_CS_TopLevelStatements (line 41) | [TestMethod] method CertificateValidationCheck_VB (line 45) | [TestMethod] method CreateParameterLookup_CS_ThrowsException (line 49) | [TestMethod] method CreateParameterLookup_VB_ThrowsException (line 57) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CheckArgumentExceptionTest.cs class CheckArgumentExceptionTest (line 22) | [TestClass] method CheckArgumentException (line 27) | [TestMethod] method CheckArgumentException_TopLevelStatements (line 31) | [TestMethod] method CheckArgumentException_CS_Latest (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CheckFileLicenseTest.cs class CheckFileLicenseTest (line 23) | [TestClass] method CheckFileLicense_WhenUnlicensedFileStartingWithUsing_ShouldBeNoncompliant_CS (line 78) | [TestMethod] method CheckFileLicense_WhenLicensedFileStartingWithUsing_ShouldBeCompliant_CS (line 82) | [TestMethod] method CheckFileLicense_WhenLicensedFileStartingWithUsingAndUsingCustomValues_ShouldBeCompliant_CS (line 88) | [TestMethod] method CheckFileLicense_WhenLicensedWithMultilineCommentStartingWithUsing_ShouldBeCompliant_CS (line 94) | [TestMethod] method CheckFileLicense_WhenLicensedWithMultilineCommentStartingWithUsingWithCustomValues_ShouldBeCompliant_CS (line 100) | [TestMethod] method CheckFileLicense_WhenNoLicenseStartingWithNamespace_ShouldBeNonCompliant_CS (line 106) | [TestMethod] method CheckFileLicense_WhenLicensedWithSingleLineCommentStartingWithNamespace_ShouldBeCompliant_CS (line 110) | [TestMethod] method CheckFileLicense_WhenLicensedWithSingleLineCommentStartingWithNamespaceAndUsingCustomValues_ShouldBeCompliant_CS (line 116) | [TestMethod] method CheckFileLicense_WhenLicensedWithMultilineCommentStartingWithNamespace_ShouldBeCompliant_CS (line 122) | [TestMethod] method CheckFileLicense_WhenLicensedWithMultilineCommentStartingWithNamespaceAndUsingCustomValues_ShouldBeCompliant_CS (line 128) | [TestMethod] method CheckFileLicense_WhenLicensedWithMultiSingleLineCommentStartingWithNamespaceAndNoRegex_ShouldBeCompliant_CS (line 134) | [TestMethod] method CheckFileLicense_WhenLicensedWithMultiSingleLineCommentStartingWithAdditionalComments_ShouldBeCompliant_CS (line 140) | [TestMethod] method CheckFileLicense_WhenLicensedWithMultiSingleLineCommentStartingWithAdditionalCommentOnSameLine_ShouldBeNonCompliant_CS (line 146) | [TestMethod] method CheckFileLicense_WithForcingEmptyLines_ShouldBeNonCompliant_CS (line 150) | [TestMethod] method CheckFileLicense_WithForcingEmptyLines_ShouldBeCompliant_CS (line 154) | [TestMethod] method CheckFileLicense_WhenLicensedWithMultiSingleLineCommentStartingWithNamespaceAndMultiLineRegexWithNewLine_ShouldBeCompliant_CS (line 160) | [TestMethod] method CheckFileLicense_WhenLicensedWithMultiSingleLineCommentStartingWithNamespaceAndMultiLineRegexWithDot_ShouldBeCompliant_CS (line 166) | [TestMethod] method CheckFileLicense_WhenEmptyFile_ShouldBeNonCompliant_CS (line 172) | [TestMethod] method CheckFileLicenseCodeFix_WhenThereIsAYearDifference_ShouldBeNonCompliant_CS (line 183) | [TestMethod] method CheckFileLicense_WhenProvidingAnInvalidRegex_ShouldThrowException_CS (line 187) | [TestMethod] method CheckFileLicense_WhenUsingComplexRegex_ShouldBeCompliant_CS (line 197) | [TestMethod] method CheckFileLicense_WhenUsingMultilinesHeaderAsSingleLineString_ShouldBeCompliant_CS (line 204) | [TestMethod] method CheckFileLicenseCodeFix_WhenNoLicenseStartWithNamespaceAndUsesDefaultValues_ShouldBeNoncompliant_CS (line 211) | [TestMethod] method CheckFileLicenseCodeFix_CSharp9_ShouldBeNoncompliant_CS (line 219) | [TestMethod] method CheckFileLicenseCodeFix_WhenNoLicenseStartingWithUsing_ShouldBeFixedAsExpected_CS (line 228) | [TestMethod] method CheckFileLicenseCodeFix_WhenNoLicenseStartingWithNamespace_ShouldBeFixedAsExpected_CS (line 236) | [TestMethod] method CheckFileLicenseCodeFix_WhenThereIsAYearDifference_ShouldBeFixedAsExpected_CS (line 244) | [TestMethod] method CheckFileLicenseCodeFix_WhenOutdatedLicenseStartingWithUsing_ShouldBeFixedAsExpected_CS (line 252) | [TestMethod] method CheckFileLicenseCodeFix_WhenOutdatedLicenseStartingWithNamespace_ShouldBeFixedAsExpected_CS (line 260) | [TestMethod] method CheckFileLicense_NullHeader_NoIssueReported_CS (line 268) | [TestMethod] method CheckFileLicense_NonCompliant_VB (line 273) | [TestMethod] method CheckFileLicense_Compliant_VB (line 277) | [TestMethod] method Builder (line 288) | private static VerifierBuilder Builder(string headerFormat, bool isReg... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ClassAndMethodNameTest.cs class ClassAndMethodNameTest (line 23) | [TestClass] method ClassAndMethodName_CS (line 28) | [TestMethod] method ClassAndMethodName_InTestProject_CS (line 36) | [TestMethod] method ClassAndMethodName_TopLevelStatement_CS (line 40) | [TestMethod] method ClassAndMethodName_TopLevelStatement_InTestProject_CS (line 44) | [TestMethod] method ClassAndMethodName_MethodName_CS_Latest (line 48) | [TestMethod] method ClassAndMethodName_MethodName_InTestProject_CS_Latest (line 52) | [TestMethod] method ClassAndMethodName_VB (line 56) | [TestMethod] method ClassAndMethodName_MethodName (line 62) | [TestMethod] method TestSplitToParts (line 71) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ClassNamedExceptionTest.cs class ClassNamedExceptionTest (line 23) | [TestClass] method ClassNamedException_CS (line 29) | [TestMethod] method ClassNamedException_CS_Latest (line 35) | [TestMethod] method ClassNamedException_VB (line 42) | [TestMethod] method ClassNamedException_Interop_CS (line 50) | [TestMethod] method ClassNamedException_Interop_VB (line 56) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ClassNotInstantiatableTest.cs class ClassNotInstantiatableTest (line 23) | [TestClass] method ClassNotInstantiatable_CS (line 28) | [TestMethod] method ClassNotInstantiatable_CS_Latest (line 32) | [TestMethod] method ClassNotInstantiatable_VB (line 38) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ClassShouldNotBeEmptyTest.cs class ClassShouldNotBeEmptyTest (line 23) | [TestClass] method ClassShouldNotBeEmpty_CS (line 29) | [TestMethod] method ClassShouldNotBeEmpty_VB (line 35) | [TestMethod] method ClassShouldNotBeEmpty_CS_Latest (line 41) | [TestMethod] method ClassShouldNotBeEmpty_Inheritance_CS (line 50) | [TestMethod] method ClassShouldNotBeEmpty_Inheritance_VB (line 57) | [TestMethod] method AdditionalReferences (line 64) | private static MetadataReference[] AdditionalReferences() => FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ClassWithEqualityShouldImplementIEquatableTest.cs class ClassWithEqualityShouldImplementIEquatableTest (line 22) | [TestClass] method ClassWithEqualityShouldImplementIEquatable (line 27) | [TestMethod] method ClassWithEqualityShouldImplementIEquatable_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ClassWithOnlyStaticMemberTest.cs class ClassWithOnlyStaticMemberTest (line 22) | [TestClass] method ClassWithOnlyStaticMember (line 27) | [TestMethod] method ClassWithOnlyStaticMember_TopLevelStatements (line 31) | [TestMethod] method ClassWithOnlyStaticMember_Latest (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CloudNative/AzureFunctionsCatchExceptionsTest.cs class AzureFunctionsCatchExceptionsTest (line 22) | [TestClass] method AzureFunctionsCatchExceptions_CS (line 27) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CloudNative/AzureFunctionsLogFailuresTest.cs class AzureFunctionsLogFailuresTest (line 22) | [TestClass] method AzureFunctionsLogFailures_CS (line 27) | [TestMethod] method AzureFunctionsLogFailures_VerifyLoggerCalls (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CloudNative/AzureFunctionsReuseClientsTest.cs class AzureFunctionsReuseClientsTest (line 22) | [TestClass] method AzureFunctionsReuseClients_HttpClient_CS (line 32) | [TestMethod] method AzureFunctionsReuseClients_HttpClient_CSharp9 (line 36) | [TestMethod] method AzureFunctionsReuseClients_DocumentClient_CS (line 40) | [TestMethod] method AzureFunctionsReuseClients_CosmosClient_CS (line 46) | [TestMethod] method AzureFunctionsReuseClients_ServiceBusV5_CS (line 52) | [TestMethod] method AzureFunctionsReuseClients_ServiceBusV7_CS (line 58) | [TestMethod] method AzureFunctionsReuseClients_Storage_CS (line 64) | [TestMethod] method AzureFunctionsReuseClients_ArmClient_CS (line 75) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CloudNative/AzureFunctionsStatelessTest.cs class AzureFunctionsStatelessTest (line 22) | [TestClass] method AzureFunctionsStateless_CSharp8 (line 27) | [TestMethod] method AzureFunctionsStateless_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CloudNative/DurableEntityInterfaceRestrictionsTest.cs class DurableEntityInterfaceRestrictionsTest (line 22) | [TestClass] method DurableEntityInterfaceRestrictions_CSharp11 (line 30) | [TestMethod] method DurableEntityInterfaceRestrictions_CS_NET (line 36) | [TestMethod] method DurableEntityInterfaceRestrictions_CS (line 42) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CognitiveComplexityTest.cs class CognitiveComplexityTest (line 23) | [TestClass] method CognitiveComplexity_CS (line 29) | [TestMethod] method CognitiveComplexity_CS_Latest (line 35) | [TestMethod] method CognitiveComplexity_VB (line 44) | [TestMethod] method CognitiveComplexity_StackOverflow_CS (line 47) | [TestMethod] method CognitiveComplexity_StackOverflow_VB (line 56) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CollectionEmptinessCheckingTest.cs class CollectionEmptinessCheckingTest (line 23) | [TestClass] method CollectionEmptinessChecking_CS (line 29) | [TestMethod] method CollectionEmptinessChecking_VB (line 35) | [TestMethod] method CollectionEmptinessChecking_CodeFix_CS (line 41) | [TestMethod] method CollectionEmptinessChecking_CS_Latest (line 51) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CollectionPropertiesShouldBeReadOnlyTest.cs class CollectionPropertiesShouldBeReadOnlyTest (line 22) | [TestClass] method CollectionPropertiesShouldBeReadOnly (line 27) | [TestMethod] method CollectionPropertiesShouldBeReadOnly_CS_Latest (line 32) | [TestMethod] method CollectionPropertiesShouldBeReadOnly_Razor (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CollectionQuerySimplificationTest.cs class CollectionQuerySimplificationTest (line 22) | [TestClass] method CollectionQuerySimplification (line 27) | [TestMethod] method CollectionQuerySimplification_NetFx (line 33) | [TestMethod] method CollectionQuerySimplification_TopLevelStatements (line 43) | [TestMethod] method CollectionQuerySimplification_Latest (line 49) | [TestMethod] method EntityFrameworkNetReferences (line 56) | private static IEnumerable EntityFrameworkNetRefere... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CollectionsShouldImplementGenericInterfaceTest.cs class CollectionsShouldImplementGenericInterfaceTest (line 22) | [TestClass] method CollectionsShouldImplementGenericInterface (line 29) | [TestMethod] method CollectionsShouldImplementGenericInterface_Csharp9 (line 33) | [TestMethod] method CollectionsShouldImplementGenericInterface_Csharp10 (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CommentKeywordTest.cs class CommentKeywordTest (line 23) | [TestClass] method CommentTodo_CS (line 29) | [TestMethod] method CommentFixme_CS (line 37) | [TestMethod] method CommentTodo_VB (line 45) | [TestMethod] method CommentFixme_VB (line 53) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CommentLineEndTest.cs class CommentLineEndTest (line 22) | [TestClass] method CommentLineEnd (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CommentedOutCodeTest.cs class CommentedOutCodeTest (line 23) | [TestClass] method CommentedOutCode_Nonconcurrent (line 28) | [TestMethod] method CommentedOutCode (line 32) | [TestMethod] method CommentedOutCode_NoDocumentation (line 36) | [TestMethod] method CommentedOutCode_CodeFix_SingleLine (line 43) | [TestMethod] method CommentedOutCode_CodeFix_MultiLine (line 50) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CommentsShouldNotBeEmptyTest.cs class CommentsShouldNotBeEmptyTest (line 23) | [TestClass] method CommentsShouldNotBeEmpty_CS (line 29) | [TestMethod] method CommentsShouldNotBeEmpty_CS1 (line 33) | [TestMethod] method CommentsShouldNotBeEmpty_VB (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ComparableInterfaceImplementationTest.cs class ComparableInterfaceImplementationTest (line 22) | [TestClass] method IComparableImplementation (line 25) | [TestMethod] method IComparableImplementation_Latest (line 29) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CompareNaNTest.cs class CompareNaNTest (line 22) | [TestClass] method CompareNaN (line 27) | [TestMethod] method CompareNaN_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ConditionalSimplificationTest.cs class ConditionalSimplificationTest (line 23) | [TestClass] method ConditionalSimplification_BeforeCSharp8 (line 29) | [TestMethod] method ConditionalSimplification_CSharp8 (line 33) | [TestMethod] method ConditionalSimplification_CSharp8_CodeFix (line 37) | [TestMethod] method ConditionalSimplification_FromCSharp8 (line 41) | [TestMethod] method ConditionalSimplification_BeforeCSharp8_CodeFix (line 45) | [TestMethod] method ConditionalSimplification_FromCSharp8_CodeFix (line 51) | [TestMethod] method ConditionalSimplification_FromCSharp9 (line 58) | [TestMethod] method ConditionalSimplification_FromCSharp10 (line 62) | [TestMethod] method ConditionalSimplification_FromCSharp9_CodeFix (line 74) | [TestMethod] method ConditionalSimplification_FromCSharp10_CodeFix (line 81) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ConditionalStructureSameConditionTest.cs class ConditionalStructureSameConditionTest (line 23) | [TestClass] method ConditionalStructureSameCondition_CS (line 30) | [TestMethod] method ConditionalStructureSameCondition_CS_CSharp9 (line 34) | [TestMethod] method ConditionalStructureSameCondition_CS_CSharp10 (line 40) | [TestMethod] method ConditionalStructureSameCondition_RazorFile_CorrectMessage (line 46) | [TestMethod] method ConditionalStructureSameCondition_VisualBasic (line 72) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ConditionalStructureSameImplementationTest.cs class ConditionalStructureSameImplementationTest (line 23) | [TestClass] method ConditionalStructureSameImplementation_If_CSharp (line 31) | [TestMethod] method ConditionalStructureSameImplementation_Switch_CSharp (line 35) | [TestMethod] method ConditionalStructureSameImplementation_NameOf_CSharp (line 40) | [TestMethod] method ConditionalStructureSameImplementation_SymbolCannotBeResolved_VB (line 79) | [TestMethod] method ConditionalStructureSameImplementation_If_VisualBasic (line 112) | [TestMethod] method ConditionalStructureSameImplementation_Switch_VisualBasic (line 116) | [TestMethod] method ConditionalStructureSameImplementation_If_CSharp_Latest (line 120) | [TestMethod] method ConditionalStructureSameImplementation_Switch_CSharp_Latest (line 124) | [TestMethod] method ConditionalStructureSameImplementation_RazorFile_CorrectMessage (line 128) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ConditionalsShouldStartOnNewLineTest.cs class ConditionalsShouldStartOnNewLineTest (line 22) | [TestClass] method ConditionalsShouldStartOnNewLine (line 25) | [TestMethod] method ConditionalsShouldStartOnNewLine_CS_Latest (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ConditionalsWithSameConditionTest.cs class ConditionalsWithSameConditionTest (line 22) | [TestClass] method ConditionalsWithSameCondition (line 29) | [TestMethod] method ConditionalsWithSameCondition_CSharp9 (line 33) | [TestMethod] method ConditionalsWithSameCondition_CSharp9_TopLevelStatements (line 39) | [TestMethod] method ConditionalsWithSameCondition_CSharp10 (line 45) | [TestMethod] method ConditionalsWithSameCondition_RazorFile_CorrectMessage (line 51) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ConstructorArgumentValueShouldExistTest.cs class ConstructorArgumentValueShouldExistTest (line 23) | [TestClass] method ConstructorArgumentValueShouldExist_CS_Latest_Net (line 28) | [TestMethod] method ConstructorArgumentValueShouldExist_CS_NetFx (line 36) | [TestMethod] method ConstructorArgumentValueShouldExist_VB_NetFx (line 43) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ConstructorOverridableCallTest.cs class ConstructorOverridableCallTest (line 22) | [TestClass] method ConstructorOverridableCall (line 27) | [TestMethod] method ConstructorOverridableCall_Latest (line 31) | [TestMethod] method ConstructorOverridableCall_Nancy (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ConsumeValueTaskCorrectlyTest.cs class ConsumeValueTaskCorrectlyTest (line 22) | [TestClass] method ConsumeValueTaskCorrectly (line 29) | [TestMethod] method ConsumeValueTaskCorrectly_CSharp_Latest (line 33) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ControlCharacterInStringTest.cs class ControlCharacterInStringTest (line 22) | [TestClass] method ControlCharacterInString_CSharp8 (line 27) | [TestMethod] method ControlCharacterInString_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/CryptographicKeyShouldNotBeTooShortTest.cs class CryptographicKeyShouldNotBeTooShortTest (line 22) | [TestClass] method CryptographicKeyShouldNotBeTooShort (line 27) | [TestMethod] method CryptographicKeyShouldNotBeTooShort_NetFramework (line 33) | [TestMethod] method CryptographicKeyShouldNotBeTooShort_CS_Latest (line 39) | [TestMethod] method AdditionalReferences (line 48) | private static IEnumerable AdditionalReferences() => FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DangerousGetHandleShouldNotBeCalledTest.cs class DangerousGetHandleShouldNotBeCalledTest (line 23) | [TestClass] method DangerousGetHandleShouldNotBeCalled_CS (line 29) | [TestMethod] method DangerousGetHandleShouldNotBeCalled_CS_CSharp9 (line 35) | [TestMethod] method DangerousGetHandleShouldNotBeCalled_VB (line 43) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DatabasePasswordsShouldBeSecureTest.cs class DatabasePasswordsShouldBeSecureTest (line 25) | [TestClass] method DatabasePasswordsShouldBeSecure_CS (line 32) | [TestMethod] method DatabasePasswordsShouldBeSecure_CS_Latest (line 41) | [TestMethod] method DatabasePasswordsShouldBeSecure_Net5_CS (line 50) | [TestMethod] method DatabasePasswordsShouldBeSecure_NetCore3_CS (line 57) | [TestMethod] method DatabasePasswordsShouldBeSecure_CS_WebConfig (line 64) | [TestMethod] method DatabasePasswordsShouldBeSecure_CS_ExternalConnection (line 73) | [TestMethod] method DatabasePasswordsShouldBeSecure_CS_CorruptAndNonExistingWebConfigs_ShouldNotFail (line 82) | [TestMethod] method DatabasePasswordsShouldBeSecure_CS_AppSettings (line 92) | [TestMethod] method DatabasePasswordsShouldBeSecure_CS_CorruptAndNonExistingAppSettings_ShouldNotFail (line 108) | [TestMethod] method GetWebConfigPath (line 118) | private static string GetWebConfigPath(string rootFolder) => Path.Comb... method GetAppSettingsPath (line 120) | private static string GetAppSettingsPath(string rootFolder) => Path.Co... method VerifyAdditionalFiles (line 122) | private void VerifyAdditionalFiles(bool expectIssues, string additiona... method GetReferences (line 138) | private static IEnumerable GetReferences(string ent... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DateAndTimeShouldNotBeUsedasTypeForPrimaryKeyTest.cs class DateAndTimeShouldNotBeUsedAsTypeForPrimaryKeyTest (line 23) | [TestClass] method DateAndTimeShouldNotBeUsedAsTypeForPrimaryKey_CS (line 29) | [TestMethod] method DateAndTimeShouldNotBeUsedAsTypeForPrimaryKey_VB (line 33) | [TestMethod] method DateAndTimeShouldNotBeUsedAsTypeForPrimaryKey_NoReferenceToEntityFramework_CS (line 37) | [TestMethod] method DateAndTimeShouldNotBeUsedAsTypeForPrimaryKey_NoReferenceToEntityFramework_VB (line 43) | [TestMethod] method DateAndTimeShouldNotBeUsedAsTypeForPrimaryKey_Latest (line 49) | [TestMethod] method DateAndTimeShouldNotBeUsedAsTypeForPrimaryKey_EntityFrameworkCore_CS (line 58) | [TestMethod] method DateAndTimeShouldNotBeUsedAsTypeForPrimaryKey_EntityFrameworkCore_VB (line 62) | [TestMethod] method DateAndTimeShouldNotBeUsedAsTypeForPrimaryKey_FluentApi_CS (line 66) | [TestMethod] method DateAndTimeShouldNotBeUsedAsTypeForPrimaryKey_FluentApi_VB (line 70) | [TestMethod] method CreateVerifier (line 76) | private static VerifierBuilder CreateVerifier() method AddReferences (line 88) | AddReferences(NuGetMetadataReference.MicrosoftEntityFramework("6.0.0")); FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DateTimeFormatShouldNotBeHardcodedTest.cs class DateTimeFormatShouldNotBeHardcodedTest (line 23) | [TestClass] method DateTimeFormatShouldNotBeHardcoded_CS (line 29) | [TestMethod] method DateTimeFormatShouldNotBeHardcoded_VB (line 33) | [TestMethod] method DateTimeFormatShouldNotBeHardcoded_CS_Latest (line 39) | [TestMethod] method DateTimeFormatShouldNotBeHardcoded_NET_VB (line 46) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DeadStoresTest.cs class DeadStoresTest (line 22) | [TestClass] method DeadStores_SonarCfg (line 33) | [TestMethod] method DeadStores_RoslynCfg (line 37) | [TestMethod] method DeadStores_CS_Latest (line 43) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DebugAssertHasNoSideEffectsTest.cs class DebugAssertHasNoSideEffectsTest (line 22) | [TestClass] method DebugAssertHasNoSideEffects (line 27) | [TestMethod] method DebugAssertHasNoSideEffects_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DebuggerDisplayUsesExistingMembersTest.cs class DebuggerDisplayUsesExistingMembersTest (line 23) | [TestClass] method DebuggerDisplayUsesExistingMembers_CS (line 29) | [TestMethod] method DebuggerDisplayUsesExistingMembers_CSharp_Latest (line 33) | [TestMethod] method DebuggerDisplayUsesExistingMembers_VB (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DeclareEventHandlersCorrectlyTest.cs class DeclareEventHandlersCorrectlyTest (line 22) | [TestClass] method DeclareEventHandlersCorrectly (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DeclareTypesInNamespacesTest.cs class DeclareTypesInNamespacesTest (line 23) | [TestClass] method DeclareTypesInNamespaces_CS (line 28) | [TestMethod] method DeclareTypesInNamespaces_CS_Latest (line 32) | [TestMethod] method DeclareTypesInNamespaces_CS_TopLevelStatements (line 39) | [TestMethod] method DeclareTypesInNamespaces_VB (line 46) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DefaultSectionShouldBeFirstOrLastTest.cs class DefaultSectionShouldBeFirstOrLastTest (line 22) | [TestClass] method DefaultSectionShouldBeFirstOrLast (line 27) | [TestMethod] method DefaultSectionShouldBeFirstOrLast_CSharp9 (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DelegateSubtractionTest.cs class DelegateSubtractionTest (line 22) | [TestClass] method DelegateSubtraction (line 27) | [TestMethod] method DelegateSubtraction_CS_Latest (line 31) | [TestMethod] method DelegateSubtraction_TopLevelStatements (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DisposableMemberInNonDisposableClassTest.cs class DisposableMemberInNonDisposableClassTest (line 22) | [TestClass] method DisposableMemberInNonDisposableClass (line 27) | [TestMethod] method DisposableMemberInNonDisposableClass_CSharp9 (line 33) | [TestMethod] method DisposableMemberInNonDisposableClass_IAsyncDisposable (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DisposableNotDisposedTest.cs class DisposableNotDisposedTest (line 22) | [TestClass] method DisposableNotDisposed (line 27) | [TestMethod] method DisposableNotDisposed_ILogger (line 33) | [TestMethod] method DisposableNotDisposed_TopLevelStatements (line 39) | [TestMethod] method DisposableNotDisposed_Latest (line 45) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DisposableReturnedFromUsingTest.cs class DisposableReturnedFromUsingTest (line 22) | [TestClass] method DisposableReturnedFromUsing (line 27) | [TestMethod] method DisposableReturnedFromUsing_TopLevelStatements (line 32) | [TestMethod] method DisposableReturnedFromUsing_Latest (line 38) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DisposableTypesNeedFinalizersTest.cs class DisposableTypesNeedFinalizersTest (line 22) | [TestClass] method DisposableTypesNeedFinalizers (line 27) | [TestMethod] method DisposableTypesNeedFinalizers_CSharp9 (line 31) | [TestMethod] method DisposableTypesNeedFinalizers_CSharp11 (line 35) | [TestMethod] method DisposableTypesNeedFinalizers_InvalidCode (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DisposeFromDisposeTest.cs class DisposeFromDisposeTest (line 23) | [TestClass] method DisposeFromDispose_CSharp7_2 (line 28) | [TestMethod] method DisposeFromDispose_CSharp8 (line 37) | [TestMethod] method DisposeFromDispose_CSharp9 (line 41) | [TestMethod] method DisposeFromDispose_CSharp10 (line 45) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DisposeNotImplementingDisposeTest.cs class DisposeNotImplementingDisposeTest (line 22) | [TestClass] method DisposeNotImplementingDispose (line 27) | [TestMethod] method DisposeNotImplementingDispose_TopLevelStatements (line 31) | [TestMethod] method DisposeNotImplementingDispose_Latest (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotCallAssemblyGetExecutingAssemblyTest.cs class DoNotCallAssemblyGetExecutingAssemblyTest (line 22) | [TestClass] method DoNotCallAssemblyGetExecutingAssembly (line 27) | [TestMethod] method DoNotCallAssemblyGetExecutingAssembly_CSharp9 (line 32) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotCallAssemblyLoadInvalidMethodsTest.cs class DoNotCallAssemblyLoadInvalidMethodsTest (line 22) | [TestClass] method DoNotCallAssemblyLoadInvalidMethods (line 27) | [TestMethod] method DoNotCallAssemblyLoadInvalidMethods_CSharp9 (line 33) | [TestMethod] method DoNotCallAssemblyLoadInvalidMethods_EvidenceParameter (line 43) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotCallExitMethodsTest.cs class DoNotCallExitMethodsTest (line 22) | [TestClass] method DoNotCallExitMethods (line 27) | [TestMethod] method DoNotCallExitMethods_CSharp9 (line 33) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotCallGCCollectMethodTest.cs class DoNotCallGCCollectMethodTest (line 22) | [TestClass] method DoNotCallGCCollectMethod (line 27) | [TestMethod] method DoNotCallGCCollectMethod_Latest (line 32) | [TestMethod] method DoNotCallGCCollectMethod_AD0001 (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotCallGCSuppressFinalizeTest.cs class DoNotCallGCSuppressFinalizeTest (line 22) | [TestClass] method DoNotCallGCSuppressFinalize (line 27) | [TestMethod] method DoNotCallGCSuppressFinalize_NetCore (line 34) | [TestMethod] method DoNotCallGCSuppressFinalize_Net5 (line 40) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotCatchNullReferenceExceptionTest.cs class DoNotCatchNullReferenceExceptionTest (line 22) | [TestClass] method DoNotCatchNullReferenceException (line 27) | [TestMethod] method DoNotCatchNullReferenceException_CSharp9 (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotCatchSystemExceptionTest.cs class DoNotCatchSystemExceptionTest (line 22) | [TestClass] method DoNotCatchSystemException (line 27) | [TestMethod] method DoNotCatchSystemException_CSharp9 (line 31) | [TestMethod] method DoNotCatchSystemException_CSharp10 (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotCheckZeroSizeCollectionTest.cs class DoNotCheckZeroSizeCollectionTest (line 23) | [TestClass] method DoNotCheckZeroSizeCollection_CS (line 29) | [TestMethod] method DoNotCheckZeroSizeCollection_CS_Latest (line 33) | [TestMethod] method DoNotCheckZeroSizeCollection_VB (line 40) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotCopyArraysInPropertiesTest.cs class DoNotCopyArraysInPropertiesTest (line 22) | [TestClass] method DoNotCopyArraysInProperties (line 27) | [TestMethod] method DoNotCopyArraysInProperties_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotDecreaseMemberVisibilityTest.cs class DoNotDecreaseMemberVisibilityTest (line 22) | [TestClass] method DoNotDecreaseMemberVisibility (line 27) | [TestMethod] method DoNotDecreaseMemberVisibility_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotExposeListTTest.cs class DoNotExposeListTTest (line 22) | [TestClass] method DoNotExposeListT (line 27) | [TestMethod] method DoNotExposeListT_Latest (line 33) | [TestMethod] method DoNotExposeListT_InvalidCode (line 40) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotHardcodeCredentialsTest.cs class DoNotHardcodeCredentialsTest (line 24) | [TestClass] method DoNotHardcodeCredentials_CS_DefaultValues (line 34) | [TestMethod] method DoNotHardcodeCredentials_CS_SecureString (line 38) | [TestMethod] method DoNotHardcodeCredentials_VB_SecureString (line 42) | [TestMethod] method DoNotHardcodeCredentials_CS_DefaultValues_Latest (line 46) | [TestMethod] method DoNotHardcodeCredentials_CS_CustomValues (line 50) | [TestMethod] method DoNotHardcodeCredentials_CS_CustomValues_CaseInsensitive (line 54) | [TestMethod] method DoNotHardcodeCredentials_CS_WebConfig (line 58) | [TestMethod] method DoNotHardcodeCredentials_CS_LaunchSettings (line 62) | [TestMethod] method DoNotHardcodeCredentials_CS_AppSettings (line 66) | [TestMethod] method DoNotHardcodeCredentials_VB_DefaultValues (line 70) | [TestMethod] method DoNotHardcodeCredentials_VB_CustomValues (line 74) | [TestMethod] method DoNotHardcodeCredentials_VB_CustomValues_CaseInsensitive (line 78) | [TestMethod] method DoNotHardcodeCredentials_VB_WebConfig (line 82) | [TestMethod] method DoNotHardcodeCredentials_VB_LaunchSettings (line 86) | [TestMethod] method DoNotHardcodeCredentials_VB_AppSettings (line 90) | [TestMethod] method DoNotHardcodeCredentials_ConfiguredCredentialsAreRead (line 94) | [TestMethod] method CreateVerifierCS (line 104) | private static VerifierBuilder CreateVerifierCS(string credentialWords... method CreateVerifierVB (line 110) | private static VerifierBuilder CreateVerifierVB(string credentialWords... method DoNotHardcodeCredentials_ExternalFiles (line 116) | private void DoNotHardcodeCredentials_ExternalFiles(DiagnosticAnalyzer... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotHardcodeSecretsTest.cs class DoNotHardcodeSecretsTest (line 24) | [TestClass] method DoNotHardcodeSecrets_DefaultValues_CS (line 32) | [TestMethod] method DoNotHardcodeSecrets_DefaultValues_CS_Latest (line 36) | [TestMethod] method DoNotHardcodeSecrets_DefaultValues_VB (line 40) | [TestMethod] method DoNotHardcodeSecrets_WebConfig_CS (line 44) | [TestMethod] method DoNotHardcodeSecrets_WebConfig_VB (line 48) | [TestMethod] method DoNotHardcodeSecrets_AppSettings_CS (line 52) | [TestMethod] method DoNotHardcodeSecrets_AppSettings_VB (line 56) | [TestMethod] method DoNotHardcodeSecrets_LaunchSettings_CS (line 60) | [TestMethod] method DoNotHardcodeSecrets_LaunchSettings_VB (line 64) | [TestMethod] method DoNotHardcodeCredentials_ExternalFiles (line 68) | private void DoNotHardcodeCredentials_ExternalFiles(VerifierBuilder bu... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotHideBaseClassMethodsTest.cs class DoNotHideBaseClassMethodsTest (line 22) | [TestClass] method DoNotHideBaseClassMethods (line 27) | [TestMethod] method DoNotHideBaseClassMethods_CS_Latest (line 33) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotInstantiateSharedClassesTest.cs class DoNotInstantiateSharedClassesTest (line 23) | [TestClass] method DoNotInstantiateSharedClasses_CS (line 29) | [TestMethod] method DoNotInstantiateSharedClasses_CS_InTest (line 33) | [TestMethod] method DoNotInstantiateSharedClasses_VB (line 39) | [TestMethod] method DoNotInstantiateSharedClasses_VB_InTest (line 43) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotLockOnSharedResourceTest.cs class DoNotLockOnSharedResourceTest (line 23) | [TestClass] method DoNotLockOnSharedResource_CS (line 29) | [TestMethod] method DoNotLockOnSharedResource_VB (line 33) | [TestMethod] method DoNotLockOnSharedResource_CS_Latest (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotLockWeakIdentityObjectsTest.cs class DoNotLockWeakIdentityObjectsTest (line 23) | [TestClass] method DoNotLockWeakIdentityObjects_CS (line 28) | [TestMethod] method DoNotLockWeakIdentityObjects_Latest (line 32) | [TestMethod] method DoNotLockWeakIdentityObjects_VB (line 38) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotMarkEnumsWithFlagsTest.cs class DoNotMarkEnumsWithFlagsTest (line 22) | [TestClass] method DoNotMarkEnumsWithFlags (line 27) | [TestMethod] method DoNotMarkEnumsWithFlags_InvalidEnumType (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotNestTernaryOperatorsTest.cs class DoNotNestTernaryOperatorsTest (line 23) | [TestClass] method DoNotNestTernaryOperators_CS (line 29) | [TestMethod] method DoNotNestTernaryOperators_VB (line 33) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotNestTypesInArgumentsTest.cs class DoNotNestTypesInArgumentsTest (line 22) | [TestClass] method DoNotNestTypesInArguments_CS (line 25) | [TestMethod] method DoNotNestTypesInArguments_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotOverloadOperatorEqualTest.cs class DoNotOverloadOperatorEqualTest (line 22) | [TestClass] method DoNotOverloadOperatorEqual (line 27) | [TestMethod] method DoNotOverloadOperatorEqual_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotOverwriteCollectionElementsTest.cs class DoNotOverwriteCollectionElementsTest (line 23) | [TestClass] method DoNotOverwriteCollectionElements_CS (line 29) | [TestMethod] method DoNotOverwriteCollectionElements_VB (line 33) | [TestMethod] method DoNotOverwriteCollectionElements_CS_Latest (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotShiftByZeroOrIntSizeTest.cs class DoNotShiftByZeroOrIntSizeTest (line 22) | [TestClass] method DoNotShiftByZeroOrIntSize (line 29) | [TestMethod] method DoNotShiftByZeroOrIntSize_CSharp9 (line 33) | [TestMethod] method DoNotShiftByZeroOrIntSize_CSharp10 (line 39) | [TestMethod] method DoNotShiftByZeroOrIntSize_CSharp11 (line 45) | [TestMethod] method DoNotShiftByZeroOrIntSize_RazorFile_CorrectMessage (line 51) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotTestThisWithIsOperatorTest.cs class DoNotTestThisWithIsOperatorTest (line 22) | [TestClass] method DoNotTestThisWithIsOperator (line 27) | [TestMethod] method DoNotTestThisWithIsOperator_CSharp9 (line 31) | [TestMethod] method DoNotTestThisWithIsOperator_CSharp10 (line 37) | [TestMethod] method DoNotTestThisWithIsOperator_CSharp11 (line 43) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotThrowFromDestructorsTest.cs class DoNotThrowFromDestructorsTest (line 23) | [TestClass] method DoNotThrowFromDestructors_CS (line 28) | [TestMethod] method DoNotThrowFromDestructors_CS_CSharp9 (line 32) | [TestMethod] method DoNotThrowFromDestructors_VB (line 38) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotUseByValTest.cs class DoNotUseByValTest (line 22) | [TestClass] method DoNotUseByVal (line 27) | [TestMethod] method DoNotUseByValCodeFix (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotUseCollectionInItsOwnMethodCallsTest.cs class DoNotUseCollectionInItsOwnMethodCallsTest (line 22) | [TestClass] method DoNotUseCollectionInItsOwnMethodCalls (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotUseDateTimeNowTest.cs class DoNotUseDateTimeNowTest (line 23) | [TestClass] method DoNotUseDateTimeNow_CS (line 26) | [TestMethod] method DoNotUseDateTimeNow_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotUseIIfTest.cs class DoNotUseIIfTest (line 22) | [TestClass] method DoNotUseIif (line 27) | [TestMethod] method DoNotUseIif_CodeFix (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotUseLiteralBoolInAssertionsTest.cs class DoNotUseLiteralBoolInAssertionsTest (line 25) | [TestClass] method DoNotUseLiteralBoolInAssertions_MsTest (line 30) | [TestMethod] method DoNotUseLiteralBoolInAssertions_NUnit (line 39) | [TestMethod] method DoNotUseLiteralBoolInAssertions_NUnit4 (line 47) | [TestMethod] method DoNotUseLiteralBoolInAssertions_Xunit (line 53) | [TestMethod] method DoNotUseLiteralBoolInAssertions_XunitV3 (line 61) | [TestMethod] method DoNotUseLiteralBoolInAssertions_NUnit4_AliasedNamespace (line 72) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotUseOutRefParametersTest.cs class DoNotUseOutRefParametersTest (line 22) | [TestClass] method DoNotUseOutRefParameters (line 27) | [TestMethod] method DoNotUseOutRefParameters_CSharp9 (line 31) | [TestMethod] method DoNotUseOutRefParameters_CSharp11 (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DoNotWriteToStandardOutputTest.cs class DoNotWriteToStandardOutputTest (line 22) | [TestClass] method DoNotWriteToStandardOutput (line 27) | [TestMethod] method DoNotWriteToStandardOutput_ConditionalDirectives1 (line 31) | [TestMethod] method DoNotWriteToStandardOutput_ConditionalDirectives2 (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DontMixIncrementOrDecrementWithOtherOperatorsTest.cs class DontMixIncrementOrDecrementWithOtherOperatorsTest (line 22) | [TestClass] method DontMixIncrementOrDecrementWithOtherOperators (line 27) | [TestMethod] method DontMixIncrementOrDecrementWithOtherOperators_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DontUseTraceSwitchLevelsTest.cs class DontUseTraceSwitchLevelsTest (line 22) | [TestClass] method DontUseTraceSwitchLevels_CS (line 27) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/DontUseTraceWriteTest.cs class DontUseTraceWriteTest (line 22) | [TestClass] method DontUseTraceWrite_CS (line 27) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EmptyMethodTest.cs class EmptyMethodTest (line 23) | [TestClass] method EmptyMethod (line 29) | [TestMethod] method EmptyMethod_CSharp9 (line 36) | [TestMethod] method EmptyMethod_CSharp9_CodeFix_Throw (line 43) | [TestMethod] method EmptyMethod_CSharp9_CodeFix_Comment (line 52) | [TestMethod] method EmptyMethod_CS_Latest (line 61) | [TestMethod] method EmptyMethod_CodeFix_Throw (line 67) | [TestMethod] method EmptyMethod_CodeFix_Comment (line 75) | [TestMethod] method EmptyMethod_WithoutClosingBracket_CodeFix_Comment (line 83) | [TestMethod] method EmptyMethod_VB (line 91) | [TestMethod] method EmptyMethod_WithVirtualOverride_RaisesIssueForMainProject_CS (line 95) | [TestMethod] method EmptyMethod_WithVirtualOverride_DoesNotRaiseIssuesForTestProject_CS (line 99) | [TestMethod] method EmptyMethod_WithVirtualOverride_RaisesIssueForMainProject_VB (line 103) | [TestMethod] method EmptyMethod_WithVirtualOverride_DoesNotRaiseIssuesForTestProject_VB (line 107) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EmptyNamespaceTest.cs class EmptyNamespaceTest (line 22) | [TestClass] method EmptyNamespace (line 27) | [TestMethod] method EmptyNamespace_CSharp10 (line 31) | [TestMethod] method EmptyNamespace_CSharp10_CodeFix (line 38) | [TestMethod] method EmptyNamespace_CodeFix (line 47) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EmptyNestedBlockTest.cs class EmptyNestedBlockTest (line 23) | [TestClass] method EmptyNestedBlock_CS (line 28) | [TestMethod] method EmptyNestedBlock_CS_Latest (line 34) | [TestMethod] method EmptyNestedBlock_VB (line 40) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EmptyStatementTest.cs class EmptyStatementTest (line 22) | [TestClass] method EmptyStatement (line 28) | [TestMethod] method EmptyStatement_CS_TopLevelStatements (line 32) | [TestMethod] method EmptyStatement_CS_Latest (line 38) | [TestMethod] method EmptyStatement_CodeFix (line 44) | [TestMethod] method EmptyStatement_CodeFix_CS_TopLevelStatements (line 50) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EncryptionAlgorithmsShouldBeSecureTest.cs class EncryptionAlgorithmsShouldBeSecureTest (line 23) | [TestClass] method EncryptionAlgorithmsShouldBeSecure_CS (line 29) | [TestMethod] method EncryptionAlgorithmsShouldBeSecure_CS_NetStandard21 (line 33) | [TestMethod] method EncryptionAlgorithmsShouldBeSecure_VB (line 37) | [TestMethod] method EncryptionAlgorithmsShouldBeSecure_VB_NetStandard21 (line 41) | [TestMethod] method EncryptionAlgorithmsShouldBeSecure_VB_NetStandard21_Net7 (line 49) | [TestMethod] method EncryptionAlgorithmsShouldBeSecure_VB_NetStandard21_Net48 (line 58) | [TestMethod] method GetAdditionalReferences (line 67) | private static IEnumerable GetAdditionalReferences(... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EndStatementUsageTest.cs class EndStatementUsageTest (line 22) | [TestClass] method EndStatementUsage (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EnumNameHasEnumSuffixTest.cs class EnumNameHasEnumSuffixTest (line 23) | [TestClass] method EnumNameHasEnumSuffix_CS (line 26) | [TestMethod] method EnumNameHasEnumSuffix_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EnumNameShouldFollowRegexTest.cs class EnumNameShouldFollowRegexTest (line 23) | [TestClass] method EnumNameShouldFollowRegex_CS (line 26) | [TestMethod] method EnumNameShouldFollowRegex_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EnumStorageNeedsToBeInt32Test.cs class EnumStorageNeedsToBeInt32Test (line 22) | [TestClass] method EnumStorageNeedsToBeInt32 (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EnumerableSumInUncheckedTest.cs class EnumerableSumInUncheckedTest (line 22) | [TestClass] method EnumerableSumInUnchecked (line 27) | [TestMethod] method EnumerableSumInUnchecked_CSharp9 (line 31) | [TestMethod] method EnumerableSumInUnchecked_CSharp11 (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EnumerationValueNameTest.cs class EnumerationValueNameTest (line 22) | [TestClass] method EnumerationValueName (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EnumsShouldNotBeNamedReservedTest.cs class EnumsShouldNotBeNamedReservedTest (line 22) | [TestClass] method EnumsShouldNotBeNamedReserved (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EqualityOnFloatingPointTest.cs class EqualityOnFloatingPointTest (line 22) | [TestClass] method EqualityOnFloatingPoint (line 27) | [TestMethod] method EqualityOnFloatingPoint_CSharp11 (line 33) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EqualityOnModulusTest.cs class EqualityOnModulusTest (line 22) | [TestClass] method EqualityOnModulus (line 27) | [TestMethod] method EqualityOnModulus_CSharp9 (line 31) | [TestMethod] method EqualityOnModulus_CSharp11 (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EquatableClassShouldBeSealedTest.cs class EquatableClassShouldBeSealedTest (line 22) | [TestClass] method EquatableClassShouldBeSealed (line 27) | [TestMethod] method EquatableClassShouldBeSealed_CSharp9 (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EscapeLambdaParameterTypeNamedScopedTest.cs class EscapeLambdaParameterTypeNamedScopedTest (line 23) | [TestClass] method EscapeLambdaParameterTypeNamedScoped_TopLevelStatements_CSharp11_13 (line 28) | [TestMethod] method EscapeLambdaParameterTypeNamedScoped_CSharp11_13 (line 35) | [TestMethod] method EscapeLambdaParameterTypeNamedScoped_TopLevelStatements_Latest (line 41) | [TestMethod] method EscapeLambdaParameterTypeNamedScoped_Latest (line 48) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EventHandlerDelegateShouldHaveProperArgumentsTest.cs class EventHandlerDelegateShouldHaveProperArgumentsTest (line 22) | [TestClass] method EventHandlerDelegateShouldHaveProperArguments (line 27) | [TestMethod] method EventHandlerDelegateShouldHaveProperArguments_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EventHandlerNameTest.cs class EventHandlerNameTest (line 22) | [TestClass] method EventHandlerName (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EventNameContainsBeforeOrAfterTest.cs class EventNameContainsBeforeOrAfterTest (line 22) | [TestClass] method EventNameContainsBeforeOrAfter (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/EventNameTest.cs class EventNameTest (line 22) | [TestClass] method EventName (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ExceptionRethrowTest.cs class ExceptionRethrowTest (line 22) | [TestClass] method ExceptionRethrow (line 27) | [TestMethod] method ExceptionRethrow_CodeFix (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ExceptionShouldNotBeThrownFromUnexpectedMethodsTest.cs class ExceptionShouldNotBeThrownFromUnexpectedMethodsTest (line 22) | [TestClass] method ExceptionShouldNotBeThrownFromUnexpectedMethods (line 27) | [TestMethod] method ExceptionShouldNotBeThrownFromUnexpectedMethods_Latest (line 33) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ExceptionsNeedStandardConstructorsTest.cs class ExceptionsNeedStandardConstructorsTest (line 22) | [TestClass] method ExceptionsNeedStandardConstructors (line 27) | [TestMethod] method ExceptionsNeedStandardConstructors_InvalidCode (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ExceptionsShouldBeLoggedOrThrownTest.cs class ExceptionsShouldBeLoggedOrThrownTest (line 22) | [TestClass] method ExceptionsShouldBeLoggedOrThrown_CS (line 27) | [TestMethod] method ExceptionsShouldBeLoggedOrThrown_Coalesce_CS (line 34) | [TestMethod] method ExceptionsShouldBeLoggedOrThrown_Log4net_CS (line 58) | [TestMethod] method ExceptionsShouldBeLoggedOrThrown_NLog_CS (line 87) | [TestMethod] method ExceptionsShouldBeLoggedOrThrown_CastleCore_CS (line 115) | [TestMethod] method ExceptionsShouldBeLoggedOrThrown_CommonLogging_CS (line 138) | [TestMethod] method ExceptionsShouldBeLoggedOrThrown_Serilog_CS (line 161) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ExceptionsShouldBeLoggedTest.cs class ExceptionsShouldBeLoggedTest (line 22) | [TestClass] method ExceptionsShouldBeLogged_CS (line 30) | [TestMethod] method ExceptionsShouldBeLogged_MicrosoftExtensionsLogging_NonCompliant_CS (line 37) | [TestMethod] method ExceptionsShouldBeLogged_CastleCore_CS (line 88) | [TestMethod] method ExceptionsShouldBeLogged_CommonLoggingCore_CS (line 126) | [TestMethod] method ExceptionsShouldBeLogged_Log4net_CS (line 168) | [TestMethod] method ExceptionsShouldBeLogged_NLog_CS (line 208) | [TestMethod] method ExceptionsShouldBeLogged_NLog_ILoggerBase_CS (line 254) | [TestMethod] method ExceptionsShouldBeLogged_NLog_Conditional_CS (line 287) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ExceptionsShouldBePublicTest.cs class ExceptionsShouldBePublicTest (line 23) | [TestClass] method ExceptionsShouldBePublic_CS (line 26) | [TestMethod] method ExceptionsShouldBePublic_VB (line 32) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ExceptionsShouldBeUsedTest.cs class ExceptionsShouldBeUsedTest (line 22) | [TestClass] method ExceptionsShouldBeUsed (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ExcludeFromCodeCoverageAttributesNeedJustificationTest.cs class ExcludeFromCodeCoverageAttributesNeedJustificationTest (line 23) | [TestClass] method ExcludeFromCodeCoverageAttributesNeedJustification_OnAssembly_CS (line 32) | [TestMethod] method ExcludeFromCodeCoverageAttributesNeedJustification_OnAssembly_VB (line 36) | [TestMethod] method ExcludeFromCodeCoverageAttributesNeedJustification_CS (line 40) | [TestMethod] method ExcludeFromCodeCoverageAttributesNeedJustification_CSharp9 (line 44) | [TestMethod] method ExcludeFromCodeCoverageAttributesNeedJustification_CSharp10 (line 48) | [TestMethod] method ExcludeFromCodeCoverageAttributesNeedJustification_VB (line 52) | [TestMethod] method ExcludeFromCodeCoverageAttributesNeedJustification_IgnoredForNet48 (line 58) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ExitStatementUsageTest.cs class ExitStatementUsageTest (line 22) | [TestClass] method ExitStatementUsage (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ExpectedExceptionAttributeShouldNotBeUsedTest.cs class ExpectedExceptionAttributeShouldNotBeUsedTest (line 24) | [TestClass] method ExpectedExceptionAttributeShouldNotBeUsed_MsTest_CS (line 30) | [TestMethod] method ExpectedExceptionAttributeShouldNotBeUsed_NUnit_CS (line 39) | [TestMethod] method ExpectedExceptionAttributeShouldNotBeUsed_NUnit_NoIssue_CS (line 47) | [TestMethod] method ExpectedExceptionAttributeShouldNotBeUsed_MsTest_VB (line 57) | [TestMethod] method ExpectedExceptionAttributeShouldNotBeUsed_NUnit_VB (line 65) | [TestMethod] method ExpectedExceptionAttributeShouldNotBeUsed_NUnit_NoIssue_VB (line 73) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ExpressionComplexityTest.cs class ExpressionComplexityTest (line 23) | [TestClass] method ExpressionComplexity_CSharp8 (line 28) | [TestMethod] method ExpressionComplexity_TransparentComparissionOperators (line 34) | [TestMethod] method ExpressionComplexity_TransparentBinaryOperators (line 54) | [TestMethod] method ExpressionComplexity_CSharp9 (line 85) | [TestMethod] method ExpressionComplexity_CSharp10 (line 91) | [TestMethod] method ExpressionComplexity_CSharp11 (line 98) | [TestMethod] method ExpressionComplexity_VB (line 105) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ExtensionMethodShouldBeInSeparateNamespaceTest.cs class ExtensionMethodShouldBeInSeparateNamespaceTest (line 22) | [TestClass] method ExtensionMethodShouldBeInSeparateNamespace (line 27) | [TestMethod] method ExtensionMethodShouldBeInSeparateNamespace_CSharp9 (line 33) | [TestMethod] method ExtensionMethodShouldBeInSeparateNamespace_CSharp10 (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ExtensionMethodShouldNotExtendObjectTest.cs class ExtensionMethodShouldNotExtendObjectTest (line 23) | [TestClass] method ExtensionMethodShouldNotExtendObject_CS (line 26) | [TestMethod] method ExtensionMethodShouldNotExtendObject_VB (line 32) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/FieldShadowsParentFieldTest.cs class FieldShadowsParentFieldTest (line 23) | [TestClass] method FieldShadowsParentField_CS (line 29) | [TestMethod] method FieldShadowsParentField_VB (line 33) | [TestMethod] method FieldShadowsParentField_DoesNotRaiseIssuesForTestProject_CS (line 37) | [TestMethod] method FieldShadowsParentField_DoesNotRaiseIssuesForTestProject_VB (line 43) | [TestMethod] method FieldShadowsParentField_CSharp9 (line 49) | [TestMethod] method FieldsShouldNotDifferByCapitalization_CShar9 (line 55) | [TestMethod] method FieldsShouldNotDifferByCapitalization_CS (line 61) | [TestMethod] method FieldsShouldNotDifferByCapitalization_VB (line 69) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/FieldShouldBeReadonlyTest.cs class FieldShouldBeReadonlyTest (line 22) | [TestClass] method FieldShouldBeReadonly (line 27) | [TestMethod] method FieldShouldBeReadonly_Latest (line 31) | [TestMethod] method FieldShouldBeReadonly_CodeFix (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/FieldShouldNotBePublicTest.cs class FieldShouldNotBePublicTest (line 23) | [TestClass] method FieldShouldNotBePublic_CS (line 29) | [TestMethod] method FieldShouldNotBePublic_CS_CSharp9 (line 33) | [TestMethod] method FieldShouldNotBePublic_VB (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/FieldsShouldBeEncapsulatedInPropertiesTest.cs class FieldsShouldBeEncapsulatedInPropertiesTest (line 22) | [TestClass] method FieldsShouldBeEncapsulatedInProperties (line 27) | [TestMethod] method FieldsShouldBeEncapsulatedInProperties_Unity3D_Ignored (line 31) | [TestMethod] method FieldsShouldBeEncapsulatedInProperties_CSharp9 (line 38) | [TestMethod] method FieldsShouldBeEncapsulatedInProperties_CSharp12 (line 44) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/FileLinesTest.cs class FileLinesTest (line 23) | [TestClass] method FileLines_CS (line 26) | [TestMethod] method FileLines_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/FileShouldEndWithEmptyNewLineTest.cs class FileShouldEndWithEmptyNewLineTest (line 22) | [TestClass] method FileShouldEndWithEmptyNewLine (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/FinalizerShouldNotBeEmptyTest.cs class FinalizerShouldNotBeEmptyTest (line 22) | [TestClass] method FinalizerShouldNotBeEmpty (line 27) | [TestMethod] method FinalizerShouldNotBeEmpty_CSharp9 (line 31) | [TestMethod] method FinalizerShouldNotBeEmpty_InvalidCode (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/FindInsteadOfFirstOrDefaultTest.cs class FindInsteadOfFirstOrDefaultTest (line 23) | [TestClass] method FindInsteadOfFirstOrDefault_CS (line 29) | [TestMethod] method GetReferencesEntityFrameworkNetCore (line 33) | internal static IEnumerable GetReferencesEntityFram... method FindInsteadOfFirstOrDefault_Immutable_CS (line 40) | [TestMethod] method FindInsteadOfFirstOrDefault_Net_CS (line 44) | [TestMethod] method FindInsteadOfFirstOrDefault_Net_VB (line 48) | [TestMethod] method FindInsteadOfFirstOrDefault_Array_CS (line 54) | [TestMethod] method FindInsteadOfFirstOrDefault_VB (line 58) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/FlagsEnumWithoutInitializerTest.cs class FlagsEnumWithoutInitializerTest (line 23) | [TestClass] method FlagsEnumWithoutInitializer_CS (line 26) | [TestMethod] method FlagsEnumWithoutInitializer_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/FlagsEnumZeroMemberTest.cs class FlagsEnumZeroMemberTest (line 23) | [TestClass] method FlagsEnumZeroMember_CS (line 26) | [TestMethod] method FlagsEnumZeroMember_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ForLoopConditionAlwaysFalseTest.cs class ForLoopConditionAlwaysFalseTest (line 22) | [TestClass] method ForLoopConditionAlwaysFalse (line 27) | [TestMethod] method ForLoopConditionAlwaysFalse_CSharp9 (line 31) | [TestMethod] method ForLoopConditionAlwaysFalse_CSharp11 (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ForLoopCounterChangedTest.cs class ForLoopCounterChangedTest (line 22) | [TestClass] method ForLoopCounterChanged (line 27) | [TestMethod] method ForLoopCounterChanged_CS_Latest (line 31) | [TestMethod] method ForLoopCounterChanged_VariableUsage (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ForLoopCounterConditionTest.cs class ForLoopCounterConditionTest (line 22) | [TestClass] method ForLoopCounterCondition (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ForLoopIncrementSignTest.cs class ForLoopIncrementSignTest (line 22) | [TestClass] method ForLoopIncrementSign (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ForeachLoopExplicitConversionTest.cs class ForeachLoopExplicitConversionTest (line 22) | [TestClass] method ForeachLoopExplicitConversion (line 27) | [TestMethod] method ForeachLoopExplicitConversion_CodeFix (line 31) | [TestMethod] method ForeachLoopExplicitConversion_CS_Latest (line 38) | [TestMethod] method ForeachLoopExplicitConversion_CS_Latest_CodeFix (line 45) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/FrameworkTypeNamingTest.cs class FrameworkTypeNamingTest (line 22) | [TestClass] method FrameworkTypeNaming (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/FunctionComplexityTest.cs class FunctionComplexityTest (line 23) | [TestClass] method FunctionComplexity_CS (line 26) | [TestMethod] method FunctionComplexity_CS_Latest (line 30) | [TestMethod] method FunctionComplexity_InsufficientExecutionStack_CS (line 34) | [TestMethod] method FunctionComplexity_VB (line 43) | [TestMethod] method CreateCSBuilder (line 49) | private static VerifierBuilder CreateCSBuilder(int maxComplexityScore) => FILE: analyzers/tests/SonarAnalyzer.Test/Rules/FunctionNameTest.cs class FunctionNameTest (line 22) | [TestClass] method FunctionName (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/FunctionNestingDepthTest.cs class FunctionNestingDepthTest (line 23) | [TestClass] method FunctionNestingDepth_CS (line 28) | [TestMethod] method FunctionNestingDepth_CS_CSharp9 (line 32) | [TestMethod] method FunctionNestingDepth_VB (line 38) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/GenericInheritanceShouldNotBeRecursiveTest.cs class GenericInheritanceShouldNotBeRecursiveTest (line 23) | [TestClass] method GenericInheritanceShouldNotBeRecursive_CS (line 29) | [TestMethod] method GenericInheritanceShouldNotBeRecursive_CSharp9 (line 33) | [TestMethod] method GenericInheritanceShouldNotBeRecursive_VB (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/GenericLoggerInjectionShouldMatchEnclosingTypeTest.cs class GenericLoggerInjectionShouldMatchEnclosingTypeTest (line 22) | [TestClass] method GenericLoggerInjectionShouldMatchEnclosingTypeTest_CS (line 27) | [TestMethod] method GenericLoggerInjectionShouldMatchEnclosingTypeTest_CS_Latest (line 33) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/GenericReadonlyFieldPropertyAssignmentTest.cs class GenericReadonlyFieldPropertyAssignmentTest (line 22) | [TestClass] method GenericReadonlyFieldPropertyAssignment (line 28) | [TestMethod] method GenericReadonlyFieldPropertyAssignment_CS_Latest (line 32) | [TestMethod] method GenericReadonlyFieldPropertyAssignment_CS_Latest_CodeFix_Remove_Statement (line 36) | [TestMethod] method GenericReadonlyFieldPropertyAssignment_CodeFix_Remove_Statement (line 44) | [TestMethod] method GenericReadonlyFieldPropertyAssignment_CodeFix_Add_Generic_Type_Constraint (line 51) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/GenericTypeParameterEmptinessCheckingTest.cs class GenericTypeParameterEmptinessCheckingTest (line 22) | [TestClass] method GenericTypeParameterEmptinessChecking (line 27) | [TestMethod] method GenericTypeParameterEmptinessChecking_CS_Latest (line 31) | [TestMethod] method GenericTypeParameterEmptinessChecking_CodeFix (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/GenericTypeParameterInOutTest.cs class GenericTypeParameterInOutTest (line 22) | [TestClass] method GenericTypeParameterInOut (line 27) | [TestMethod] method GenericTypeParameterInOut_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/GenericTypeParameterUnusedTest.cs class GenericTypeParameterUnusedTest (line 22) | [TestClass] method GenericTypeParameterUnused (line 27) | [TestMethod] method GenericTypeParameterUnused_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/GenericTypeParametersRequiredTest.cs class GenericTypeParametersRequiredTest (line 22) | [TestClass] method GenericTypeParametersRequired (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/GetHashCodeEqualsOverrideTest.cs class GetHashCodeEqualsOverrideTest (line 22) | [TestClass] method GetHashCodeEqualsOverride (line 27) | [TestMethod] method GetHashCodeEqualsOverride_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/GetHashCodeMutableTest.cs class GetHashCodeMutableTest (line 22) | [TestClass] method GetHashCodeMutable (line 27) | [TestMethod] method GetHashCodeMutable_CS_Latest (line 31) | [TestMethod] method GetHashCodeMutable_CodeFix (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/GetTypeWithIsAssignableFromTest.cs class GetTypeWithIsAssignableFromTest (line 22) | [TestClass] method GetTypeWithIsAssignableFrom (line 27) | [TestMethod] method GetTypeWithIsAssignableFrom_CS_Latest (line 31) | [TestMethod] method GetTypeWithIsAssignableFrom_CS_Latest_CodeFix (line 38) | [TestMethod] method GetTypeWithIsAssignableFrom_CodeFix (line 47) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/GotoStatementTest.cs class GotoStatementTest (line 23) | [TestClass] method GotoStatement_CS (line 26) | [TestMethod] method GotoStatement_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/GuardConditionOnEqualsOverrideTest.cs class GuardConditionOnEqualsOverrideTest (line 22) | [TestClass] method GuardConditionOnEqualsOverride (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/ClearTextProtocolsAreSensitiveTest.cs class ClearTextProtocolsAreSensitiveTest (line 22) | [TestClass] method ClearTextProtocolsAreSensitive (line 34) | [TestMethod] method ClearTextProtocolsAreSensitive_NetFx (line 43) | [TestMethod] method ClearTextProtocolsAreSensitive_CS_Latest (line 51) | [TestMethod] method ClearTextProtocolsAreSensitive_CS_TopLevelStatements (line 58) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/CommandPathTest.cs class CommandPathTest (line 23) | [TestClass] method CommandPath_CS (line 34) | [TestMethod] method CommandPath_CS_Latest (line 38) | [TestMethod] method CommandPath_VB (line 44) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/ConfiguringLoggersTest.cs class ConfiguringLoggersTest (line 23) | [TestClass] method ConfiguringLoggers_Log4Net_CS (line 29) | [TestMethod] method ConfiguringLoggers_Log4Net_VB (line 35) | [TestMethod] method ConfiguringLoggers_NLog_CS (line 41) | [TestMethod] method ConfiguringLoggers_NLog_VB (line 47) | [TestMethod] method ConfiguringLoggers_Serilog_CS (line 53) | [TestMethod] method ConfiguringLoggers_Serilog_VB (line 59) | [TestMethod] method ConfiguringLoggers_AspNetCore2_CS (line 66) | [TestMethod] method ConfiguringLoggers_AspNetCoreLatest_CS (line 73) | [TestMethod] method ConfiguringLoggers_AspNetCore_VB (line 79) | [TestMethod] method AspNetCoreLoggingReferences (line 110) | private static IEnumerable AspNetCoreLoggingReferen... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/CookieShouldBeHttpOnlyTest.cs class CookieShouldBeHttpOnlyTest (line 23) | [TestClass] method CookieShouldBeHttpOnly_Nancy (line 34) | [TestMethod] method CookieShouldBeHttpOnly_Latest (line 38) | [TestMethod] method CookieShouldBeHttpOnly_TopLevelStatements (line 46) | [TestMethod] method CookieShouldBeHttpOnly (line 55) | [TestMethod] method CookieShouldBeHttpOnly_WithWebConfigValueSetToTrue (line 59) | [TestMethod] method CookieShouldBeHttpOnly_WithWebConfigValueSetToFalse (line 69) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/CookieShouldBeSecureTest.cs class CookieShouldBeSecureTest (line 23) | [TestClass] method CookieShouldBeSecure_Nancy (line 34) | [TestMethod] method CookieShouldBeSecure_Latest (line 38) | [TestMethod] method CookieShouldBeSecure_TopLevelStatements (line 46) | [TestMethod] method CookieShouldBeSecure_NetFx (line 55) | [TestMethod] method CookieShouldBeSecure_WithWebConfigValueSetToTrue (line 62) | [TestMethod] method CookieShouldBeSecure_WithWebConfigValueSetToFalse (line 75) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/CreatingHashAlgorithmsTest.cs class CreatingHashAlgorithmsTest (line 23) | [TestClass] method CreatingHashAlgorithms_CS (line 34) | [TestMethod] method CreatingHashAlgorithms_CS_Latest (line 38) | [TestMethod] method CreatingHashAlgorithms_CS_NetFx (line 42) | [TestMethod] method CreatingHashAlgorithms_VB (line 46) | [TestMethod] method CreatingHashAlgorithms_VB_NET (line 50) | [TestMethod] method CreatingHashAlgorithms_VB_NetFx (line 54) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/DeliveringDebugFeaturesInProductionTest.cs class DeliveringDebugFeaturesInProductionTest (line 23) | [TestClass] method DeliveringDebugFeaturesInProduction_NetCore2_CS (line 29) | [TestMethod] method DeliveringDebugFeaturesInProduction_NetCore2_VB (line 35) | [TestMethod] method DeliveringDebugFeaturesInProduction_NetCore3_CS (line 43) | [TestMethod] method DeliveringDebugFeaturesInProduction_NetCore3_VB (line 49) | [TestMethod] method DeliveringDebugFeaturesInProduction_Net7_CS (line 55) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/DisablingCsrfProtectionTest.cs class DisablingCsrfProtectionTest (line 24) | [TestClass] method DisablingCsrfProtection_Latest (line 31) | [TestMethod] method AdditionalReferences (line 37) | internal static IEnumerable AdditionalReferences() => FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/DisablingRequestValidationTest.cs class DisablingRequestValidationTest (line 25) | [TestClass] method DisablingRequestValidation_CS (line 33) | [TestMethod] method DisablingRequestValidation_CS_Disabled (line 39) | [TestMethod] method DisablingRequestValidation_CS_NoIssuesInTestCode (line 45) | [TestMethod] method DisablingRequestValidation_CS_WebConfig (line 52) | [TestMethod] method DisablingRequestValidation_CS_CorruptAndNonExistingWebConfigs (line 62) | [TestMethod] method DisablingRequestValidation_CS_WebConfig_SubFolders (line 72) | [TestMethod] method DisablingRequestValidation_CS_WebConfig_LowerCase (line 96) | [TestMethod] method DisablingRequestValidation_CS_WebConfig_Transformation (line 104) | [TestMethod] method DisablingRequestValidation_VB (line 111) | [TestMethod] method DisablingRequestValidation_VB_Disabled (line 118) | [TestMethod] method DisablingRequestValidation_VB_WebConfig (line 124) | [TestMethod] method CreateBuilderCS (line 136) | private static VerifierBuilder CreateBuilderCS(IAnalyzerConfiguration ... method CreateBuilderVB (line 142) | private static VerifierBuilder CreateBuilderVB(IAnalyzerConfiguration ... method VerifyAdditionalFiles (line 148) | private void VerifyAdditionalFiles(bool expectIssues, string additiona... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/DoNotUseRandomTest.cs class DoNotUseRandomTest (line 22) | [TestClass] method DoNotUseRandom (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/ExecutingSqlQueriesTest.cs class ExecutingSqlQueriesTest (line 23) | [TestClass] method ExecutingSqlQueries_CS_Dapper (line 29) | [TestMethod] method ExecutingSqlQueries_CS_MySqlData (line 37) | [TestMethod] method ExecutingSqlQueries_CS_EF6 (line 47) | [TestMethod] method ExecutingSqlQueries_OrmLite_CS_810 (line 53) | [TestMethod] method ExecutingSqlQueries_OrmLite_CS (line 62) | [TestMethod] method ExecutingSqlQueries_NHibernate_CS (line 71) | [TestMethod] method ExecutingSqlQueries_CS_AzureCosmos (line 78) | [TestMethod] method ExecutingSqlQueries_CS_MicrosoftDataSqlClient (line 85) | [TestMethod] method ExecutingSqlQueries_CS_OracleManagedDataAccess (line 94) | [TestMethod] method ExecutingSqlQueries_CS_EntityFrameworkCore2 (line 103) | [TestMethod] method ExecutingSqlQueries_CS_EntityFrameworkCore7 (line 111) | [TestMethod] method ExecutingSqlQueries_CS_Latest (line 119) | [TestMethod] method ExecutingSqlQueries_VB_EntityFrameworkCore2 (line 127) | [TestMethod] method ExecutingSqlQueries_VB_EntityFrameworkCore7 (line 135) | [TestMethod] method ExecutingSqlQueries_CS_Net46 (line 145) | [TestMethod] method ExecutingSqlQueries_VB_Net46 (line 152) | [TestMethod] method ExecutingSqlQueries_MonoSqlLite_Net46_CS (line 160) | [TestMethod] method ExecutingSqlQueries_MonoSqlLite_Net46_VB (line 168) | [TestMethod] method ReferencesNet46 (line 177) | internal static IEnumerable ReferencesNet46(string ... method ReferencesEntityFrameworkNetCore (line 187) | internal static IEnumerable ReferencesEntityFramewo... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/ExpandingArchivesTest.cs class ExpandingArchivesTest (line 23) | [TestClass] method ExpandingArchives_CS (line 28) | [TestMethod] method ExpandingArchives_CS_Latest (line 35) | [TestMethod] method ExpandingArchives_VB (line 43) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/HardcodedIpAddressTest.cs class HardcodedIpAddressTest (line 23) | [TestClass] method HardcodedIpAddress_CS (line 29) | [TestMethod] method HardcodedIpAddress_CS_Latest (line 33) | [TestMethod] method HardcodedIpAddress_VB (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/InsecureDeserializationTest.cs class InsecureDeserializationTest (line 22) | [TestClass] method InsecureDeserialization (line 27) | [TestMethod] method InsecureDeserialization_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/PermissiveCorsTest.cs class PermissiveCorsTest (line 22) | [TestClass] method PermissiveCors_Latest (line 46) | [TestMethod] method PermissiveCors_AspNet_WebApi (line 62) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/PubliclyWritableDirectoriesTest.cs class PubliclyWritableDirectoriesTest (line 23) | [TestClass] method PubliclyWritableDirectories_CS (line 29) | [TestMethod] method PubliclyWritableDirectories_CS_Latest (line 33) | [TestMethod] method PubliclyWritableDirectories_VB (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/RequestsWithExcessiveLengthTest.cs class RequestsWithExcessiveLengthTest (line 24) | [TestClass] method RequestsWithExcessiveLength_CS (line 39) | [TestMethod] method RequestsWithExcessiveLength_CS_CustomValues (line 43) | [TestMethod] method RequestsWithExcessiveLength_CSharp_Latest (line 51) | [TestMethod] method RequestsWithExcessiveLength_CSharp_Latest_Params (line 60) | [TestMethod] method RequestsWithExcessiveLength_VB (line 87) | [TestMethod] method RequestsWithExcessiveLength_VB_CustomValues (line 91) | [TestMethod] method RequestsWithExcessiveLength_CS_WebConfig (line 99) | [TestMethod] method RequestsWithExcessiveLength_CS_WebConfig_CustomParameterValue (line 130) | [TestMethod] method RequestsWithExcessiveLength_CS_CorruptAndNonExistingWebConfigs_ShouldNotFail (line 144) | [TestMethod] method GetAdditionalReferences (line 158) | internal static IEnumerable GetAdditionalReferences... method GetWebConfigPath (line 162) | private static string GetWebConfigPath(string rootFolder) => Path.Comb... method OpenReadStreamReferences (line 164) | private static IEnumerable OpenReadStreamReferences... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/UnsafeCodeBlocksTest.cs class UnsafeCodeBlocksTest (line 22) | [TestClass] method UnsafeCodeBlocks (line 27) | [TestMethod] method UnsafeRecord (line 31) | [TestMethod] method UnsafeRecordStruct (line 40) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Hotspots/UsingNonstandardCryptographyTest.cs class UsingNonstandardCryptographyTest (line 23) | [TestClass] method UsingNonstandardCryptography_CS (line 29) | [TestMethod] method UsingNonstandardCryptography_CSharp9 (line 33) | [TestMethod] method UsingNonstandardCryptography_CSharp10 (line 37) | [TestMethod] method UsingNonstandardCryptography_CSharp12 (line 41) | [TestMethod] method UsingNonstandardCryptography_VB (line 45) | [TestMethod] method CreateBuilder (line 49) | private static VerifierBuilder CreateBuilder() => FILE: analyzers/tests/SonarAnalyzer.Test/Rules/IdentifiersNamedExtensionShouldBeEscapedTest.cs class IdentifiersNamedExtensionShouldBeEscapedTest (line 23) | [TestClass] method IdentifiersNamedExtensionShouldBeEscaped_BeforeCSharp14 (line 28) | [TestMethod] method IdentifiersNamedExtensionShouldBeEscaped_Latest (line 34) | [TestMethod] method TypeDeclarations (line 43) | public static IEnumerable TypeDeclarations() => method IdentifiersNamedExtensionShouldBeEscaped_TypeDeclarations_CSharp10ToCSharp13 (line 56) | [TestMethod] method IdentifiersNamedExtensionShouldBeEscaped_TypeDeclarations_Latest (line 64) | [TestMethod] method IdentifiersNamedExtensionShouldBeEscaped_TypeDeclarations_Compliant_CSharp10ToCSharp13 (line 72) | [TestMethod] method IdentifiersNamedExtensionShouldBeEscaped_TypeDeclarations_Compliant_Latest (line 80) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/IdentifiersNamedFieldShouldBeEscapedTest.cs class IdentifiersNamedFieldShouldBeEscapedTest (line 23) | [TestClass] method IdentifiersNamedFieldShouldBeEscaped_CSharp9_13 (line 33) | [TestMethod] method IdentifiersNamedFieldShouldBeEscaped_Latest (line 37) | [TestMethod] method IdentifiersNamedFieldShouldBeEscaped_BeforeCSharp14 (line 43) | [TestMethod] method CS9273LocalDeclarationForms (line 53) | public static IEnumerable CS9273LocalDeclarationForms() => method NonCS9273LocalDeclarationForms (line 80) | public static IEnumerable NonCS9273LocalDeclarationForms() => method IdentifiersNamedFieldShouldBeEscaped_CS9273LocalDeclarationForms_CSharp9_13 (line 88) | [TestMethod] method IdentifiersNamedFieldShouldBeEscaped_CS9273LocalDeclarationForms_Latest (line 96) | [TestMethod] method IdentifiersNamedFieldShouldBeEscaped_NonCS9273LocalDeclarationForms_CSharp9_13 (line 104) | [TestMethod] method IdentifiersNamedFieldShouldBeEscaped_NonCS9273LocalDeclarationForms_Latest (line 114) | [TestMethod] method WrapInAccessor (line 119) | private static string WrapInAccessor(string statement) => FILE: analyzers/tests/SonarAnalyzer.Test/Rules/IfChainWithoutElseTest.cs class IfChainWithoutElseTest (line 23) | [TestClass] method IfChainWithoutElse_CS (line 26) | [TestMethod] method IfChainWithoutElse_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/IfCollapsibleTest.cs class IfCollapsibleTest (line 23) | [TestClass] method IfCollapsible_CS (line 26) | [TestMethod] method IfCollapsible_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ImplementIDisposableCorrectlyTest.cs class ImplementIDisposableCorrectlyTest (line 22) | [TestClass] method ImplementIDisposableCorrectly (line 27) | [TestMethod] method ImplementIDisposableCorrectly_CS_Latest (line 31) | [TestMethod] method ImplementIDisposableCorrectly_AbstractClass (line 35) | [TestMethod] method ImplementIDisposableCorrectly_PartialClassesInDifferentFiles (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ImplementISerializableCorrectlyTest.cs class ImplementISerializableCorrectlyTest (line 22) | [TestClass] method ImplementISerializableCorrectly (line 27) | [TestMethod] method ImplementISerializableCorrectly_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ImplementSerializationMethodsCorrectlyTest.cs class ImplementSerializationMethodsCorrectlyTest (line 23) | [TestClass] method ImplementSerializationMethodsCorrectly_CS (line 29) | [TestMethod] method ImplementSerializationMethodsCorrectly_CS_Latest (line 33) | [TestMethod] method ImplementSerializationMethodsCorrectly_CS_InvalidCode (line 40) | [TestMethod] method ImplementSerializationMethodsCorrectly_VB (line 57) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/IndentSingleLineFollowingConditionalTest.cs class IndentSingleLineFollowingConditionalTest (line 22) | [TestClass] method IndentSingleLineFollowingConditional (line 29) | [TestMethod] method IndentSingleLineFollowingConditional_CS_Latest (line 33) | [TestMethod] method IndentSingleLineFollowingConditional_RazorFile_CorrectMessage (line 40) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/IndexOfCheckAgainstZeroTest.cs class IndexOfCheckAgainstZeroTest (line 23) | [TestClass] method IndexOfCheckAgainstZero_CS (line 28) | [TestMethod] method IndexOfCheckAgainstZero_CS_Latest (line 32) | [TestMethod] method IndexOfCheckAgainstZero_VB (line 36) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/IndexedPropertyWithMultipleParametersTest.cs class IndexedPropertyWithMultipleParametersTest (line 22) | [TestClass] method IndexedPropertyWithMultipleParameters (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/InfiniteRecursionTest.cs class InfiniteRecursionTest (line 23) | [TestClass] method InfiniteRecursion_SonarCfg (line 33) | [TestMethod] method InfiniteRecursion_RoslynCfg (line 39) | [TestMethod] method InfiniteRecursion_RoslynCfg_Latest (line 44) | [TestMethod] method InfiniteRecursion_RoslynCfg_8977 (line 51) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/InheritedCollidingInterfaceMembersTest.cs class InheritedCollidingInterfaceMembersTest (line 22) | [TestClass] method InheritedCollidingInterfaceMembers (line 27) | [TestMethod] method InheritedCollidingInterfaceMembers_DifferentFileSizes (line 31) | [TestMethod] method InheritedCollidingInterfaceMembers_CS_Latest (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/InitializeStaticFieldsInlineTest.cs class InitializeStaticFieldsInlineTest (line 22) | [TestClass] method InitializeStaticFieldsInline (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/InsecureContentSecurityPolicyTest.cs class InsecureContentSecurityPolicyTest (line 24) | [TestClass] method InsecureContentSecurityPolicy_CS (line 33) | [TestMethod] method InsecureContentSecurityPolicy_CS_Latest (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/InsecureEncryptionAlgorithmTest.cs class InsecureEncryptionAlgorithmTest (line 23) | [TestClass] method InsecureEncryptionAlgorithm_MainProject_CS (line 29) | [TestMethod] method InsecureEncryptionAlgorithm_DoesNotRaiseIssuesForTestProject_CS (line 33) | [TestMethod] method InsecureEncryptionAlgorithm_CS_Latest (line 37) | [TestMethod] method InsecureEncryptionAlgorithm_VB (line 41) | [TestMethod] method InsecureEncryptionAlgorithm_VB_Latest (line 45) | [TestMethod] method AdditionalReferences (line 49) | private static IEnumerable AdditionalReferences() => FILE: analyzers/tests/SonarAnalyzer.Test/Rules/InsecureTemporaryFilesCreationTest.cs class InsecureTemporaryFilesCreationTest (line 23) | [TestClass] method InsecureTemporaryFilesCreation_CS (line 28) | [TestMethod] method InsecureTemporaryFilesCreation_CS_Latest (line 32) | [TestMethod] method InsecureTemporaryFilesCreation_VB (line 36) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/InsteadOfAnyTest.cs class InsteadOfAnyTest (line 23) | [TestClass] method InsteadOfAny_CS (line 29) | [TestMethod] method InsteadOfAny_CS_Latest (line 33) | [TestMethod] method InsteadOfAny_CS_EntityFramework (line 41) | [TestMethod] method InsteadOfAny_CS_EntityFramework_NetFx (line 50) | [TestMethod] method ExistsInsteadOfAny_VB (line 58) | [TestMethod] method InsteadOfAny_VB_EntityFramework (line 62) | [TestMethod] method ReferencesEntityFrameworkNetCore (line 68) | private static IEnumerable ReferencesEntityFramewor... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/InterfaceMethodsShouldBeCallableByChildTypesTest.cs class InterfaceMethodsShouldBeCallableByChildTypesTest (line 22) | [TestClass] method InterfaceMethodsShouldBeCallableByChildTypes (line 27) | [TestMethod] method InterfaceMethodsShouldBeCallableByChildTypes_CSharp9 (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/InterfaceNameTest.cs class InterfaceNameTest (line 22) | [TestClass] method InterfaceName (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/InterfacesShouldNotBeEmptyTest.cs class InterfacesShouldNotBeEmptyTest (line 22) | [TestClass] method InterfacesShouldNotBeEmpty (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/InvalidCastToInterfaceTest.cs class InvalidCastToInterfaceTest (line 23) | [TestClass] method InvalidCastToInterface_CS (line 31) | [TestMethod] method InvalidCastToInterface_VB (line 40) | [TestMethod] method InvalidCastToInterface_CS_Latest (line 44) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/InvocationResolvesToOverrideWithParamsTest.cs class InvocationResolvesToOverrideWithParamsTest (line 22) | [TestClass] method InvocationResolvesToOverrideWithParams (line 27) | [TestMethod] method InvocationResolvesToOverrideWithParams_TopLevelStatements (line 51) | [TestMethod] method InvocationResolvesToOverrideWithParams_CS_Latest (line 55) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/IssueSuppressionTest.cs class IssueSuppressionTest (line 22) | [TestClass] method IssueSuppression (line 27) | [TestMethod] method IssueSuppression_CSharp9 (line 31) | [TestMethod] method IssueSuppression_CSharp10 (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/JSInvokableMethodsShouldBePublicTest.cs class JSInvokableMethodsShouldBePublicTest (line 22) | [TestClass] method JSInvokableMethodsShouldBePublic_CS (line 29) | [TestMethod] method JSInvokableMethodsShouldBePublic_Razor (line 33) | [TestMethod] method JSInvokableMethodsShouldBePublic_CS_Latest (line 41) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/JwtSignedTest.cs class JwtSignedTest (line 23) | [TestClass] method JwtSigned_CS (line 29) | [TestMethod] method JwtSigned_JWTDecoderExtensions_CS (line 35) | [TestMethod] method JwtSigned_CS_Latest (line 41) | [TestMethod] method JwtSigned_VB (line 49) | [TestMethod] method JwtSigned_JWTDecoderExtensions_VB (line 55) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LdapConnectionShouldBeSecureTest.cs class LdapConnectionShouldBeSecureTest (line 22) | [TestClass] method LdapConnectionsShouldBeSecure (line 27) | [TestMethod] method LdapConnectionsShouldBeSecure_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LineContinuationTest.cs class LineContinuationTest (line 22) | [TestClass] method LineContinuation (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LineLengthTest.cs class LineLengthTest (line 23) | [TestClass] method LineLength_CS (line 26) | [TestMethod] method LineLength_VB (line 32) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LinkedListPropertiesInsteadOfMethodsTest.cs class LinkedListPropertiesInsteadOfMethodsTest (line 23) | [TestClass] method LinkedListPropertiesInsteadOfMethods_CS (line 28) | [TestMethod] method LinkedListPropertiesInsteadOfMethods_CS_CodeFix (line 32) | [TestMethod] method LinkedListPropertiesInsteadOfMethods_TopLevelStatements (line 39) | [TestMethod] method LinkedListPropertiesInsteadOfMethods_VB (line 60) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LiteralSuffixUpperCaseTest.cs class LiteralSuffixUpperCaseTest (line 22) | [TestClass] method LiteralSuffixUpperCase (line 28) | [TestMethod] method LiteralSuffixUpperCase_CodeFix (line 32) | [TestMethod] method LiteralSuffixUpperCase_CS_Latest (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LiteralsShouldNotBePassedAsLocalizedParametersTest.cs class LiteralsShouldNotBePassedAsLocalizedParametersTest (line 22) | [TestClass] method LiteralsShouldNotBePassedAsLocalizedParameters (line 27) | [TestMethod] method LiteralsShouldNotBePassedAsLocalizedParameters_CSharp9 (line 31) | [TestMethod] method LiteralsShouldNotBePassedAsLocalizedParameters_CSharp10 (line 35) | [TestMethod] method LiteralsShouldNotBePassedAsLocalizedParameters_CSharp11 (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LocalVariableNameTest.cs class LocalVariableNameTest (line 22) | [TestClass] method LocalVariableName (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LockedFieldShouldBeReadonlyTest.cs class LockedFieldShouldBeReadonlyTest (line 22) | [TestClass] method LockedFieldShouldBeReadonly_CS (line 27) | [TestMethod] method LockedFieldShouldBeReadonly_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LoggerFieldsShouldBePrivateStaticReadonlyTest.cs class LoggerFieldsShouldBePrivateStaticReadonlyTest (line 22) | [TestClass] method LoggerFieldsShouldBePrivateStaticReadonly_MicrosoftExtensionsLogging_CS (line 27) | [TestMethod] method LoggerFieldsShouldBePrivateStaticReadonly_CSharp8 (line 34) | [TestMethod] method LoggerFieldsShouldBePrivateStaticReadonly_Serilog_CS (line 57) | [TestMethod] method LoggerFieldsShouldBePrivateStaticReadonly_NLog_CS (line 73) | [TestMethod] method LoggerFieldsShouldBePrivateStaticReadonly_log4net_CS (line 94) | [TestMethod] method LoggerFieldsShouldBePrivateStaticReadonly_CastleCore_CS (line 120) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LoggerMembersNamesShouldComplyTest.cs class LoggerMembersNamesShouldComplyTest (line 22) | [TestClass] method LoggerMembersNamesShouldComply_Compliant_CS (line 27) | [TestMethod] method LoggerMembersNamesShouldComply_MicrosoftExtensionsLogging_CS (line 55) | [TestMethod] method LoggerMembersNamesShouldComply_Serilog_CS (line 77) | [TestMethod] method LoggerMembersNamesShouldComply_NLog_CS (line 100) | [TestMethod] method LoggerMembersNamesShouldComply_log4net_CS (line 125) | [TestMethod] method LoggerMembersNamesShouldComply_CastleCore_CS (line 156) | [TestMethod] method LoggerMembersNamesShouldComply_Parameterized_CS (line 178) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LoggersShouldBeNamedForEnclosingTypeTest.cs class LoggersShouldBeNamedForEnclosingTypeTest (line 22) | [TestClass] method LoggersShouldBeNamedForEnclosingType_CS (line 27) | [TestMethod] method LoggersShouldBeNamedForEnclosingType_TopLevelStatements_CS (line 34) | [TestMethod] method LoggersShouldBeNamedForEnclosingType_NLog_CS (line 52) | [TestMethod] method LoggersShouldBeNamedForEnclosingType_Log4net_CS (line 59) | [TestMethod] method LoggersShouldBeNamedForEnclosingType_NLogLatest_CS (line 93) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LoggingArgumentsShouldBePassedCorrectlyTest.cs class LoggingArgumentsShouldBePassedCorrectlyTest (line 22) | [TestClass] method LoggingArgumentsShouldBePassedCorrectly_CS (line 27) | [TestMethod] method LoggingArgumentsShouldBePassedCorrectly_MicrosoftExtensionsLogging_NonCompliant_CS (line 31) | [TestMethod] method LoggingArgumentsShouldBePassedCorrectly_MicrosoftExtensionsLogging_Log_CS (line 80) | [TestMethod] method LoggingArgumentsShouldBePassedCorrectly_CastleCore_CS (line 116) | [TestMethod] method LoggingArgumentsShouldBePassedCorrectly_NLog_CS (line 149) | [TestMethod] method LoggingArgumentsShouldBePassedCorrectly_NLog_ConditionalExtensions_CS (line 202) | [TestMethod] method LoggingArgumentsShouldBePassedCorrectly_Serilog_CS (line 246) | [TestMethod] method LoggingArgumentsShouldBePassedCorrectly_Serilog_Write_CS (line 285) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LoggingTemplatePlaceHoldersShouldBeInOrderTest.cs class LoggingTemplatePlaceHoldersShouldBeInOrderTest (line 23) | [TestClass] method LoggingTemplatePlaceHoldersShouldBeInOrder_CS (line 28) | [TestMethod] method LoggingTemplatePlaceHoldersShouldBeInOrder_MicrosoftExtensionsLogging_CS (line 34) | [TestMethod] method LoggingTemplatePlaceHoldersShouldBeInOrder_Serilog_CS (line 58) | [TestMethod] method LoggingTemplatePlaceHoldersShouldBeInOrder_NLog_CS (line 82) | [TestMethod] method LoggingTemplatePlaceHoldersShouldBeInOrder_FakeLoggerWithSameName (line 117) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LoopsAndLinqTest.cs class LoopsAndLinqTest (line 22) | [TestClass] method LoopsAndLinq_CS (line 27) | [TestMethod] method LoopsAndLinq_CS_Latest (line 33) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LooseFilePermissionsTest.cs class LooseFilePermissionsTest (line 23) | [TestClass] method LooseFilePermissions_Windows_CS (line 29) | [TestMethod] method LooseFilePermissions_Windows_VB (line 33) | [TestMethod] method LooseFilePermissions_Windows_CSharp9 (line 37) | [TestMethod] method LooseFilePermissions_Windows_CSharp10 (line 43) | [TestMethod] method LooseFilePermissions_Windows_CSharp11 (line 50) | [TestMethod] method LooseFilePermissions_Windows_CSharp12 (line 57) | [TestMethod] method LooseFilePermissions_Unix_CS (line 63) | [TestMethod] method LooseFilePermissions_Unix_VB (line 69) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/LossOfFractionInDivisionTest.cs class LossOfFractionInDivisionTest (line 22) | [TestClass] method LossOfFractionInDivision (line 27) | [TestMethod] method LossOfFractionInDivision_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MagicNumberShouldNotBeUsedTest.cs class MagicNumberShouldNotBeUsedTest (line 22) | [TestClass] method MagicNumberShouldNotBeUsed (line 27) | [TestMethod] method MagicNumberShouldNotBeUsed_CSharp11 (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MarkAssemblyWithAssemblyVersionAttributeTest.cs class MarkAssemblyWithAssemblyVersionAttributeTest (line 23) | [TestClass] method MarkAssemblyWithAssemblyVersionAttribute_CS (line 29) | [TestMethod] method MarkAssemblyWithAssemblyVersionAttributeRazor_CS (line 33) | [TestMethod] method MarkAssemblyWithAssemblyVersionAttribute_CS_Concurrent (line 41) | [TestMethod] method MarkAssemblyWithAssemblyVersionAttributeNoncompliant_CS (line 49) | [TestMethod] method MarkAssemblyWithAssemblyVersionAttributeNoncompliant_NoTargets_ShouldNotRaise_CS (line 55) | [TestMethod] method MarkAssemblyWithAssemblyVersionAttribute_VB (line 63) | [TestMethod] method MarkAssemblyWithAssemblyVersionAttributeRazor_VB (line 67) | [TestMethod] method MarkAssemblyWithAssemblyVersionAttribute_VB_Concurrent (line 75) | [TestMethod] method MarkAssemblyWithAssemblyVersionAttributeNoncompliant_VB (line 83) | [TestMethod] method MarkAssemblyWithAssemblyVersionAttributeNoncompliant_NoTargets_ShouldNotRaise_VB (line 89) | [TestMethod] method GetAspNetCoreRazorReferences (line 97) | private static IEnumerable GetAspNetCoreRazorRefere... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MarkAssemblyWithAttributeUsageAttributeTest.cs class MarkAssemblyWithAttributeUsageAttributeTest (line 22) | [TestClass] method RequireAttributeUsageAttribute (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MarkAssemblyWithClsCompliantAttributeTest.cs class MarkAssemblyWithClsCompliantAttributeTest (line 23) | [TestClass] method MarkAssemblyWithClsCompliantAttribute_CS (line 29) | [TestMethod] method MarkAssemblyWithClsCompliantAttribute_VB (line 33) | [TestMethod] method MarkAssemblyWithClsCompliantAttributeNoncompliant_CS (line 37) | [TestMethod] method MarkAssemblyWithClsCompliantAttributeNoncompliant_VB (line 41) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MarkAssemblyWithComVisibleAttributeTest.cs class MarkAssemblyWithComVisibleAttributeTest (line 23) | [TestClass] method MarkAssemblyWithComVisibleAttribute_CS (line 29) | [TestMethod] method MarkAssemblyWithComVisibleAttribute_VB (line 33) | [TestMethod] method MarkAssemblyWithComVisibleAttributeNoncompliant_CS (line 37) | [TestMethod] method MarkAssemblyWithComVisibleAttributeNoncompliant_VB (line 41) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MarkAssemblyWithNeutralResourcesLanguageAttributeTest.cs class MarkAssemblyWithNeutralResourcesLanguageAttributeTest (line 22) | [TestClass] method MarkAssemblyWithNeutralResourcesLanguageAttribute_HasResx_HasAttribute_Compliant (line 27) | [TestMethod] method MarkAssemblyWithNeutralResourcesLanguageAttribute_NoResx_HasAttribute_Compliant (line 31) | [TestMethod] method MarkAssemblyWithNeutralResourcesLanguageAttribute_HasResx_HasInvalidAttribute_Noncompliant (line 35) | [TestMethod] method MarkAssemblyWithNeutralResourcesLanguageAttribute_HasResx_NoAttribute_Noncompliant (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MarkWindowsFormsMainWithStaThreadTest.cs class MarkWindowsFormsMainWithStaThreadTest (line 23) | [TestClass] method MarkWindowsFormsMainWithStaThread_CS (line 29) | [TestMethod] method MarkWindowsFormsMainWithStaThread_VB (line 37) | [TestMethod] method MarkWindowsFormsMainWithStaThread_ClassLibrary_CS (line 45) | [TestMethod] method MarkWindowsFormsMainWithStaThread_ClassLibrary_VB (line 54) | [TestMethod] method MarkWindowsFormsMainWithStaThread_CS_NoWindowsForms (line 62) | [TestMethod] method MarkWindowsFormsMainWithStaThread_VB_NoWindowsForms (line 69) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MemberInitializedToDefaultTest.cs class MemberInitializedToDefaultTest (line 22) | [TestClass] method MemberInitializedToDefault (line 27) | [TestMethod] method MemberInitializedToDefault_CodeFix (line 31) | [TestMethod] method MemberInitializedToDefault_CSharp8 (line 39) | [TestMethod] method MemberInitializedToDefault_CSharp9 (line 43) | [TestMethod] method MemberInitializedToDefault_CSharp10 (line 47) | [TestMethod] method MemberInitializedToDefault_CSharp11 (line 51) | [TestMethod] method MemberInitializedToDefault_CSharp11_CodeFix (line 55) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MemberInitializerRedundantTest.cs class MemberInitializerRedundantTest (line 22) | [TestClass] method MemberInitializerRedundant_RoslynCfg (line 28) | [TestMethod] method MemberInitializerRedundant_RoslynCfg_FlowCaptureOperationNotSupported (line 32) | [TestMethod] method MemberInitializerRedundant_SonarCfg (line 36) | [TestMethod] method MemberInitializerRedundant_CodeFix (line 40) | [TestMethod] method MemberInitializerRedundant_CS_Latest (line 48) | [TestMethod] method MemberInitializerRedundant_CS_Latest_CodeFix (line 52) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MemberOverrideCallsBaseMemberTest.cs class MemberOverrideCallsBaseMemberTest (line 22) | [TestClass] method MemberOverrideCallsBaseMember (line 27) | [TestMethod] method MemberOverrideCallsBaseMember_Latest (line 31) | [TestMethod] method MemberOverrideCallsBaseMember_Latest_CodeFix (line 35) | [TestMethod] method MemberOverrideCallsBaseMember_CodeFix (line 43) | [TestMethod] method MemberOverrideCallsBaseMember_ToString (line 50) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MemberShadowsOuterStaticMemberTest.cs class MemberShadowsOuterStaticMemberTest (line 22) | [TestClass] method MemberShadowsOuterStaticMember (line 27) | [TestMethod] method MemberShadowsOuterStaticMember_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MemberShouldBeStaticTest.cs class MemberShouldBeStaticTest (line 22) | [TestClass] method MemberShouldBeStatic (line 27) | [TestMethod] method MemberShouldBeStatic_WinForms (line 39) | [TestMethod] method MemberShouldBeStatic_Xaml (line 43) | [TestMethod] method MemberShouldBeStatic_Latest (line 47) | [TestMethod] method MemberShouldBeStatic_HttpApplication (line 55) | [TestMethod] method MemberShouldBeStatic_InvalidCode (line 67) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MemberShouldNotHaveConflictingTransparencyAttributesTest.cs class MemberShouldNotHaveConflictingTransparencyAttributesTest (line 22) | [TestClass] method MemberShouldNotHaveConflictingTransparencyAttributes (line 27) | [TestMethod] method MemberShouldNotHaveConflictingTransparencyAttributes_AssemblyLevel (line 31) | [TestMethod] method MemberShouldNotHaveConflictingTransparencyAttributes_CS_Latest (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MessageTemplatesShouldBeCorrectTest.cs class MessageTemplatesShouldBeCorrectTest (line 22) | [TestClass] method MessageTemplatesShouldBeCorrect_CS (line 27) | [TestMethod] method MessageTemplatesShouldBeCorrect_MicrosoftExtensionsLogging_CS (line 34) | [TestMethod] method MessageTemplatesShouldBeCorrect_Serilog_CS (line 63) | [TestMethod] method MessageTemplatesShouldBeCorrect_NLog_CS (line 93) | [TestMethod] method MessageTemplatesShouldBeCorrect_NLog_ConditionalExtensions_CS (line 125) | [TestMethod] method MessageTemplatesShouldBeCorrect_Latest (line 148) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MethodOverloadOptionalParameterTest.cs class MethodOverloadOptionalParameterTest (line 22) | [TestClass] method MethodOverloadOptionalParameter (line 29) | [TestMethod] method MethodOverloadOptionalParameter_CS_Latest (line 33) | [TestMethod] method MethodOverloadOptionalParameter_Razor (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MethodOverloadsShouldBeGroupedTest.cs class MethodOverloadsShouldBeGroupedTest (line 23) | [TestClass] method MethodOverloadsShouldBeGrouped_CS (line 29) | [TestMethod] method MethodOverloadsShouldBeGrouped_CS_Latest (line 33) | [TestMethod] method MethodOverloadsShouldBeGrouped_VB (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MethodOverrideAddsParamsTest.cs class MethodOverrideAddsParamsTest (line 22) | [TestClass] method MethodOverrideAddsParams (line 27) | [TestMethod] method MethodOverrideAddsParams_CS_Latest (line 31) | [TestMethod] method MethodOverrideAddsParams_CodeFix (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MethodOverrideChangedDefaultValueTest.cs class MethodOverrideChangedDefaultValueTest (line 22) | [TestClass] method MethodOverrideChangedDefaultValue (line 27) | [TestMethod] method MethodOverrideChangedDefaultValue_CS_Latest (line 34) | [TestMethod] method MethodOverrideChangedDefaultValue_CS_Latest_CodeFix (line 40) | [TestMethod] method MethodOverrideChangedDefaultValue_CodeFix_Synchronize (line 48) | [TestMethod] method MethodOverrideChangedDefaultValue_CodeFix_Remove (line 56) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MethodOverrideNoParamsTest.cs class MethodOverrideNoParamsTest (line 22) | [TestClass] method MethodOverrideNoParams (line 27) | [TestMethod] method MethodOverrideNoParams_CS_Latest (line 31) | [TestMethod] method MethodOverrideNoParams_CodeFix (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MethodParameterMissingOptionalTest.cs class MethodParameterMissingOptionalTest (line 22) | [TestClass] method MethodParameterMissingOptional (line 27) | [TestMethod] method MethodParameterMissingOptional_TopLevelStatements (line 31) | [TestMethod] method MethodParameterMissingOptional_CS_Latest (line 35) | [TestMethod] method MethodParameterMissingOptional_CodeFix (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MethodParameterUnusedTest.cs class MethodParameterUnusedTest (line 23) | [TestClass] method MethodParameterUnused_CS_SonarCfg (line 29) | [TestMethod] method MethodParameterUnused_CS_RoslynCfg (line 33) | [TestMethod] method MethodParameterUnused_CodeFix_CS (line 37) | [TestMethod] method MethodParameterUnused_DoubleCompilation_CS (line 44) | [TestMethod] method MethodParameterUnused_VB (line 65) | [TestMethod] method MethodParameterUnused_CS_RoslynCfg_Latest (line 69) | [TestMethod] method MethodParameterUnused_GeneratedCode_CS (line 76) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MethodShouldBeNamedAccordingToSynchronicityTest.cs class MethodShouldBeNamedAccordingToSynchronicityTest (line 23) | [TestClass] method MethodShouldBeNamedAccordingToSynchronicity (line 28) | [TestMethod] method MethodShouldBeNamedAccordingToSynchronicity_MVC (line 38) | [TestMethod] method MethodShouldBeNamedAccordingToSynchronicity_MVC_Core (line 44) | [TestMethod] method MethodShouldBeNamedAccordingToSynchronicity_MsTest (line 54) | [TestMethod] method MethodShouldBeNamedAccordingToSynchronicity_NUnit (line 61) | [TestMethod] method MethodShouldBeNamedAccordingToSynchronicity_Xunit (line 67) | [TestMethod] method MethodShouldBeNamedAccordingToSynchronicity_CSharp8 (line 73) | [TestMethod] method MethodShouldBeNamedAccordingToSynchronicity_CSharp11 (line 77) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MethodShouldNotOnlyReturnConstantTest.cs class MethodShouldNotOnlyReturnConstantTest (line 22) | [TestClass] method MethodShouldNotOnlyReturnConstant (line 27) | [TestMethod] method MethodShouldNotOnlyReturnConstant_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MethodsShouldNotHaveIdenticalImplementationsTest.cs class MethodsShouldNotHaveIdenticalImplementationsTest (line 23) | [TestClass] method MethodsShouldNotHaveIdenticalImplementations (line 29) | [TestMethod] method MethodsShouldNotHaveIdenticalImplementations_MethodTypeParameters (line 33) | [TestMethod] method MethodsShouldNotHaveIdenticalImplementations_MethodTypeParameters_NonCompliant (line 69) | [TestMethod] method MethodsShouldNotHaveIdenticalImplementations_MethodTypeParameters_Dictionary_NonCompliant (line 94) | [TestMethod] method MethodsShouldNotHaveIdenticalImplementations_MethodTypeParameters_Dictionary_VB_NonCompliant (line 129) | [TestMethod] method MethodsShouldNotHaveIdenticalImplementations_MethodTypeParameters_Dictionary_Compliant (line 158) | [TestMethod] method MethodsShouldNotHaveIdenticalImplementations_MethodTypeParameters_Dictionary_VB_Compliant (line 191) | [TestMethod] method MethodsShouldNotHaveIdenticalImplementations_ClassTypeParameters_Dictionary_NonCompliant (line 216) | [TestMethod] method MethodsShouldNotHaveIdenticalImplementations_SelfTypes_NonCompliant (line 251) | [TestMethod] method MethodsShouldNotHaveIdenticalImplementations_TopLevelStatements (line 279) | [TestMethod] method MethodsShouldNotHaveIdenticalImplementations_CS_Latest (line 283) | [TestMethod] method MethodsShouldNotHaveIdenticalImplementations_VB (line 287) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MethodsShouldNotHaveTooManyLinesTest.cs class MethodsShouldNotHaveTooManyLinesTest (line 23) | [TestClass] method MethodsShouldNotHaveTooManyLines_DefaultValues_CS (line 26) | [TestMethod] method MethodsShouldNotHaveTooManyLines_CustomValues_CS (line 30) | [TestMethod] method MethodsShouldNotHaveTooManyLines_LocalFunctions (line 34) | [TestMethod] method MethodsShouldNotHaveTooManyLines_LocalFunctions_CSharp9 (line 38) | [TestMethod] method MethodsShouldNotHaveTooManyLines_CustomValues_CSharp9 (line 42) | [TestMethod] method MethodsShouldNotHaveTooManyLines_CustomValues_CSharp10 (line 46) | [TestMethod] method MethodsShouldNotHaveTooManyLines_CSharp9_NoUsing (line 50) | [TestMethod] method MethodsShouldNotHaveTooManyLines_CSharp9_Valid (line 66) | [TestMethod] method MethodsShouldNotHaveTooManyLines_DoesntReportInTest_CS (line 79) | [TestMethod] method MethodsShouldNotHaveTooManyLines_InvalidSyntax_CS (line 85) | [TestMethod] method MethodsShouldNotHaveTooManyLines_InvalidMaxThreshold_CS (line 99) | [TestMethod] method MethodsShouldNotHaveTooManyLines_DefaultValues_VB (line 111) | [TestMethod] method MethodsShouldNotHaveTooManyLines_CustomValues_VB (line 115) | [TestMethod] method MethodsShouldNotHaveTooManyLines_DoesntReportInTest_VB (line 121) | [TestMethod] method MethodsShouldNotHaveTooManyLines_InvalidMaxThreshold_VB (line 127) | [TestMethod] method CreateCSBuilder (line 139) | private static VerifierBuilder CreateCSBuilder(int maxLines) => FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MethodsShouldUseBaseTypesTest.cs class MethodsShouldUseBaseTypesTest (line 22) | [TestClass] method MethodsShouldUseBaseTypes_Internals (line 27) | [TestMethod] method MethodsShouldUseBaseTypes (line 64) | [TestMethod] method MethodsShouldUseBaseTypes_CSharp8 (line 70) | [TestMethod] method MethodsShouldUseBaseTypes_Controllers (line 74) | [TestMethod] method MethodsShouldUseBaseTypes_CSharp9 (line 79) | [TestMethod] method MethodsShouldUseBaseTypes_InvalidCode (line 83) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MultilineBlocksWithoutBraceTest.cs class MultilineBlocksWithoutBraceTest (line 22) | [TestClass] method MultilineBlocksWithoutBrace (line 27) | [TestMethod] method MultilineBlocksWithoutBrace_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MultipleVariableDeclarationTest.cs class MultipleVariableDeclarationTest (line 23) | [TestClass] method MultipleVariableDeclaration_CS (line 29) | [TestMethod] method MultipleVariableDeclaration_VB (line 33) | [TestMethod] method MultipleVariableDeclaration_CodeFix_CS_WrongIndentation (line 37) | [TestMethod] method MultipleVariableDeclaration_CodeFix_CS (line 44) | [TestMethod] method MultipleVariableDeclaration_CodeFix_VB (line 51) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MutableFieldsShouldNotBePublicReadonlyTest.cs class MutableFieldsShouldNotBePublicReadonlyTest (line 22) | [TestClass] method PublicMutableFieldsShouldNotBeReadonly (line 27) | [TestMethod] method PublicMutableFieldsShouldNotBeReadonly_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/MutableFieldsShouldNotBePublicStaticTest.cs class MutableFieldsShouldNotBePublicStaticTest (line 22) | [TestClass] method MutableFieldsShouldNotBePublicStatic (line 27) | [TestMethod] method MutableFieldsShouldNotBePublicStatic_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/NameOfShouldBeUsedTest.cs class NameOfShouldBeUsedTest (line 25) | [TestClass] method NameOfShouldBeUsed_CSharp6 (line 31) | [TestMethod] method NameOfShouldBeUsed_CSharp5 (line 35) | [TestMethod] method NameOfShouldBeUsed_CSharp11 (line 42) | [TestMethod] method NameOfShouldBeUsed_FromVB14 (line 46) | [TestMethod] method NameOfShouldBeUsed_VB12 (line 50) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/NamedPlaceholdersShouldBeUniqueTest.cs class NamedPlaceholdersShouldBeUniqueTest (line 23) | [TestClass] method NamedPlaceholdersShouldBeUnique_CS (line 35) | [TestMethod] method NamedPlaceholdersShouldBeUnique_MicrosoftExtensionsLogging_CS (line 39) | [TestMethod] method NamedPlaceholdersShouldBeUnique_Serilog_CS (line 73) | [TestMethod] method NamedPlaceholdersShouldBeUnique_Serilog_Derived_CS (line 104) | [TestMethod] method NamedPlaceholdersShouldBeUnique_NLog_CS (line 128) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/NamespaceNameTest.cs class NamespaceNameTest (line 22) | [TestClass] method NamespaceName (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/NativeMethodsShouldBeWrappedTest.cs class NativeMethodsShouldBeWrappedTest (line 23) | [TestClass] method NativeMethodsShouldBeWrapped (line 28) | [TestMethod] method NativeMethodsShouldBeWrapped_TopLevelStatements (line 32) | [TestMethod] method NativeMethodsShouldBeWrapped_CS_Latest (line 41) | [TestMethod] method NativeMethodsShouldBeWrapped_InvalidCode (line 50) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/NegatedIsExpressionTest.cs class NegatedIsExpressionTest (line 22) | [TestClass] method NegatedIsExpression (line 27) | [TestMethod] method NegatedIsExpression_CodeFix (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/NestedCodeBlockTest.cs class NestedCodeBlockTest (line 22) | [TestClass] method NestedCodeBlock (line 27) | [TestMethod] method NestedCodeBlock_TopLevelStatements (line 31) | [TestMethod] method NestedCodeBlock_CS_Latest (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/NoExceptionsInFinallyTest.cs class NoExceptionsInFinallyTest (line 23) | [TestClass] method NoExceptionsInFinally_CS (line 26) | [TestMethod] method NoExceptionsInFinally_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/NonAsyncTaskShouldNotReturnNullTest.cs class NonAsyncTaskShouldNotReturnNullTest (line 23) | [TestClass] method NonAsyncTaskShouldNotReturnNull_CS (line 28) | [TestMethod] method NonAsyncTaskShouldNotReturnNull__CS_Latest (line 32) | [TestMethod] method NonAsyncTaskShouldNotReturnNull_VB (line 40) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/NonDerivedPrivateClassesShouldBeSealedTest.cs class NonDerivedPrivateClassesShouldBeSealedTest (line 21) | [TestClass] method NonDerivedPrivateClassesShouldBeSealed_CS (line 26) | [TestMethod] method NonDerivedPrivateClassesShouldBeSealed_CS_Latest (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/NonFlagsEnumInBitwiseOperationTest.cs class NonFlagsEnumInBitwiseOperationTest (line 22) | [TestClass] method NonFlagsEnumInBitwiseOperation (line 27) | [TestMethod] method NonFlagsEnumInBitwiseOperation_CodeFix (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/NormalizeStringsToUppercaseTest.cs class NormalizeStringsToUppercaseTest (line 22) | [TestClass] method NormalizeStringsToUppercase (line 27) | [TestMethod] method NormalizeStringsToUppercase_CSharp11 (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/NotAssignedPrivateMemberTest.cs class NotAssignedPrivateMemberTest (line 23) | [TestClass] method NotAssignedPrivateMember (line 28) | [TestMethod] method NotAssignedPrivateMember_Latest (line 32) | [TestMethod] method NotAssignedPrivateMember_Razor (line 40) | [TestMethod] method NotAssignedPrivateMember_IndexingMovableFixedBuffer (line 44) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/NumberPatternShouldBeRegularTest.cs class NumberPatternShouldBeRegularTest (line 22) | [TestClass] method NumberPatternShouldBeRegular_BeforeCSharp7 (line 27) | [TestMethod] method NumberPatternShouldBeRegular_FromCSharp7 (line 31) | [TestMethod] method NumberPatternShouldBeRegular_FromCSharp9 (line 35) | [TestMethod] method HasIrregularPattern (line 39) | [TestMethod] method HasRegularPattern (line 57) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ObjectCreatedDroppedTest.cs class ObjectCreatedDroppedTest (line 22) | [TestClass] method ObjectCreatedDropped (line 27) | [TestMethod] method ObjectCreatedDropped_CS_Latest (line 31) | [TestMethod] method ObjectCreatedDropped_InTest (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ObsoleteAttributesTest.cs class ObsoleteAttributesTest (line 23) | [TestClass] method ObsoleteAttributesTest (line 31) | public ObsoleteAttributesTest() method ObsoleteAttributesNeedExplanation_CS (line 44) | [TestMethod] method ObsoleteAttributesNeedExplanation_CS_Latest (line 48) | [TestMethod] method ObsoleteAttributesNeedExplanation_VB14 (line 56) | [TestMethod] method ObsoleteAttributesNeedExplanation_VB (line 60) | [TestMethod] method RemoveObsoleteCode_CS (line 64) | [TestMethod] method RemoveObsoleteCode_Latest (line 68) | [TestMethod] method RemoveObsoleteCode_VB (line 75) | [TestMethod] method RemoveObsoleteCode_AttributeTargetTest_CS (line 79) | [TestMethod] method RemoveObsoleteCode_AttributeTargetTest_VB (line 119) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/OnErrorStatementTest.cs class OnErrorStatementTest (line 22) | [TestClass] method OnErrorStatement (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/OperatorOverloadsShouldHaveNamedAlternativesTest.cs class OperatorOverloadsShouldHaveNamedAlternativesTest (line 22) | [TestClass] method OperatorOverloadsShouldHaveNamedAlternatives (line 27) | [TestMethod] method OperatorOverloadsShouldHaveNamedAlternatives_CSharp9 (line 31) | [TestMethod] method OperatorOverloadsShouldHaveNamedAlternatives_CSharp11 (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/OperatorsShouldBeOverloadedConsistentlyTest.cs class OperatorsShouldBeOverloadedConsistentlyTest (line 22) | [TestClass] method OperatorsShouldBeOverloadedConsistently (line 27) | [TestMethod] method OperatorsShouldBeOverloadedConsistently_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/OptionExplicitOnTest.cs class OptionExplicitOnTest (line 23) | [TestClass] method OptionExplicitOn_IsOffForProject (line 26) | [TestMethod] method OptionExplicitOn_IsOff (line 30) | [TestMethod] method OptionExplicitOn_IsOn (line 34) | [TestMethod] method OptionExplicitOn_IsMissing (line 38) | [TestMethod] method OptionExplicitOn_Concurrent (line 42) | [TestMethod] method CreateBuilder (line 50) | private static VerifierBuilder CreateBuilder(string snippet, bool opti... method CreateBuilder (line 53) | private static VerifierBuilder CreateBuilder(bool optionExplicit) => FILE: analyzers/tests/SonarAnalyzer.Test/Rules/OptionStrictOnTest.cs class OptionStrictOnTest (line 23) | [TestClass] method OptionStrictOn_IsOff_ForProject (line 26) | [TestMethod] method OptionStrictOn_IsCustom_ForProject (line 30) | [TestMethod] method OptionStrictOn_IsOff (line 34) | [TestMethod] method OptionStrictOn_IsOn (line 38) | [TestMethod] method OptionStrictOn_Concurrent (line 42) | [TestMethod] method CreateBuilder (line 50) | private static VerifierBuilder CreateBuilder(string snippet, OptionStr... method CreateBuilder (line 53) | private static VerifierBuilder CreateBuilder(OptionStrict optionStrict... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/OptionalParameterNotPassedToBaseCallTest.cs class OptionalParameterNotPassedToBaseCallTest (line 23) | [TestClass] method OptionalParameterNotPassedToBaseCall_CS (line 29) | [TestMethod] method OptionalParameterNotPassedToBaseCall_CS_Latest (line 33) | [TestMethod] method OptionalParameterNotPassedToBaseCall_VB (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/OptionalParameterTest.cs class OptionalParameterTest (line 23) | [TestClass] method OptionalParameter_CS (line 29) | [TestMethod] method OptionalParameter_VB (line 33) | [TestMethod] method OptionalParameter_CS_Web (line 39) | [TestMethod] method OptionalParameter_CSharp10 (line 44) | [TestMethod] method OptionalParameter_CSharp11 (line 48) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/OptionalParameterWithDefaultValueTest.cs class OptionalParameterWithDefaultValueTest (line 22) | [TestClass] method OptionalParameterWithDefaultValue (line 27) | [TestMethod] method OptionalParameterWithDefaultValue_CS_Latest (line 31) | [TestMethod] method OptionalParameterWithDefaultValue_CodeFix (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/OptionalRefOutParameterTest.cs class OptionalRefOutParameterTest (line 22) | [TestClass] method OptionalRefOutParameter (line 27) | [TestMethod] method OptionalRefOutParameter_TopLevelStatements (line 31) | [TestMethod] method OptionalRefOutParameter_CS_Latest (line 35) | [TestMethod] method OptionalRefOutParameter_CodeFix (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/OrderByRepeatedTest.cs class OrderByRepeatedTest (line 22) | [TestClass] method OrderByRepeated (line 27) | [TestMethod] method OrderByRepeated_CodeFix (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/OverrideGetHashCodeOnOverridingEqualsTest.cs class OverrideGetHashCodeOnOverridingEqualsTest (line 22) | [TestClass] method OverrideGetHashCodeOnOverridingEquals (line 27) | [TestMethod] method OverrideGetHashCodeOnOverridingEquals_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PInvokesShouldNotBeVisibleTest.cs class PInvokesShouldNotBeVisibleTest (line 22) | [TestClass] method PInvokesShouldNotBeVisible (line 27) | [TestMethod] method PInvokesShouldNotBeVisible_CSharp9 (line 31) | [TestMethod] method PInvokesShouldNotBeVisible_CSharp11 (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ParameterAssignedToTest.cs class ParameterAssignedToTest (line 23) | [TestClass] method ParameterAssignedTo_CS (line 29) | [TestMethod] method ParameterAssignedTo_CS_Latest (line 33) | [TestMethod] method ParameterAssignedTo_VB (line 41) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ParameterNameMatchesOriginalTest.cs class ParameterNameMatchesOriginalTest (line 23) | [TestClass] method ParameterNameMatchesOriginal_CS (line 29) | [TestMethod] method ParameterNameMatchesOriginal_CS_Latest (line 35) | [TestMethod] method ParameterNameMatchesOriginal_VB (line 43) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ParameterNameTest.cs class ParameterNameTest (line 22) | [TestClass] method ParameterName (line 25) | [TestMethod] method ParameterName_CustomPattern (line 29) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ParameterNamesShouldNotDuplicateMethodNamesTest.cs class ParameterNamesShouldNotDuplicateMethodNamesTest (line 22) | [TestClass] method ParameterNamesShouldNotDuplicateMethodNames_CSharp8 (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ParameterTypeShouldMatchRouteTypeConstraintTest.cs class ParameterTypeShouldMatchRouteTypeConstraintTest (line 22) | [TestClass] method ParameterTypeShouldMatchRouteTypeConstraint_Blazor (line 29) | [TestMethod] method ParameterTypeShouldMatchRouteTypeConstraint_Partial (line 35) | [TestMethod] method ParameterTypeShouldMatchRouteTypeConstraint_CS (line 41) | [TestMethod] method ParameterTypeShouldMatchRouteTypeConstraint_CS_Latest (line 47) | [TestMethod] method ParameterTypeShouldMatchRouteTypeConstraint_Conversion (line 54) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ParameterValidationInAsyncShouldBeWrappedTest.cs class ParameterValidationInAsyncShouldBeWrappedTest (line 22) | [TestClass] method ParameterValidationInAsyncShouldBeWrapped (line 27) | [TestMethod] method ParameterValidationInAsyncShouldBeWrapped_CSharp10 (line 31) | [TestMethod] method ParameterValidationInAsyncShouldBeWrapped_CSharp11 (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ParameterValidationInYieldShouldBeWrappedTest.cs class ParameterValidationInYieldShouldBeWrappedTest (line 22) | [TestClass] method ParameterValidationInYieldShouldBeWrapped (line 27) | [TestMethod] method ParameterValidationInYieldShouldBeWrapped_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ParametersCorrectOrderTest.cs class ParametersCorrectOrderTest (line 23) | [TestClass] method ParametersCorrectOrder (line 29) | [TestMethod] method ParametersCorrectOrder_CS_Latest (line 33) | [TestMethod] method ParametersCorrectOrder_InvalidCode_CS (line 37) | [TestMethod] method ParametersCorrectOrder_VB (line 51) | [TestMethod] method ParametersCorrectOrder_InvalidCode_VB (line 55) | [TestMethod] method ParametersCorrectOrder_SecondaryLocationsOutsideCurrentCompilation (line 66) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PartCreationPolicyShouldBeUsedWithExportAttributeTest.cs class PartCreationPolicyShouldBeUsedWithExportAttributeTest (line 23) | [TestClass] method PartCreationPolicyShouldBeUsedWithExportAttribute_CS (line 29) | [TestMethod] method PartCreationPolicyShouldBeUsedWithExportAttribute_UnresolvedSymbol_CS (line 33) | [TestMethod] method PartCreationPolicyShouldBeUsedWithExportAttribute_CS_Latest (line 41) | [TestMethod] method PartCreationPolicyShouldBeUsedWithExportAttribute_VB (line 45) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PartialMethodNoImplementationTest.cs class PartialMethodNoImplementationTest (line 22) | [TestClass] method PartialMethodNoImplementation (line 27) | [TestMethod] method PartialMethodNoImplementation_CS_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PasswordsShouldBeStoredCorrectlyTest.cs class PasswordsShouldBeStoredCorrectlyTest (line 22) | [TestClass] method PasswordsShouldBeStoredCorrectly_CS_Core (line 28) | [TestMethod] method PasswordsShouldBeStoredCorrectly_CS_PasswordHasherOptions (line 41) | [TestMethod] method PasswordsShouldBeStoredCorrectly_CS_Rfc2898DeriveBytes (line 70) | [TestMethod] method PasswordsShouldBeStoredCorrectly_CS_BouncyCastle_Generate (line 126) | [TestMethod] method PasswordsShouldBeStoredCorrectly_CS_BouncyCastle_Init (line 168) | [TestMethod] method PasswordsShouldBeStoredCorrectly_CS_BouncyCastle_Generate_SCrypt (line 194) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PointersShouldBePrivateTest.cs class PointersShouldBePrivateTest (line 22) | [TestClass] method PointersShouldBePrivate (line 27) | [TestMethod] method PointersShouldBePrivate_CSharp9 (line 31) | [TestMethod] method PointersShouldBePrivate_CSharp11 (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PreferGuidEmptyTest.cs class PreferGuidEmptyTest (line 23) | [TestClass] method PreferGuidEmpty_CS (line 29) | [TestMethod] method PreferGuidEmpty_CS_Latest (line 33) | [TestMethod] method PreferGuidEmpty_VB (line 37) | [TestMethod] method PreferGuidEmpty_CodeFix_CS (line 41) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PreferJaggedArraysOverMultidimensionalTest.cs class PreferJaggedArraysOverMultidimensionalTest (line 22) | [TestClass] method PreferJaggedArraysOverMultidimensional (line 27) | [TestMethod] method PreferJaggedArraysOverMultidimensional_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PrivateConstantFieldNameTest.cs class PrivateConstantFieldNameTest (line 22) | [TestClass] method PrivateConstantFieldName (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PrivateFieldNameTest.cs class PrivateFieldNameTest (line 22) | [TestClass] method PrivateFieldName (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PrivateFieldUsedAsLocalVariableTest.cs class PrivateFieldUsedAsLocalVariableTest (line 22) | [TestClass] method PrivateFieldUsedAsLocalVariable (line 27) | [TestMethod] method PrivateFieldUsedAsLocalVariable_CS_Latest (line 32) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PrivateSharedReadonlyFieldNameTest.cs class PrivateSharedReadonlyFieldNameTest (line 22) | [TestClass] method PrivateSharedReadonlyFieldName (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PrivateStaticMethodUsedOnlyByNestedClassTest.cs class PrivateStaticMethodUsedOnlyByNestedClassTest (line 22) | [TestClass] method PrivateStaticMethodUsedOnlyByNestedClass_CS (line 27) | [TestMethod] method PrivateStaticMethodUsedOnlyByNestedClass_CS_Latest (line 33) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PropertiesAccessCorrectFieldTest.cs class PropertiesAccessCorrectFieldTest (line 23) | [TestClass] method PropertiesAccessCorrectField_CS (line 34) | [TestMethod] method PropertiesAccessCorrectField_CS_Latest (line 38) | [TestMethod] method PropertiesAccessCorrectField_CS_NetFramework (line 42) | [TestMethod] method PropertiesAccessCorrectField_VB_NetFramework (line 46) | [TestMethod] method PropertiesAccessCorrectField_VB (line 50) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PropertiesShouldBePreferredTest.cs class PropertiesShouldBePreferredTest (line 22) | [TestClass] method PropertiesShouldBePreferred (line 27) | [TestMethod] method PropertiesShouldBePreferred_CSharp9 (line 31) | [TestMethod] method PropertiesShouldBePreferred_CSharp10 (line 35) | [TestMethod] method PropertiesShouldBePreferred_CSharp11 (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PropertyGetterWithThrowTest.cs class PropertyGetterWithThrowTest (line 23) | [TestClass] method PropertyGetterWithThrow_CS (line 28) | [TestMethod] method PropertyGetterWithThrow_VB (line 32) | [TestMethod] method PropertyGetterWithThrow_CS_Latest (line 36) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PropertyNameTest.cs class PropertyNameTest (line 22) | [TestClass] method PropertyName (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PropertyNamesShouldNotMatchGetMethodsTest.cs class PropertyNamesShouldNotMatchGetMethodsTest (line 22) | [TestClass] method PropertyNamesShouldNotMatchGetMethods (line 27) | [TestMethod] method PropertyNamesShouldNotMatchGetMethods_InvalidCode (line 31) | [TestMethod] method PropertyNamesShouldNotMatchGetMethods_Latest (line 42) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PropertyToAutoPropertyTest.cs class PropertyToAutoPropertyTest (line 22) | [TestClass] method PropertyToAutoProperty (line 27) | [TestMethod] method PropertyToAutoProperty_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PropertyWithArrayTypeTest.cs class PropertyWithArrayTypeTest (line 22) | [TestClass] method PropertyWithArrayType (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PropertyWriteOnlyTest.cs class PropertyWriteOnlyTest (line 23) | [TestClass] method PropertyWriteOnly_CS (line 28) | [TestMethod] method PropertyWriteOnly_CS_Latest (line 32) | [TestMethod] method PropertyWriteOnly_VB (line 36) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ProvideDeserializationMethodsForOptionalFieldsTest.cs class ProvideDeserializationMethodsForOptionalFieldsTest (line 23) | [TestClass] method ProvideDeserializationMethodsForOptionalFields_CS (line 28) | [TestMethod] method ProvideDeserializationMethodsForOptionalFields_CS_Latest (line 32) | [TestMethod] method ProvideDeserializationMethodsForOptionalFields_VB (line 36) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PublicConstantFieldNameTest.cs class PublicConstantFieldNameTest (line 22) | [TestClass] method PublicConstantFieldName (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PublicConstantFieldTest.cs class PublicConstantFieldTest (line 23) | [TestClass] method PublicConstantField_CSharp (line 28) | [TestMethod] method PublicConstantField_CSharp9 (line 32) | [TestMethod] method PublicConstantField_CSharp10 (line 38) | [TestMethod] method PublicConstantField_VB (line 44) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PublicFieldNameTest.cs class PublicFieldNameTest (line 22) | [TestClass] method PublicFieldName (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PublicMethodWithMultidimensionalArrayTest.cs class PublicMethodWithMultidimensionalArrayTest (line 23) | [TestClass] method PublicMethodWithMultidimensionalArray_CS (line 29) | [TestMethod] method PublicMethodWithMultidimensionalArray_CS_Latest (line 33) | [TestMethod] method PublicMethodWithMultidimensionalArray_VB (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PublicSharedReadonlyFieldNameTest.cs class PublicSharedReadonlyFieldNameTest (line 22) | [TestClass] method PublicSharedReadonlyFieldName (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/PureAttributeOnVoidMethodTest.cs class PureAttributeOnVoidMethodTest (line 23) | [TestClass] method PureAttributeOnVoidMethod_CS (line 28) | [TestMethod] method PureAttributeOnVoidMethod_CSharpLatest (line 32) | [TestMethod] method PureAttributeOnVoidMethod_TopLevelStatements (line 36) | [TestMethod] method PureAttributeOnVoidMethod_VB (line 40) | [TestMethod] method PureAttributeOnVoidMethod_CSharp7 (line 44) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundancyInConstructorDestructorDeclarationTest.cs class RedundancyInConstructorDestructorDeclarationTest (line 22) | [TestClass] method RedundancyInConstructorDestructorDeclaration (line 33) | [TestMethod] method RedundancyInConstructorDestructorDeclaration_CSharp9 (line 37) | [TestMethod] method RedundancyInConstructorDestructorDeclaration_CSharp10 (line 43) | [TestMethod] method RedundancyInConstructorDestructorDeclaration_CSharp11 (line 49) | [TestMethod] method RedundancyInConstructorDestructorDeclaration_CSharp12 (line 55) | [TestMethod] method RedundancyInConstructorDestructorDeclaration_CodeFix_CSharp9 (line 61) | [TestMethod] method RedundancyInConstructorDestructorDeclaration_CodeFix_CSharp10 (line 68) | [TestMethod] method RedundancyInConstructorDestructorDeclaration_CodeFix_CSharp11 (line 75) | [TestMethod] method RedundancyInConstructorDestructorDeclaration_CodeFix_BaseCall (line 82) | [TestMethod] method RedundancyInConstructorDestructorDeclaration_CodeFix_Constructor (line 88) | [TestMethod] method RedundancyInConstructorDestructorDeclaration_CodeFix_Destructor (line 94) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundantArgumentTest.cs class RedundantArgumentTest (line 22) | [TestClass] method RedundantArgument (line 28) | [TestMethod] method RedundantArgument_TopLevelStatements (line 32) | [TestMethod] method RedundantArgument_Latest (line 36) | [TestMethod] method RedundantArgument_CodeFix_No_Named_Arguments (line 40) | [TestMethod] method RedundantArgument_CodeFix_Named_Arguments (line 44) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundantCastTest.cs class RedundantCastTest (line 23) | [TestClass] method RedundantCast (line 60) | [TestMethod] method RedundantCast_Latest (line 64) | [TestMethod] method RedundantCast_CodeFix (line 68) | [TestMethod] method RedundantCast_DefaultLiteral (line 72) | [TestMethod] method RedundantCast_TypeArgumentAnnotations (line 89) | [TestMethod] method RedundantCast_NullableEnabled (line 160) | [TestMethod] method RedundantCast_NullableWarnings (line 165) | [TestMethod] method RedundantCast_NullableDisabled (line 170) | [TestMethod] method RedundantCast_NullableAnnotations (line 175) | [TestMethod] method VerifyNullableTests (line 180) | private void VerifyNullableTests(string snippet, string nullableContex... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundantConditionalAroundAssignmentTest.cs class RedundantConditionalAroundAssignmentTest (line 22) | [TestClass] method RedundantConditionalAroundAssignment (line 28) | [TestMethod] method RedundantConditionalAroundAssignment_CodeFix (line 32) | [TestMethod] method RedundantConditionalAroundAssignment_Latest (line 38) | [TestMethod] method RedundantConditionalAroundAssignment_Latest_CodeFix (line 44) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundantDeclarationTest.cs class RedundantDeclarationTest (line 22) | [TestClass] method RedundantDeclaration (line 28) | [TestMethod] method RedundantDeclaration_UnusedLambdaParameters_BeforeCSharp9 (line 34) | [TestMethod] method RedundantDeclaration_CSharp9 (line 40) | [TestMethod] method RedundantDeclaration_CSharp9_CodeFix_TitleRedundantParameterName (line 47) | [TestMethod] method RedundantDeclaration_CSharp10 (line 55) | [TestMethod] method RedundantDeclaration_CSharp10_CodeFix_ExplicitDelegate (line 61) | [TestMethod] method RedundantDeclaration_CSharp12 (line 69) | [TestMethod] method RedundantDeclaration_CSharp12_CodeFix_ArraySize (line 75) | [TestMethod] method RedundantDeclaration_CSharp12_CodeFix_LambdaParameterType (line 84) | [TestMethod] method RedundantDeclaration_CodeFix_ArraySize (line 93) | [TestMethod] method RedundantDeclaration_CodeFix_ArrayType (line 100) | [TestMethod] method RedundantDeclaration_CodeFix_DelegateParameterList (line 107) | [TestMethod] method RedundantDeclaration_CodeFix_ExplicitDelegate (line 114) | [TestMethod] method RedundantDeclaration_CodeFix_ExplicitNullable (line 122) | [TestMethod] method RedundantDeclaration_CodeFix_LambdaParameterType (line 129) | [TestMethod] method RedundantDeclaration_CodeFix_ObjectInitializer (line 136) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundantExitSelectTest.cs class RedundantExitSelectTest (line 22) | [TestClass] method RedundantExitSelect (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundantInheritanceListTest.cs class RedundantInheritanceListTest (line 22) | [TestClass] method RedundantInheritanceList (line 28) | [TestMethod] method RedundantInheritanceList_CSharp9 (line 32) | [TestMethod] method RedundantInheritanceList_CSharp9_CodeFix (line 36) | [TestMethod] method RedundantInheritanceList_CSharp10 (line 43) | [TestMethod] method RedundantInheritanceList_CSharp10_CodeFix (line 47) | [TestMethod] method RedundantInheritanceList_CodeFix (line 54) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundantJumpStatementTest.cs class RedundantJumpStatementTest (line 22) | [TestClass] method RedundantJumpStatement (line 27) | [TestMethod] method RedundantJumpStatement_Latest (line 32) | [TestMethod] method RedundantJumpStatement_TopLevelStatements (line 38) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundantModifierTest.cs class RedundantModifierTest (line 23) | [TestClass] method RedundantModifier (line 28) | [TestMethod] method RedundantModifier_Unsafe_CodeFix (line 32) | [TestMethod] method RedundantModifier_Checked_CodeFix (line 40) | [TestMethod] method RedundantModifier_Partial_CodeFix (line 48) | [TestMethod] method RedundantModifier_Sealed_CodeFix (line 56) | [TestMethod] method RedundantModifier_Preprocessor (line 65) | [TestMethod] method RedundantModifier_Preprocessor (line 78) | [TestMethod] method RedundantModifier_Latest (line 85) | [TestMethod] method RedundantModifier_Checked_CodeFix_Latest (line 91) | [TestMethod] method RedundantModifier_Partial_CodeFix_Latest (line 100) | [TestMethod] method RedundantModifier_Sealed_CodeFix_Latest (line 109) | [TestMethod] method RedundantModifier_Unsafe_CodeFix_Latest (line 118) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundantNullCheckTest.cs class RedundantNullCheckTest (line 23) | [TestClass] method RedundantNullCheck_CS (line 29) | [TestMethod] method RedundantNullCheck_CS_CodeFix (line 33) | [TestMethod] method RedundantNullCheck_CSharp9 (line 39) | [TestMethod] method RedundantNullCheck_CSharp10 (line 45) | [TestMethod] method RedundantNullCheck_CSharp11 (line 52) | [TestMethod] method RedundantNullCheck_CSharp9_CodeFix (line 58) | [TestMethod] method RedundantNullCheck_CSharp10_CodeFix (line 65) | [TestMethod] method RedundantNullCheck_VB (line 73) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundantNullableTypeComparisonTest.cs class RedundantNullableTypeComparisonTest (line 22) | [TestClass] method RedundantNullableTypeComparison (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundantParenthesesObjectCreationTest.cs class RedundantParenthesesObjectCreationTest (line 22) | [TestClass] method RedundantParenthesesObjectCreation (line 27) | [TestMethod] method RedundantParenthesesObjectCreation_CSharp9 (line 32) | [TestMethod] method RedundantParenthesesObjectCreation_CSharp10 (line 39) | [TestMethod] method RedundantParenthesesObjectCreation_CSharp11 (line 45) | [TestMethod] method RedundantParenthesesObjectCreation_CodeFix (line 51) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundantParenthesesTest.cs class RedundantParenthesesTest (line 23) | [TestClass] method RedundantParentheses_CS (line 26) | [TestMethod] method RedundantParentheses_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundantPropertyNamesInAnonymousClassTest.cs class RedundantPropertyNamesInAnonymousClassTest (line 22) | [TestClass] method RedundantPropertyNamesInAnonymousClass (line 27) | [TestMethod] method RedundantPropertyNamesInAnonymousClass_Latest (line 31) | [TestMethod] method RedundantPropertyNamesInAnonymousClass_CodeFix (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundantToArrayCallTest.cs class RedundantToArrayCallTest (line 22) | [TestClass] method RedundantToArrayCall (line 28) | [TestMethod] method RedundantToArrayCall_CodeFix (line 32) | [TestMethod] method RedundantToArrayCall_CSharp11 (line 39) | [TestMethod] method RedundantToArrayCall_CSharp11_CodeFix (line 43) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RedundantToStringCallTest.cs class RedundantToStringCallTest (line 22) | [TestClass] method RedundantToStringCall (line 27) | [TestMethod] method RedundantToStringCall_CSharp9 (line 31) | [TestMethod] method RedundantToStringCall_CSharp10 (line 37) | [TestMethod] method RedundantToStringCall_CSharp11 (line 43) | [TestMethod] method RedundantToStringCall_CodeFix (line 49) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ReferenceEqualityCheckWhenEqualsExistsTest.cs class ReferenceEqualityCheckWhenEqualsExistsTest (line 22) | [TestClass] method ReferenceEqualityCheckWhenEqualsExists (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ReferenceEqualsOnValueTypeTest.cs class ReferenceEqualsOnValueTypeTest (line 22) | [TestClass] method ReferenceEqualsOnValueType (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RegularExpressions/RegexMustHaveValidSyntaxTest.cs class RegexMustHaveValidSyntaxTest (line 23) | [TestClass] method RegexMustHaveValidSyntax_CS (line 36) | [TestMethod] method RegexMustHaveValidSyntax_CS_Latest (line 40) | [TestMethod] method RegexMustHaveValidSyntax_VB (line 46) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RequireAttributeUsageAttributeTest.cs class RequireAttributeUsageAttributeTest (line 22) | [TestClass] method RequireAttributeUsageAttribute (line 27) | [TestMethod] method RequireAttributeUsageAttribute_CSharp11 (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ReturnEmptyCollectionInsteadOfNullTest.cs class ReturnEmptyCollectionInsteadOfNullTest (line 22) | [TestClass] method ReturnEmptyCollectionInsteadOfNull (line 27) | [TestMethod] method ReturnEmptyCollectionInsteadOfNull_Latest (line 33) | [TestMethod] method ReturnEmptyCollectionInsteadOfNull_TopLevelStatements (line 40) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ReturnTypeNamedPartialShouldBeEscapedTest.cs class ReturnTypeNamedPartialShouldBeEscapedTest (line 23) | [TestClass] method ReturnTypeNamedPartialShouldBeEscaped_CSharp8_13 (line 28) | [TestMethod] method ReturnTypeNamedPartialShouldBeEscaped_TopLevelStatements_CSharp9_13 (line 34) | [TestMethod] method ReturnTypeNamedPartialShouldBeEscaped_TopLevelStatements_Latest (line 41) | [TestMethod] method ReturnTypeNamedPartialShouldBeEscaped_CS_Latest (line 48) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ReturnValueIgnoredTest.cs class ReturnValueIgnoredTest (line 22) | [TestClass] method ReturnValueIgnored (line 27) | [TestMethod] method ReturnValueIgnored_Latest (line 31) | [TestMethod] method ReturnValueIgnored_TopLevelStatements (line 38) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ReversedOperatorsTest.cs class ReversedOperatorsTest (line 23) | [TestClass] method ReversedOperators_CS (line 28) | [TestMethod] method ReversedOperators_CS_Latest (line 32) | [TestMethod] method ReversedOperators_TopLevelStatements (line 38) | [TestMethod] method ReversedOperators_VB (line 44) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/RightCurlyBraceStartsLineTest.cs class RightCurlyBraceStartsLineTest (line 22) | [TestClass] method RightCurlyBraceStartsLine (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SecurityPInvokeMethodShouldNotBeCalledTest.cs class SecurityPInvokeMethodShouldNotBeCalledTest (line 23) | [TestClass] method SecurityPInvokeMethodShouldNotBeCalled_CS (line 28) | [TestMethod] method SecurityPInvokeMethodShouldNotBeCalled_CSharp11 (line 32) | [TestMethod] method SecurityPInvokeMethodShouldNotBeCalled_CSharp12 (line 36) | [TestMethod] method SecurityPInvokeMethodShouldNotBeCalled_VB (line 40) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SelfAssignmentTest.cs class SelfAssignmentTest (line 23) | [TestClass] method SelfAssignment_CS (line 28) | [TestMethod] method SelfAssignment_CS_Latest (line 32) | [TestMethod] method SelfAssignment_CS_TopLevelStatements (line 38) | [TestMethod] method SelfAssignment_VB (line 45) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SerializationConstructorsShouldBeSecuredTest.cs class SerializationConstructorsShouldBeSecuredTest (line 22) | [TestClass] method SerializationConstructorsShouldBeSecured (line 27) | [TestMethod] method SerializationConstructorsShouldBeSecured_CSharp9 (line 31) | [TestMethod] method SerializationConstructorsShouldBeSecured_InvalidCode (line 35) | [TestMethod] method SerializationConstructorsShouldBeSecured_NoAssemblyAttribute (line 51) | [TestMethod] method SerializationConstructorsShouldBeSecured_PartialClasses (line 55) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SetLocaleForDataTypesTest.cs class SetLocaleForDataTypesTest (line 22) | [TestClass] method SetLocaleForDataTypes (line 27) | [TestMethod] method SetLocaleForDataTypes_CSharp9 (line 32) | [TestMethod] method SetLocaleForDataTypes_CSharp10 (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SetPropertiesInsteadOfMethodsTest.cs class SetPropertiesInsteadOfMethodsTest (line 23) | [TestClass] method SetPropertiesInsteadOfMethods_CS (line 28) | [TestMethod] method SetPropertiesInsteadOfMethods_CS_Latest (line 32) | [TestMethod] method SetPropertiesInsteadOfMethods_VB (line 40) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ShiftDynamicNotIntegerTest.cs class ShiftDynamicNotIntegerTest (line 23) | [TestClass] method ShiftDynamicNotInteger_CS (line 28) | [TestMethod] method ShiftDynamicNotInteger_CSharp9 (line 32) | [TestMethod] method ShiftDynamicNotInteger_CSharp11 (line 38) | [TestMethod] method ShiftDynamicNotInteger_VB (line 44) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ShouldImplementExportedInterfacesTest.cs class ShouldImplementExportedInterfacesTest (line 23) | [TestClass] method ShouldImplementExportedInterfaces_CS (line 28) | [TestMethod] method ShouldImplementExportedInterfaces_SystemComposition_CS (line 32) | [TestMethod] method ShouldImplementExportedInterfaces_Partial (line 36) | [TestMethod] method ShouldImplementExportedInterfaces_CSharp9 (line 40) | [TestMethod] method ShouldImplementExportedInterfaces_VB (line 44) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SimpleDoLoopTest.cs class SimpleDoLoopTest (line 22) | [TestClass] method SimpleDoLoop (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SingleStatementPerLineTest.cs class SingleStatementPerLineTest (line 23) | [TestClass] method SingleStatementPerLine_CS (line 30) | [TestMethod] method SingleStatementPerLine_CSharp9 (line 34) | [TestMethod] method SingleStatementPerLine_Razor (line 40) | [TestMethod] method SingleStatementPerLine_VB (line 57) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SpecifyIFormatProviderOrCultureInfoTest.cs class SpecifyIFormatProviderOrCultureInfoTest (line 22) | [TestClass] method SpecifyIFormatProviderOrCultureInfo (line 27) | [TestMethod] method SpecifyIFormatProviderOrCultureInfo_BeforeCSharp13 (line 31) | [TestMethod] method SpecifyIFormatProviderOrCultureInfo_CS_Latest (line 49) | [TestMethod] method SpecifyIFormatProviderOrCultureInfo_FromCSharp13 (line 57) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SpecifyStringComparisonTest.cs class SpecifyStringComparisonTest (line 22) | [TestClass] method SpecifyStringComparison (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SpecifyTimeoutOnRegexTest.cs class SpecifyTimeoutOnRegexTest (line 23) | [TestClass] method SpecifyTimeoutOnRegex_CS (line 38) | [TestMethod] method SpecifyTimeoutOnRegex_CS_Latest (line 42) | [TestMethod] method SpecifyTimeoutOnRegex_DefaultMatchTimeout (line 46) | [TestMethod] method SpecifyTimeoutOnRegex_VB (line 50) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SqlKeywordsDelimitedBySpaceTest.cs class SqlKeywordsDelimitedBySpaceTest (line 22) | [TestClass] method SqlKeywordsDelimitedBySpace_Csharp8 (line 28) | [TestMethod] method SqlKeywordsDelimitedBySpace_UsingInsideNamespace (line 34) | [TestMethod] method SqlKeywordsDelimitedBySpace_DefaultNamespace (line 40) | [TestMethod] method SqlKeywordsDelimitedBySpace_CSharp10_GlobalUsings (line 46) | [TestMethod] method SqlKeywordsDelimitedBySpace_CSharp10_FileScopesNamespace (line 53) | [TestMethod] method SqlKeywordsDelimitedBySpace_Latest (line 60) | [TestMethod] method SqlKeywordsDelimitedBySpace_DotnetFramework (line 67) | [DataRow("System.Data")] method SqlKeywordsDelimitedBySpace_DotnetCore (line 103) | [DataRow("System.Data.SqlClient")] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/StaticFieldInGenericClassTest.cs class StaticFieldInGenericClassTest (line 22) | [TestClass] method StaticFieldInGenericClass (line 27) | [TestMethod] method StaticFieldInGenericClass_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/StaticFieldInitializerOrderTest.cs class StaticFieldInitializerOrderTest (line 22) | [TestClass] method StaticFieldInitializerOrder (line 27) | [TestMethod] method StaticFieldInitializerOrder_Latest (line 32) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/StaticFieldVisibleTest.cs class StaticFieldVisibleTest (line 22) | [TestClass] method StaticFieldVisible (line 27) | [TestMethod] method StaticFieldVisible_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/StaticFieldWrittenFromInstanceConstructorTest.cs class StaticFieldWrittenFromInstanceConstructorTest (line 22) | [TestClass] method StaticFieldWrittenFromInstanceConstructor (line 27) | [TestMethod] method StaticFieldWrittenFromInstanceConstructor_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/StaticFieldWrittenFromInstanceMemberTest.cs class StaticFieldWrittenFromInstanceMemberTest (line 23) | [TestClass] method StaticFieldWrittenFromInstanceMember (line 28) | [TestMethod] method StaticFieldWrittenFromInstanceMember_Latest (line 32) | [TestMethod] method StaticFieldWrittenFromInstanceMember_Latest_TopLevelStatements (line 38) | [TestMethod] method SecondaryIssueInReferencedCompilation (line 45) | [TestMethod] method CreateCompilation (line 75) | private static CSharpCompilation CreateCompilation(SyntaxTree tree, st... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/StaticSealedClassProtectedMembersTest.cs class StaticSealedClassProtectedMembersTest (line 22) | [TestClass] method StaticSealedClassProtectedMembers (line 27) | [TestMethod] method StaticSealedClassProtectedMembers_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/StreamReadStatementTest.cs class StreamReadStatementTest (line 22) | [TestClass] method StreamReadStatement (line 27) | [TestMethod] method StreamReadStatement_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/StringConcatenationInLoopTest.cs class StringConcatenationInLoopTest (line 23) | [TestClass] method StringConcatenationInLoop_CS (line 28) | [TestMethod] method StringConcatenationInLoop_CS_Latest (line 32) | [TestMethod] method StringConcatenationInLoop_VB (line 38) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/StringConcatenationWithPlusTest.cs class StringConcatenationWithPlusTest (line 22) | [TestClass] method StringConcatenationWithPlus (line 27) | [TestMethod] method StringConcatenationWithPlus_CodeFix (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/StringFormatValidatorTest.cs class StringFormatValidatorTest (line 22) | [TestClass] method StringFormatValidator_RuntimeExceptionFree (line 27) | [TestMethod] method StringFormatValidator_TypoFree (line 35) | [TestMethod] method StringFormatValidator_EdgeCases (line 43) | [TestMethod] method StringFormatValidator_RuntimeExceptionFree_CSharp11 (line 47) | [TestMethod] method StringFormatValidator_TypoFree_CSharp11 (line 56) | [TestMethod] method StringFormatValidator_Latest (line 65) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/StringLiteralShouldNotBeDuplicatedTest.cs class StringLiteralShouldNotBeDuplicatedTest (line 23) | [TestClass] method StringLiteralShouldNotBeDuplicated_CS (line 37) | [TestMethod] method StringLiteralShouldNotBeDuplicated_CS_Latest (line 46) | [TestMethod] method StringLiteralShouldNotBeDuplicated_CS_WithTopLevelStatements (line 54) | [TestMethod] method StringLiteralShouldNotBeDuplicated_CS_Dapper (line 61) | [TestMethod] method StringLiteralShouldNotBeDuplicated_VB_Dapper (line 67) | [TestMethod] method StringLiteralShouldNotBeDuplicated_Attributes_CS (line 76) | [TestMethod] method StringLiteralShouldNotBeDuplicated_VB (line 83) | [TestMethod] method StringLiteralShouldNotBeDuplicated_Attributes_VB (line 89) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/StringOffsetMethodsTest.cs class StringOffsetMethodsTest (line 22) | [TestClass] method StringOffsetMethods (line 27) | [TestMethod] method StringOffsetMethods_Latest (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/StringOperationWithoutCultureTest.cs class StringOperationWithoutCultureTest (line 22) | [TestClass] method StringOperationWithoutCulture (line 27) | [TestMethod] method StringOperationWithoutCulture_CSharp10 (line 31) | [TestMethod] method StringOperationWithoutCulture_CSharp11 (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/StringOrIntegralTypesForIndexersTest.cs class StringOrIntegralTypesForIndexersTest (line 22) | [TestClass] method StringOrIntegralTypesForIndexers_CSharp8 (line 27) | [TestMethod] method StringOrIntegralTypesForIndexers_Latest (line 34) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SuppressFinalizeUselessTest.cs class SuppressFinalizeUselessTest (line 22) | [TestClass] method SuppressFinalizeUseless (line 27) | [TestMethod] method SuppressFinalizeUseless_CSharp9 (line 31) | [TestMethod] method SuppressFinalizeUseless_CodeFix (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SwaggerActionReturnTypeTest.cs class SwaggerActionReturnTypeTest (line 23) | [TestClass] method SwaggerActionReturnType_CS (line 38) | [TestMethod] method SwaggerActionReturnType_IActionResult (line 42) | [TestMethod] method SwaggerActionReturnType_IActionResult_Compliant (line 80) | [TestMethod] method SwaggerActionReturnType_IResult (line 104) | [TestMethod] method ApiConventionType_AssemblyLevel (line 143) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SwitchCaseFallsThroughToDefaultTest.cs class SwitchCaseFallsThroughToDefaultTest (line 22) | [TestClass] method SwitchCaseFallsThroughToDefault (line 27) | [TestMethod] method SwitchCaseFallsThroughToDefault_TopLevelStatements (line 31) | [TestMethod] method SwitchCaseFallsThroughToDefault_CodeFix (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SwitchCasesMinimumThreeTest.cs class SwitchCasesMinimumThreeTest (line 23) | [TestClass] method SwitchCasesMinimumThree_CSharp8 (line 26) | [TestMethod] method SwitchCasesMinimumThree_VB (line 32) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SwitchDefaultClauseEmptyTest.cs class SwitchDefaultClauseEmptyTest (line 22) | [TestClass] method SwitchDefaultClauseEmpty (line 27) | [TestMethod] method SwitchDefaultClauseEmpty_CodeFix (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SwitchSectionShouldNotHaveTooManyStatementsTest.cs class SwitchSectionShouldNotHaveTooManyStatementsTest (line 23) | [TestClass] method SwitchSectionShouldNotHaveTooManyStatements_DefaultValue_CS (line 26) | [TestMethod] method SwitchSectionShouldNotHaveTooManyStatements_CustomValue_CSharp8 (line 30) | [TestMethod] method SwitchSectionShouldNotHaveTooManyStatements_DefaultValue_VB (line 37) | [TestMethod] method SwitchSectionShouldNotHaveTooManyStatements_CustomValue_VB (line 41) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SwitchShouldNotBeNestedTest.cs class SwitchShouldNotBeNestedTest (line 23) | [TestClass] method SwitchShouldNotBeNested_CSharp8 (line 26) | [TestMethod] method SwitchShouldNotBeNested_VB (line 32) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/SwitchWithoutDefaultTest.cs class StringConcatenationInLoopSwitchWithoutDefaultTest (line 23) | [TestClass] method SwitchWithoutDefault_CS (line 26) | [TestMethod] method SwitchWithoutDefault_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/TabCharacterTest.cs class TabCharacterTest (line 23) | [TestClass] method TabCharacter_CS (line 26) | [TestMethod] method TabCharacter_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/TaskConfigureAwaitTest.cs class TaskConfigureAwaitTest (line 22) | [TestClass] method TaskConfigureAwait_NetFx (line 29) | [TestMethod] method TaskConfigureAwait_NetCore (line 35) | [TestMethod] method TaskConfigureAwait_ConsoleApp (line 41) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/TestClassShouldHaveTestMethodTest.cs class TestClassShouldHaveTestMethodTest (line 23) | [TestClass] method TestClassShouldHaveTestMethod_NUnit (line 28) | [TestMethod] method TestClassShouldHaveTestMethod_NUnit4 (line 37) | [TestMethod] method TestClassShouldHaveTestMethod_NUnit3 (line 44) | [TestMethod] method TestClassShouldHaveTestMethod_MSTest (line 53) | [TestMethod] method TestClassShouldHaveTestMethod_Latest (line 63) | [TestMethod] method TestClassShouldHaveTestMethod_NUnit4_AliasedNamespace (line 72) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/TestMethodShouldContainAssertionTest.cs class TestMethodShouldContainAssertionTest (line 25) | [TestClass] method TestMethodShouldContainAssertion_MSTest_Common (line 30) | [TestMethod] method TestMethodShouldContainAssertion_MSTest_V3 (line 39) | [TestMethod] method TestMethodShouldContainAssertion_MSTest_Latest (line 45) | [TestMethod] method TestMethodShouldContainAssertion_NUnit (line 51) | [TestMethod] method TestMethodShouldContainAssertion_NUnit4 (line 58) | [TestMethod] method TestMethodShouldContainAssertion_NUnit_V2Specific (line 62) | [TestMethod] method TestMethodShouldContainAssertion_Xunit (line 103) | [TestMethod] method TestMethodShouldContainAssertion_Xunit_Legacy (line 109) | [TestMethod] method TestMethodShouldContainAssertion_XunitV3 (line 113) | [TestMethod] method TestMethodShouldContainAssertion_NUnit_FluentAssertionsLegacy (line 123) | [TestMethod] method TestMethodShouldContainAssertion_NUnit_NFluentLegacy (line 157) | [TestMethod] method TestMethodShouldContainAssertion_Moq (line 175) | [TestMethod] method TestMethodShouldContainAssertion_CustomAssertionMethod_Common (line 179) | [TestMethod] method TestMethodShouldContainAssertion_CustomAssertionMethod_V3 (line 186) | [TestMethod] method TestMethodShouldContainAssertion_FsCheck_XUnit (line 190) | [TestMethod] method TestMethodShouldContainAssertion_FsCheck_NUnit (line 196) | [TestMethod] method TestMethodShouldContainAssertion_CodeGenerator (line 202) | [TestMethod] method TestMethodShouldContainAssertion_Latest (line 213) | [TestMethod] method TestMethodShouldContainAssertion_NUnit4_AliasedNamespace (line 222) | [TestMethod] method WithTestReferences (line 247) | internal static VerifierBuilder WithTestReferences(IEnumerable EntityFrameworkCoreRe... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UnusedReturnValueTest.cs class UnusedReturnValueTest (line 22) | [TestClass] method UnusedReturnValue (line 27) | [TestMethod] method UnusedReturnValue_CS_Latest (line 31) | [TestMethod] method UnusedReturnValue_CS_TopLevelStatements (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UnusedStringBuilderTest.cs class UnusedStringBuilderTest (line 23) | [TestClass] method UnusedStringBuilder_CS (line 29) | [TestMethod] method UnusedStringBuilder_VB (line 33) | [TestMethod] method UnusedStringBuilder_CS_Latest (line 37) | [TestMethod] method UnusedStringBuilder_TopLevelStatements (line 41) | [TestMethod] method UnusedStringBuilder_CSExpressionsTest (line 76) | [TestMethod] method UnusedStringBuilder_VBExpressionsTest (line 119) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UriShouldNotBeHardcodedTest.cs class UriShouldNotBeHardcodedTest (line 23) | [TestClass] method UriShouldNotBeHardcoded_CS (line 29) | [TestMethod] method UriShouldNotBeHardcoded_CS_Exceptions (line 33) | [TestMethod] method UriShouldNotBeHardcoded_CS_Latest (line 40) | [TestMethod] method UriShouldNotBeHardcoded_CS_VirtualPath_AspNet (line 46) | [TestMethod] method UriShouldNotBeHardcoded_CS_VirtualPath_AspNetCore (line 56) | [TestMethod] method UriShouldNotBeHardcoded_VB (line 65) | [TestMethod] method AdditionalReferences (line 69) | private static IEnumerable AdditionalReferences(str... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseAwaitableMethodTest.cs class UseAwaitableMethodTest (line 22) | [TestClass] method UseAwaitableMethod_CS (line 29) | [TestMethod] method UseAwaitableMethod_Moq (line 33) | [TestMethod] method UseAwaitableMethod_Sockets (line 37) | [TestMethod] method UseAwaitableMethod_CS_TopLevelStatements (line 41) | [TestMethod] method UseAwaitableMethod_CS_Latest (line 45) | [TestMethod] method UseAwaitableMethod_EF (line 50) | [TestMethod] method UseAwaitableMethod_MongoDb (line 62) | [TestMethod] method UseAwaitableMethod_FluentValidation11 (line 67) | [TestMethod] method UseAwaitableMethod_FluentValidationLatest (line 71) | [TestMethod] method UseAwaitableMethod_DbDataReader (line 75) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseCharOverloadOfStringMethodsTest.cs class UseCharOverloadOfStringMethodsTest (line 23) | [TestClass] method UseCharOverloadOfStringMethods_CS (line 31) | [TestMethod] method UseCharOverloadOfStringMethods_VB (line 35) | [TestMethod] method UseCharOverloadOfStringMethods_CS (line 41) | [TestMethod] method UseCharOverloadOfStringMethods_CS_Latest (line 45) | [TestMethod] method UseCharOverloadOfStringMethods_VB (line 51) | [TestMethod] method UseCharOverloadOfStringMethods_CS_Fix (line 55) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseConstantLoggingTemplateTest.cs class UseConstantLoggingTemplateTest (line 22) | [TestClass] method UseConstantLoggingTemplate_CS (line 27) | [TestMethod] method UseConstantLoggingTemplate_CastleCoreLogging_CS (line 31) | [TestMethod] method UseConstantLoggingTemplate_Log4Net_CS (line 55) | [TestMethod] method UseConstantLoggingTemplate_MicrosoftExtensionsLogging_CS (line 84) | [TestMethod] method UseConstantLoggingTemplate_NLog_CS (line 106) | [TestMethod] method UseConstantLoggingTemplate_NLog_AdditionalLoggers_CS (line 130) | public void UseConstantLoggingTemplate_NLog_AdditionalLoggers_CS() => method UseConstantLoggingTemplate_Serilog_CS (line 147) | [TestMethod] method CreateVerifier (line 173) | private static VerifierBuilder CreateVerifier() FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseConstantsWhereAppropriateTest.cs class UseConstantsWhereAppropriateTest (line 22) | [TestClass] method UseConstantsWhereAppropriate (line 27) | [TestMethod] method UseConstantsWhereAppropriate_CSharp11 (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseCurlyBracesTest.cs class UseCurlyBracesTest (line 22) | [TestClass] method UseCurlyBraces (line 27) | [TestMethod] method UseCurlyBraces_FromCSharp7 (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseDateTimeOffsetInsteadOfDateTimeTest.cs class UseDateTimeOffsetInsteadOfDateTimeTest (line 23) | [TestClass] method UseDateTimeInsteadOfDateTimeOffset_CS (line 29) | [TestMethod] method UseDateTimeInsteadOfDateTimeOffset_CSharp9 (line 35) | [TestMethod] method UseDateTimeInsteadOfDateTimeOffset_VB_Net (line 39) | [TestMethod] method UseDateTimeInsteadOfDateTimeOffset_VB (line 45) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseFindSystemTimeZoneByIdTest.cs class UseFindSystemTimeZoneByIdTest (line 23) | [TestClass] method UseFindSystemTimeZoneById_Net_CS (line 31) | [TestMethod] method UseFindSystemTimeZoneById_Net_VB (line 37) | [TestMethod] method UseFindSystemTimeZoneById_Net_WithoutReference_DoesNotRaise_CS (line 43) | [TestMethod] method UseFindSystemTimeZoneById_Net_WithoutReference_DoesNotRaise_VB (line 49) | [TestMethod] method UseFindSystemTimeZoneById_CS (line 57) | [TestMethod] method UseFindSystemTimeZoneById_VB (line 62) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseGenericEventHandlerInstancesTest.cs class UseGenericEventHandlerInstancesTest (line 22) | [TestClass] method UseGenericEventHandlerInstances (line 27) | [TestMethod] method UseGenericEventHandlerInstances_CSharp9 (line 32) | [TestMethod] method UseGenericEventHandlerInstances_CSharp11 (line 38) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseGenericWithRefParametersTest.cs class UseGenericWithRefParametersTest (line 22) | [TestClass] method UseGenericWithRefParameters (line 27) | [TestMethod] method UseGenericWithRefParameters_InvalidCode (line 31) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseIFormatProviderForParsingDateAndTimeTest.cs class UseIFormatProviderForParsingDateAndTimeTest (line 24) | [TestClass] method UseIFormatProviderForParsingDateAndTime_CS (line 30) | [TestMethod] method UseIFormatProviderForParsingDateAndTime_VB (line 34) | [TestMethod] method UseIFormatProviderForParsingDateAndTime__MethodOverloads_CS (line 40) | [TestMethod] method UseIFormatProviderForParsingDateAndTime__MethodOverloads_VB (line 118) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseIndexingInsteadOfLinqMethodsTest.cs class UseIndexingInsteadOfLinqMethodsTest (line 23) | [TestClass] method UseIndexingInsteadOfLinqMethods_CS (line 29) | [TestMethod] method UseIndexingInsteadOfLinqMethods_VB (line 33) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseLambdaParameterInConcurrentDictionaryTest.cs class UseLambdaParameterInConcurrentDictionaryTest (line 23) | [TestClass] method UseLambdaParameterInConcurrentDictionary_CSharp8 (line 26) | [TestMethod] method UseLambdaParameterInConcurrentDictionary_VB (line 33) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseNumericLiteralSeparatorTest.cs class UseNumericLiteralSeparatorTest (line 22) | [TestClass] method UseNumericLiteralSeparator_BeforeCSharp7 (line 27) | [TestMethod] method UseNumericLiteralSeparator_FromCSharp7 (line 34) | [TestMethod] method UseNumericLiteralSeparator_CSharp9 (line 40) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseParamsForVariableArgumentsTest.cs class UseParamsForVariableArgumentsTest (line 22) | [TestClass] method UseParamsForVariableArguments (line 27) | [TestMethod] method UseParamsForVariableArguments_CSharpLatest (line 32) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UsePascalCaseForNamedPlaceHoldersTest.cs class UsePascalCaseForNamedPlaceHoldersTest (line 24) | [TestClass] method UsePascalCaseForNamedPlaceHolders_CS (line 36) | [TestMethod] method UsePascalCaseForNamedPlaceHolders_Latest_CS (line 40) | [TestMethod] method UsePascalCaseForNamedPlaceHolders_MicrosoftExtensionsLogging_CS (line 44) | [TestMethod] method UsePascalCaseForNamedPlaceHolders_Serilog_CS (line 67) | [TestMethod] method UsePascalCaseForNamedPlaceHolders_NLog_CS (line 90) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseReturnStatementTest.cs class UseReturnStatementTest (line 22) | [TestClass] method UseReturnStatement (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseShortCircuitingOperatorTest.cs class UseShortCircuitingOperatorTest (line 23) | [TestClass] method UseShortCircuitingOperators_VB (line 29) | [TestMethod] method UseShortCircuitingOperators_VB_CodeFix (line 33) | [TestMethod] method UseShortCircuitingOperators_CS (line 37) | [TestMethod] method UseShortCircuitingOperators_CS_Latest (line 41) | [TestMethod] method UseShortCircuitingOperators_CS_TopLevelStatements (line 45) | [TestMethod] method UseShortCircuitingOperators_CS_TopLevelStatements_CodeFix (line 49) | [TestMethod] method UseShortCircuitingOperators_CS_CodeFix (line 53) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseStringCreateTest.cs class UseStringCreateTest (line 22) | [TestClass] method UseStringCreate_CSharp10 (line 29) | [TestMethod] method UseStringCreate (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseStringIsNullOrEmptyTest.cs class UseStringIsNullOrEmptyTest (line 22) | [TestClass] method UseStringNullOrEmpty (line 27) | [TestMethod] method UseStringNullOrEmpty_CSharp10 (line 31) | [TestMethod] method UseStringNullOrEmpty_CSharp11 (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseTestableTimeProviderTest.cs class UseTestableTimeProviderTest (line 23) | [TestClass] method UseTestableTimeProvider_CS (line 26) | [TestMethod] method UseTestableTimeProvider_VB (line 33) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseTrueForAllTest.cs class UseTrueForAllTest (line 23) | [TestClass] method UseTrueForAll_CS (line 29) | [TestMethod] method UseTrueForAll_CS_Immutable (line 33) | [TestMethod] method UseTrueForAll_VB (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseUnixEpochTest.cs class UseUnixEpochTest (line 23) | [TestClass] method UseUnixEpoch_Framework_CS (line 31) | [TestMethod] method UseUnixEpoch_Framework_VB (line 35) | [TestMethod] method UseUnixEpoch_CS (line 41) | [TestMethod] method UseUnixEpoch_CSharp9 (line 45) | [TestMethod] method UseUnixEpoch_VB (line 52) | [TestMethod] method UseUnixEpoch_CodeFix_CS (line 56) | [TestMethod] method UseUnixEpoch_CodeFix_CSharp9 (line 64) | [TestMethod] method UseUnixEpoch_CodeFix_VB (line 73) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseUriInsteadOfStringTest.cs class UseUriInsteadOfStringTest (line 22) | [TestClass] method UseUriInsteadOfString (line 27) | [TestMethod] method UseUriInsteadOfString_TopLevelStatements (line 33) | [TestMethod] method UseUriInsteadOfString_Latest (line 39) | [TestMethod] method UseUriInsteadOfString_InvalidCode (line 45) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseValueParameterTest.cs class UseValueParameterTest (line 22) | [TestClass] method UseValueParameter (line 27) | [TestMethod] method UseValueParameter_CS_Latest (line 31) | [TestMethod] method UseValueParameter_InvalidCode (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseWhereBeforeOrderByTest.cs class UseWhereBeforeOrderByTest (line 23) | [TestClass] method UseWhereBeforeOrderBy_CS (line 26) | [TestMethod] method UseWhereBeforeOrderBy_VB (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseWhileLoopInsteadTest.cs class UseWhileLoopInsteadTest (line 22) | [TestClass] method UseWhileLoopInstead (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/UseWithStatementTest.cs class UseWithStatementTest (line 22) | [TestClass] method UseWithStatement (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Utilities/AnalysisWarningAnalyzerTest.cs class AnalysisWarningAnalyzerTest (line 27) | [TestClass] method AnalysisWarning_MSBuildSupportedScenario_NoWarning (line 32) | [TestMethod] method AnalysisWarning_MSBuild14UnsupportedScenario_GenerateWarning (line 43) | [TestMethod] method AnalysisWarning_MSBuild15DeprecatedScenario_GenerateWarning (line 53) | [TestMethod] method AnalysisWarning_LockFile_PathShouldBeReused (line 63) | [TestMethod] method AnalysisWarning_FileExceptions_AreIgnored (line 74) | [TestMethod] method VirtualProperties (line 84) | [TestMethod] method ExecuteAnalyzer (line 92) | private string ExecuteAnalyzer(string languageName, bool isAnalyzerEna... class TestAnalysisWarningAnalyzer_CS (line 111) | private sealed class TestAnalysisWarningAnalyzer_CS : CS.AnalysisWarni... method TestAnalysisWarningAnalyzer_CS (line 119) | public TestAnalysisWarningAnalyzer_CS(bool isAnalyzerEnabled, int vs... method ReadParameters (line 127) | protected override UtilityAnalyzerParameters ReadParameters(IAnalysi... class TestAnalysisWarningAnalyzer_VB (line 131) | private sealed class TestAnalysisWarningAnalyzer_VB : VB.AnalysisWarni... method TestAnalysisWarningAnalyzer_VB (line 139) | public TestAnalysisWarningAnalyzer_VB(bool isAnalyzerEnabled, int vs... method ReadParameters (line 147) | protected override UtilityAnalyzerParameters ReadParameters(IAnalysi... class TestAnalysisWarningAnalyzer_NoOverrides (line 151) | private sealed class TestAnalysisWarningAnalyzer_NoOverrides : Analysi... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Utilities/CopyPasteTokenAnalyzerTest.cs class CopyPasteTokenAnalyzerTest (line 27) | [TestClass] method Verify_Unique_CS (line 34) | [TestMethod] method Verify_Unique_CSharp11 (line 44) | [TestMethod] method Verify_Unique_CSharp12 (line 54) | [TestMethod] method Verify_Unique_VB (line 64) | [TestMethod] method Verify_Duplicated_CS (line 74) | [TestMethod] method Verify_Duplicated_CS_GlobalUsings (line 82) | [TestMethod] method Verify_DuplicatedDifferentLiterals_CS (line 94) | [TestMethod] method Verify_NotRunForTestProject_CS (line 102) | [TestMethod] method Verify_UnchangedFiles (line 106) | [TestMethod] method Verify (line 114) | private void Verify(string fileName, Action> ver... method CreateBuilder (line 80) | private VerifierBuilder CreateBuilder(params string[] paths) method VerifyCompilationMessagesNonConcurrentRuleExecution (line 97) | private static void VerifyCompilationMessagesNonConcurrentRuleExecutio... method VerifyCompilationMessagesConcurrentRuleExecution (line 100) | private static void VerifyCompilationMessagesConcurrentRuleExecution(I... method VerifyCompilationMessagesBase (line 103) | private static void VerifyCompilationMessagesBase(IReadOnlyList messages) method VerifyLanguageVersion (line 121) | private static void VerifyLanguageVersion(IReadOnlyList messa... method VerifyConcurrentExecution (line 130) | private static void VerifyConcurrentExecution(IReadOnlyList m... method VerifyGenerated (line 139) | private static void VerifyGenerated(IReadOnlyList messages) class TestLogAnalyzer_CS (line 156) | private sealed class TestLogAnalyzer_CS : CS.LogAnalyzer method TestLogAnalyzer_CS (line 160) | public TestLogAnalyzer_CS(string outPath) method ReadParameters (line 165) | protected override UtilityAnalyzerParameters ReadParameters(IAnalysi... class TestLogAnalyzer_VB (line 169) | private sealed class TestLogAnalyzer_VB : VB.LogAnalyzer method TestLogAnalyzer_VB (line 173) | public TestLogAnalyzer_VB(string outPath) method ReadParameters (line 178) | protected override UtilityAnalyzerParameters ReadParameters(IAnalysi... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Utilities/MethodDeclarationInfoComparerTest.cs class MethodDeclarationInfoComparerTest (line 23) | [TestClass] method Equals (line 26) | [TestMethod] method Equals_Null (line 41) | [TestMethod] method GetHashCode_EqualForObjectsWithTheSameProperties (line 51) | [TestMethod] method GetHashCode_DifferentForObjectsWithDifferentProperties (line 61) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Utilities/MetricsAnalyzerTest.cs class MetricsAnalyzerTest (line 26) | [TestClass] method VerifyMetrics (line 38) | [TestMethod] method VerifyMetrics_Razor (line 57) | [TestMethod] method VerifyMetrics_Razor_Usings (line 78) | [TestMethod] method VerifyMetrics_CsHtml (line 100) | [TestMethod] method VerifyMetrics_Latest (line 107) | [TestMethod] method Verify_NotRunForTestProject (line 125) | [TestMethod] method Verify_UnchangedFiles (line 129) | [TestMethod] method CreateBuilder (line 146) | private VerifierBuilder CreateBuilder(bool isTestProject, params strin... class TestMetricsAnalyzer (line 158) | private sealed class TestMetricsAnalyzer : MetricsAnalyzer method TestMetricsAnalyzer (line 163) | public TestMetricsAnalyzer(string outPath, bool isTestProject) method ReadParameters (line 169) | protected override UtilityAnalyzerParameters ReadParameters(IAnalysi... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Utilities/SymbolReferenceAnalyzerTest.cs class SymbolReferenceAnalyzerTest (line 27) | [TestClass] method Verify_Method_PreciseLocation_CS (line 34) | [TestMethod] method Verify_Method_PreciseLocation_VB (line 46) | [TestMethod] method Verify_Event_CS (line 67) | [TestMethod] method Verify_Event_VB (line 73) | [TestMethod] method Verify_Field_CS (line 79) | [TestMethod] method Verify_Field_EscapedSequences_CS (line 89) | [TestMethod] method Verify_MissingDeclaration_CS (line 95) | [TestMethod] method Verify_Field_VB (line 101) | [TestMethod] method Verify_Tuples_CS (line 111) | [TestMethod] method Verify_Tuples_VB (line 117) | [TestMethod] method Verify_LocalFunction_CS (line 123) | [TestMethod] method Verify_Method_CS (line 129) | [TestMethod] method Verify_Method_Partial_CS (line 135) | [TestMethod] method Verify_NamedType_CS (line 182) | [TestMethod] method Verify_NamedType_VB (line 190) | [TestMethod] method Verify_Parameter_CS (line 198) | [TestMethod] method Verify_Parameter_VB (line 206) | [TestMethod] method Verify_Property_CS (line 214) | [TestMethod] method Verify_ExtensionKeyword_CS (line 222) | [TestMethod] method Verify_Property_Partial_CS (line 228) | [TestMethod] method Verify_Constructor_Partial_CS (line 261) | [TestMethod] method Verify_Event_Partial_CS (line 283) | [TestMethod] method Verify_Property_VB (line 305) | [TestMethod] method Verify_TypeParameter_CS (line 311) | [TestMethod] method Verify_TypeParameter_VB (line 317) | [TestMethod] method Verify_TokenThreshold (line 323) | [TestMethod] method Verify_UnchangedFiles (line 328) | [TestMethod] method Verify_Razor (line 344) | [TestMethod] method Verify_PrimaryConstructor_PreciseLocation_CSharp12 (line 379) | [TestMethod] method Verify (line 430) | private void Verify(string fileName, ProjectType projectType, int expe... method Verify (line 433) | private void Verify(string fileName, method CreateBuilder (line 451) | private VerifierBuilder CreateBuilder(ProjectType projectType, params ... method VerifyReferences (line 469) | private static void VerifyReferences(IReadOnlyList Telemetry_CS(CodeAnalysisCS.Lan... method Telemetry_VB (line 121) | private async Task Telemetry_VB(CodeAnalysisVB.Lan... method ParseTelemetryProtobuf (line 135) | private Protobuf.Telemetry ParseTelemetryProtobuf(string protobufFileP... method SonarLintXmlMock (line 143) | private static AdditionalText SonarLintXmlMock() method SonarProjectConfigXmlMock (line 154) | private static AdditionalText SonarProjectConfigXmlMock(string project... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Utilities/TestMethodDeclarationsAnalyzerTest.cs class TestMethodDeclarationsAnalyzerTest (line 25) | [TestClass] method VerifyMethodDeclarations_ShouldGenerateMetrics_AvoidGeneratedFiles (line 32) | [TestMethod] method VerifyMethodDeclarations_TestCode_CSharp (line 37) | [TestMethod] method VerifyMethodDeclarations_TestCode_GlobalNamespace_CSharp (line 92) | [TestMethod] method VerifyMethodDeclarations_TestCode_GlobalNamespace_VB (line 106) | [TestMethod] method VerifyMethodDeclarations_MainCode_CSharp (line 120) | [TestMethod] method VerifyMethodDeclarations_NoDeclarations_CSharp (line 124) | [TestMethod] method VerifyMethodDeclarations_TestCode_VB (line 128) | [TestMethod] method VerifyMethodDeclarations_MainCode_VB (line 180) | [TestMethod] method VerifyMethodDeclarations_NoDeclarations_VB (line 184) | [TestMethod] method CreateCSharpBuilder (line 188) | private VerifierBuilder CreateCSharpBuilder(bool isTestProject, params... method CreateVisualBasicBuilder (line 191) | private VerifierBuilder CreateVisualBasicBuilder(bool isTestProject, p... method CreateBuilder (line 194) | private VerifierBuilder CreateBuilder(ImmutableArray par... method GetFilePath (line 203) | private string GetFilePath() => Path.Combine(BasePath, TestContext.Tes... class TestMetricsAnalyzerCSharp (line 205) | private sealed class TestMetricsAnalyzerCSharp(string outPath, bool is... method ReadParameters (line 207) | protected override UtilityAnalyzerParameters ReadParameters(IAnalysi... class TestMetricsAnalyzerVisualBasic (line 211) | private sealed class TestMetricsAnalyzerVisualBasic(string outPath, bo... method ReadParameters (line 213) | protected override UtilityAnalyzerParameters ReadParameters(IAnalysi... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Utilities/TokenTypeAnalyzerTest.Classifier.cs class TokenTypeAnalyzerTest (line 20) | public partial class TokenTypeAnalyzerTest method ClassClassifications (line 22) | [TestMethod] method StringClassClassification (line 44) | [TestMethod] method IdentifierToken_QueryComprehensions (line 66) | [TestMethod] method IdentifierToken_VariableDeclarator (line 82) | [TestMethod] method IdentifierToken_LabeledStatement (line 94) | [TestMethod] method IdentifierToken_Catch (line 107) | [TestMethod] method IdentifierToken_ForEach (line 119) | [TestMethod] method IdentifierToken_MethodParameterConstructorDestructorLocalFunctionPropertyEvent (line 132) | [TestMethod] method IdentifierToken_BaseTypeDelegateEnumMember (line 148) | [TestMethod] method IdentifierToken_TupleDesignation (line 159) | [TestMethod] method IdentifierToken_FunctionPointerUnmanagedCallingConvention (line 172) | [TestMethod] method IdentifierToken_ExternAlias (line 181) | [TestMethod] method IdentifierToken_AccessorDeclaration (line 189) | [TestMethod] method IdentifierToken_AttributeTargetSpecifier_Keyword (line 197) | [TestMethod] method IdentifierToken_AttributeTargetSpecifier_UnknownSpecifier (line 215) | [TestMethod] method IdentifierToken_Usings (line 223) | [TestMethod] method IdentifierToken_Namespaces (line 249) | [TestMethod] method IdentifierToken_TypeParameters (line 257) | [TestMethod] method IdentifierToken_BaseTypeList (line 277) | [TestMethod] method IdentifierToken_BaseTypeList_DifferentTypeKind (line 296) | [TestMethod] method IdentifierToken_TypeOf (line 312) | [TestMethod] method IdentifierToken_TypeInDeclaration (line 332) | [TestMethod] method IdentifierToken_NameOf (line 353) | [TestMethod] method IdentifierToken_ValueInPropertySetter (line 374) | [TestMethod] method IdentifierToken_ValueInIndexerSetter (line 404) | [TestMethod] method IdentifierToken_ValueInEventAddRemove (line 426) | [TestMethod] method IdentifierToken_ValueInOtherPlaces (line 451) | [TestMethod] method IdentifierToken_Expressions (line 472) | [TestMethod] method IdentifierToken_Tuples (line 504) | [TestMethod] method IdentifierToken_TupleDeclaration (line 536) | [TestMethod] method IdentifierToken_LocalDeclaration (line 549) | [TestMethod] method IdentifierToken_Type_RefValue (line 570) | [TestMethod] method IdentifierToken_Type_DefaultValue (line 589) | [TestMethod] method IdentifierToken_Type_SizeOfValue (line 606) | [TestMethod] method IdentifierToken_Type_StackAlloc (line 625) | [TestMethod] method IdentifierToken_Type_Ref (line 643) | [TestMethod] method IdentifierToken_Type_QueryComprehensions (line 666) | [TestMethod] method IdentifierToken_Type_ForEach (line 696) | [TestMethod] method IdentifierToken_Type_Catch (line 713) | [TestMethod] method IdentifierToken_Type_DelegateDeclaration (line 730) | [TestMethod] method IdentifierToken_Type_MethodDeclaration (line 740) | [TestMethod] method IdentifierToken_Type_OperatorDeclaration (line 753) | [TestMethod] method IdentifierToken_Type_ConversionOperatorDeclaration (line 766) | [TestMethod] method IdentifierToken_Type_PropertyDeclaration (line 781) | [TestMethod] method IdentifierToken_Type_PartialPropertyDeclaration (line 797) | [TestMethod] method IdentifierToken_Type_LocalFunction (line 814) | [TestMethod] method IdentifierToken_Type_ParenthesizedLambda (line 830) | [TestMethod] method IdentifierToken_Type_Attribute (line 846) | [TestMethod] method IdentifierToken_Type_ExplicitInterfaceSpecifier (line 859) | [TestMethod] method IdentifierToken_Type_Nullable (line 872) | [TestMethod] method IdentifierToken_Type_Global (line 891) | [TestMethod] method IdentifierToken_SimpleMemberAccess_InOrdinaryExpression (line 905) | [TestMethod] method IdentifierToken_SimpleMemberAccess_GenericMethodGroup (line 971) | [TestMethod] method IdentifierToken_SingleExpressionIdentifier (line 994) | [TestMethod] method IdentifierToken_MemberAccess_FalseClassification (line 1138) | [TestMethod] method IdentifierToken_SingleExpressionIdentifier_NetCore (line 1159) | [TestMethod] method IdentifierToken_SingleExpressionIdentifier_Attribute (line 1191) | [TestMethod] method IdentifierToken_SimpleMemberAccess_NameOf (line 1210) | [TestMethod] method IdentifierToken_SimpleMemberAccess_ExpressionColon (line 1230) | [TestMethod] method IdentifierToken_SimpleMemberAccess_Is (line 1247) | [TestMethod] method IdentifierToken_SimpleMemberAccess_SwitchArm (line 1272) | [TestMethod] method IdentifierToken_SimpleMemberAccess_SwitchExpression (line 1298) | [TestMethod] method IdentifierToken_Scoped_Local (line 1324) | [TestMethod] method IdentifierToken_Scoped_Parameter (line 1346) | [TestMethod] method IdentifierToken_Unsafe_Pointers (line 1367) | [TestMethod] method IdentifierToken_KeywordEscaping (line 1397) | [TestMethod] method CSharp12Syntax_Classification (line 1413) | [TestMethod] method KeywordToken_AllowsAntiConstraintAndParameterModifiers (line 1428) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Utilities/TokenTypeAnalyzerTest.ClassifierTestHarness.cs class TokenTypeAnalyzerTest (line 27) | public partial class TokenTypeAnalyzerTest class ClassifierTestHarness (line 29) | private static class ClassifierTestHarness method AssertTokenTypes (line 41) | public static void AssertTokenTypes(string code, bool allowSemanticM... method CheckClassifiedToken (line 51) | private static void CheckClassifiedToken(TokenClassifier tokenClassi... method FindActual (line 78) | private static (Location Location, TokenTypeInfo.Types.TokenInfo Tok... method ParseTokens (line 94) | private static (SyntaxTree Tree, SemanticModel Model, IReadOnlyColle... method TokenGroups (line 119) | private static string TokenGroups(params string[] groups) => method TokenGroup (line 122) | private static string TokenGroup(TokenType tokenType, string shortNa... type ExpectedToken (line 125) | private readonly record struct ExpectedToken(TokenType TokenType, st... FILE: analyzers/tests/SonarAnalyzer.Test/Rules/Utilities/TokenTypeAnalyzerTest.cs class TokenTypeAnalyzerTest (line 27) | [TestClass] method Verify_MainTokens_CS (line 34) | [TestMethod] method Verify_MainTokens_CS_Latest (line 47) | [TestMethod] method Verify_NoMetricsAreComputedForRazorFiles (line 61) | [TestMethod] method Verify_MainTokens_VB (line 68) | [TestMethod] method Verify_Identifiers_CS (line 81) | [TestMethod] method Verify_Identifiers_VB (line 94) | [TestMethod] method Verify_Trivia_CS (line 106) | [TestMethod] method Verify_Trivia_VB (line 117) | [TestMethod] method Verify_IdentifierTokenThreshold (line 128) | [TestMethod] method Verify_UnchangedFiles (line 134) | [TestMethod] method Verify (line 151) | private void Verify(string fileName, ProjectType projectType, Action FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ValueTypeShouldImplementIEquatableTest.cs class ValueTypeShouldImplementIEquatableTest (line 23) | [TestClass] method ValueTypeShouldImplementIEquatable_CS (line 29) | [TestMethod] method ValueTypeShouldImplementIEquatable_CSharp10 (line 33) | [TestMethod] method ValueTypeShouldImplementIEquatable_VB (line 37) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/ValuesUselesslyIncrementedTest.cs class ValuesUselesslyIncrementedTest (line 22) | [TestClass] method ValuesUselesslyIncremented (line 27) | [TestMethod] method ValuesUselesslyIncremented_TopLevelStatements (line 31) | [TestMethod] method ValuesUselesslyIncremented_CS_Latest (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/VariableShadowsFieldTest.cs class VariableShadowsFieldTest (line 22) | [TestClass] method VariableShadowsField (line 27) | [TestMethod] method VariableShadowsField_TopLevelStatements (line 31) | [TestMethod] method VariableShadowsField_CS_Latest (line 35) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/VariableUnusedTest.cs class VariableUnusedTest (line 23) | [TestClass] method VariableUnused_CS (line 28) | [TestMethod] method VariableUnused_CS_TopLevelStatements (line 32) | [TestMethod] method VariableUnused_CS_Latest (line 36) | [TestMethod] method VariableUnused_VB (line 40) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/VirtualEventFieldTest.cs class VirtualEventFieldTest (line 22) | [TestClass] method VirtualEventField (line 27) | [TestMethod] method VirtualEventField_Latest (line 31) | [TestMethod] method VirtualEventField_Latest_CodeFix (line 35) | [TestMethod] method VirtualEventField_CodeFix (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/WcfMissingContractAttributeTest.cs class WcfMissingContractAttributeTest (line 22) | [TestClass] method WcfMissingContractAttribute (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/WcfNonVoidOneWayTest.cs class WcfNonVoidOneWayTest (line 23) | [TestClass] method WcfNonVoidOneWay_CS (line 26) | [TestMethod] method WcfNonVoidOneWay_VB (line 32) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/WeakSslTlsProtocolsTest.cs class WeakSslTlsProtocolsTest (line 23) | [TestClass] method WeakSslTlsProtocols_CSharp (line 29) | [TestMethod] method WeakSslTlsProtocols_CSharp12 (line 33) | [TestMethod] method WeakSslTlsProtocols_VB (line 37) | [TestMethod] method WithReferences (line 41) | private static VerifierBuilder WithReferences(VerifierBuilder builder) => FILE: analyzers/tests/SonarAnalyzer.Test/Rules/XMLSignatureCheckTest.cs class XmlSignatureCheckTest (line 22) | [TestClass] method XmlSignatureCheck_CS (line 30) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Rules/XmlExternalEntityShouldNotBeParsedTest.cs class XmlExternalEntityShouldNotBeParsedTest (line 22) | [TestClass] method XmlExternalEntityShouldNotBeParsed_XmlDocument (line 31) | [DataRow(NetFrameworkVersion.After452, "XmlExternalEntityShouldNotBePa... method XmlExternalEntityShouldNotBeParsed_XmlDocument_CSharp9 (line 41) | [TestMethod] method XmlExternalEntityShouldNotBeParsed_XmlDocument_CSharp10 (line 45) | [TestMethod] method XmlExternalEntityShouldNotBeParsed_XmlTextReader (line 55) | [DataRow(NetFrameworkVersion.After452, "XmlExternalEntityShouldNotBePa... method XmlExternalEntityShouldNotBeParsed_XmlTextReader_CSharp9 (line 65) | [TestMethod] method XmlExternalEntityShouldNotBeParsed_XmlTextReader_CSharp10 (line 69) | [TestMethod] method XmlExternalEntityShouldNotBeParsed_AlwaysSafe (line 75) | [DataRow(NetFrameworkVersion.After452, "XmlExternalEntityShouldNotBePa... method XmlExternalEntityShouldNotBeParsed_XmlReader (line 81) | [DataRow(NetFrameworkVersion.Probably35, "XmlExternalEntityShouldNotBe... method XmlExternalEntityShouldNotBeParsed_XmlReader_CSharp9 (line 91) | [TestMethod] method XmlExternalEntityShouldNotBeParsed_XPathDocument_CSharp9 (line 95) | [TestMethod] method XmlExternalEntityShouldNotBeParsed_XPathDocument (line 101) | [DataRow(NetFrameworkVersion.Probably35, "XmlExternalEntityShouldNotBe... method XmlExternalEntityShouldNotBeParsed_NoCrashOnExternalParameterUse (line 109) | [TestMethod] method WithAnalyzer (line 115) | private VerifierBuilder WithAnalyzer(NetFrameworkVersion version) FILE: analyzers/tests/SonarAnalyzer.Test/Syntax/Extensions/IfStatementSyntaxExtensionsTest.cs class IfStatementSyntaxExtensions (line 24) | [TestClass] method TestSetup (line 76) | [TestInitialize] method GetPrecedingIfsInConditionChain (line 80) | [TestMethod] method GetPrecedingStatementsInConditionChain (line 93) | [TestMethod] method GetPrecedingConditionsInConditionChain (line 106) | [TestMethod] method GetPrecedingSections_Empty (line 119) | [TestMethod] method GetPrecedingIfsNonChainedIsEmpty (line 127) | [TestMethod] method GetPrecedingIfsNonChainedDifferentIfIsEmpty (line 139) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Syntax/Extensions/SwitchSectionSyntaxExtensionsTest.cs class SwitchSectionSyntaxExtensionsTest (line 24) | [TestClass] method TestSetup (line 53) | [TestInitialize] method GetPrecedingSections (line 57) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Syntax/Extensions/SyntaxNodeExtensionsTest.CSharp.cs class SyntaxNodeExtensionsTest (line 25) | [TestClass] method NoDirectives (line 28) | [TestMethod] method ActiveBlocks_NonNestedIfs (line 44) | [TestMethod] method ActiveBlocks_NestedIfs (line 85) | [TestMethod] method ActiveBlocks_DirectivesInLeadingTrivia (line 125) | [TestMethod] method ActiveBlocks_ElseInPrecedingCode (line 163) | [TestMethod] method ActiveBlocks_NegativeConditions_InIf (line 196) | [TestMethod] method ActiveBlocks_NegativeConditions_InElse (line 218) | [TestMethod] method ActiveBlocks_Else_FirstBranchIsActive (line 242) | [TestMethod] method ActiveBlocks_Else_SecondBranchIsActive (line 267) | [TestMethod] method ActiveBlocks_Elif_FirstBranchIsActive (line 292) | [TestMethod] method ActiveBlocks_Elif_SecondBranchIsActive (line 320) | [TestMethod] method ActiveBlocks_Elif_FirstBranchIsActive_InLeadingTrivia (line 347) | [TestMethod] method ActiveBlocks_Elif_SecondBranchIsActive_InLeadingTrivia (line 373) | [TestMethod] method InactiveDirectives_ShouldBeIgnored (line 398) | [TestMethod] method BadDirectives_ShouldBeIgnored (line 439) | [TestMethod] method GetName_CS (line 469) | [TestMethod] method IsNullLiteral_Null_CS (line 539) | [TestMethod] method GetMainNode (line 543) | private static MethodDeclarationSyntax GetMainNode(string source) => FILE: analyzers/tests/SonarAnalyzer.Test/Syntax/Utilities/EquivalenceCheckerTest.cs class EquivalenceCheckerTest (line 27) | [TestClass] method TestSetup (line 107) | [TestInitialize] method AreEquivalent_Node_CS (line 114) | [TestMethod] method AreEquivalent_List_CS (line 124) | [TestMethod] method EqualityComparer_Node_CS (line 134) | [TestMethod] method EqualityComparer_List_CS (line 151) | [TestMethod] method AreEquivalent_Node_VB (line 168) | [TestMethod] method AreEquivalent_List_VB (line 178) | [TestMethod] method EqualityComparer_Node_VB (line 188) | [TestMethod] method EqualityComparer_List_VB (line 205) | [TestMethod] method EqualityComparer_Node_CrossLanguage (line 222) | [TestMethod] class CSharpMethods (line 226) | private class CSharpMethods method CSharpMethods (line 233) | public CSharpMethods(string source) class VisualBasicMethods (line 243) | private class VisualBasicMethods method VisualBasicMethods (line 250) | public VisualBasicMethods(string source) FILE: analyzers/tests/SonarAnalyzer.Test/Syntax/Utilities/MethodParameterLookupTest.cs class MethodParameterLookupTest (line 29) | [TestClass] method TestMethodParameterLookup_CS (line 110) | [TestMethod] method TestMethodParameterLookup_VB (line 126) | [TestMethod] method TestMethodParameterLookup_CS_ThrowsException (line 140) | [TestMethod] method TestMethodParameterLookup_VB_ThrowsException (line 154) | [TestMethod] method TestMethodParameterLookup_CS_ThrowsException_NonParams (line 168) | [TestMethod] method TestMethodParameterLookup_VB_ThrowsException_NonParams (line 178) | [TestMethod] method TestMethodParameterLookup_CS_MultipleCandidates (line 188) | [TestMethod] method TestMethodParameterLookup_VB_MultipleCandidates (line 212) | [TestMethod] method TestMethodParameterLookup_CS_MultipleCandidatesWithDifferentParameters (line 235) | [TestMethod] method TestMethodParameterLookup_VB_MultipleCandidatesWithDifferentParameters (line 259) | [TestMethod] method TestMethodParameterLookup_CS_UnknownMethod (line 282) | [TestMethod] method TestMethodParameterLookup_VB_UnknownMethod (line 304) | [TestMethod] class InspectionBase (line 321) | private abstract class InspectionBase method FindInvocationsIn (line 325) | public abstract TInvocationSyntax[] FindInvocationsIn(string name); method ExtractArgumentValue (line 326) | public abstract object ExtractArgumentValue(TArgumentSyntax argument... method GetArguments (line 327) | public abstract TArgumentSyntax[] GetArguments(TInvocationSyntax inv... method CreateLookup (line 328) | public abstract MethodParameterLookupBase CreateLoo... method InspectionBase (line 335) | protected InspectionBase(string source, AnalyzerLanguage language) method CreateLookup (line 341) | public MethodParameterLookupBase CreateLookup(int i... method CheckExpectedParameterMappings (line 349) | public void CheckExpectedParameterMappings(int invocationIndex, stri... method InitSpecial (line 356) | protected void InitSpecial(TInvocationSyntax specialInvocation) method InspectTryGetSyntax (line 362) | private void InspectTryGetSyntax(MethodParameterLookupBase class CSharpInspection (line 425) | private class CSharpInspection : InspectionBase C... method ExtractArgumentValue (line 462) | public override object ExtractArgumentValue(VBSyntax.ArgumentSyntax ... FILE: analyzers/tests/SonarAnalyzer.Test/Syntax/Utilities/RemovableDeclarationCollectorTest.cs class RemovableDeclarationCollectorTest (line 25) | [TestClass] method RemovableFieldLikeDeclarations_SearchesInNestedTypes_VB (line 28) | [TestMethod] method RemovableDeclarations_VB (line 57) | [TestMethod] method IsRemovable_Null_ReturnsFalse (line 114) | [TestMethod] method CreateCollector (line 118) | private static VisualBasicRemovableDeclarationCollector CreateCollecto... FILE: analyzers/tests/SonarAnalyzer.Test/Syntax/Utilities/SymbolUsageCollectorTest.cs class SymbolUsageCollectorTest (line 23) | [TestClass] method VerifyUsagesBeingCollectedOnMatchingSyntaxNodes (line 26) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Syntax/Utilities/SyntaxClassifierTest.cs class SyntaxClassifierTest (line 29) | [TestClass] method IsInLoopCondition_Loops_CS (line 32) | [TestMethod] method IsInLoopCondition_If_CS (line 42) | [TestMethod] method IsInLoopCondition_Loops_VB (line 60) | [TestMethod] method IsInLoopCondition_If_VB (line 76) | [TestMethod] method IsInLoopCondition_NestedInLambda (line 90) | [TestMethod] method MemberAccessExpression_Null_CS (line 102) | [TestMethod] method MemberAccessExpression_Null_VB (line 106) | [TestMethod] method IsInLoopCondition_LambdaInLoop_CS (line 110) | [TestMethod] method IsInLoopCondition_LambdaInLoop_VB (line 118) | [TestMethod] method IsInLoopConditionCS (line 126) | private static bool IsInLoopConditionCS(string code) => method IsInLoopConditionVB (line 129) | private static bool IsInLoopConditionVB(string code) => method CreateConditionCS (line 132) | private static SyntaxCS.IdentifierNameSyntax CreateConditionCS(string ... method CreateConditionVB (line 147) | private static SyntaxVB.IdentifierNameSyntax CreateConditionVB(string ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AbstractClassToInterface.Latest.Partial.cs class PartialPropertyAbstractOnly (line 4) | public abstract partial class PartialPropertyAbstractOnly class PartialPropertyPartial (line 9) | public abstract partial class PartialPropertyPartial class PartialConstructor (line 17) | public abstract partial class PartialConstructor method PartialConstructor (line 19) | public partial PartialConstructor() { } class PartialEventTest (line 22) | public abstract partial class PartialEventTest FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AbstractClassToInterface.Latest.cs type Empty (line 6) | public abstract record Empty { } type Animal (line 8) | public abstract record Animal // Noncompliant {{Convert this 'abstract' ... type SomeBaseRecord (line 14) | public record SomeBaseRecord { } type Animal2 (line 16) | public abstract record Animal2 : SomeBaseRecord // Compliant method Move (line 108) | public abstract void Move(); method Foo (line 109) | string Foo() => "FOO"; type RecordWithProtectedAbstractMethod (line 22) | public abstract record RecordWithProtectedAbstractMethod // Noncompliant type Color (line 27) | public abstract record Color type AnimalCompliant (line 33) | public interface AnimalCompliant method move (line 35) | void move(); method feed (line 36) | void feed(); class ColorCompliant (line 39) | public class ColorCompliant method ColorCompliant (line 43) | private ColorCompliant() method getRed (line 46) | public int getRed() => red; type LampCompliant (line 49) | public abstract record LampCompliant type View (line 66) | public abstract record View // Noncompliant {{Convert this 'abstract' re... type View2 (line 72) | public abstract record View2() // Compliant, has abstract and non abstra... type Record (line 79) | public abstract record Record(string X); type Record2 (line 81) | public abstract record Record2(string X) // Compliant, this record has a... class AbstractClassWithStaticField (line 87) | public abstract class AbstractClassWithStaticField // TN for .NET F... method SomeMethod (line 90) | public abstract void SomeMethod(); class Empty (line 96) | file abstract class Empty class OnlyAbstract (line 100) | file abstract class OnlyAbstract // Noncompliant {{Convert this 'abst... method Move (line 103) | public abstract void Move(); class Animal2 (line 106) | file abstract class Animal2 //Compliant method Move (line 108) | public abstract void Move(); method Foo (line 109) | string Foo() => "FOO"; class PartialPropertyAbstractOnly (line 115) | public abstract partial class PartialPropertyAbstractOnly //Noncompliant... class PartialPropertyPartial (line 121) | public abstract partial class PartialPropertyPartial class EventTest (line 129) | public abstract class EventTest class AbstractEventTest (line 134) | public abstract class AbstractEventTest class PartialConstructor (line 142) | public abstract partial class PartialConstructor method PartialConstructor (line 144) | public partial PartialConstructor(); class PartialEventTest (line 147) | public abstract partial class PartialEventTest FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AbstractClassToInterface.cs class PartialMixed (line 4) | public abstract partial class PartialMixed method X (line 6) | public abstract void X(); method Y (line 11) | public void Y() { } class PartialMixed (line 9) | public abstract partial class PartialMixed method X (line 6) | public abstract void X(); method Y (line 11) | public void Y() { } class PartialAbstract (line 14) | public abstract partial class PartialAbstract // Noncompliant method X (line 16) | public abstract void X(); method Y (line 21) | public abstract void Y(); class PartialAbstract (line 19) | public abstract partial class PartialAbstract // Noncompliant method X (line 16) | public abstract void X(); method Y (line 21) | public abstract void Y(); class Empty (line 24) | public abstract class Empty class Animal (line 28) | public abstract class Animal // Noncompliant {{Convert this 'abstract' c... method move (line 31) | public abstract void move(); method feed (line 32) | public abstract void feed(); class SomeBaseClass (line 35) | public class SomeBaseClass { } class Animal2 (line 37) | public abstract class Animal2 : SomeBaseClass // Compliant method move (line 39) | public abstract void move(); method feed (line 40) | public abstract void feed(); class Color (line 43) | public abstract class Color method getRed (line 49) | public int getRed() type AnimalCompliant (line 55) | public interface AnimalCompliant method move (line 57) | void move(); method feed (line 58) | void feed(); class ColorCompliant (line 61) | public class ColorCompliant method ColorCompliant (line 67) | private ColorCompliant() method getRed (line 71) | public int getRed() class LampCompliant (line 77) | public abstract class LampCompliant method glow (line 81) | public abstract void glow(); method flipSwitch (line 83) | public void flipSwitch() class View (line 93) | public abstract class View // Noncompliant, should be an interface class View2 (line 98) | public abstract class View2 // Compliant, has abstract and non abstract ... class View2Derived (line 105) | public abstract class View2Derived : View2 // Compliant, still has abstr... class View3Derived (line 111) | public abstract class View3Derived : SomeUnknownType // Error [CS0246] class WithStaticConstructor (line 117) | public abstract class WithStaticConstructor // TN for .NET Frame... method ToOverride (line 119) | public abstract void ToOverride(); method WithStaticConstructor (line 121) | static WithStaticConstructor() class WithNonStaticConstructor (line 127) | public abstract class WithNonStaticConstructor // Compliant: the cl... method ToOverride (line 129) | public abstract void ToOverride(); method WithNonStaticConstructor (line 131) | public WithNonStaticConstructor() class AbstractClassWithField (line 138) | public abstract class AbstractClassWithField // Compliant: th... method SomeMethod (line 141) | public abstract void SomeMethod(); class AbstractProtectedMethod (line 144) | public abstract class AbstractProtectedMethod // Noncompliant method SomeMethod (line 146) | protected abstract void SomeMethod(); class AbstractProtectedInternalMethod (line 149) | public abstract class AbstractProtectedInternalMethod // Noncompliant method SomeMethod (line 151) | protected internal abstract void SomeMethod(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AbstractTypesShouldNotHaveConstructors.Latest.Partial.cs class PartialConstructor (line 3) | public abstract partial class PartialConstructor method PartialConstructor (line 5) | public partial PartialConstructor() { } class NonPartialConstructor (line 8) | public abstract partial class NonPartialConstructor FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AbstractTypesShouldNotHaveConstructors.Latest.cs class PrimaryConstructor (line 6) | abstract class PrimaryConstructor(int i) // Compliant type AbstractRecordOne (line 14) | abstract record AbstractRecordOne type RecordOne (line 21) | record RecordOne : AbstractRecordOne type AbstractRecordTwo (line 26) | abstract record AbstractRecordTwo(string Y); type RecordTwo (line 28) | record RecordTwo(string Z) : AbstractRecordTwo(Z); type Person (line 30) | public abstract record Person(string Name, string Surname) type MyStruct (line 37) | public struct MyStruct method MyStruct (line 39) | public MyStruct(string s) class PartialConstructor (line 47) | public abstract partial class PartialConstructor method PartialConstructor (line 49) | public partial PartialConstructor(); class NonPartialConstructor (line 52) | public abstract partial class NonPartialConstructor method NonPartialConstructor (line 54) | public NonPartialConstructor() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AbstractTypesShouldNotHaveConstructors.TopLevelStatements.cs class Base (line 5) | abstract class Base method Base (line 7) | public Base() { } method Base (line 9) | private Base(int i) { } type AbstractRecordOne (line 12) | abstract record AbstractRecordOne type RecordOne (line 19) | record RecordOne : AbstractRecordOne FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AbstractTypesShouldNotHaveConstructors.cs class Program (line 6) | class Program class Base (line 8) | abstract class Base method Base (line 10) | public Base() // Noncompliant {{Change the visibility of this constr... method Base (line 16) | private Base(int i) // Compliant method Base (line 21) | protected Base(int i, int j) // Compliant method Base (line 26) | internal Base(int i, int j, int k) // Noncompliant {{Change the visi... method Base (line 31) | internal protected Base(int i, int j, int k, int l) // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AllBranchesShouldNotHaveSameImplementation.cs class Program (line 5) | public class Program method IfElseCases (line 7) | public void IfElseCases(int b, int c) method SwitchCases (line 66) | public void SwitchCases(int i) method TernaryCases (line 133) | public void TernaryCases(bool c, int a) method DoSomething (line 144) | private void DoSomething() method DoSomethingElse (line 148) | private void DoSomethingElse() method SwitchExpressionNoncompliant (line 152) | public int SwitchExpressionNoncompliant(string type) => method SwitchExpressionNested (line 161) | public int SwitchExpressionNested(string type) method GetNumber (line 175) | public int GetNumber() => 42; method SwitchExpressionCompliant (line 177) | public int SwitchExpressionCompliant(string type) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AlwaysSetDateTimeKind.cs class Program (line 5) | public class Program method Noncompliant (line 7) | public void Noncompliant() method Compliant (line 23) | public void Compliant() class FakeDateTime (line 35) | public class FakeDateTime class DateTime (line 37) | private class DateTime method Compliant (line 42) | private void Compliant() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AnonymousDelegateEventUnsubscribe.Latest.cs class AnonymousDelegateEventUnsubscribe (line 6) | class AnonymousDelegateEventUnsubscribe method Test_LambdaDiscard_StaticLambda (line 13) | void Test_LambdaDiscard_StaticLambda() method Test_LambdaDiscard_StaticLambda_Compliant (line 21) | void Test_LambdaDiscard_StaticLambda_Compliant() method NullConditionalAssignment (line 32) | public void NullConditionalAssignment(WithEvent obj) class WithEvent (line 40) | public class WithEvent FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AnonymousDelegateEventUnsubscribe.cs class AnonymousDelegateEventUnsubscribe (line 6) | class AnonymousDelegateEventUnsubscribe method Test (line 13) | void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ArgumentSpecifiedForCallerInfoParameter.Latest.cs class ArgumentSpecifiedForCallerInfoParameter (line 6) | public class ArgumentSpecifiedForCallerInfoParameter method TraceMessage (line 8) | public void TraceMessage(bool condition, [CallerArgumentExpression("co... method MyMethod (line 12) | void MyMethod() type ISomeInterface (line 20) | public interface ISomeInterface method StaticVirtualMembersInInterfaces (line 22) | static abstract bool StaticVirtualMembersInInterfaces(bool flag, [Call... class SomeTestClass (line 25) | public class SomeTestClass : ISomeInterface method StaticVirtualMembersInInterfaces (line 27) | public static bool StaticVirtualMembersInInterfaces(bool flag, [Caller... class SomeTestClass2 (line 30) | public class SomeTestClass2 : ISomeInterface method StaticVirtualMembersInInterfaces (line 32) | public static bool StaticVirtualMembersInInterfaces(bool flag, [Caller... class SomeOtherClass (line 35) | public class SomeOtherClass method MyMethod (line 37) | void MyMethod(T someTestClass) where T : ISomeInterface class Repro_NET1252 (line 46) | public class Repro_NET1252 method MyMethod (line 48) | void MyMethod() class Extensions (line 54) | public static class Extensions method extension (line 56) | extension(ArgumentSpecifiedForCallerInfoParameter obj) method extension (line 66) | extension (ExtensionHasCallerInfo obj) class ExtensionHasCallerInfo (line 72) | public class ExtensionHasCallerInfo method Test (line 74) | void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ArgumentSpecifiedForCallerInfoParameter.cs class ArgumentSpecifiedForCallerInfoParameter (line 7) | class ArgumentSpecifiedForCallerInfoParameter method TraceMessage (line 9) | void TraceMessage(string message, method MyMethod (line 17) | void MyMethod() method PassThrough (line 29) | void PassThrough(string message, FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ArrayCovariance.CSharp9.cs class Fruit (line 6) | abstract class Fruit { } class Apple (line 7) | class Apple : Fruit { } class Orange (line 8) | class Orange : Fruit { } class Program (line 10) | class Program method TargetTypedConditional (line 12) | static void TargetTypedConditional(bool isTrue, Apple[] apples, Fruit[... method AddToBasket (line 41) | static void AddToBasket(Fruit[] fruits) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ArrayCovariance.cs class Fruit (line 6) | abstract class Fruit { } class Apple (line 7) | class Apple : Fruit { } class Orange (line 8) | class Orange : Fruit { } class Program (line 10) | class Program method Main (line 17) | static void Main(string[] args) method FillWithOranges (line 28) | static void FillWithOranges(Fruit[] fruits) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ArrayPassedAsParams.Latest.cs class MyClass (line 59) | class MyClass(int a, params int[] args); class MyClass2 (line 60) | class MyClass2(int[] a, params int[] args); class MyClass3 (line 61) | class MyClass3(params int[][] args); class MyClass4 (line 62) | class MyClass4(params MyClass[] args); class MyClass5 (line 63) | class MyClass5 method MyClass5 (line 65) | public MyClass5(int a, params int[] args) { } class MyImmutableArray (line 68) | static class MyImmutableArray method Create (line 70) | public static MyImmutableArray Create(ReadOnlySpan items) => []; method GetEnumerator (line 76) | IEnumerator IEnumerable.GetEnumerator() => default!; method GetEnumerator (line 77) | IEnumerator IEnumerable.GetEnumerator() => default!; type MyImmutableArray (line 73) | [CollectionBuilder(typeof(MyImmutableArray), "Create")] method Create (line 70) | public static MyImmutableArray Create(ReadOnlySpan items) => []; method GetEnumerator (line 76) | IEnumerator IEnumerable.GetEnumerator() => default!; method GetEnumerator (line 77) | IEnumerator IEnumerable.GetEnumerator() => default!; class Repro6977_CollectionExpression (line 81) | public class Repro6977_CollectionExpression class ParamsAttribute (line 83) | class ParamsAttribute : Attribute method ParamsAttribute (line 85) | public ParamsAttribute(params string[] values) { } method ParamsAttribute (line 86) | public ParamsAttribute(int a, string b, params string[] values) { } type Foo (line 89) | internal enum Foo class ImplicitSpanConversion (line 99) | public class ImplicitSpanConversion method Test (line 101) | public static void Test(string[] myArray) method DoSomething (line 117) | public static void DoSomething(params Span arr) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ArrayPassedAsParams.cs class Program (line 4) | public class Program method Base (line 6) | public void Base(string[] myArray) method Method (line 50) | public void Method(params string[] args) { } method Method2 (line 52) | public void Method2(int a, params string[] args) { } method Method3 (line 54) | public void Method3(string[] a, params string[] args) { } method Method4 (line 56) | public void Method4(object[] a, params object[] args) { } method Method5 (line 58) | public void Method5(params string[] a, params string[] args) { } class MyClass (line 61) | public class MyClass method MyClass (line 63) | public MyClass(int a, params int[] args) { } class MyOtherClass (line 66) | public class MyOtherClass method MyOtherClass (line 68) | public MyOtherClass(int[] a, params int[] args) { } class IndexerClass (line 71) | public class IndexerClass class Repro6894 (line 76) | public class Repro6894 method Method (line 80) | public void Method(params object[] args) { } method MethodMixed (line 81) | public void MethodMixed(int i, params object[] args) { } method MethodArray (line 82) | public void MethodArray(params Array[] args) { } method MethodJaggedArray (line 83) | public void MethodJaggedArray(params int[][] args) { } method MethodImplicitArray (line 84) | public void MethodImplicitArray(params string[] args) { } method CallMethod (line 86) | public void CallMethod(dynamic d) class Repro6893 (line 114) | public class Repro6893 method Method (line 116) | public void Method(int a, params object[] argumentArray) { } method CallMethod (line 118) | public void CallMethod() class Repro6977 (line 125) | public class Repro6977 class ParamsAttribute (line 127) | class ParamsAttribute : Attribute method ParamsAttribute (line 129) | public ParamsAttribute(params string[] values) { } method ParamsAttribute (line 130) | public ParamsAttribute(int a, string b, params string[] values) { } method ParamsAttribute (line 131) | public ParamsAttribute() { } type Foo (line 136) | internal enum Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/AnnotateApiActionsWithHttpVerb.cs class NoncompliantController (line 9) | [ApiController] method FooGet (line 12) | [Route("foo")] method FooPost (line 16) | public int FooPost([FromBody] string id) => // Noncompliant class CompliantController (line 20) | [ApiController] method Get (line 23) | [HttpGet("foo")] method Put (line 26) | [HttpPut("foo")] method Post (line 30) | [HttpPost("foo")] method Delete (line 34) | [HttpDelete("foo")] method Patch (line 38) | [HttpPatch("foo")] method Head (line 42) | [HttpHead("foo")] method Options (line 46) | [Route("foo")] method AcceptVerbs (line 51) | [AcceptVerbs("GET", "POST")] method IgnoresApi (line 56) | [Route("Error")] method MyGet (line 68) | [Route("foo")] method MyMethod (line 73) | [Route("foo")] method MyGet (line 310) | [HttpRouteGet("foo")] class CompliantController (line 65) | [ApiController] method Get (line 23) | [HttpGet("foo")] method Put (line 26) | [HttpPut("foo")] method Post (line 30) | [HttpPost("foo")] method Delete (line 34) | [HttpDelete("foo")] method Patch (line 38) | [HttpPatch("foo")] method Head (line 42) | [HttpHead("foo")] method Options (line 46) | [Route("foo")] method AcceptVerbs (line 51) | [AcceptVerbs("GET", "POST")] method IgnoresApi (line 56) | [Route("Error")] method MyGet (line 68) | [Route("foo")] method MyMethod (line 73) | [Route("foo")] method MyGet (line 310) | [HttpRouteGet("foo")] class MyHttpGetAttribute (line 79) | public class MyHttpGetAttribute : HttpGetAttribute { } class MyHttpMethodAttribute (line 81) | public class MyHttpMethodAttribute : HttpMethodAttribute method MyHttpMethodAttribute (line 83) | public MyHttpMethodAttribute() : base(null) { } class ExcludedFromOpenApiController (line 89) | [ApiController] method FooGet (line 93) | [Route("foo")] method FooPost (line 96) | public int FooPost([FromBody] string id) => class MarkedWithApiExplorerButIgnoreApiSpecifiedAsFalse (line 100) | [ApiController] method FooGet (line 104) | [Route("foo")] class MarkedWithApiExplorerButIgnoreApiUnspecified (line 108) | [ApiController] method FooGet (line 112) | [Route("foo")] class MarkedWithApiExplorerButIgnoreApiUnspecified2 (line 116) | [ApiController] method FooGet (line 120) | [Route("foo")] class MyApiExplorerSettingsAttribute (line 126) | class MyApiExplorerSettingsAttribute : ApiExplorerSettingsAttribute { } class MarkedWithMyApiExplorer (line 128) | [ApiController] method FooGet (line 132) | [Route("foo")] class MarkedWithMyApiExplorerButIgnoreApiSpecifiedAsFalse (line 136) | [ApiController] method FooGet (line 140) | [Route("foo")] class MarkedWithMyApiExplorerButIgnoreApiUnspecified (line 144) | [ApiController] method FooGet (line 148) | [Route("foo")] class NotPublicClass (line 156) | [ApiController] method FooGet (line 159) | [Route("foo")] class NotPublicMethod (line 163) | [ApiController] method FooGet (line 166) | [Route("foo")] class AnnotatedAsController (line 173) | [ApiController] method FooGet (line 177) | [Route("foo")] class NotAController (line 181) | [NonController] method FooGet (line 185) | [Route("foo")] class AnnotatedAsControllerAndNonController (line 189) | [ApiController] method FooGet (line 194) | [Route("foo")] class NotApiController (line 198) | public class NotApiController : ControllerBase method FooGet (line 200) | [Route("foo")] class NotApiController2 (line 204) | [Controller] method FooGet (line 207) | [Route("foo")] class AnnotatedWithCustomApiController (line 211) | [MyApiController] method FooGet (line 214) | [Route("foo")] class MyApiControllerAttribute (line 218) | class MyApiControllerAttribute : ApiControllerAttribute { } class NotDerivingController (line 223) | [ApiController] method FooGet (line 226) | [Route("foo")] class DerivingController (line 230) | [ApiController] method Foo (line 233) | [Route("foo")] method Get (line 236) | public string Get() => "hi"; class DerivingMyController (line 239) | [ApiController] method Foo (line 242) | [Route("foo")] method Get (line 245) | public string Get() => "hi"; class MyController (line 248) | public class MyController : Controller { } class BaseController (line 250) | [ApiController] method BaseHasNoMethod (line 253) | [Route("foo")] method BaseHasMethod (line 256) | [HttpGet("foo")] method BaseHasAcceptVerbs (line 259) | [AcceptVerbs("GET")] method BaseHasApiExplorerSettingsWithoutIgnoring (line 262) | [ApiExplorerSettings()] method BaseHasApiExplorerSettingsIgnoring (line 265) | [ApiExplorerSettings(IgnoreApi = true)] method BaseAbstractMethod (line 268) | public abstract string BaseAbstractMethod(); class ImplementationNoBehaviorChangeController (line 271) | public class ImplementationNoBehaviorChangeController : BaseController method BaseHasNoMethod (line 273) | public override string BaseHasNoMethod() => "hi"; method BaseHasMethod (line 275) | public override string BaseHasMethod() => "hi"; method BaseHasAcceptVerbs (line 277) | public override string BaseHasAcceptVerbs() => "hi"; method BaseHasApiExplorerSettingsWithoutIgnoring (line 279) | public override string BaseHasApiExplorerSettingsWithoutIgnoring() => ... method BaseHasApiExplorerSettingsIgnoring (line 281) | public override string BaseHasApiExplorerSettingsIgnoring() => "hi"; method BaseAbstractMethod (line 283) | public override string BaseAbstractMethod() => "hi"; class ImplementationBehaviorChangedController (line 286) | public class ImplementationBehaviorChangedController : BaseController method BaseHasNoMethod (line 288) | [HttpGet] method BaseHasAcceptVerbs (line 291) | public override string BaseHasAcceptVerbs() => "hi"; method BaseHasApiExplorerSettingsWithoutIgnoring (line 293) | [ApiExplorerSettings(IgnoreApi = true)] method BaseHasApiExplorerSettingsIgnoring (line 296) | [ApiExplorerSettings(IgnoreApi = false)] method BaseAbstractMethod (line 299) | [HttpGet] class CompliantController (line 307) | [ApiController] method Get (line 23) | [HttpGet("foo")] method Put (line 26) | [HttpPut("foo")] method Post (line 30) | [HttpPost("foo")] method Delete (line 34) | [HttpDelete("foo")] method Patch (line 38) | [HttpPatch("foo")] method Head (line 42) | [HttpHead("foo")] method Options (line 46) | [Route("foo")] method AcceptVerbs (line 51) | [AcceptVerbs("GET", "POST")] method IgnoresApi (line 56) | [Route("Error")] method MyGet (line 68) | [Route("foo")] method MyMethod (line 73) | [Route("foo")] method MyGet (line 310) | [HttpRouteGet("foo")] class HttpRouteGetAttribute (line 315) | public class HttpRouteGetAttribute : Attribute, IActionHttpMethodProvider method HttpRouteGetAttribute (line 317) | public HttpRouteGetAttribute(string template) => Template = template; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/ApiControllersShouldNotDeriveDirectlyFromController.cs class ChildAttribute (line 5) | class ChildAttribute : ApiControllerAttribute { } class GrandChildAttribute (line 6) | class GrandChildAttribute : ChildAttribute { } class ParentController (line 8) | public class ParentController : Controller { } class ParentControllerBase (line 9) | public class ParentControllerBase : ControllerBase { } class ChildController (line 11) | public class ChildController : ParentController { } class ChildControllerBase (line 12) | public class ChildControllerBase : ParentControllerBase { } class Baseline (line 16) | [ApiController] class ControllerWithInterface (line 20) | [ApiController] class ChildOfBase (line 24) | [ApiController] class WithoutAttribute (line 27) | public class WithoutAttribute : Controller { } class PocoController (line 29) | public class PocoController { } class PocoWithApiAttribute (line 31) | [ApiController] class PocoWithControllerAttribute (line 34) | [Controller] class PocoWithBothAttributes (line 37) | [ApiController] class NotAController (line 41) | [ApiController] class Internal (line 45) | [ApiController] type ITestInterface (line 48) | public interface ITestInterface { } class WithType (line 53) | [type: ApiController] class WithSuffix (line 56) | [ApiControllerAttribute] class WithParentheses (line 59) | [ApiController()] class Everything (line 62) | [type: ApiControllerAttribute()] class Child (line 69) | [ApiController] class GrandChild (line 72) | [ApiController] class NoInheritance (line 75) | [ApiController] class UsesChildAttribute (line 81) | [ChildAttribute] class UsesGrandChildAttribute (line 85) | [GrandChildAttribute] class UsesChildAttributeBase (line 89) | [ChildAttribute] class UsesGrandChildAttributeBase (line 92) | [GrandChildAttribute] class Partial (line 98) | [ApiController] method Foo (line 153) | public object Foo() => View(); class Partial (line 100) | public partial class Partial : Controller { } method Foo (line 153) | public object Foo() => View(); class PartialBase (line 103) | [ApiController] class PartialBase (line 105) | public partial class PartialBase : ControllerBase { } class PartialDoubleInheritance (line 107) | [ApiController] class PartialDoubleInheritance (line 111) | public partial class PartialDoubleInheritance : Controller { } class Outer (line 118) | public class Outer class Inner (line 120) | [ApiController] class OverrideViewInvocation (line 127) | [ApiController] method Foo (line 130) | public object Foo() => this.View(); method View (line 131) | public override ViewResult View() => null; class FakeViewInvocation (line 134) | [ApiController] method Foo (line 137) | public object Foo() => this.View(); method View (line 138) | public ViewResult View() => null; class BaseViewInvocation (line 141) | [ApiController] method Foo (line 144) | public object Foo() => base.View(); method View (line 145) | public ViewResult View() => null; class Partial (line 148) | [ApiController] method Foo (line 153) | public object Foo() => View(); class Partial (line 150) | public partial class Partial : Controller { } method Foo (line 153) | public object Foo() => View(); class Partial (line 151) | public partial class Partial method Foo (line 153) | public object Foo() => View(); class MemberReference (line 156) | [ApiController] method NotCalled (line 159) | public Func NotCalled() => this.View; class NameOf (line 162) | [ApiController] method Foo (line 165) | public object Foo() => nameof(View); class PassByName (line 168) | [ApiController] method Foo (line 171) | public void Foo() => ExpectsAction(View); method ExpectsAction (line 172) | public void ExpectsAction(Func func) class PassByLambda (line 178) | [ApiController] method Foo (line 181) | public void Foo() => ExpectsAction(() => View()); method ExpectsAction (line 182) | public void ExpectsAction(Func func) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/ApiControllersShouldNotDeriveDirectlyFromControllerCodeFix.Fixed.cs class Baseline (line 7) | [ApiController] class SimpleController (line 11) | [ApiController] class CodeFixRespectsCommentsController (line 14) | [ApiController] class CodeFixRespectsCommentsAlsoHasInterfaceController (line 17) | [ApiController] class ControllerWithInterface (line 20) | [ApiController] type ITestInterface (line 23) | public interface ITestInterface { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/ApiControllersShouldNotDeriveDirectlyFromControllerCodeFix.cs class Baseline (line 7) | [ApiController] class SimpleController (line 11) | [ApiController] class CodeFixRespectsCommentsController (line 14) | [ApiController] class CodeFixRespectsCommentsAlsoHasInterfaceController (line 17) | [ApiController] class ControllerWithInterface (line 20) | [ApiController] type ITestInterface (line 23) | public interface ITestInterface { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/AvoidUnderPosting.AutogeneratedModel.cs class AutogeneratedModel (line 11) | public partial class AutogeneratedModel FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/AvoidUnderPosting.Latest.Partial.cs class PartialPropertyClass (line 5) | public partial class PartialPropertyClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/AvoidUnderPosting.Latest.cs class ModelWithPrimaryConstructor (line 8) | public class ModelWithPrimaryConstructor(int vp, int rvp, int nvp) class ModelWithPrimaryAndParameterlessConstructor (line 13) | public class ModelWithPrimaryAndParameterlessConstructor(int vp, int rvp... method ModelWithPrimaryAndParameterlessConstructor (line 15) | public ModelWithPrimaryAndParameterlessConstructor() : this(0, 0, 0) { } class DerivedFromController (line 19) | public class DerivedFromController : Controller method Create (line 21) | [HttpPost] public IActionResult Create(ModelWithPrimaryConstructor mod... method Remove (line 22) | [HttpDelete] public IActionResult Remove(ModelWithPrimaryAndParameterl... method Create (line 44) | [HttpPost] public IActionResult Create(Model model) => View(model); method Read (line 67) | [HttpGet] public IActionResult Read(RecordModel model) => View(model); method Create (line 68) | [HttpPost] public IActionResult Create(ModelUsedInController model) =>... method Create (line 93) | [HttpPost] method Create (line 156) | [HttpPost] class Model (line 29) | public class Model class DerivedFromController (line 42) | public class DerivedFromController : Controller method Create (line 21) | [HttpPost] public IActionResult Create(ModelWithPrimaryConstructor mod... method Remove (line 22) | [HttpDelete] public IActionResult Remove(ModelWithPrimaryAndParameterl... method Create (line 44) | [HttpPost] public IActionResult Create(Model model) => View(model); method Read (line 67) | [HttpGet] public IActionResult Read(RecordModel model) => View(model); method Create (line 68) | [HttpPost] public IActionResult Create(ModelUsedInController model) =>... method Create (line 93) | [HttpPost] method Create (line 156) | [HttpPost] class CustomAttribute (line 47) | public class CustomAttribute : Attribute { } type RecordModel (line 53) | public record RecordModel( class ModelUsedInController (line 60) | public class ModelUsedInController class DerivedFromController (line 65) | public class DerivedFromController : Controller method Create (line 21) | [HttpPost] public IActionResult Create(ModelWithPrimaryConstructor mod... method Remove (line 22) | [HttpDelete] public IActionResult Remove(ModelWithPrimaryAndParameterl... method Create (line 44) | [HttpPost] public IActionResult Create(Model model) => View(model); method Read (line 67) | [HttpGet] public IActionResult Read(RecordModel model) => View(model); method Create (line 68) | [HttpPost] public IActionResult Create(ModelUsedInController model) =>... method Create (line 93) | [HttpPost] method Create (line 156) | [HttpPost] class ModelUsedInController (line 76) | public class ModelUsedInController class DerivedFromController (line 91) | public class DerivedFromController : Controller method Create (line 21) | [HttpPost] public IActionResult Create(ModelWithPrimaryConstructor mod... method Remove (line 22) | [HttpDelete] public IActionResult Remove(ModelWithPrimaryAndParameterl... method Create (line 44) | [HttpPost] public IActionResult Create(Model model) => View(model); method Read (line 67) | [HttpGet] public IActionResult Read(RecordModel model) => View(model); method Create (line 68) | [HttpPost] public IActionResult Create(ModelUsedInController model) =>... method Create (line 93) | [HttpPost] method Create (line 156) | [HttpPost] class GenericType (line 103) | public class GenericType class ControllerClass (line 116) | public class ControllerClass : Controller method Create (line 118) | [HttpPost] public IActionResult Create(GenericType View(model); method Read (line 67) | [HttpGet] public IActionResult Read(RecordModel model) => View(model); method Create (line 68) | [HttpPost] public IActionResult Create(ModelUsedInController model) =>... method Create (line 93) | [HttpPost] method Create (line 156) | [HttpPost] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/AvoidUnderPosting.cs class ClassNotUsedInRequests (line 13) | public class ClassNotUsedInRequests class ModelUsedInController (line 18) | public class ModelUsedInController class NoDefaultConstructor (line 53) | public class NoDefaultConstructor method NoDefaultConstructor (line 57) | public NoDefaultConstructor(int arg) class ExplicitDefaultConstructor (line 62) | public class ExplicitDefaultConstructor method ExplicitDefaultConstructor (line 66) | public ExplicitDefaultConstructor() method ExplicitDefaultConstructor (line 70) | public ExplicitDefaultConstructor(int arg) class DerivedFromController (line 75) | public class DerivedFromController : Controller method Create (line 77) | [HttpPost] public IActionResult Create(ModelUsedInController model) =>... method Update (line 78) | [HttpPut] public IActionResult Update(NoDefaultConstructor model) => V... method Remove (line 79) | [HttpDelete] public IActionResult Remove(ExplicitDefaultConstructor mo... method NotActionMethod (line 80) | private void NotActionMethod(ClassNotUsedInRequests arg) { } class SingleModel (line 86) | public class SingleModel { public int Property { get; set; } } class MultipleModel (line 87) | public class MultipleModel { public int Property { get; set; } } class VerbModel (line 88) | public class VerbModel { public int Property { get; set; } } class MultipleVerbsModel (line 89) | public class MultipleVerbsModel { public int Property { get; set; } } class DecoratedWithApiControlerAttribute (line 91) | [ApiController] method Single (line 95) | [HttpGet] method Multiple (line 98) | [HttpGet] method Verb (line 104) | [AcceptVerbs("POST")] method MultipleVerbs (line 107) | [AcceptVerbs("GET", "POST", "PUT", "DELETE")] class Parent (line 114) | public class Parent class Child (line 119) | public class Child : Parent class GrandChild (line 124) | public class GrandChild : Child class ControllerClass (line 129) | public class ControllerClass : Controller method Create (line 131) | [HttpPost] public IActionResult Create(GrandChild model) => View(model); method Update (line 132) | [HttpPost] public IActionResult Update(Parent model) => View(model); method Create (line 153) | [HttpPost] public IActionResult Create(Model model) => View(model); method CreateArray (line 169) | [HttpPost] public IActionResult CreateArray(ArrayItem[] model) => View... method CreateNestedArray (line 170) | [HttpPost] public IActionResult CreateNestedArray(NestedArrayItem[] mo... method CreateEnumerable (line 171) | [HttpPost] public IActionResult CreateEnumerable(IEnumerable model) => Vi... method CreateDictionary (line 173) | [HttpPost] public IActionResult CreateDictionary(Dictionary View(model); method Update (line 132) | [HttpPost] public IActionResult Update(Parent model) => View(model); method Create (line 153) | [HttpPost] public IActionResult Create(Model model) => View(model); method CreateArray (line 169) | [HttpPost] public IActionResult CreateArray(ArrayItem[] model) => View... method CreateNestedArray (line 170) | [HttpPost] public IActionResult CreateNestedArray(NestedArrayItem[] mo... method CreateEnumerable (line 171) | [HttpPost] public IActionResult CreateEnumerable(IEnumerable model) => Vi... method CreateDictionary (line 173) | [HttpPost] public IActionResult CreateDictionary(Dictionary View(model); method Update (line 132) | [HttpPost] public IActionResult Update(Parent model) => View(model); method Create (line 153) | [HttpPost] public IActionResult Create(Model model) => View(model); method CreateArray (line 169) | [HttpPost] public IActionResult CreateArray(ArrayItem[] model) => View... method CreateNestedArray (line 170) | [HttpPost] public IActionResult CreateNestedArray(NestedArrayItem[] mo... method CreateEnumerable (line 171) | [HttpPost] public IActionResult CreateEnumerable(IEnumerable model) => Vi... method CreateDictionary (line 173) | [HttpPost] public IActionResult CreateDictionary(Dictionary model) method Create (line 208) | public void Create(MyModel model) class Model (line 187) | public class Model where T : Person class Person (line 192) | public abstract class Person class Developer (line 197) | public class Developer : Person class MyController (line 206) | public class MyController : ControllerBase method Create (line 182) | public void Create(Model model) method Create (line 208) | public void Create(MyModel model) class Model (line 213) | public class Model where T : Model class MyModel (line 219) | public class MyModel : Model class NotVisited (line 226) | public class NotVisited class Model (line 231) | public class Model class NeverValidatedModel (line 237) | [ValidateNever] class RegularModel (line 243) | public class RegularModel class CustomController (line 248) | public class CustomController : Controller method Get (line 250) | [HttpGet] public IActionResult Get(NeverValidatedModel model) => View(... method Post (line 251) | [HttpPost] public IActionResult Post(Model model) => View(model); method Put (line 252) | [HttpPut] public IActionResult Put([ValidateNever] RegularModel model)... method Post (line 270) | [HttpPost] public IActionResult Post(Model1 model1, int other, Model2 ... method Post (line 288) | [HttpPost] public IActionResult Post(Model model) => View(model); method PostObject (line 296) | [HttpPost] public IActionResult PostObject(object model) => View(model); method PostString (line 297) | [HttpPost] public IActionResult PostString(string model) => View(model); method PostDynamic (line 298) | [HttpPost] public IActionResult PostDynamic(dynamic model) => View(mod... method Get (line 335) | [HttpGet] public IActionResult Get(ModelWithBindNeverProperty model) =... method Post (line 336) | [HttpPost] public IActionResult Post(EntireModelWithBindNeverAttribute... class Model1 (line 258) | public class Model1 class Model2 (line 263) | public class Model2 class CustomController (line 268) | public class CustomController : Controller method Get (line 250) | [HttpGet] public IActionResult Get(NeverValidatedModel model) => View(... method Post (line 251) | [HttpPost] public IActionResult Post(Model model) => View(model); method Put (line 252) | [HttpPut] public IActionResult Put([ValidateNever] RegularModel model)... method Post (line 270) | [HttpPost] public IActionResult Post(Model1 model1, int other, Model2 ... method Post (line 288) | [HttpPost] public IActionResult Post(Model model) => View(model); method PostObject (line 296) | [HttpPost] public IActionResult PostObject(object model) => View(model); method PostString (line 297) | [HttpPost] public IActionResult PostString(string model) => View(model); method PostDynamic (line 298) | [HttpPost] public IActionResult PostDynamic(dynamic model) => View(mod... method Get (line 335) | [HttpGet] public IActionResult Get(ModelWithBindNeverProperty model) =... method Post (line 336) | [HttpPost] public IActionResult Post(EntireModelWithBindNeverAttribute... type IPerson (line 276) | public interface IPerson class Model (line 281) | public class Model class CustomController (line 286) | public class CustomController : Controller method Get (line 250) | [HttpGet] public IActionResult Get(NeverValidatedModel model) => View(... method Post (line 251) | [HttpPost] public IActionResult Post(Model model) => View(model); method Put (line 252) | [HttpPut] public IActionResult Put([ValidateNever] RegularModel model)... method Post (line 270) | [HttpPost] public IActionResult Post(Model1 model1, int other, Model2 ... method Post (line 288) | [HttpPost] public IActionResult Post(Model model) => View(model); method PostObject (line 296) | [HttpPost] public IActionResult PostObject(object model) => View(model); method PostString (line 297) | [HttpPost] public IActionResult PostString(string model) => View(model); method PostDynamic (line 298) | [HttpPost] public IActionResult PostDynamic(dynamic model) => View(mod... method Get (line 335) | [HttpGet] public IActionResult Get(ModelWithBindNeverProperty model) =... method Post (line 336) | [HttpPost] public IActionResult Post(EntireModelWithBindNeverAttribute... class CustomController (line 294) | public class CustomController : Controller method Get (line 250) | [HttpGet] public IActionResult Get(NeverValidatedModel model) => View(... method Post (line 251) | [HttpPost] public IActionResult Post(Model model) => View(model); method Put (line 252) | [HttpPut] public IActionResult Put([ValidateNever] RegularModel model)... method Post (line 270) | [HttpPost] public IActionResult Post(Model1 model1, int other, Model2 ... method Post (line 288) | [HttpPost] public IActionResult Post(Model model) => View(model); method PostObject (line 296) | [HttpPost] public IActionResult PostObject(object model) => View(model); method PostString (line 297) | [HttpPost] public IActionResult PostString(string model) => View(model); method PostDynamic (line 298) | [HttpPost] public IActionResult PostDynamic(dynamic model) => View(mod... method Get (line 335) | [HttpGet] public IActionResult Get(ModelWithBindNeverProperty model) =... method Post (line 336) | [HttpPost] public IActionResult Post(EntireModelWithBindNeverAttribute... class HasAutogeneratedModelController (line 304) | public class HasAutogeneratedModelController : Controller method Single (line 306) | [HttpGet] class AutogeneratedModel (line 311) | public partial class AutogeneratedModel class ModelWithBindNeverProperty (line 322) | public class ModelWithBindNeverProperty class EntireModelWithBindNeverAttribute (line 327) | [BindNever] class CustomController (line 333) | public class CustomController : Controller method Get (line 250) | [HttpGet] public IActionResult Get(NeverValidatedModel model) => View(... method Post (line 251) | [HttpPost] public IActionResult Post(Model model) => View(model); method Put (line 252) | [HttpPut] public IActionResult Put([ValidateNever] RegularModel model)... method Post (line 270) | [HttpPost] public IActionResult Post(Model1 model1, int other, Model2 ... method Post (line 288) | [HttpPost] public IActionResult Post(Model model) => View(model); method PostObject (line 296) | [HttpPost] public IActionResult PostObject(object model) => View(model); method PostString (line 297) | [HttpPost] public IActionResult PostString(string model) => View(model); method PostDynamic (line 298) | [HttpPost] public IActionResult PostDynamic(dynamic model) => View(mod... method Get (line 335) | [HttpGet] public IActionResult Get(ModelWithBindNeverProperty model) =... method Post (line 336) | [HttpPost] public IActionResult Post(EntireModelWithBindNeverAttribute... class DataModel (line 343) | public class DataModel class DataModelController (line 349) | public class DataModelController : Controller method Post (line 351) | [HttpPost] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/BackslashShouldBeAvoidedInAspNetRoutes.AspNet4x.cs class BackslashOnControllerUsingVerbatimStringController (line 4) | [Route(@"A\[controller]")] // Noncompliant {{Replace '\' with '/'.}} class BackslashOnControllerUsingEscapeCharacterController (line 8) | [Route("A\\[controller]")] // Noncompliant {{Replace '\' with '/'.}} class MultipleBackslashesOnController (line 12) | [Route("A\\[controller]\\B")] // Noncompliant {{Replace '\' with '/'.}} class BackslashOnActionUsingVerbatimStringController (line 16) | public class BackslashOnActionUsingVerbatimStringController : Controller method Index (line 18) | [Route(@"A\[action]")] // Noncompliant {{Replace '\' with '/'.}} class BackslashOnActionUsingEscapeCharacterController (line 23) | public class BackslashOnActionUsingEscapeCharacterController : Controller method Index (line 25) | [Route("A\\[action]")] // Noncompliant class MultipleBackslashesOnActionController (line 30) | public class MultipleBackslashesOnActionController : Controller method Index (line 32) | [Route("A\\[action]\\B")] // Noncompliant class RouteOnControllerStartingWithBackslashController (line 37) | [Route("\\[controller]")] // Noncompliant class AController (line 41) | public class AController : Controller method WithoutRouteAttribute (line 44) | public ActionResult WithoutRouteAttribute() => View(); method WithOptionalAttributeParameters (line 46) | [Route("A\\[action]", Name = "a", Order = 3)] // Noncompliant method WithAttributeSuffix (line 49) | [RouteAttribute("A\\[action]")] // Noncompliant method WithFullQualifiedName (line 52) | [System.Web.Mvc.RouteAttribute("A\\[action]")] // Noncompliant method WithMultipleRoutes (line 55) | [Route("A\\[action]")] // Noncompliant method WithUrlEscapedBackslash (line 60) | [Route("A%5C[action]")] // Compliant: URL-escaped backslash is used method WithRegexContainingBackslashInLookahead (line 63) | [Route("A/{s:regex(^(?!index\\b)[[a-zA-Z0-9-]]+$)}.html")] ... method WithRegexContainingBackslashInMetaEscape (line 66) | [Route("A/{s:datetime:regex(\\d{{4}}-\\d{{2}}-\\d{{4}})}/B")] ... method WithFirstBackslashBeforeFirstRegex (line 69) | [Route("A\\{s:regex(.*)\\[action]")] ... method WithFirstBackslashAfterFirstRegex (line 72) | [Route("{s:regex(.*)\\[action]")] ... method WithSecondBackslashNotInRegex (line 75) | [Route("{s:regex([^\\\\]*)\\[action]")] ... method WithTwoBackslashesInRegex (line 78) | [Route("{s:regex([^\\\\]*)/regex([^\\\\]*)")] ... class WithAliasedRouteAttributeController (line 87) | [MyRoute(@"A\[controller]")] // Noncompliant class WithFullQualifiedPartiallyAliasedNameController (line 90) | [ASP.Mvc.RouteAttribute("A\\[action]")] // Noncompliant class AControllerController (line 96) | [Route(@"A\[controller]")] // Compliant: not a real RouteAttribute class RouteAttribute (line 99) | [AttributeUsage(AttributeTargets.Class)] method RouteAttribute (line 102) | public RouteAttribute(string template) { } class WithTuples (line 106) | class WithTuples method Test (line 108) | void Test() class MyAttribute (line 117) | [AttributeUsage(AttributeTargets.All)] class MyController (line 123) | public class MyController : Controller FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/BackslashShouldBeAvoidedInAspNetRoutes.AspNetCore2AndAbove.cs class BackslashOnControllerUsingVerbatimString (line 6) | [Route(@"A\[controller]")] // Noncompliant {{Replace '\' with '/'.}} class BackslashOnControllerUsingEscapeCharacter (line 10) | [Route("A\\[controller]")] // Noncompliant {{Replace '\' with '/'.}} class MultipleBackslashesOnController (line 14) | [Route("A\\[controller]\\B")] // Noncompliant {{Replace '\' with '/'.}} class BackslashOnActionUsingVerbatimString (line 18) | public class BackslashOnActionUsingVerbatimString : Controller method Index (line 20) | [Route(@"A\[action]")] // Noncompliant {{Replace '\' with '/'.}} class BackslashOnActionUsingEscapeCharacter (line 25) | public class BackslashOnActionUsingEscapeCharacter : Controller method Index (line 27) | [Route("A\\[action]")] // Noncompliant class MultipleBackslashesOnAction (line 32) | public class MultipleBackslashesOnAction : Controller method Index (line 34) | [Route("A\\[action]\\B")] // Noncompliant class RouteOnControllerStartingWithBackslash (line 39) | [Route("\\[controller]")] // Noncompliant class AController (line 43) | public class AController : Controller method WithoutRouteAttribute (line 46) | public IActionResult WithoutRouteAttribute() => View(); method WithOptionalAttributeParameters (line 48) | [Route("A\\[action]", Name = "a", Order = 3)] // Noncompliant method WithBackslashInRouteName (line 51) | [Route("A/[action]", Name = @"a\b", Order = 3)] // Compliant: backslas... method WithAttributeSuffix (line 54) | [RouteAttribute("A\\[action]")] // Noncompliant method WithFullQualifiedName (line 57) | [Microsoft.AspNetCore.Mvc.RouteAttribute("A\\[action]")] // Noncompliant method WithMultipleRoutes (line 60) | [Route("A\\[action]")] // Noncompliant method WithUrlEscapedBackslash (line 65) | [Route("A%5C[action]")] // Compliant: URL-escaped backslash is used method WithRegexContainingBackslashInLookahead (line 68) | [Route("A/{s:regex(^(?!index\\b)[[a-zA-Z0-9-]]+$)}.html")] method WithRegexContainingBackslashInMetaEscape (line 71) | [Route("A/{s:datetime:regex(\\d{{4}}-\\d{{2}}-\\d{{4}})}/B")] class WithAliasedRouteAttribute (line 80) | [MyRoute(@"A\[controller]")] // Noncompliant class WithFullQualifiedPartiallyAliasedName (line 83) | [ASP.Mvc.RouteAttribute("A\\[action]")] // Noncompliant class AController (line 89) | [Route(@"A\[controller]")] // Compliant: not a real RouteAttribute method WithoutRouteAttribute (line 46) | public IActionResult WithoutRouteAttribute() => View(); method WithOptionalAttributeParameters (line 48) | [Route("A\\[action]", Name = "a", Order = 3)] // Noncompliant method WithBackslashInRouteName (line 51) | [Route("A/[action]", Name = @"a\b", Order = 3)] // Compliant: backslas... method WithAttributeSuffix (line 54) | [RouteAttribute("A\\[action]")] // Noncompliant method WithFullQualifiedName (line 57) | [Microsoft.AspNetCore.Mvc.RouteAttribute("A\\[action]")] // Noncompliant method WithMultipleRoutes (line 60) | [Route("A\\[action]")] // Noncompliant method WithUrlEscapedBackslash (line 65) | [Route("A%5C[action]")] // Compliant: URL-escaped backslash is used method WithRegexContainingBackslashInLookahead (line 68) | [Route("A/{s:regex(^(?!index\\b)[[a-zA-Z0-9-]]+$)}.html")] method WithRegexContainingBackslashInMetaEscape (line 71) | [Route("A/{s:datetime:regex(\\d{{4}}-\\d{{2}}-\\d{{4}})}/B")] class RouteAttribute (line 92) | [AttributeUsage(AttributeTargets.Class)] method RouteAttribute (line 95) | public RouteAttribute(string template) { } class WithUserDefinedSyntaxRouteParameter (line 99) | class WithUserDefinedSyntaxRouteParameter method Test (line 103) | void Test() method StringSyntaxWithRouteParameter (line 118) | private void StringSyntaxWithRouteParameter([StringSyntax("Route")]str... method StringSyntaxWithRouteParameterAfterOtherParameter (line 119) | private void StringSyntaxWithRouteParameterAfterOtherParameter(string ... method StringSyntaxWithRouteConstParameter (line 120) | private void StringSyntaxWithRouteConstParameter([StringSyntax(RouteCo... method StringSyntaxWithNonRouteParameter (line 121) | private void StringSyntaxWithNonRouteParameter([StringSyntax("NotRoute... method StringSyntaxWithRouteWrongCaseParameter (line 122) | private void StringSyntaxWithRouteWrongCaseParameter([StringSyntax("ro... method StringSyntaxWithNullParameter (line 123) | private void StringSyntaxWithNullParameter([StringSyntax(null)]string ... method StringSyntaxWithEmptyStringParameter (line 124) | private void StringSyntaxWithEmptyStringParameter([StringSyntax("")]st... method MultipleStringSyntaxWithRouteParameterValidFirst (line 125) | private void MultipleStringSyntaxWithRouteParameterValidFirst([StringS... method MultipleStringSyntaxWithRouteParameterInvalidFirst (line 126) | private void MultipleStringSyntaxWithRouteParameterInvalidFirst([Strin... method NoStringSyntax (line 127) | private void NoStringSyntax(string route) { } class InheritingFromFakeControllerDoesntInfluenceRouteCheck (line 130) | class InheritingFromFakeControllerDoesntInfluenceRouteCheck class NotAController (line 132) | [NonController] class Controller (line 136) | public class Controller { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/BackslashShouldBeAvoidedInAspNetRoutes.AspNetCore2x.Latest.cs class ControllerRequirementsDontInfluenceRouteCheck (line 6) | class ControllerRequirementsDontInfluenceRouteCheck class NotAController (line 8) | [NonController] class ControllerWithoutControllerSuffix (line 12) | [Route(@"A\[controller]")] // Noncompliant class ControllerWithControllerAttribute (line 15) | [Controller] class InternalController (line 19) | [Route(@"A\[controller]")] // Noncompliant class ProtectedController (line 22) | [Route(@"A\[controller]")] // Noncompliant class PrivateProtectedController (line 25) | [Route(@"A\[controller]")] // Noncompliant class ControllerWithoutParameterlessConstructor (line 28) | [Route(@"A\[controller]")] // Noncompliant method ControllerWithoutParameterlessConstructor (line 31) | public ControllerWithoutParameterlessConstructor(int i) { } class ControllerWithEscapeChar (line 33) | [Route(@"A\e\[controller]")] // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/BackslashShouldBeAvoidedInAspNetRoutes.AspNetCore3AndAbove.Latest.cs class WithAllControllerEndpointRouteBuilderExtensionsMethods (line 8) | class WithAllControllerEndpointRouteBuilderExtensionsMethods method MapControllerRoute (line 13) | void MapControllerRoute(WebApplication app) method OtherMethods (line 47) | void OtherMethods(WebApplication app) class ATransformer (line 61) | private sealed class ATransformer : DynamicRouteValueTransformer method TransformAsync (line 63) | public override ValueTask TransformAsync(HttpC... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/BackslashShouldBeAvoidedInAspNetRoutes.AspNetCore8AndAbove.Latest.cs class WithAllControllerEndpointRouteBuilderExtensionsMethods (line 3) | class WithAllControllerEndpointRouteBuilderExtensionsMethods method MapFallbackToPage (line 6) | void MapFallbackToPage(WebApplication app) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/CallModelStateIsValid.AutogeneratedController.cs class AutogeneratedController (line 13) | public partial class AutogeneratedController : Controller method Post (line 17) | [HttpPost] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/CallModelStateIsValid.Latest.cs class PositionalPatternClause (line 5) | public class PositionalPatternClause : Controller method Pattern (line 7) | public int Pattern((int X, int Y) tuple) => // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/CallModelStateIsValid.cs class NonCompliantController (line 8) | public class NonCompliantController : ControllerBase method Get (line 10) | [HttpGet("/[controller]")] method Post (line 17) | [HttpPost("/[controller]")] method Put (line 23) | [HttpPut("/[controller]")] method Delete (line 29) | [HttpDelete("/[controller]")] method Patch (line 35) | [HttpPatch("/[controller]")] method Mix (line 41) | [HttpGet] method AGet (line 52) | [AcceptVerbs("GET")] method APost (line 59) | [AcceptVerbs("POST")] method APut (line 66) | [AcceptVerbs("PUT")] method ADelete (line 73) | [AcceptVerbs("DELETE")] method APatch (line 80) | [AcceptVerbs("PATCH")] method Many (line 87) | [AcceptVerbs("GET", "POST", "PUT", "DELETE", "PATCH")] method List (line 94) | [HttpGet("/[controller]/list")] method ListAsync (line 97) | [HttpGet("/[controller]/listasync")] class ControllerWithApiAttributeAtTheClassLevel (line 101) | [ApiController] method Add (line 104) | [HttpPost("/[controller]")] class BaseClassHasApiControllerAttribute (line 111) | public class BaseClassHasApiControllerAttribute : ControllerWithApiAttri... method Remove (line 113) | [HttpDelete("/[controller]")] class ControllerThatDoesNotInheritFromControllerBase (line 120) | [Controller] method Add (line 123) | [HttpPost("/[controller]")] class SimpleController (line 130) | public class SimpleController method Add (line 132) | [HttpPost("/[controller]")] class CompliantController (line 139) | public class CompliantController : ControllerBase method Get (line 141) | [HttpGet("/[controller]")] method GetNoParam (line 151) | [HttpGet("/[controller]/GetNoParam")] method Post (line 157) | [HttpPost("/[controller]")] class ControllerClassWithActionFilter (line 169) | [ValidateModel] method Create (line 172) | [HttpPost("/[controller]/create")] class ControllerMethodsWithActionFilter (line 179) | public class ControllerMethodsWithActionFilter : ControllerBase method Create (line 181) | [ValidateModel] class Movie (line 189) | public class Movie class ValidateModelAttribute (line 198) | public class ValidateModelAttribute : ActionFilterAttribute method OnActionExecuting (line 200) | public override void OnActionExecuting(ActionExecutingContext context) class ControllerCallsTryValidate (line 209) | public class ControllerCallsTryValidate : ControllerBase method CallsTryValidateModel1 (line 211) | [HttpPost] method CallsTryValidateModel (line 217) | [HttpPost] class ControllerCallsTryValidateOverride (line 224) | public class ControllerCallsTryValidateOverride : ControllerBase method TryValidateModel (line 226) | public override bool TryValidateModel(object model) => true; method TryValidateModel (line 227) | public override bool TryValidateModel(object model, string prefix) => ... method CallsTryValidateModel1 (line 229) | [HttpPost] method CallsTryValidateModel (line 235) | [HttpPost] class MyController (line 245) | public class MyController : ControllerBase method Get (line 247) | [HttpGet("/[controller]")] method CheckModelState (line 257) | private bool CheckModelState() => ModelState.IsValid; method OnlyIngoredTypes (line 266) | [HttpGet("/[controller]")] method WithValidationAttribute (line 272) | [HttpGet("/[controller]")] class MyController (line 264) | public class MyController : ControllerBase method Get (line 247) | [HttpGet("/[controller]")] method CheckModelState (line 257) | private bool CheckModelState() => ModelState.IsValid; method OnlyIngoredTypes (line 266) | [HttpGet("/[controller]")] method WithValidationAttribute (line 272) | [HttpGet("/[controller]")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/ControllerReuseClient.CSharp12.cs class C (line 7) | [ApiController] class D (line 11) | [ApiController] method D (line 15) | public D() : this(new HttpClient()) { } class E (line 19) | [ApiController] method E (line 23) | public E() : base(new HttpClient()) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/ControllersHaveMixedResponsibilities.Latest.Partial.cs class WithFieldBackedPartialProperties (line 6) | public partial class WithFieldBackedPartialProperties : ControllerBase /... class WithPartialIndexer (line 12) | public partial class WithPartialIndexer : ControllerBase // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/ControllersHaveMixedResponsibilities.Latest.cs type IServiceWithAnAPI (line 15) | public interface IServiceWithAnAPI { void Use(); } method Use (line 15) | void Use(); class ServiceWithAnApi (line 17) | public abstract class ServiceWithAnApi : IServiceWithAnAPI { public void... method Use (line 17) | public void Use() { } type ILogger (line 24) | public interface ILogger : IServiceWithAnAPI { } type IHttpClientFactory (line 25) | public interface IHttpClientFactory : IServiceWithAnAPI { } type IMediator (line 26) | public interface IMediator : IServiceWithAnAPI { } type IMapper (line 27) | public interface IMapper : IServiceWithAnAPI { } type IConfiguration (line 28) | public interface IConfiguration : IServiceWithAnAPI { } type IBus (line 29) | public interface IBus : IServiceWithAnAPI { } type IMessageBus (line 30) | public interface IMessageBus : IServiceWithAnAPI { } type IOption (line 35) | public interface IOption : IServiceWithAnAPI { } type IS1 (line 40) | public interface IS1 : IServiceWithAnAPI { } type IS2 (line 41) | public interface IS2 : IServiceWithAnAPI { } type IS3 (line 42) | public interface IS3 : IServiceWithAnAPI { } type IS4 (line 43) | public interface IS4 : IServiceWithAnAPI { } type IS5 (line 44) | public interface IS5 : IServiceWithAnAPI { } type IS6 (line 45) | public interface IS6 : IServiceWithAnAPI { } type IS7 (line 46) | public interface IS7 : IServiceWithAnAPI { } type IS8 (line 47) | public interface IS8 : IServiceWithAnAPI { } type IS9 (line 48) | public interface IS9 : IServiceWithAnAPI { } type IS10 (line 49) | public interface IS10 : IServiceWithAnAPI { } class Class1 (line 51) | public class Class1: ServiceWithAnApi, IS1 { } class Class2 (line 52) | public class Class2: ServiceWithAnApi, IS2 { } class Class3 (line 53) | public class Class3: ServiceWithAnApi, IS3 { } class Class4 (line 54) | public class Class4: ServiceWithAnApi, IS4 { } class Struct1 (line 56) | public class Struct1: IS1 { public void Use() { } } method Use (line 56) | public void Use() { } class Struct2 (line 57) | public class Struct2: IS2 { public void Use() { } } method Use (line 57) | public void Use() { } class Struct3 (line 58) | public class Struct3: IS3 { public void Use() { } } method Use (line 58) | public void Use() { } class Struct4 (line 59) | public class Struct4: IS4 { public void Use() { } } method Use (line 59) | public void Use() { } class TwoResponsibilities (line 73) | [ApiController] method A1 (line 76) | public IActionResult A1() { s1.Use(); return Ok(); } method A2 (line 77) | public IActionResult A2() { s2.Use(); return Ok(); } class WithGenerics (line 80) | [ApiController] method GenericAction (line 84) | public IActionResult GenericAction() { s2.Use(); return Ok(); } method NonGenericAction (line 86) | public IActionResult NonGenericAction() { s1.Use(); return Ok(); } class @event (line 90) | [ApiController] method @private (line 94) | public IActionResult @private() { s2.Use(); return Ok(); } method @public (line 96) | public IActionResult @public() { s1.Use(); return Ok(); } class ThreeResponsibilities (line 100) | [ApiController] method A1 (line 104) | public IActionResult A1() { s1.Use(); return Ok(); } method A2 (line 105) | public IActionResult A2() { s2.Use(); return Ok(); } method A3 (line 106) | public IActionResult A3() { s3.Use(); return Ok(); } method A1 (line 297) | public IActionResult A1() { logger.Use(); mediator.Use(); s1.Use(); re... method A2 (line 298) | public IActionResult A2() { mediator.Use(); mapper.Use(); s2.Use(); re... method A3 (line 299) | public IActionResult A3() { mapper.Use(); return Ok(); } class WellKnownDepsController (line 113) | [ApiController] method A1 (line 117) | public IActionResult A1() { logger.Use(); return Ok(); } method A2 (line 118) | public IActionResult A2() { mediator.Use(); return Ok(); } method A3 (line 119) | public IActionResult A3() { mapper.Use(); return Ok(); } method A4 (line 120) | public IActionResult A4() { configuration.Use(); return Ok(); } class FourDifferentOptionDepsController (line 124) | [ApiController] method A1 (line 128) | public IActionResult A1() { o1.Use(); return Ok(); } method A2 (line 129) | public IActionResult A2() { o2.Use(); return Ok(); } method A3 (line 130) | public IActionResult A3() { o3.Use(); return Ok(); } method A4 (line 131) | public IActionResult A4() { o4.Use(); return Ok(); } class FourDifferentOptionDepsUsedInCouplesController (line 135) | [ApiController] method A1 (line 139) | public IActionResult A1() { o1.Use(); o2.Use(); return Ok(); } method A2 (line 140) | public IActionResult A2() { o2.Use(); o3.Use(); return Ok(); } method A3 (line 141) | public IActionResult A3() { o3.Use(); o4.Use(); return Ok(); } method A4 (line 142) | public IActionResult A4() { o4.Use(); o5.Use(); return Ok(); } class ThreeOptionDepsController (line 146) | [ApiController] method A1 (line 151) | public IActionResult A1() { o1.Use(); logger.Use(); return Ok(); } method A2 (line 152) | public IActionResult A2() { o2.Use(); mediator.Use(); return Ok(); } method A3 (line 153) | public IActionResult A3() { o3.Use(); configuration.Use(); return Ok(); } method A4 (line 154) | public IActionResult A4() { logger.Use(); return Ok(); } class TwoSeparateResponsibilitiesPlusSharedWellKnown (line 161) | [ApiController] method A1 (line 166) | public IActionResult A1() { logger.Use(); mediator.Use(); bus.Use(); c... method A2 (line 167) | public IActionResult A2() { mediator.Use(); mapper.Use(); bus.Use(); c... class FourSpecificDepsTwoForA1AndTwoForA2 (line 171) | [ApiController] method A1 (line 176) | public IActionResult A1() { logger.Use(); s1.Use(); s2.Use(); return O... method A2 (line 177) | public IActionResult A2() { mediator.Use(); mapper.Use(); s3.Use(); s4... class FourSpecificDepsTwoForA1AndTwoForA2NonApiFromController (line 181) | public class FourSpecificDepsTwoForA1AndTwoForA2NonApiFromController( method A1 (line 185) | public void A1() { logger.Use(); s1.Use(); s2.Use(); } method A2 (line 186) | public void A2() { mediator.Use(); mapper.Use(); s3.Use(); s4.Use(); } class FourSpecificDepsTwoForA1AndTwoForA2NonApiFromControllerBase (line 190) | public class FourSpecificDepsTwoForA1AndTwoForA2NonApiFromControllerBase( method A1 (line 194) | public void A1() { logger.Use(); s1.Use(); s2.Use(); } method A2 (line 195) | public void A2() { mediator.Use(); mapper.Use(); s3.Use(); s4.Use(); } class FourSpecificDepsTwoForA1AndTwoForA2NoController (line 199) | [ApiController] method A1 (line 204) | public IActionResult A1() { logger.Use(); s1.Use(); s2.Use(); return O... method A2 (line 205) | public IActionResult A2() { mediator.Use(); mapper.Use(); s3.Use(); s4... class FourSpecificDepsTwoForA1AndTwoForA2PoCoController (line 209) | [ApiController] method A1 (line 214) | public string A1() { logger.Use(); s1.Use(); s2.Use(); return "Ok"; } method A2 (line 215) | public string A2() { mediator.Use(); mapper.Use(); s3.Use(); s4.Use();... class PoCoControllerWithoutControllerSuffix (line 219) | public class PoCoControllerWithoutControllerSuffix( method A1 (line 223) | public string A1() { logger.Use(); s1.Use(); s2.Use(); return "Ok"; } method A2 (line 224) | public string A2() { mediator.Use(); mapper.Use(); s3.Use(); s4.Use();... class PoCoControllerWithoutControllerSuffixWithControllerAttribute (line 228) | [ApiController] method A1 (line 234) | public string A1() { logger.Use(); s1.Use(); s2.Use(); return "Ok"; } method A2 (line 235) | public string A2() { mediator.Use(); mapper.Use(); s3.Use(); s4.Use();... class FourSpecificDepsTwoForA1AndTwoForA2DifferentOrderOfResponsibilities (line 239) | [ApiController] method A2 (line 244) | public IActionResult A2() { logger.Use(); s1.Use(); s2.Use(); return O... method A1 (line 245) | public IActionResult A1() { mediator.Use(); mapper.Use(); s3.Use(); s4... class FourSpecificDepsTwoForA1AndTwoForA2DifferentOrderOfDependencies (line 249) | [ApiController] method A1 (line 254) | public IActionResult A1() { logger.Use(); s2.Use(); s1.Use(); return O... method A2 (line 255) | public IActionResult A2() { mediator.Use(); mapper.Use(); s3.Use(); s4... class FourSpecificDepsThreeForA1AndOneForA2 (line 259) | [ApiController] method A1 (line 264) | public IActionResult A1() { logger.Use(); s1.Use(); s2.Use(); s3.Use()... method A2 (line 265) | public IActionResult A2() { mediator.Use(); mapper.Use(); s4.Use(); re... class FourSpecificDepsFourForA1AndNoneForA2 (line 269) | [ApiController] method A1 (line 274) | public IActionResult A1() { logger.Use(); mediator.Use(); s1.Use(); s2... method A2 (line 275) | public IActionResult A2() { mediator.Use(); mapper.Use(); return Ok(); } class ThreeSpecificDepsOneInCommonBetweenA1AndA2 (line 279) | [ApiController] method A1 (line 284) | public IActionResult A1() { logger.Use(); mediator.Use(); s1.Use(); s2... method A2 (line 285) | public IActionResult A2() { mediator.Use(); mapper.Use(); s2.Use(); s3... class ThreeResponsibilities (line 292) | [ApiController] method A1 (line 104) | public IActionResult A1() { s1.Use(); return Ok(); } method A2 (line 105) | public IActionResult A2() { s2.Use(); return Ok(); } method A3 (line 106) | public IActionResult A3() { s3.Use(); return Ok(); } method A1 (line 297) | public IActionResult A1() { logger.Use(); mediator.Use(); s1.Use(); re... method A2 (line 298) | public IActionResult A2() { mediator.Use(); mapper.Use(); s2.Use(); re... method A3 (line 299) | public IActionResult A3() { mapper.Use(); return Ok(); } class UpToThreeSpecificDepsController (line 303) | [ApiController] method A1 (line 308) | public IActionResult A1() { logger.Use(); s1.Use(); s1.Use(); return O... method A2 (line 309) | public IActionResult A2() { logger.Use(); mapper.Use(); s2.Use(); s2.U... method A3 (line 310) | public IActionResult A3() { mediator.Use(); mapper.Use(); s3.Use(); s3... class ThreeResponsibilities2 (line 314) | [ApiController] method A1 (line 319) | public IActionResult A1() { logger.Use(); mediator.Use(); s1.Use(); re... method A2 (line 320) | public IActionResult A2() { mediator.Use(); mapper.Use(); s2.Use(); re... method A3 (line 321) | public IActionResult A3() { s3.Use(); return Ok(); } class ThreeSpecificDepsFormingAChainAndAnIsolatedAction (line 325) | [ApiController] method A1 (line 331) | public IActionResult A1() { logger.Use(); mediator.Use(); s1.Use(); s2... method A2 (line 332) | public IActionResult A2() { mediator.Use(); mapper.Use(); s2.Use(); re... method A3 (line 334) | public IActionResult A3() { s3.Use(); return Ok(); } class FourSpecificDepsTwoForA1OneForA2AndOneForA3 (line 338) | [ApiController] method A1 (line 343) | public IActionResult A1() { logger.Use(); mediator.Use(); s1.Use(); s2... method A2 (line 344) | public IActionResult A2() { mediator.Use(); mapper.Use(); s3.Use(); re... method A3 (line 345) | public IActionResult A3() { s4.Use(); return Ok(); } class FourSpecificDepsOneForA1OneForA2OneForA3OneUnused (line 349) | [ApiController] method A1 (line 354) | public IActionResult A1() { logger.Use(); mediator.Use(); s1.Use(); re... method A2 (line 355) | public IActionResult A2() { mediator.Use(); mapper.Use(); s2.Use(); re... method A3 (line 356) | public IActionResult A3() { s3.Use(); return Ok(); } class FourSpecificDepsFormingACycle (line 360) | [ApiController] method A1 (line 366) | public IActionResult A1() { logger.Use(); mediator.Use(); s1.Use(); s2... method A2 (line 367) | public IActionResult A2() { mediator.Use(); mapper.Use(); s2.Use(); s3... method A3 (line 368) | public IActionResult A3() { s3.Use(); s4.Use(); s1.Use(); return Ok(); } class FourSpecificDepsFormingTwoDisconnectedCycles (line 375) | [ApiController] method A1 (line 380) | public IActionResult A1() { s1.Use(); s2.Use(); return Ok(); } method A2 (line 381) | public IActionResult A2() { s2.Use(); s3.Use(); return Ok(); } method A3 (line 382) | public IActionResult A3() { s3.Use(); s1.Use(); return Ok(); } method A4 (line 384) | public IActionResult A4() { s4.Use(); s5.Use(); return Ok(); } method A5 (line 385) | public IActionResult A5() { s5.Use(); s6.Use(); return Ok(); } method A6 (line 386) | public IActionResult A6() { s6.Use(); s4.Use(); return Ok(); } class FourSpecificDepsFormingTwoConnectedCycles (line 390) | [ApiController] method A1 (line 395) | public IActionResult A1() { s1.Use(); s2.Use(); return Ok(); } method A2 (line 396) | public IActionResult A2() { s2.Use(); s3.Use(); return Ok(); } method A3 (line 397) | public IActionResult A3() { s3.Use(); s1.Use(); return Ok(); } method A4 (line 399) | public IActionResult A4() { s1.Use(); s4.Use(); return Ok(); } method A5 (line 400) | public IActionResult A5() { s4.Use(); s5.Use(); return Ok(); } method A6 (line 401) | public IActionResult A6() { s5.Use(); s1.Use(); return Ok(); } class FourSpecificDepsFormingTwoConnectedCycles2 (line 405) | [ApiController] method A1 (line 410) | public IActionResult A1() { s1.Use(); s2.Use(); return Ok(); } method A2 (line 411) | public IActionResult A2() { s2.Use(); s3.Use(); return Ok(); } method A3 (line 412) | public IActionResult A3() { s3.Use(); s1.Use(); return Ok(); } method A4 (line 414) | public IActionResult A4() { s1.Use(); s2.Use(); return Ok(); } method A5 (line 415) | public IActionResult A5() { s2.Use(); s4.Use(); return Ok(); } method A6 (line 416) | public IActionResult A6() { s4.Use(); s1.Use(); return Ok(); } class FourSpecificDepsFormingTwoConnectedCycles3 (line 420) | [ApiController] method A1 (line 425) | public IActionResult A1() { s1.Use(); s2.Use(); return Ok(); } method A2 (line 426) | public IActionResult A2() { s2.Use(); s3.Use(); return Ok(); } method A3 (line 427) | public IActionResult A3() { s3.Use(); s1.Use(); return Ok(); } method A4 (line 429) | public IActionResult A4() { A1(); s4.Use(); return Ok(); } method A5 (line 430) | public IActionResult A5() { s5.Use(); s6.Use(); return Ok(); } method A6 (line 431) | public IActionResult A6() { s6.Use(); s4.Use(); return Ok(); } class FourSpecificDepsFormingThreeDisconnectedCycles (line 435) | [ApiController] method A1 (line 440) | public IActionResult A1() { s1.Use(); s2.Use(); return Ok(); } method A2 (line 441) | public IActionResult A2() { s2.Use(); s1.Use(); return Ok(); } method A3 (line 443) | public IActionResult A3() { s3.Use(); s4.Use(); return Ok(); } method A4 (line 444) | public IActionResult A4() { s4.Use(); s3.Use(); return Ok(); } method A5 (line 446) | public IActionResult A5() { s5.Use(); s6.Use(); return Ok(); } method A6 (line 447) | public IActionResult A6() { s6.Use(); s5.Use(); return Ok(); } class FourSpecificDepsFormingTwoConnectedCyclesAndOneDisconnectedCycle (line 451) | [ApiController] method A1 (line 456) | public IActionResult A1() { s1.Use(); s2.Use(); return Ok(); } method A2 (line 457) | public IActionResult A2() { s2.Use(); s1.Use(); return Ok(); } method A3 (line 459) | public IActionResult A3() { A1(); s3.Use(); s4.Use(); return Ok(); } method A4 (line 460) | public IActionResult A4() { s4.Use(); s3.Use(); return Ok(); } method A5 (line 462) | public IActionResult A5() { s5.Use(); s6.Use(); return Ok(); } method A6 (line 463) | public IActionResult A6() { s6.Use(); s5.Use(); return Ok(); } class FourSpecificDepsFormingThreeConnectedCycles (line 467) | [ApiController] method A1 (line 472) | public IActionResult A1() { s1.Use(); s2.Use(); return Ok(); } method A2 (line 473) | public IActionResult A2() { s2.Use(); s1.Use(); return Ok(); } method A3 (line 475) | public IActionResult A3() { A1(); s3.Use(); s4.Use(); return Ok(); } method A4 (line 476) | public IActionResult A4() { s4.Use(); s3.Use(); return Ok(); } method A5 (line 478) | public IActionResult A5() { A2(); s5.Use(); s6.Use(); return Ok(); } method A6 (line 479) | public IActionResult A6() { s6.Use(); s5.Use(); return Ok(); } class FourSpecificDepsFormingThreeConnectedCyclesTransitivity (line 483) | [ApiController] method A1 (line 488) | public IActionResult A1() { s1.Use(); s2.Use(); return Ok(); } method A2 (line 489) | public IActionResult A2() { s2.Use(); s1.Use(); return Ok(); } method A3 (line 491) | public IActionResult A3() { A1(); s3.Use(); s4.Use(); return Ok(); } method A4 (line 492) | public IActionResult A4() { s4.Use(); s3.Use(); return Ok(); } method A5 (line 494) | public IActionResult A5() { A3(); s5.Use(); s6.Use(); return Ok(); } method A6 (line 495) | public IActionResult A6() { s6.Use(); s5.Use(); return Ok(); } class WithFields (line 507) | [ApiController] method WithFields (line 513) | public WithFields(IS1 s1, IS2 s2) { this.s1 = s1; this.s2 = s2; } method A1 (line 515) | public void A1() { s1.Use(); } method A2 (line 516) | public void A2() { s2.Use(); } class WithDifferentVisibilities (line 519) | [ApiController] method WithDifferentVisibilities (line 529) | public WithDifferentVisibilities(IS1 s1, IS2 s2, IS3 s3, IS4 s4, IS5 s... method A1 (line 534) | private void A1() { s1.Use(); s2.Use(); } method A2 (line 535) | protected void A2() { s2.Use(); s1.Use(); } method A3 (line 536) | internal void A3() { s3.Use(); s4.Use(); } method A4 (line 537) | private protected void A4() { s4.Use(); s3.Use(); } method A5 (line 538) | protected internal void A5() { s5.Use(); s6.Use(); } method A6 (line 539) | public void A6() { s6.Use(); s5.Use(); } class WithStaticFields (line 542) | [ApiController] method WithStaticFields (line 548) | public WithStaticFields(IS1 s1, IS2 s2) { WithStaticFields.s1 = s1; Wi... method WithStaticFields (line 550) | static WithStaticFields() { s1 = S1.Instance; } method A1 (line 552) | public void A1() { s1.Use(); } method A2 (line 553) | public void A2() { s2.Use(); } class S1 (line 555) | class S1 : IS1 { public void Use() { } public static IS1 Instance => n... method Use (line 555) | public void Use() { } class WithAutoProperties (line 558) | [ApiController] method WithAutoProperties (line 566) | public WithAutoProperties(IS1 s1, IS2 s2, IS3 s3) { S1 = s1; S2 = s2; ... method A1 (line 568) | public void A1() { S1.Use(); } method A2 (line 569) | public void A2() { S2.Use(); } method A3 (line 570) | public void A3() { S3.Use(); S2.Use(); } method A4 (line 571) | public void A4() { S4.Use(); } class WithFieldBackedProperties (line 574) | [ApiController] method WithFieldBackedProperties (line 583) | public WithFieldBackedProperties(IS1 s1, IS2 s2) { _s1 = s1; _s2 = s2; } method A1 (line 585) | public void A1() { S1.Use(); } method A2 (line 586) | public void A2() { S2.Use(); } class WithMixedStorageMechanismsAndPropertyDependency (line 589) | [ApiController] method WithMixedStorageMechanismsAndPropertyDependency (line 599) | public WithMixedStorageMechanismsAndPropertyDependency(IS1 s1, IS2 s2,... method A1 (line 601) | public void A1() { _s1.Use(); S2.Use(); } method A2 (line 602) | public void A2() { S2.Use(); S3.Use(); } method A3 (line 603) | public void A3() { S3.Use(); } class WithMixedStorageMechanismsAndPropertyDependencyTransitivity (line 606) | [ApiController] method WithMixedStorageMechanismsAndPropertyDependencyTransitivity (line 618) | public WithMixedStorageMechanismsAndPropertyDependencyTransitivity(IS1... method A1 (line 621) | public void A1() { _s1.Use(); S2.Use(); } method A2 (line 622) | public void A2() { S2.Use(); S3.Use(); } method A3 (line 623) | public void A3() { S3.Use(); _s1.Use(); } method A4 (line 624) | public void A4() { S4.Use(); } class WithLambdaCapturingService (line 627) | [ApiController] method WithLambdaCapturingService (line 633) | public WithLambdaCapturingService(IS1 s1, IS2 s2) { s1Provider = () =>... method A1 (line 635) | public void A1() { s1Provider().Use(); } method A2 (line 636) | public void A2() { s2Provider(42).Use(); } class WithNonPublicConstructor (line 639) | [ApiController] method WithNonPublicConstructor (line 645) | private WithNonPublicConstructor(IS1 s1, IS2 s2) { this.s1 = s1; this.... method A1 (line 647) | public void A1() { s1.Use(); s1.Use(); } method A2 (line 648) | public void A2() { S2.Use(); } class WithCtorNotInitializingInjectedServices (line 651) | [ApiController] method WithCtorNotInitializingInjectedServices (line 657) | public WithCtorNotInitializingInjectedServices(IS1 s1, IS2 s2) { } method A1 (line 659) | public void A1() { s1.Use(); } method A2 (line 660) | public void A2() { s2.Use(); } class WithServicesNotInjectedAtAll (line 663) | [ApiController] method WithServicesNotInjectedAtAll (line 669) | public WithServicesNotInjectedAtAll() { } method A1 (line 671) | public void A1() { s1.Use(); } method A2 (line 672) | public void A2() { s2.Use(); } class WithServicesInitializedWithServiceProvider (line 675) | [ApiController] method WithServicesInitializedWithServiceProvider (line 681) | public WithServicesInitializedWithServiceProvider(IServiceProvider ser... method A1 (line 687) | public void A1() { s1.Use(); } method A2 (line 688) | public void A2() { s2.Use(); } class WithServicesInitializedWithSingletons (line 691) | [ApiController] method A1 (line 697) | public void A1() { s1.Use(); } method A2 (line 698) | public void A2() { s2.Use(); } class S1 (line 700) | class S1 : IS1 { public void Use() { } public static IS1 Instance => n... method Use (line 700) | public void Use() { } class S2 (line 701) | class S2 : IS2 { public void Use() { } public static IS2 Instance => n... method Use (line 701) | public void Use() { } class WithServicesInitializedWithMixedStrategies (line 704) | [ApiController] method WithServicesInitializedWithMixedStrategies (line 711) | public WithServicesInitializedWithMixedStrategies(IS1 s1, IServiceProv... method A1 (line 717) | public void A1() { s1.Use(); } method A2 (line 718) | public void A2() { s2.Use(); } method A3 (line 719) | public void A3() { s3.Use(); } class S2 (line 721) | class S2 : IS2 { public void Use() { } public static IS2 Instance => n... method Use (line 721) | public void Use() { } class WithAWellKnownInterfaceIncluded (line 724) | [ApiController] method WithAWellKnownInterfaceIncluded (line 732) | public WithAWellKnownInterfaceIncluded(ILogger n... method Use (line 743) | public void Use() { } class WithHttpClientFactory (line 747) | [ApiController] method A1 (line 754) | public void A1() { _httpClientFactory.Use(); s1.Use(); } method A2 (line 755) | public void A2() { _httpClientFactory.Use(); s2.Use(); } method A3 (line 756) | public void A3() { _httpClientFactory.Use(); } class WithUseInComplexBlocks (line 759) | [ApiController] method If (line 764) | public void If() // Secondary {{May belong to responsibility #2.}} method Switch (line 769) | public void Switch() // Secondary {{May belong to responsibility #2.}} method For (line 774) | public void For() // Secondary {{May belong to responsibility #2.}} method TryCatchFinally (line 779) | public void TryCatchFinally() // Secondary {{May belong to respon... method Using (line 784) | public void Using() // Secondary {{May belong to respon... method BlocksAndParentheses (line 789) | public void BlocksAndParentheses() // Secondary {{May belong to respon... method NestedLocalFunctions (line 794) | public void NestedLocalFunctions() // Secondary {{May belong to respon... class ADisposable (line 808) | class ADisposable : IDisposable { public void Dispose() { } } method Dispose (line 808) | public void Dispose() { } class WithMethodsDependingOnEachOther (line 811) | [ApiController] method A1 (line 817) | void A1() { s1.Use(); } method A2 (line 818) | void A2() { s2.Use(); A1(); } method A3 (line 819) | void A3() { s2.Use(); } method A4 (line 821) | void A4() { A4(); } method A5 (line 823) | void A5() { A6(); } method A6 (line 824) | void A6() { A5(); } method A7 (line 826) | void A7() { A8(); } method A8 (line 827) | void A8() { A9(); } method A9 (line 828) | void A9() { A7(); } method A10 (line 830) | void A10() { A11(); } method A11 (line 831) | void A11() { A12(); } method A12 (line 832) | void A12() { A10(); s3.Use(); } method A13 (line 833) | void A13() { s3.Use(); } method A14 (line 835) | void A14() { A15(); s4.Use(); } method A15 (line 836) | void A15() { A16(); } method A16 (line 837) | void A16() { A14(); } method A17 (line 838) | void A17() { s4.Use(); } method A18 (line 840) | void A18() { } method A19 (line 842) | void A19() { s5.Use(); } method A20 (line 844) | void A20() { A22(); } method A21 (line 845) | void A21() { A22(); } method A22 (line 846) | void A22() { s6.Use(); s7.Use(); } class WithServiceProvidersInjectionCoupled (line 849) | [ApiController] method WithServiceProvidersInjectionCoupled (line 855) | public WithServiceProvidersInjectionCoupled(Func s1Provider, Func... method A1 (line 861) | public void A1() { s1Provider().Use(); var s2 = s2Provider(42); s2.Use... method A2 (line 862) | public void A2() { (s2Provider(42)).Use(); } class ApiController (line 865) | [ApiController] class DoesNotInheritDirectlyFromControllerBase (line 868) | public class DoesNotInheritDirectlyFromControllerBase(IS1 s1, IS2 s2) : ... method A1 (line 870) | public IActionResult A1() { s1.Use(); return Ok(); } method A2 (line 871) | public IActionResult A2() { s2.Use(); return Ok(); } class InheritsFromController (line 874) | public class InheritsFromController(IS1 s1, IS2 s2) : Controller // Comp... method A1 (line 876) | public IActionResult A1() { s1.Use(); return Ok(); } method A2 (line 877) | public IActionResult A2() { s2.Use(); return Ok(); } class AbstractController (line 880) | public abstract class AbstractController (IS1 s1, IS2 s2) : ControllerBa... method A1 (line 882) | public IActionResult A1() { s1.Use(); return Ok(); } method A2 (line 883) | public IActionResult A2() { s2.Use(); return Ok(); } method A3 (line 884) | public abstract IActionResult A3(); class WithServiceProvidersInjectionUsedInGroups (line 888) | [ApiController] method A1 (line 899) | public void A1() { _s1.Use(); } method A2 (line 900) | public void A2() { S2Provider().Use(); S3Provider(42).Use(); } method A3 (line 901) | public void A3() { S3Provider(42).Use(); } method A4 (line 902) | public void A4() { S4Provider("42", '4').Use(); _s5Provider(false, 3u,... method A5 (line 903) | public void A5() { _s5Provider(true, 3u, () => 42.0).Use(); } method A6 (line 904) | public void A6() { S5Provider(true, 3u, () => 42.0).Use(); } class WithServiceWrappersInjection (line 907) | [ApiController] method WithServiceWrappersInjection (line 913) | public WithServiceWrappersInjection(Func s1Provider, Action s2Inv... method A1 (line 919) | public void A1() { s1Provider().Use(); s2Invoker(); } method A2 (line 920) | public void A2() { s2Invoker(); } class WithLazyServicesInjection (line 923) | [ApiController] method A1 (line 931) | public void A1() { s1Lazy.Value.Use(); s2Lazy.Value.Use(); } method A2 (line 932) | public void A2() { s2Lazy.Value.Use(); s4.Use(); } method A3 (line 933) | public void A3() { s3Lazy.Value.Use(); } class WithMixOfLazyServicesAndServiceProviders (line 936) | [ApiController] method A1 (line 946) | public void A1() { s1Lazy.Value.Use(); s3.Use(); } method A2 (line 947) | public void A2() { s1Lazy.Value.Use(); s2Lazy.Value.Use(); } method A3 (line 948) | public void A3() { s4.Use(); var s5 = s5Provider(); s5.Use(); } method A4 (line 949) | public void A4() { s5Provider().Use(); var s6ProviderAlias = s6Provide... class WithIApi (line 952) | [ApiController] method WithIApi (line 957) | public WithIApi(IApi api) { _api = api; } method A1 (line 959) | public void A1() { _api.Use(); } method A2 (line 960) | public void A2() { _api.Use(); } type IApi (line 962) | public interface IApi : IServiceWithAnAPI { } class WithUnusedServices (line 965) | [ApiController] method A1 (line 973) | public void A1() { } method A2 (line 974) | public void A2() { } method A3 (line 975) | public void A3() { } method A4 (line 976) | public void A4() { } class WithUnusedAndUsedServicesFormingTwoGroups (line 979) | [ApiController] method A1 (line 988) | public void A1() { s1.Use(); } class WithUnusedAndUsedServicesFormingThreeGroups (line 991) | [ApiController] method A2 (line 999) | public void A2() { s2.Use(); } method A3 (line 1000) | public void A3() { s3.Use(); } method A4 (line 1001) | public void A4() { s4.Use(); } class WithMethodOverloads (line 1004) | [ApiController] method A1 (line 1014) | public void A1() { s1.Use(); } method A1 (line 1015) | public void A1(int i) { s2.Use(); } method A1 (line 1016) | public void A1(string s) { s3.Use(); } method A1 (line 1017) | public void A1(int i, string s) { s4.Use(); } method A2 (line 1018) | public void A2() { s5.Use(); } method A2 (line 1019) | public void A2(int i) { s6.Use(); } class WithIndexer (line 1022) | [ApiController] method A1 (line 1031) | public void A1() { s1.Use(); } method A2 (line 1032) | public void A2() { s2.Use(); } method A3 (line 1033) | public void A3() { s3.Use(); } class WithIndexerOverloads (line 1036) | [ApiController] method A1 (line 1048) | public void A1() { s1.Use(); } method A2 (line 1049) | public void A2() { s2.Use(); } method A3 (line 1050) | public void A3() { s3.Use(); } method A4 (line 1051) | public void A4() { s4.Use(); } method A5 (line 1052) | public void A5() { s5.Use(); } class WithIndexerArrow (line 1055) | [ApiController] method A1 (line 1064) | public void A1() { s1.GetValue(); } method A2 (line 1065) | public void A2() { s2.GetValue(); } method A3 (line 1066) | public void A3() { s3.GetValue(); } type IS1ReturningInt (line 1068) | public interface IS1ReturningInt { int GetValue(); } method GetValue (line 1068) | int GetValue(); type IS2ReturningInt (line 1069) | public interface IS2ReturningInt { int GetValue(); } method GetValue (line 1069) | int GetValue(); type IS3ReturningInt (line 1070) | public interface IS3ReturningInt { int GetValue(); } method GetValue (line 1070) | int GetValue(); class WithClassInjection (line 1073) | [ApiController] method A1 (line 1080) | public void A1() { s1.Use(); } method A2 (line 1081) | public void A2() { s2.Use(); } method A3 (line 1082) | public void A3() { s3.Use(); } method A4 (line 1083) | public void A4() { s3.Use(); s1.Use(); } method A5 (line 1084) | public void A5() { } class WithStructInjection (line 1087) | [ApiController] method A1 (line 1094) | public void A1() { s1.Use(); } method A2 (line 1095) | public void A2() { s2.Use(); } method A3 (line 1096) | public void A3() { s3.Use(); } method A4 (line 1097) | public void A4() { s3.Use(); s1.Use(); } method A5 (line 1098) | public void A5() { } class WithMixOfInjectionTypes (line 1101) | [ApiController] method A1 (line 1127) | public void A1() { interface1.Use(); class1.Use(); } method A2 (line 1128) | public void A2() { interface2.Use(); class1.Use(); struct2.Use(); } method A3 (line 1129) | public void A3() { class2.Use(); } method A4 (line 1130) | public void A4() { struct1.Use(); class2.Use(); _ = lazy4; } method A5 (line 1131) | public void A5() { struct2.Use(); lazy1.Value.Use(); } method A6 (line 1132) | public void A6() { _ = lazy1.Value; lazy3.Value.Use(); } method A7 (line 1133) | public void A7() { _ = lazy3.ToString(); } method A8 (line 1134) | public void A8() { lazy4.Value.Use(); _ = lazy5.IsValueCreated; } method A9 (line 1135) | public void A9() { _ = lazy6.GetHashCode(); delegate1().Use(); } method A10 (line 1136) | public void A10() { _ = delegate2(); delegate3.Invoke().Use(); } method A11 (line 1137) | public void A11() { _ = delegate1.Target; ((delegate3())).Use(); } method A12 (line 1138) | public void A12() { _ = delegate4(); } method A13 (line 1139) | public void A13() { } class WithDestructor (line 1142) | [ApiController] method A1 (line 1150) | public void A1() { s1.Use(); } method A2 (line 1151) | public void A2() { s2.Use(); } class NotAControllerForCoverage (line 1154) | public class NotAControllerForCoverage class WithFieldBackedPartialProperties (line 1163) | [ApiController] method WithFieldBackedPartialProperties (line 1172) | public WithFieldBackedPartialProperties(IS1 s1, IS2 s2) { _s1 = s1; _s... method A1 (line 1174) | public void A1() { S1.Use(); } method A2 (line 1176) | public void A2() { S2.Use(); } class WithPartialIndexer (line 1180) | [ApiController] method A1 (line 1189) | public void A1() { s1.Use(); } method A2 (line 1191) | public void A2() { s2.Use(); } method A3 (line 1193) | public void A3() { s3.Use(); } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/ControllersReuseClient.CSharp9.cs class SomeController (line 7) | [ApiController] method Foo (line 11) | [HttpGet("foo")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/ControllersReuseClient.Csharp8.cs class SomeController (line 7) | [ApiController] method Foo (line 13) | [HttpGet("foo")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/ControllersReuseClient.cs class SomeController (line 7) | [ApiController] method SomeController (line 18) | public SomeController() method Foo (line 23) | [HttpGet("foo")] method StaticCreateClient (line 60) | private static HttpClient StaticCreateClient() method CreateClient (line 65) | private HttpClient CreateClient() class NotAController (line 71) | public class NotAController FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/RouteTemplateShouldNotStartWithSlash.AspNet4x.PartialAutogenerated.cs class NonCompliantPartialController (line 4) | [Route("[controller]")] method Index5 (line 7) | [Route("/[action]")] // Seconda... method Index6 (line 10) | [Route("/SubPath/Index6_1")] // Secondar... class PartialCompliantController (line 15) | [Route("[controller]")] method Index4 (line 18) | [Route("[action]")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/RouteTemplateShouldNotStartWithSlash.AspNet4x.cs class NoncompliantController (line 3) | [Route("[controller]")] method Index1 (line 7) | [Route("/Index1")] // Secondary method Index2 (line 11) | [Route("/SubPath/Index2_1")] // Secondary method Index3 (line 17) | [Route("/[action]")] // Secondary method Index4 (line 21) | [Route("/SubPath/Index4_1")] // Secondary class NoncompliantWithRoutePrefixController (line 28) | [RoutePrefix("[controller]")] method Index1 (line 32) | [Route("/Index1")] // Secondary class NoncompliantMultiRouteController (line 39) | [Route("[controller]")] method Index1 (line 44) | [Route("/Index1")] // Secondary method Index2 (line 48) | [Route("/SubPath/Index2_1")] // Secondary method Index3 (line 54) | [Route("/[action]")] // Secondary class CompliantController (line 59) | [Route("[controller]")] method Index1 (line 62) | [Route("/Index1")] method Index2 (line 65) | [Route("/SubPath/Index2")] method Index3 (line 68) | [Route("/[action]")] method Index4 (line 71) | [Route("/[controller]/Index4_1")] class NoncompliantNoControllerRouteController (line 76) | public class NoncompliantNoControllerRouteController : Controller // Non... method Index1 (line 78) | [Route("/Index1")] // Secondary method Index2 (line 81) | [Route("/SubPath/Index2_1")] // Secondary method Index3 (line 85) | [Route("/[action]")] // Secondary class CompliantNoControllerRouteNoActionRouteController (line 89) | public class CompliantNoControllerRouteNoActionRouteController : Control... method Index1 (line 91) | public ActionResult Index1() => View(); method Index2 (line 93) | [Route("/SubPath/Index2")] method Index3 (line 96) | [Route("/[action]")] method Index4 (line 99) | [Route("/SubPath/Index4_1")] class CompliantNoControllerRouteEmptyActionRouteController (line 104) | public class CompliantNoControllerRouteEmptyActionRouteController : Cont... method Index1 (line 106) | [Route] method Index2 (line 109) | [Route("/SubPath/Index2")] method Index3 (line 112) | [Route("/[action]")] method Index4 (line 115) | [Route("/SubPath/Index4_1")] class ControllerWithoutActions (line 120) | public class ControllerWithoutActions : Controller // Compliant method NotAnAction (line 122) | public int NotAnAction() class EmptyController (line 128) | public class EmptyController : Controller { } class NotAController (line 130) | public class NotAController { } class WithAliasedRouteAttributeController (line 137) | public class WithAliasedRouteAttributeController : Controller // Noncomp... method Index (line 139) | [MyRoute(@"/[controller]")] // Secondary class WithFullQualifiedPartiallyAliasedNameController (line 143) | public class WithFullQualifiedPartiallyAliasedNameController : Controlle... method Index (line 145) | [ASP.Mvc.RouteAttribute("/[action]")] // Secondary class NonCompliantPartialController (line 150) | [Route("[controller]")] method Index1 (line 153) | [Route("/Index1")] // Secondary [first, s... method Index2 (line 156) | [Route("/SubPath/Index2_1")] // Secondary [first, s... method Index3 (line 164) | [Route("/[action]")] // Secondary [first, s... method Index4 (line 167) | [Route("/SubPath/Index4_1")] // Secondary [first, s... class NonCompliantPartialController (line 161) | [Route("[controller]")] method Index1 (line 153) | [Route("/Index1")] // Secondary [first, s... method Index2 (line 156) | [Route("/SubPath/Index2_1")] // Secondary [first, s... method Index3 (line 164) | [Route("/[action]")] // Secondary [first, s... method Index4 (line 167) | [Route("/SubPath/Index4_1")] // Secondary [first, s... class CompliantPartialController (line 173) | [Route("[controller]")] method Index1 (line 176) | [Route("/Index1")] method Index2 (line 179) | [Route("/SubPath/Index2")] method Index3 (line 186) | [Route("[action]")] class CompliantPartialController (line 183) | [Route("[controller]")] method Index1 (line 176) | [Route("/Index1")] method Index2 (line 179) | [Route("/SubPath/Index2")] method Index3 (line 186) | [Route("[action]")] class PartialCompliantController (line 190) | [Route("[controller]")] method Index3 (line 193) | [Route("/[action]")] class Repro_9002 (line 198) | public class Repro_9002 : Controller // Noncompliant method Index (line 200) | [Route("~/B")] // Secondary FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/RouteTemplateShouldNotStartWithSlash.AspNetCore.CSharp12.cs class WithUserDefinedAttributeDerivedFromHttpMethodAttributeController (line 4) | public class WithUserDefinedAttributeDerivedFromHttpMethodAttributeContr... method WithUserDefinedAttribute (line 6) | [MyHttpMethod("/Index")] // Secondary class MyHttpMethodAttribute (line 9) | private sealed class MyHttpMethodAttribute(string template) : HttpMeth... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/RouteTemplateShouldNotStartWithSlash.AspNetCore.PartialAutogenerated.cs class NoncompliantPartialAutogeneratedController (line 5) | [Route("[controller]")] method Index3 (line 8) | [HttpGet("/[action]")] // Secondary method Index4 (line 11) | [HttpGet("/SubPath/Index4_1")] // Secondary class CompliantPartialAutogeneratedController (line 15) | [Route("[controller]")] method Index3 (line 18) | [HttpGet("[action]")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/RouteTemplateShouldNotStartWithSlash.AspNetCore.cs class NoncompliantController (line 4) | [Route("[controller]")] method Index1 (line 8) | [Route("/Index1")] // Secondary {{Change this path to... method Index2 (line 12) | [Route("/SubPath/Index2")] // Secondary {{Change this path to... method Index3 (line 16) | [HttpGet("/[action]")] // Secondary {{Change this path to... method Index4 (line 20) | [HttpGet("/SubPath/Index4_1")] // Secondary {{Change this path to... class NoncompliantMultiRouteController (line 27) | [Route("[controller]")] method Index1 (line 32) | [Route("/Index1")] // Secondary method Index2 (line 36) | [Route("/SubPath/Index2")] // Secondary method Index3 (line 40) | [HttpGet("/[action]")] // Secondary method Index4 (line 44) | [HttpGet("/SubPath/Index4_1")] // Secondary class CompliantController (line 51) | [Route("[controller]")] method Index1 (line 54) | [Route("/Index1")] method Index2 (line 57) | [Route("/SubPath/Index2")] method Index3 (line 60) | [HttpGet("/[action]")] method Index4 (line 63) | [HttpGet("/[controller]/Index4_1")] class NoncompliantNoControllerRouteController (line 68) | public class NoncompliantNoControllerRouteController : Controller // Non... method Index1 (line 70) | [Route("/Index1")] // Secondary {{Add a contr... method Index2 (line 73) | [Route("/SubPath/Index2")] // Secondary {{Add a contr... method Index3 (line 76) | [HttpGet("/[action]")] // Secondary {{Add a contr... method Index4 (line 79) | [HttpGet("/SubPath/Index4_1")] // Secondary {{Add a contr... class CompliantNoControllerRouteNoActionRouteController (line 84) | public class CompliantNoControllerRouteNoActionRouteController : Control... method Index1 (line 86) | public IActionResult Index1() => View(); method Index2 (line 88) | [Route("/SubPath/Index2")] method Index3 (line 91) | [HttpGet("/[action]")] method Index4 (line 94) | [HttpGet("/SubPath/Index4_1")] class CompliantNoControllerRouteEmptyActionRouteController (line 99) | public class CompliantNoControllerRouteEmptyActionRouteController : Cont... method Index1 (line 101) | [HttpGet] method Index2 (line 104) | [Route("/SubPath/Index2")] method Index3 (line 107) | [HttpGet("/[action]")] method Index4 (line 110) | [HttpGet("/SubPath/Index4_1")] class WithAliasedRouteAttributeController (line 120) | public class WithAliasedRouteAttributeController : Controller // Noncomp... method Index (line 122) | [MyRoute(@"/[controller]")] // Secondary class WithFullQualifiedPartiallyAliasedNameController (line 126) | public class WithFullQualifiedPartiallyAliasedNameController : Controlle... method Index (line 128) | [ASP.Mvc.RouteAttribute("/[action]")] // Secondary class MultipleActionsAllRoutesStartingWithSlash1Controller (line 133) | public class MultipleActionsAllRoutesStartingWithSlash1Controller : Cont... method WithHttpAttribute (line 135) | [HttpGet("/Index1")] // Secondary method WithRouteAttribute (line 138) | [Route("/Index2")] // Secondary class MultipleActionsAllRoutesStartingWithSlash2Controller (line 142) | public class MultipleActionsAllRoutesStartingWithSlash2Controller : Cont... method WithHttpAttributes (line 144) | [HttpGet("/Index1")] // Secondary method WithRouteAndHttpAttributes (line 148) | [Route("/Index2")] // Secondary class MultipleActionsAllRoutesStartingWithSlash3Controller (line 154) | [Route("[controller]")] method WithHttpAttributes (line 157) | [HttpGet("/Index1")] // Secondary method WithRouteAndHttpAttributes (line 161) | [Route("/Index2")] // Secondary class MultipleActionsSomeRoutesStartingWithSlash1Controller (line 167) | public class MultipleActionsSomeRoutesStartingWithSlash1Controller : Con... method WithHttpAttribute (line 169) | [HttpGet("Index1")] method WithRouteAttribute (line 172) | [Route("/Index2")] class MultipleActionsSomeRoutesStartingWithSlash2Controller (line 176) | public class MultipleActionsSomeRoutesStartingWithSlash2Controller : Con... method WithHttpAttributes (line 178) | [HttpGet("Index1")] method WithRouteAttribute (line 182) | [Route("/Index2")] class MultipleActionsSomeRoutesStartingWithSlash3Controller (line 186) | public class MultipleActionsSomeRoutesStartingWithSlash3Controller : Con... method WithHttpAttributes (line 188) | [HttpGet("Index1")] method WithRouteAttribute (line 192) | [Route("/Index2")] class NotAController (line 196) | [NonController] method Index (line 199) | [Route("/Index1")] class ControllerWithoutControllerSuffix (line 203) | public class ControllerWithoutControllerSuffix : Controller // Noncompliant method Index (line 205) | [Route("/Index1")] // Secondary class ControllerWithControllerAttribute (line 209) | [Controller] method Index (line 212) | [Route("/Index1")] // Secondary class ControllerWithoutParameterlessConstructor (line 216) | public class ControllerWithoutParameterlessConstructor : Controller // N... method ControllerWithoutParameterlessConstructor (line 218) | public ControllerWithoutParameterlessConstructor(int i) { } method Index (line 220) | [Route("/Index1")] // Secondary class NonPublicController (line 224) | class NonPublicController : Controller // Compli... method Index (line 226) | [Route("/Index1")] class ControllerRequirementsInfluenceActionsCheck (line 231) | public class ControllerRequirementsInfluenceActionsCheck class InternalController (line 233) | internal class InternalController : Controller // Complia... method Index (line 235) | [Route("/Index1")] class ProtectedController (line 239) | protected class ProtectedController : Controller // Complia... method Index (line 241) | [Route("/Index1")] class PublicNestedController (line 245) | public class PublicNestedController : Controller // Complian... method Index (line 247) | [Route("/Index1")] type AStruct (line 252) | public struct AStruct class PublicNestedController (line 254) | public class PublicNestedController : Controller // Complian... method Index (line 256) | [Route("/Index1")] class NoncompliantPartialController (line 261) | [Route("[controller]")] method Index1 (line 264) | [Route("/Index1")] // Secondary [first, second] method Index2 (line 267) | [Route("/SubPath/Index2")] // Secondary [first, second] method Index3 (line 274) | [HttpGet("/[action]")] // Secondary [first, second] method Index4 (line 277) | [HttpGet("/SubPath/Index4_1")] // Secondary [first, second] class NoncompliantPartialController (line 271) | [Route("[controller]")] method Index1 (line 264) | [Route("/Index1")] // Secondary [first, second] method Index2 (line 267) | [Route("/SubPath/Index2")] // Secondary [first, second] method Index3 (line 274) | [HttpGet("/[action]")] // Secondary [first, second] method Index4 (line 277) | [HttpGet("/SubPath/Index4_1")] // Secondary [first, second] class CompliantPartialController (line 281) | [Route("[controller]")] method Index1 (line 284) | [Route("/Index1")] method Index2 (line 287) | [Route("/SubPath/Index2")] method Index3 (line 294) | [HttpGet("[action]")] class CompliantPartialController (line 291) | [Route("[controller]")] method Index1 (line 284) | [Route("/Index1")] method Index2 (line 287) | [Route("/SubPath/Index2")] method Index3 (line 294) | [HttpGet("[action]")] class NoncompliantPartialAutogeneratedController (line 298) | [Route("[controller]")] method Index1 (line 301) | [Route("/Index1")] // Secondary method Index2 (line 304) | [Route("/SubPath/Index2")] // Secondary class CompliantPartialAutogeneratedController (line 308) | [Route("[controller]")] method Index1 (line 311) | [Route("/Index1")] method Index2 (line 314) | [Route("/SubPath/Index2")] class Repro_9002 (line 319) | public class Repro_9002 : Controller // Noncompliant method Index (line 321) | [Route("~/B")] // Secondary FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/SpecifyRouteAttribute.CSharp12.cs class RouteTemplateIsNotSpecifiedController (line 7) | public class RouteTemplateIsNotSpecifiedController : Controller method NoAttribute (line 9) | public IActionResult NoAttribute() => View(); method WithHttpGetAttribute (line 11) | [HttpGet] method WithHttpGetAttributeWithParanthesis (line 14) | [HttpGet()] method WithFullAttributeName (line 17) | [HttpGetAttribute] method WithNamespaceAttribute (line 20) | [Microsoft.AspNetCore.Mvc.HttpGet] method WithAliasedNamespaceAttribute (line 23) | [MA.Mvc.HttpGet] method WithScopedAttribute (line 26) | [method: HttpGet] method AbsoluteUri1 (line 29) | [HttpGet("/[controller]/[action]/{sortBy}")] method AbsoluteUri2 (line 32) | [HttpGet("~/[controller]/[action]/{sortBy}")] method Error (line 35) | public IActionResult Error() => View(); class RouteTemplatesAreSpecifiedController (line 38) | public class RouteTemplatesAreSpecifiedController : Controller ... method Get (line 43) | [HttpGet("GetObject")] method GetMultipleTemplates (line 47) | [HttpGet("GetFirst")] method MixGetAndPut (line 51) | [HttpGet("GetFirst")] method MixWithTemplateAndWithout (line 55) | [HttpGet("GetFirst")] method MixWithoutTemplate (line 59) | [HttpGet()] method Post (line 63) | [HttpPost("CreateObject")] method Put (line 66) | [HttpPut("UpdateObject")] method Delete (line 69) | [HttpDelete("DeleteObject")] method Patch (line 72) | [HttpPatch("PatchObject")] method HttpHead (line 75) | [HttpHead("Head")] method HttpOptions (line 78) | [HttpOptions("Options")] method WithRoute (line 81) | [Route("details")] method WithRouteAndProperties1 (line 84) | [Route("details", Order = 1)] method WithRouteAndProperties2 (line 87) | [Route("details", Order = 1, Name = "Details")] method WithRouteAndProperties3 (line 90) | [Route("details", Name = "Details", Order = 1)] method RouteAndMethodMix (line 93) | [Route("[controller]/List/{sortBy}/{direction}")] method MultipleProperties1 (line 97) | [HttpGet("details", Order = 1)] method MultipleProperties2 (line 100) | [HttpGet("details", Order = 1, Name = "Details")] method MultipleProperties3 (line 103) | [HttpGet("details", Name = "Details", Order = 1)] method Constant (line 106) | [HttpGet(ConstantRoute)] method Constant2 (line 109) | [HttpGet(""" method Interpolation1 (line 114) | [HttpGet($"Route {ConstantRoute}")] method Interpolation2 (line 117) | [HttpGet($""" method WithActionResult (line 122) | [HttpGet("GetObject")] method WithSpace (line 125) | [Route(" ")] method WithTab (line 128) | [Route("\t")] method Comment (line 132) | public IActionResult Comment() => View(); class WithRouteAttributeIsCompliantController (line 135) | [Route("api/[controller]")] method Index (line 138) | [HttpGet("Test")] class WithUserDefinedAttributeController (line 142) | public class WithUserDefinedAttributeController : Controller ... method Index (line 144) | [MyHttpMethod("Test")] class MyHttpMethodAttribute (line 147) | private sealed class MyHttpMethodAttribute(string template) : HttpMeth... class WithCustomGetAttributeController (line 150) | public class WithCustomGetAttributeController : Controller ... method Index (line 152) | [HttpGet("Test")] class HttpGetAttribute (line 155) | private sealed class HttpGetAttribute(string template) : HttpMethodAtt... class WithCustomController (line 158) | public class WithCustomController : DerivedController ... method Index (line 160) | [HttpGet("Test")] class WithAttributeController (line 164) | [Controller] method Index (line 167) | [HttpGet("Test")] class WithAttributeControllerUsingInheritanceController (line 171) | public class WithAttributeControllerUsingInheritanceController : Endpoin... method Index (line 173) | [HttpGet("Test")] class NamedController (line 177) | public class NamedController ... method Index (line 179) | [HttpGet("Test")] class NonController (line 183) | [NonController] method Index (line 186) | [HttpGet("Test")] class DerivedController (line 189) | public class DerivedController : Controller { } class Endpoint (line 191) | [Controller] class ControllerWithRouteAttribute (line 194) | [Route("api/[controller]")] class ControllerWithInheritedRoute (line 197) | public class ControllerWithInheritedRoute : ControllerWithRouteAttribute... method Index (line 199) | [HttpGet("Test")] ... class BaseControllerWithActionWithRoute (line 203) | public class BaseControllerWithActionWithRoute : Controller ... method Index (line 205) | [HttpGet("Test")] ... method Index (line 209) | public virtual string Index(int id) => "Hi!"; class ControllerOverridesActionWithRoute (line 212) | public class ControllerOverridesActionWithRoute : BaseControllerWithActi... method Index (line 215) | public override string Index() => "Hi!"; method Index (line 218) | public override string Index(int id) => "Hi!"; class ExtendedRouteAttribute (line 222) | public sealed class ExtendedRouteAttribute() : RouteAttribute("[controll... class SomeController (line 224) | [ExtendedRoute] method Foo (line 227) | [HttpGet("foo")] class BaseController (line 234) | public abstract class BaseController : Controller // Compliant - class... method List (line 236) | [HttpGet] class UserController (line 245) | [Route("/api/user")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AspNet/UseAspNetModelBinding_AspNetCore_Latest.cs class TestController (line 8) | public class TestController : Controller method Post (line 12) | public IActionResult Post(string key) method MixedAccess_Form (line 55) | void MixedAccess_Form(string key) method MixedAccess_Form_Query (line 61) | void MixedAccess_Form_Query(string key) method FalseNegatives (line 67) | void FalseNegatives() method FormCollection (line 74) | void FormCollection(IFormCollection form) method WriteAccess (line 79) | void WriteAccess() method Compliant (line 85) | async Task Compliant() method CompliantFormAccess (line 91) | async Task CompliantFormAccess() class CodeBlocksController (line 98) | public class CodeBlocksController : Controller method CodeBlocksController (line 100) | public CodeBlocksController() method CodeBlocksController (line 105) | public CodeBlocksController(object o) => _ = Request.Form["id"]; method M1 (line 122) | void M1() => _ = Request.Form["id"]; method M2 (line 123) | void M2() method M3 (line 129) | void M3() class OverridesController (line 148) | public class OverridesController : Controller method Action (line 150) | public void Action() method Undecidable (line 154) | private void Undecidable(HttpContext context) method Undecidable (line 169) | private void Undecidable(HttpRequest request) method OnActionExecuted (line 173) | public override void OnActionExecuted(ActionExecutedContext context) method OnActionExecuting (line 177) | public override void OnActionExecuting(ActionExecutingContext context) method OnActionExecutionAsync (line 181) | public override Task OnActionExecutionAsync(ActionExecutingContext con... class PocoController (line 188) | [Controller] method OnActionExecuted (line 191) | public void OnActionExecuted(ActionExecutedContext context) method OnActionExecuted (line 195) | void IActionFilter.OnActionExecuted(Microsoft.AspNetCore.Mvc.Filters.A... method OnActionExecuting (line 199) | public void OnActionExecuting(ActionExecutingContext context) method OnActionExecuting (line 203) | void IActionFilter.OnActionExecuting(ActionExecutingContext context) method OnActionExecutionAsync (line 207) | public Task OnActionExecutionAsync(ActionExecutingContext context, Act... method OnActionExecutionAsync (line 212) | Task IAsyncActionFilter.OnActionExecutionAsync(ActionExecutingContext ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AssertionArgsShouldBePassedInCorrectOrder.MsTest.cs class Program (line 6) | [TestClass] method Simple (line 9) | [TestMethod] method Dynamic (line 49) | [TestMethod] method BrokeSyntax (line 59) | [TestMethod] method Foo (line 74) | [TestMethod] type Seasons (line 105) | public enum Seasons { Spring, Summer, Autumn, Winter } method TestString (line 107) | [TestMethod] method TestEnum (line 117) | [TestMethod] method RetrieveSeason (line 126) | public Seasons RetrieveSeason() => Seasons.Spring; method RetrieveString (line 127) | public string RetrieveString() => "Spring"; class Program (line 71) | [TestClass] method Simple (line 9) | [TestMethod] method Dynamic (line 49) | [TestMethod] method BrokeSyntax (line 59) | [TestMethod] method Foo (line 74) | [TestMethod] type Seasons (line 105) | public enum Seasons { Spring, Summer, Autumn, Winter } method TestString (line 107) | [TestMethod] method TestEnum (line 117) | [TestMethod] method RetrieveSeason (line 126) | public Seasons RetrieveSeason() => Seasons.Spring; method RetrieveString (line 127) | public string RetrieveString() => "Spring"; class Program (line 102) | [TestClass] method Simple (line 9) | [TestMethod] method Dynamic (line 49) | [TestMethod] method BrokeSyntax (line 59) | [TestMethod] method Foo (line 74) | [TestMethod] type Seasons (line 105) | public enum Seasons { Spring, Summer, Autumn, Winter } method TestString (line 107) | [TestMethod] method TestEnum (line 117) | [TestMethod] method RetrieveSeason (line 126) | public Seasons RetrieveSeason() => Seasons.Spring; method RetrieveString (line 127) | public string RetrieveString() => "Spring"; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AssertionArgsShouldBePassedInCorrectOrder.NUnit.cs class Program (line 6) | [TestFixture] method FakeAssert (line 9) | void FakeAssert(object a, object b) { } method Simple (line 11) | [Test] method Foo (line 60) | [Test] method Dynamic (line 81) | [Test] method BrokeSyntax (line 91) | [Test] type Seasons (line 106) | public enum Seasons { Spring, Summer, Autumn, Winter } method TestString (line 108) | [Test] method TestEnum (line 118) | [Test] method RetrieveSeason (line 127) | public Seasons RetrieveSeason() => Seasons.Spring; method RetrieveString (line 128) | public string RetrieveString() => "Spring"; class Program (line 57) | [TestFixture] method FakeAssert (line 9) | void FakeAssert(object a, object b) { } method Simple (line 11) | [Test] method Foo (line 60) | [Test] method Dynamic (line 81) | [Test] method BrokeSyntax (line 91) | [Test] type Seasons (line 106) | public enum Seasons { Spring, Summer, Autumn, Winter } method TestString (line 108) | [Test] method TestEnum (line 118) | [Test] method RetrieveSeason (line 127) | public Seasons RetrieveSeason() => Seasons.Spring; method RetrieveString (line 128) | public string RetrieveString() => "Spring"; class Program (line 103) | [TestFixture] method FakeAssert (line 9) | void FakeAssert(object a, object b) { } method Simple (line 11) | [Test] method Foo (line 60) | [Test] method Dynamic (line 81) | [Test] method BrokeSyntax (line 91) | [Test] type Seasons (line 106) | public enum Seasons { Spring, Summer, Autumn, Winter } method TestString (line 108) | [Test] method TestEnum (line 118) | [Test] method RetrieveSeason (line 127) | public Seasons RetrieveSeason() => Seasons.Spring; method RetrieveString (line 128) | public string RetrieveString() => "Spring"; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AssertionArgsShouldBePassedInCorrectOrder.NUnit4.cs class ProgramNUnit4 (line 7) | [TestFixture] method FakeAssert (line 10) | void FakeAssert(object a, object b) { } method Simple (line 12) | [Test] class Program (line 57) | [TestFixture] method Foo (line 60) | [Test] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AssertionArgsShouldBePassedInCorrectOrder.Xunit.cs class Program (line 6) | class Program method Simple (line 8) | [Fact] method Dynamic (line 39) | [Fact] method BrokeSyntax (line 49) | [Fact] method Foo (line 63) | [Fact] type Seasons (line 90) | public enum Seasons { Spring, Summer, Autumn, Winter } method TestString (line 92) | [Fact] method TestEnum (line 102) | [Fact] method RetrieveSeason (line 111) | public Seasons RetrieveSeason() => Seasons.Spring; method RetrieveString (line 112) | public string RetrieveString() => "Spring"; class Program (line 61) | class Program method Simple (line 8) | [Fact] method Dynamic (line 39) | [Fact] method BrokeSyntax (line 49) | [Fact] method Foo (line 63) | [Fact] type Seasons (line 90) | public enum Seasons { Spring, Summer, Autumn, Winter } method TestString (line 92) | [Fact] method TestEnum (line 102) | [Fact] method RetrieveSeason (line 111) | public Seasons RetrieveSeason() => Seasons.Spring; method RetrieveString (line 112) | public string RetrieveString() => "Spring"; class Program (line 88) | class Program method Simple (line 8) | [Fact] method Dynamic (line 39) | [Fact] method BrokeSyntax (line 49) | [Fact] method Foo (line 63) | [Fact] type Seasons (line 90) | public enum Seasons { Spring, Summer, Autumn, Winter } method TestString (line 92) | [Fact] method TestEnum (line 102) | [Fact] method RetrieveSeason (line 111) | public Seasons RetrieveSeason() => Seasons.Spring; method RetrieveString (line 112) | public string RetrieveString() => "Spring"; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AssertionArgsShouldBePassedInCorrectOrder.XunitV3.cs class XUnitV3Tests (line 6) | public class XUnitV3Tests method Simple (line 8) | [Fact] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AssertionsShouldBeComplete.AllFrameworks.cs class Tests (line 8) | internal class Tests method FluentAssertions (line 10) | public void FluentAssertions(string s) method NFluent (line 15) | public void NFluent() method NSubstitute (line 20) | public void NSubstitute(IComparable comparable) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AssertionsShouldBeComplete.FluentAssertions.CSharp7.cs class Program (line 6) | public class Program method StringAssertions (line 8) | public void StringAssertions() method CollectionAssertions (line 19) | public void CollectionAssertions() method DictionaryAssertions (line 29) | public void DictionaryAssertions() method ReturnedByReturn (line 35) | public StringAssertions ReturnedByReturn() method ReturnedByArrow (line 41) | public StringAssertions ReturnedByArrow(string s) => method ReturnedByArrowWithConversion (line 44) | public object ReturnedByArrowWithConversion(string s) => method CalledByArrow (line 47) | public void CalledByArrow(string s) => method Assigned (line 50) | public void Assigned() method PassedAsArgument (line 57) | public void PassedAsArgument() method ValidateString (line 62) | private void ValidateString(StringAssertions assertion) { } method UnreducedCall (line 64) | public void UnreducedCall() method ReturnedInLambda (line 70) | public void ReturnedInLambda() method CustomAssertions (line 75) | public void CustomAssertions() method CustomStructAssertions (line 82) | public void CustomStructAssertions() class CustomAssertionExtension (line 90) | public static class CustomAssertionExtension method Should (line 92) | public static CustomAssertion Should(this Custom instance) class CustomAssertion (line 96) | public class CustomAssertion : ReferenceTypeAssertions CheckReturnedByReturn() method CheckReturnedByExpressionBody (line 59) | public ICheck CheckReturnedByExpressionBody() => method AnonymousInvocation (line 62) | public void AnonymousInvocation(Func a) => class Check (line 68) | public static class Check method That (line 70) | public static void That(int i) { } class Test (line 73) | public class Test method CheckThat (line 75) | public void CheckThat() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AssertionsShouldBeComplete.NSubstitute.cs type ICommand (line 3) | public interface ICommand method Execute (line 5) | void Execute(); class Tests (line 10) | internal class Tests method Received (line 12) | public void Received() method DidNotReceive (line 24) | public void DidNotReceive() method ReceivedWithAnyArgs (line 34) | public void ReceivedWithAnyArgs() method DidNotReceiveWithAnyArgs (line 45) | public void DidNotReceiveWithAnyArgs() method ReceivedCalls (line 55) | public void ReceivedCalls() class OtherExtensions (line 69) | public static class OtherExtensions method Received (line 71) | public static void Received(this T something) { } class Test (line 74) | public class Test method Received (line 76) | public void Received(ICommand command) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AssignmentInsideSubExpression.Latest.cs class CoalescingAssignment (line 6) | public class CoalescingAssignment method Test (line 8) | public void Test() method SomeMethod (line 17) | void SomeMethod(int val) { } class AssignmentInsideSubExpression (line 20) | public class AssignmentInsideSubExpression method foo (line 22) | void foo(int a) method Foo (line 26) | void Foo() class Bar (line 35) | public class Bar method GetFooNullableAsyncTriggered (line 37) | private async Task GetFooNullableAsyncTriggered() => class FooProvider (line 40) | public class FooProvider method GetFooAsync (line 42) | public Task GetFooAsync() => Task.FromResult(42); class OverriddenCompoundAssignment (line 51) | public class OverriddenCompoundAssignment method Test (line 53) | void Test() method SomeMethod (line 59) | void SomeMethod(C1 c) { } class C1 (line 60) | class C1 method Test (line 73) | void Test() class C2 (line 87) | class C2 class Nesting (line 92) | public class Nesting FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AssignmentInsideSubExpression.TopLevelStatements.cs type Record (line 67) | record Record type PositionalRecord (line 72) | record PositionalRecord(int Input) type ICustomMsgQueue (line 90) | interface ICustomMsgQueue method Pop (line 92) | string? Pop(); class MessageQueueUseCase (line 95) | class MessageQueueUseCase method Process (line 97) | void Process(ICustomMsgQueue queue) type RecordStruct (line 110) | record struct RecordStruct type PositionalRecordStruct (line 115) | record struct PositionalRecordStruct(int Input) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AssignmentInsideSubExpression.cs class AssignmentInsideSubExpression (line 7) | public class AssignmentInsideSubExpression method foo (line 9) | void foo(int a) method foo (line 13) | void foo(bool a) method foo (line 17) | int foo(Func f) class MyClass (line 22) | private class MyClass method Foo (line 27) | void Foo() method TestMethod1 (line 123) | public void TestMethod1() method GetBool (line 133) | public bool GetBool() => true; class WaitingInLoop (line 137) | abstract class WaitingInLoop method Process (line 139) | public async void Process() method GetTask (line 148) | internal abstract Task GetTask(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AsyncAwaitIdentifier.Latest.cs class AsyncAwaitIdentifier (line 7) | public class AsyncAwaitIdentifier method Cs9_nuint (line 9) | public void Cs9_nuint() method GetDiscount (line 14) | private static int GetDiscount(object p) => p switch class A (line 22) | public class A { } class B (line 23) | public class B { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AsyncAwaitIdentifier.cs class AsyncAwaitIdentifier (line 7) | public class AsyncAwaitIdentifier method AsyncAwaitIdentifier (line 9) | public AsyncAwaitIdentifier() method Foo (line 18) | public void Foo(int async) // Noncompliant method Foo (line 25) | public static async Task Foo(string a) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AsyncVoidMethod.Latest.cs class Sample (line 4) | public class Sample : EventArgs { } type EventHandlerCasesInRecord (line 6) | public record EventHandlerCasesInRecord type EventHandlerCasesInPositionalRecord (line 48) | public record EventHandlerCasesInPositionalRecord(string Param) type EventHandlerCasesInInterface (line 76) | public interface EventHandlerCasesInInterface method MyMethod (line 78) | async void MyMethod() // Compliant because it can be implemented as a ... method MyMethod (line 83) | async void MyMethod(object sender, EventArgs args) method MyMethod1 (line 88) | async void MyMethod1(object o, EventArgs e) method MyMethod2 (line 93) | async void MyMethod2(object o, Sample e) method NotAHandler (line 98) | private async void NotAHandler(object sender) // Noncompliant type ISomeInterface (line 104) | public interface ISomeInterface method SomeMethod (line 108) | public void SomeMethod() method EventHandlerCases_MyEvent (line 113) | private async void EventHandlerCases_MyEvent(object sender, bool e) class Reproducer5432 (line 119) | public class Reproducer5432 method SomeMethod (line 121) | public void SomeMethod() method RunOnceAsync (line 126) | private async void RunOnceAsync(object? _) // Compliant, see: https://... type EventHandlerCasesInRecordStruct (line 131) | public record struct EventHandlerCasesInRecordStruct type EventHandlerCasesInPositionalRecordStruct (line 173) | public record struct EventHandlerCasesInPositionalRecordStruct(string Pa... type IVirtualMethodInterface (line 201) | public interface IVirtualMethodInterface method SomeMethod1 (line 203) | static abstract void SomeMethod1(); method SomeVirtualMethod (line 205) | static virtual async void SomeVirtualMethod() // Compliant (virtual me... class SomeClass (line 211) | public class SomeClass : IVirtualMethodInterface method SomeMethod1 (line 213) | public static async void SomeMethod1() // Compliant as it comes from t... method SomeMethod2 (line 218) | public static async void SomeMethod2() // Noncompliant class Extensions (line 224) | public static class Extensions method extension (line 226) | extension(Sample e) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AsyncVoidMethod.MsTestTestFramework.cs class MyUnitTests (line 7) | [TestClass] method AssemblyCleanup (line 10) | [AssemblyCleanup] method AssemblyInitialize (line 13) | [AssemblyInitialize] method ClassCleanup (line 16) | [ClassCleanup] method ClassInitialize (line 19) | [ClassInitialize] method TestCleanup (line 22) | [TestCleanup] method TestInitialize (line 25) | [TestInitialize] method MyTest (line 28) | [TestMethod] class MyOtherUnitTests (line 32) | [TestClass] method AssemblyCleanup (line 35) | [AssemblyCleanup] method AssemblyInitialize (line 38) | [AssemblyInitialize] method ClassCleanup (line 41) | [ClassCleanup] method ClassInitialize (line 44) | [ClassInitialize] method TestCleanup (line 47) | [TestCleanup] method TestInitialize (line 50) | [TestInitialize] method MyTest (line 53) | [TestMethod] class MsTestCases (line 60) | internal class MsTestCases method M (line 62) | [Generic] class GenericAttribute (line 66) | public class GenericAttribute : TestMethodAttribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AsyncVoidMethod.VsUtFramework.cs class MyUnitTests (line 8) | [TestClass] method AssemblyCleanup (line 11) | [AssemblyCleanup] method AssemblyInitialize (line 14) | [AssemblyInitialize] method ClassCleanup (line 17) | [ClassCleanup] method ClassInitialize (line 20) | [ClassInitialize] method TestCleanup (line 23) | [TestCleanup] method TestInitialize (line 26) | [TestInitialize] method MyTest (line 29) | [TestMethod] class MsTestCases (line 33) | internal class MsTestCases method Method (line 35) | public void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AsyncVoidMethod.cs class Foo (line 6) | public class Foo : EventArgs { } class EventHandlerCases (line 8) | public class EventHandlerCases method MyMethod (line 10) | async void MyMethod() // Noncompliant {{Return 'Task' instead.}} method MyVirtualMethod (line 16) | public virtual async void MyVirtualMethod() // Compliant as it is virtual method MyMethod (line 21) | async void MyMethod(object sender, EventArgs args) method MyMethod2 (line 26) | async void MyMethod2(object o, Foo e) method MyMethod3 (line 31) | void MyMethod3() { } method MyMethod4 (line 33) | void MyMethod4(object sender, EventArgs args) { } method MyMethod5 (line 35) | async Task MyMethod5() method EventHandlerCases (line 42) | public EventHandlerCases() method EventHandlerCases_MyEvent (line 47) | private async void EventHandlerCases_MyEvent(object sender, bool e) method OnValueChanged (line 52) | static async void OnValueChanged() // Compliant, has OnXxx name method OnX (line 56) | async void OnX() { } method O (line 58) | async void O() { } method On (line 59) | async void On() { } method Onboard (line 60) | async void Onboard() { } method ToX (line 61) | async void ToX() { } method ONCAPS (line 62) | async void ONCAPS() { } method On3People (line 63) | async void On3People() { } method On_Underscore (line 64) | async void On_Underscore() { } method onEvent (line 65) | async void onEvent() { } method Onřád (line 67) | async void Onřád() { } method OnŘád (line 68) | async void OnŘád() { } method OnΘ (line 70) | async void OnΘ() { } method Onθ (line 71) | async void Onθ() { } method OnEventNameChanged (line 74) | static async void OnEventNameChanged(BindableObject bindable, object o... method ArbreDesClefs_ItemInvoked (line 79) | private async void ArbreDesClefs_ItemInvoked(TreeView sender, TreeView... class BindableObject (line 83) | public class BindableObject { } class TreeView (line 84) | public class TreeView { } class TreeViewItemInvokedEventArgs (line 85) | public class TreeViewItemInvokedEventArgs { } type EventHandlerCasesInStruct (line 88) | public struct EventHandlerCasesInStruct method MyMethod (line 90) | async void MyMethod() // Noncompliant {{Return 'Task' instead.}} method MyMethod (line 96) | async void MyMethod(object sender, EventArgs args) method MyMethod1 (line 101) | async void MyMethod1(object o, EventArgs e) method MyMethod2 (line 106) | async void MyMethod2(object o, Foo e) method NotAHandler (line 111) | private async void NotAHandler(object sender) // Noncompliant class UwpCases (line 118) | public class UwpCases type ISuspendingEventArgs (line 122) | private interface ISuspendingEventArgs { } method MyOtherMethod1 (line 124) | async void MyOtherMethod1(object o, ISuspendingEventArgs args) method OnSuspending (line 129) | private async void OnSuspending(object sender, ISuspendingEventArgs e) type StructExample (line 135) | public struct StructExample method SomeMethod (line 139) | public void SomeMethod() method EventHandlerCases_MyEvent (line 144) | private async void EventHandlerCases_MyEvent(object sender, bool e) class Reproducer5432 (line 150) | public class Reproducer5432 method SomeMethod (line 154) | public void SomeMethod() method CallAction (line 163) | private void CallAction(Action action) { } method CallDelegate (line 165) | private void CallDelegate(CustomDelegate @delegate) { } method RunOnceAsync (line 167) | private async void RunOnceAsync(object _) { } method Do (line 169) | private async void Do(bool b) { } method Do (line 171) | private async void Do(int i) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AvoidDateTimeNowForBenchmarking.cs class Program (line 3) | public class Program method Benchmark (line 5) | void Benchmark() method Timing (line 20) | void Timing() method Combinations (line 30) | void Combinations(TimeSpan timeSpan, DateTime dateTime) method SwitchExpression (line 67) | void SwitchExpression(DateTime start) method NonInLineDateTimeNow (line 78) | void NonInLineDateTimeNow() method EdgeCases (line 86) | void EdgeCases(DateTime dateTime, TimeSpan timeSpan) class FakeDateTimeSubtract (line 96) | public class FakeDateTimeSubtract method MyMethod (line 98) | void MyMethod(System.DateTime dateTime) class DateTime (line 103) | public static class DateTime FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AvoidExcessiveClassCoupling.Latest.cs type IFoo (line 8) | public interface IFoo { } class FooBase (line 9) | class FooBase : IFoo { } class Foo1 (line 10) | class Foo1 : FooBase { } type MyStruct (line 11) | public struct MyStruct { } type FirstRecord (line 13) | public record FirstRecord { } type SecondRecord (line 14) | public record SecondRecord // Noncompliant {{Split this record into smal... type PositionalRecord (line 30) | public record PositionalRecord(int Parameter) // Noncompliant {{Split th... type OutterRecord (line 46) | public record OutterRecord type IFoo (line 59) | public interface IFoo { } class FooBase (line 60) | class FooBase : IFoo { } class Foo1 (line 61) | class Foo1 : FooBase { } type MyStruct (line 62) | public struct MyStruct { } type FirstRecordStruct (line 64) | public record struct FirstRecordStruct { } type SecondRecordStruct (line 65) | public record struct SecondRecordStruct // Noncompliant {{Split this rec... type PositionalRecordStruct (line 81) | public record struct PositionalRecordStruct(int Parameter) // Noncompliant type OutterRecordStruct (line 96) | public record struct OutterRecordStruct // Compliant: nested record stru... type IFoo (line 113) | public interface IFoo { } class FooBase (line 114) | class FooBase : IFoo { } class Foo (line 115) | class Foo : FooBase { } type MyStruct (line 116) | public struct MyStruct { } class ZeroDependencies (line 118) | public class ZeroDependencies { } class ZeroNonPrimitiveDependencies (line 120) | public class ZeroNonPrimitiveDependencies // Compliant method Method_IntPtr (line 128) | private void Method_IntPtr(IntPtr arg) { } method Method_UIntPtr (line 129) | private void Method_UIntPtr(UIntPtr arg) { } method Method_nint (line 130) | private void Method_nint(nint arg) { } method Method_nuint (line 131) | private void Method_nuint(nuint arg) { } class OneDependency (line 134) | public class OneDependency // Compliant class NestedClass (line 144) | private class NestedClass // Noncompliant method GetFooBase (line 148) | private FooBase GetFooBase() => default; class TwoDependencies (line 152) | public class TwoDependencies // Noncompliant class NestedClass (line 164) | private class NestedClass // Compliant method DoWork (line 174) | private void DoWork(IFoo iFoo) { } class NestedEmptyClass (line 177) | private class NestedEmptyClass // Compliant class ScopedRefParameterUsage (line 182) | public class ScopedRefParameterUsage // Noncompliant {{Split this class ... method M (line 185) | void M(scoped ref MyStruct p) { } type IFooFile (line 190) | file interface IFooFile { } class FooFileBase (line 191) | file class FooFileBase : IFooFile { } class FooFileClass1 (line 192) | file class FooFileClass1 : FooFileBase { } class FooSecond (line 194) | file class FooSecond // Noncompliant {{Split this class into smaller and... type IFoo (line 205) | public interface IFoo { } class FooBase (line 206) | public class FooBase : IFoo { } class Foo1 (line 207) | public class Foo1 : FooBase { } class Foo2 (line 208) | public class Foo2 : FooBase { } type MyStruct (line 209) | public struct MyStruct { } class Partial (line 211) | public partial class Partial // Noncompliant {{Split this class into sma... class Partial (line 218) | public partial class Partial // Noncompliant {{Split this class into sma... class Foo1 (line 230) | public class Foo1 { } class Foo1Extensions (line 232) | public static class Foo1Extensions // Compliant: 1 dep (Foo1) method extension (line 234) | extension(Foo1) class UsesStaticExtension (line 240) | public class UsesStaticExtension // Compliant: 1 dep (Foo1) — Foo1Extens... method M (line 242) | Foo1 M() => Foo1.Create(); class CollectionExtensions (line 249) | public static class CollectionExtensions // Noncompliant FP - static cla... method IsNullOrEmpty (line 251) | public static bool IsNullOrEmpty(this IList list) => list == null... method IsNullOrEmpty (line 252) | public static bool IsNullOrEmpty(this ICollection collection) => ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AvoidExcessiveClassCoupling.cs type IFoo (line 9) | public interface IFoo { } class FooBase (line 10) | class FooBase : IFoo { } class Foo1 (line 11) | class Foo1 : FooBase { } type MyStruct (line 12) | public struct MyStruct { } type ISelfReferencing (line 13) | public interface ISelfReferencing where T : ISelfReferencing { } class OuterForGenericArg (line 14) | public class OuterForGenericArg { public class Inner { } } class Inner (line 14) | public class Inner { } class TestCases (line 16) | public abstract class TestCases // Noncompliant {{Split this class into ... method TestCases (line 80) | public TestCases() method Method1 (line 102) | IDisposable Method1(object o) method Method2 (line 108) | Stream Method2() => new FileStream("", FileMode.Open); method Method3 (line 109) | private static FooBase Method3() => null; method Method4 (line 111) | protected abstract IFoo Method4(); class OutterClass (line 114) | public class OutterClass class InnerClass (line 118) | public class InnerClass // Noncompliant class WithConstraint (line 124) | public class WithConstraint where T : IDisposable { } class UnboundGenericUsage (line 125) | public class UnboundGenericUsage // Noncompliant {{Split this class into... method M (line 127) | void M() { _ = typeof(WithConstraint<>); } class ThisMemberAccessUsage (line 130) | public class ThisMemberAccessUsage // Compliant method M (line 133) | Stream M() => this._s; class AliasInCastUsage (line 136) | public class AliasInCastUsage // Noncompliant {{Split this class into sm... method M (line 139) | void M(object obj) { var x = (MyFileStream)obj; } class AliasForUserDefinedTypeUsage (line 142) | public class AliasForUserDefinedTypeUsage // Noncompliant {{Split this c... method M (line 145) | void M(object obj) { var x = (FooBaseAlias)obj; } class GlobalQualifiedCustomTypeUsage (line 148) | public class GlobalQualifiedCustomTypeUsage // Noncompliant {{Split this... class ArrayInitializerUsage (line 154) | public class ArrayInitializerUsage // Noncompliant {{Split this class in... method M (line 157) | void M() { FooBase[] arr = null; } class PointerInitializerUsage (line 160) | public class PointerInitializerUsage // Noncompliant {{Split this class ... method M (line 163) | unsafe void M() { MyStruct* ptr = null; } class SelfReferencingGenericUsage (line 166) | public class SelfReferencingGenericUsage // Compliant method M (line 168) | void M() { _ = typeof(ISelfReferencing<>); } class SelfReferencingGenericUsage (line 171) | public class SelfReferencingGenericUsage where T : ISelfReferencing); } class NullableWrapperUsage (line 176) | public class NullableWrapperUsage // Compliant class ConstraintAndNestedTypeArgUsage (line 181) | public class ConstraintAndNestedTypeArgUsage // Noncompliant {{Split ... method M (line 184) | void M() class GenericMethodTypeArgCounted (line 190) | public class GenericMethodTypeArgCounted // Noncompliant {{Split this cl... method M (line 192) | void M() method Method (line 200) | void Method() { } class NestedTypeAsGenericArgUsage (line 203) | public class NestedTypeAsGenericArgUsage // Noncompliant {{Split this cl... class ChainedMemberAccessThroughPropertyUsage (line 208) | public class ChainedMemberAccessThroughPropertyUsage // Noncompliant {{S... method M (line 211) | void M() { System.Console.Out.WriteLine("hello"); } class OuterWithNestedInterface (line 214) | public class OuterWithNestedInterface // Compliant: nested interface typ... type InnerInterface (line 218) | interface InnerInterface // Noncompliant {{Split this interface into s... method M (line 220) | Stream M(FileStream fs); class OuterWithNestedClass (line 224) | public class OuterWithNestedClass // Compliant: nested class types are n... class InnerClass (line 228) | class InnerClass // Noncompliant {{Split this class into smaller and m... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AvoidExcessiveInheritance_CustomValues.Records.cs type Record_0 (line 6) | record Record_0 { } type Record_1 (line 7) | record Record_1 : Record_0 { } type Record_2 (line 8) | record Record_2 : Record_1 { } type Record_3 (line 9) | record Record_3 : Record_2 { } type SecondSubRecord (line 10) | record SecondSubRecord : Record_3 { } type ThirdSubRecord (line 11) | record ThirdSubRecord : SecondSubRecord { } type FourthSubRecord (line 12) | record FourthSubRecord : ThirdSubRecord { } type FifthSubRecord (line 13) | record FifthSubRecord : FourthSubRecord { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AvoidExcessiveInheritance_CustomValues.cs class Class_0 (line 6) | class Class_0 : Exception { } class Class_1 (line 7) | class Class_1 : Class_0 { } class Class_2 (line 8) | class Class_2 : Class_1 { } class Class_3 (line 9) | class Class_3 : Class_2 { } class SecondSubClass (line 10) | class SecondSubClass : Class_3 { } class ThirdSubClass (line 11) | class ThirdSubClass : SecondSubClass { } class FourthSubClass (line 12) | class FourthSubClass : ThirdSubClass { } class FifthSubClass (line 13) | class FifthSubClass : FourthSubClass { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AvoidExcessiveInheritance_DefaultValues.Concurrent.cs class BaseClass (line 6) | public class BaseClass { } class DerivedClass_1 (line 8) | public class DerivedClass_1 : BaseClass { } class DerivedClass_2 (line 10) | public class DerivedClass_2 : DerivedClass_1 { } class DerivedClass_3 (line 12) | public class DerivedClass_3 : DerivedClass_2 { } class DerivedClass_4 (line 14) | public class DerivedClass_4 : DerivedClass_3 { } class DerivedClass_5 (line 16) | public class DerivedClass_5 : DerivedClass_4 { } class DerivedClass_6 (line 18) | public class DerivedClass_6 : DerivedClass_5 { } class DerivedClass_7 (line 20) | public class DerivedClass_7 : DerivedClass_6 { } class SubClass_0 (line 23) | public class SubClass_0 : Exception { } class SubClass_1 (line 24) | public class SubClass_1 : SubClass_0 { } class SubClass_2 (line 25) | public class SubClass_2 : SubClass_1 { } class SubClass_3 (line 26) | public class SubClass_3 : SubClass_2 { } class SubClass_4 (line 27) | public class SubClass_4 : SubClass_3 { } class SubClass_5 (line 28) | public class SubClass_5 : SubClass_4 { } class SubClass_6 (line 29) | public class SubClass_6 : SubClass_5 { } class SubClass_7 (line 31) | public class SubClass_7 : SubClass_6 { } class Tests_5 (line 37) | public class Tests_5 : Tests.Diagnostics.DerivedClass_4 { } class Tests_6 (line 39) | public class Tests_6 : Tests.Diagnostics.DerivedClass_5 { } class Tests_7 (line 41) | public class Tests_7 : Tests.Diagnostics.SubClass_5 { } class Tests_5 (line 46) | public class Tests_5 : Tests.Diagnostics.DerivedClass_4 { } class Tests_6 (line 48) | public class Tests_6 : Tests.Diagnostics.DerivedClass_5 { } class Tests_7 (line 50) | public class Tests_7 : Tests.Diagnostics.SubClass_5 { } class Other_0 (line 55) | public class Other_0 : AppendedNamespaceForConcurrencyTest.Tests.Diagnos... class Other_1 (line 56) | public class Other_1 : Other_0 { } class Other_2 (line 57) | public class Other_2 : Other_1 { } class Other_3 (line 58) | public class Other_3 : Other_2 { } class Other_4 (line 59) | public class Other_4 : Other_3 { } class Other_5 (line 60) | public class Other_5 : Other_4 { } class Other_6 (line 61) | public class Other_6 : Other_5 { } class Other_7 (line 62) | public class Other_7 : Other_6 { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AvoidExcessiveInheritance_DefaultValues.FileScopedTypes.cs class Class_0 (line 6) | file class Class_0 { } class Class_1 (line 7) | file class Class_1 : Class_0 { } class Class_2 (line 8) | file class Class_2 : Class_1 { } class Class_3 (line 9) | file class Class_3 : Class_2 { } class Class_4 (line 10) | file class Class_4 : Class_3 { } class Class_5 (line 11) | file class Class_5 : Class_4 { } class Class_6 (line 12) | file class Class_6 : Class_5 { } class Class_7 (line 13) | file class Class_7 : Class_6 { } type Record_0 (line 15) | file record Record_0 { } type Record_1 (line 16) | file record Record_1 : Record_0 { } type Record_2 (line 17) | file record Record_2 : Record_1 { } type Record_3 (line 18) | file record Record_3 : Record_2 { } type Record_4 (line 19) | file record Record_4 : Record_3 { } type Record_5 (line 20) | file record Record_5 : Record_4 { } type Record_6 (line 21) | file record Record_6 : Record_5 { } type Record_7 (line 22) | file record Record_7 : Record_6 { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AvoidExcessiveInheritance_DefaultValues.Records.Concurrent.cs type BaseRecord (line 7) | public record BaseRecord { } type Record_0 (line 12) | public record Record_0 : AppendedNamespaceForConcurrencyTest.Tests.Diagn... type Record_1 (line 13) | public record Record_1 : Record_0 { } type Record_2 (line 14) | public record Record_2 : Record_1 { } type Record_3 (line 15) | public record Record_3 : Record_2 { } type Record_4 (line 16) | public record Record_4 : Record_3 { } type Record_5 (line 17) | public record Record_5 : Record_4 { } type Record_6 (line 18) | public record Record_6 : Record_5 { } type Record_7 (line 19) | public record Record_7 : Record_6 { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AvoidExcessiveInheritance_DefaultValues.Records.cs type BaseRecord (line 7) | public record BaseRecord { } type Record_0 (line 12) | public record Record_0 : Tests.Diagnostics.BaseRecord { } type Record_1 (line 13) | public record Record_1 : Record_0 { } type Record_2 (line 14) | public record Record_2 : Record_1 { } type Record_3 (line 15) | public record Record_3 : Record_2 { } type Record_4 (line 16) | public record Record_4 : Record_3 { } type Record_5 (line 17) | public record Record_5 : Record_4 { } type Record_6 (line 18) | public record Record_6 : Record_5 { } type Record_7 (line 19) | public record Record_7 : Record_6 { } type Record_0 (line 22) | public record Record_0(string s); type Record_1 (line 23) | public record Record_1(string s) : Record_0(s); type Record_2 (line 24) | public record Record_2(string s) : Record_1(s); type Record_3 (line 25) | public record Record_3(string s) : Record_2(s); type Record_4 (line 26) | public record Record_4(string s) : Record_3(s); type Record_5 (line 27) | public record Record_5(string s) : Record_4(s); type Record_6 (line 28) | public record Record_6(string s) : Record_5(s); type Record_7 (line 29) | public record Record_7(string s) : Record_6(s); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AvoidExcessiveInheritance_DefaultValues.cs class BaseClass (line 6) | public class BaseClass { } class DerivedClass_1 (line 8) | public class DerivedClass_1 : BaseClass { } class DerivedClass_2 (line 10) | public class DerivedClass_2 : DerivedClass_1 { } class DerivedClass_3 (line 12) | public class DerivedClass_3 : DerivedClass_2 { } class DerivedClass_4 (line 14) | public class DerivedClass_4 : DerivedClass_3 { } class DerivedClass_5 (line 16) | public class DerivedClass_5 : DerivedClass_4 { } class DerivedClass_6 (line 18) | public class DerivedClass_6 : DerivedClass_5 { } class DerivedClass_7 (line 20) | public class DerivedClass_7 : DerivedClass_6 { } class SubClass_0 (line 23) | public class SubClass_0 : Exception { } class SubClass_1 (line 24) | public class SubClass_1 : SubClass_0 { } class SubClass_2 (line 25) | public class SubClass_2 : SubClass_1 { } class SubClass_3 (line 26) | public class SubClass_3 : SubClass_2 { } class SubClass_4 (line 27) | public class SubClass_4 : SubClass_3 { } class SubClass_5 (line 28) | public class SubClass_5 : SubClass_4 { } class SubClass_6 (line 29) | public class SubClass_6 : SubClass_5 { } class SubClass_7 (line 31) | public class SubClass_7 : SubClass_6 { } class Tests_5 (line 37) | public class Tests_5 : Tests.Diagnostics.DerivedClass_4 { } class Tests_6 (line 39) | public class Tests_6 : Tests.Diagnostics.DerivedClass_5 { } class Tests_7 (line 41) | public class Tests_7 : Tests.Diagnostics.SubClass_5 { } class Tests_5 (line 46) | public class Tests_5 : Tests.Diagnostics.DerivedClass_4 { } class Tests_6 (line 48) | public class Tests_6 : Tests.Diagnostics.DerivedClass_5 { } class Tests_7 (line 50) | public class Tests_7 : Tests.Diagnostics.SubClass_5 { } class Other_0 (line 55) | public class Other_0 : Tests.Diagnostics.SubClass_6 { } class Other_1 (line 56) | public class Other_1 : Other_0 { } class Other_2 (line 57) | public class Other_2 : Other_1 { } class Other_3 (line 58) | public class Other_3 : Other_2 { } class Other_4 (line 59) | public class Other_4 : Other_3 { } class Other_5 (line 60) | public class Other_5 : Other_4 { } class Other_6 (line 61) | public class Other_6 : Other_5 { } class Other_7 (line 62) | public class Other_7 : Other_6 { } class Other_0 (line 65) | public class Other_0 : Exception { } class Other_1 (line 66) | public class Other_1 : Other_0 { } class Other_2 (line 67) | public class Other_2 : Other_1 { } class Other_3 (line 68) | public class Other_3 : Other_2 { } class Other_4 (line 69) | public class Other_4 : Other_3 { } class Other_5 (line 70) | public class Other_5 : Other_4 { } class Other_6 (line 71) | public class Other_6 : Other_5 { } class Other_7 (line 72) | public class Other_7 : Other_6 { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AvoidLambdaExpressionInLoopsInBlazor.cs class LambdaInLoopInMethod (line 8) | class LambdaInLoopInMethod method Method (line 10) | void Method() class LambdaComponent (line 19) | public class LambdaComponent : ComponentBase class Button (line 23) | private class Button method BuildRenderTree (line 29) | protected override void BuildRenderTree(RenderTreeBuilder builder) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/AvoidUnsealedAttributes.cs class MyAttribute (line 3) | public class MyAttribute : Attribute { } class MyOtherAttribute (line 6) | public class MyOtherAttribute : Attribute { } class Bar (line 8) | public sealed class Bar : Attribute { } class FooBar (line 11) | public abstract class FooBar : Attribute { } class NotAnAttribute (line 13) | public class NotAnAttribute { } class Attr (line 15) | public sealed class Attr : Attribute class InnerAttr (line 17) | private class InnerAttr : Attribute // Compliant - private class InnerInnerAttr (line 19) | public class InnerInnerAttr : Attribute { } class InnerAttr2 (line 22) | protected class InnerAttr2 : Attribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BeginInvokePairedWithEndInvoke.Latest.Partial.cs class CallerWrapperAnotherFile (line 3) | public partial class CallerWrapperAnotherFile method CallEndInvoke (line 5) | public partial void CallEndInvoke(IAsyncResult result) => method DoNothing (line 8) | public partial void DoNothing(IAsyncResult result) { } class CrossTreeCallbackField (line 11) | public partial class CrossTreeCallbackField method HandlerWithoutEndInvoke (line 15) | private static void HandlerWithoutEndInvoke(IAsyncResult result) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BeginInvokePairedWithEndInvoke.Latest.cs class Program (line 5) | class Program method BeginInvokeOnDelegateWithLambdaCallback_UnderscoreParam (line 7) | private static void BeginInvokeOnDelegateWithLambdaCallback_Underscore... method BeginInvokeAndEndInvokeOnDelegateWithWrapperCallbackAsPartialMethod1 (line 14) | private static void BeginInvokeAndEndInvokeOnDelegateWithWrapperCallba... method BeginInvokeAndEndInvokeOnDelegateWithWrapperCallbackAsPartialMethod2 (line 22) | private static void BeginInvokeAndEndInvokeOnDelegateWithWrapperCallba... method BeginInvokeAndEndInvokeOnDelegateWithWrapperCallbackAsPartialMethod3 (line 30) | private static void BeginInvokeAndEndInvokeOnDelegateWithWrapperCallba... method BeginInvokeAndEndInvokeOnDelegateWithWrapperCallbackAsPartialMethod4 (line 38) | private static void BeginInvokeAndEndInvokeOnDelegateWithWrapperCallba... method BeginInvokeAndEndInvokeOnDelegateWithWrapperCallbackAsPartialMethod5 (line 46) | private static void BeginInvokeAndEndInvokeOnDelegateWithWrapperCallba... method BeginInvokeAndEndInvokeOnDelegateWithWrapperCallbackAsPartialMethod6 (line 54) | private static void BeginInvokeAndEndInvokeOnDelegateWithWrapperCallba... method AsyncMethod (line 62) | private static void AsyncMethod(string msg, int i) => class CallerWrapper (line 66) | partial class CallerWrapper method CallerWrapper (line 70) | public CallerWrapper(AsyncMethodCaller caller) => method CallEndInvoke (line 73) | public partial void CallEndInvoke(IAsyncResult result); method DoNothing (line 75) | public partial void DoNothing(IAsyncResult result); method CallEndInvoke (line 80) | public partial void CallEndInvoke(IAsyncResult result) => method DoNothing (line 83) | public partial void DoNothing(IAsyncResult result) { } class CallerWrapper (line 78) | partial class CallerWrapper method CallerWrapper (line 70) | public CallerWrapper(AsyncMethodCaller caller) => method CallEndInvoke (line 73) | public partial void CallEndInvoke(IAsyncResult result); method DoNothing (line 75) | public partial void DoNothing(IAsyncResult result); method CallEndInvoke (line 80) | public partial void CallEndInvoke(IAsyncResult result) => method DoNothing (line 83) | public partial void DoNothing(IAsyncResult result) { } class CallerWrapperNoImplementation (line 86) | partial class CallerWrapperNoImplementation method CallerWrapperNoImplementation (line 90) | public CallerWrapperNoImplementation(AsyncMethodCaller caller) => method MissingImplementation (line 93) | public partial void MissingImplementation(IAsyncResult result); class CallerWrapperAnotherFile (line 96) | public partial class CallerWrapperAnotherFile method CallerWrapperAnotherFile (line 100) | public CallerWrapperAnotherFile(AsyncMethodCaller caller) => method CallEndInvoke (line 103) | public partial void CallEndInvoke(IAsyncResult result); method DoNothing (line 105) | public partial void DoNothing(IAsyncResult result); type FooRecord (line 108) | public record FooRecord type PositionalRecord (line 131) | public record PositionalRecord(string Property) type FooRecordStruct (line 155) | public record struct FooRecordStruct type PositionalRecordStruct (line 178) | public record struct PositionalRecordStruct(string Property) type ITestInterface (line 203) | public interface ITestInterface method StaticVirtualMembersInInterfacesNoncompliant (line 205) | static virtual void StaticVirtualMembersInInterfacesNoncompliant() method StaticVirtualMembersInInterfacesCompliant (line 214) | static virtual void StaticVirtualMembersInInterfacesCompliant() type ISomeInterface (line 225) | public interface ISomeInterface method StaticVirtualMembersInInterfaces (line 227) | static abstract void StaticVirtualMembersInInterfaces(); class SomeClass (line 230) | public class SomeClass : ISomeInterface method StaticVirtualMembersInInterfaces (line 232) | public static void StaticVirtualMembersInInterfaces() class SomeOtherClass (line 238) | public class SomeOtherClass method TestMethodCompliant (line 240) | void TestMethodCompliant() method TestMethodNonCompliant (line 247) | void TestMethodNonCompliant() class CrossTreeCallbackField (line 254) | public partial class CrossTreeCallbackField method TestCrossTreeCallbackFieldNoncompliant (line 258) | private void TestCrossTreeCallbackFieldNoncompliant() method AsyncMethod (line 263) | private static void AsyncMethod(string msg, int i) => FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BeginInvokePairedWithEndInvoke.cs class Program (line 8) | class Program method Main (line 10) | static void Main(string[] args) method BeginInvokeOnDelegateWithoutCallback (line 15) | private static void BeginInvokeOnDelegateWithoutCallback() method BeginInvokeAndEndInvokeOnDelegateWithoutCallback (line 23) | private static void BeginInvokeAndEndInvokeOnDelegateWithoutCallback() method BeginInvokeOnDelegateWithLambdaCallback1 (line 31) | private static void BeginInvokeOnDelegateWithLambdaCallback1() method BeginInvokeOnDelegateWithLambdaCallback2 (line 37) | private static void BeginInvokeOnDelegateWithLambdaCallback2() method BeginInvokeAndEndInvokeOnDelegateWithLambdaCallback1 (line 44) | private static void BeginInvokeAndEndInvokeOnDelegateWithLambdaCallbac... method BeginInvokeAndEndInvokeOnDelegateWithLambdaCallback2 (line 50) | private static void BeginInvokeAndEndInvokeOnDelegateWithLambdaCallbac... method BeginInvokeOnDelegateWithDelegateCallback (line 57) | private static void BeginInvokeOnDelegateWithDelegateCallback() method BeginInvokeAndEndInvokeOnDelegateWithDelegateCallback (line 63) | private static void BeginInvokeAndEndInvokeOnDelegateWithDelegateCallb... method BeginInvokeAndEndInvokeOnDelegateWithVariableCallback (line 69) | private static void BeginInvokeAndEndInvokeOnDelegateWithVariableCallb... method BeginInvokeAndEndInvokeOnDelegateWithStaticCallback1 (line 76) | private static void BeginInvokeAndEndInvokeOnDelegateWithStaticCallbac... method BeginInvokeAndEndInvokeOnDelegateWithStaticCallback2 (line 83) | private static void BeginInvokeAndEndInvokeOnDelegateWithStaticCallbac... method BeginInvokeAndEndInvokeOnDelegateWithStaticCallback3 (line 89) | private static void BeginInvokeAndEndInvokeOnDelegateWithStaticCallbac... method BeginInvokeOnDelegateWithCallbackAssignment (line 96) | private static void BeginInvokeOnDelegateWithCallbackAssignment() method BeginInvokeAndEndInvokeOnDelegateWithWrapperCallback1 (line 104) | private static void BeginInvokeAndEndInvokeOnDelegateWithWrapperCallba... method BeginInvokeAndEndInvokeOnDelegateWithWrapperCallback2 (line 112) | private static void BeginInvokeAndEndInvokeOnDelegateWithWrapperCallba... method BeginInvokeAndEndInvokeOnDelegateWithNonExistingCallback (line 120) | private static void BeginInvokeAndEndInvokeOnDelegateWithNonExistingCa... method BeginInvokeOnAnyClassButDelegate (line 127) | private static void BeginInvokeOnAnyClassButDelegate() method AsyncMethod (line 137) | private static void AsyncMethod(string msg) method StaticCallEndInvoke (line 142) | private static void StaticCallEndInvoke(IAsyncResult result) method StaticDoNothing (line 148) | private static void StaticDoNothing(IAsyncResult result) method EndInvokeOfDifferentAction (line 152) | private static void EndInvokeOfDifferentAction() method BeginInvokeAndEndInvokeOnDifferentDelegateWithVariableCallback (line 160) | private static void BeginInvokeAndEndInvokeOnDifferentDelegateWithVari... class CallerWrapper (line 168) | public class CallerWrapper method CallerWrapper (line 172) | public CallerWrapper(AsyncMethodCaller caller) method CallEndInvoke (line 177) | public void CallEndInvoke(IAsyncResult result) method DoNothing (line 182) | public void DoNothing(IAsyncResult result) class AnyClassWithOptionalEndInvoke (line 188) | public class AnyClassWithOptionalEndInvoke method BeginInvoke (line 191) | public IAsyncResult BeginInvoke(AsyncMethodCaller method) method EndInvoke (line 197) | public object EndInvoke(IAsyncResult asyncResult) class Foo (line 205) | public class Foo method Foo (line 243) | static Foo() method Foo (line 248) | public Foo() method Compliant (line 253) | public void Compliant() method Bar (line 259) | public void Bar() method InvokeSomethingElse (line 269) | private void InvokeSomethingElse() type FooStruct (line 277) | public struct FooStruct method FooStruct (line 281) | public FooStruct(string field) method Container (line 288) | public void Container() class FakeProperty (line 300) | public class FakeProperty class AsyncResult (line 320) | internal class AsyncResult : IAsyncResult class ReproEndinvokeDelegate (line 333) | class ReproEndinvokeDelegate method BeginInvokeWithEndinvokeDelegate (line 335) | public void BeginInvokeWithEndinvokeDelegate() method AsyncCallbackLocalVariable (line 341) | public void AsyncCallbackLocalVariable() method AsyncCallbackLocalVariableNotEndinvokeAccess (line 348) | public void AsyncCallbackLocalVariableNotEndinvokeAccess() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BinaryOperationWithIdenticalExpressions.CSharpLatest.cs class GenericMathFeatures (line 4) | class GenericMathFeatures method UnsignedRightShiftOperator (line 6) | void UnsignedRightShiftOperator() method OverloadableOperators (line 13) | void OverloadableOperators() type MyClass (line 21) | public record MyClass(T X, T Y) where T : ISubtractionOperators class OverriddenCompoundAssignment (line 31) | public class OverriddenCompoundAssignment method Test (line 33) | void Test() class C1 (line 43) | class C1 FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BinaryOperationWithIdenticalExpressions.cs class Foo (line 9) | class Foo { } class BinaryOperationWithIdenticalExpressions (line 11) | class BinaryOperationWithIdenticalExpressions method doZ (line 13) | public void doZ() { throw new Exception();} method doW (line 14) | public void doW() { throw new Exception();} method Test (line 15) | public void Test(bool a, bool b) method CompliantCases (line 62) | public void CompliantCases() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BlazorQueryParameterRoutableComponent.Compliant.cs class BlazorQueryParameterRoutableComponent_Compliant (line 6) | [Route("/query-parameters")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BlazorQueryParameterRoutableComponent.Latest.Partial.1.razor.cs class BlazorQueryParameterRoutableComponent_Latest_Partial (line 6) | public partial class BlazorQueryParameterRoutableComponent_Latest_Partia... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BlazorQueryParameterRoutableComponent.Latest.Partial.2.razor.cs class BlazorQueryParameterRoutableComponent_Latest_Partial (line 6) | public partial class BlazorQueryParameterRoutableComponent_Latest_Partial FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BlazorQueryParameterRoutableComponent.Noncompliant.cs class Nullable (line 6) | public class Nullable { } class BlazorQueryParameterRoutableComponent_Noncompliant (line 8) | class BlazorQueryParameterRoutableComponent_Noncompliant : ComponentBase class BlazorQueryParameterRoutableComponent_Noncompliant_S6797 (line 20) | [Route("/my-route")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BooleanCheckInverted.Fixed.Batch.cs class BooleanCheckInverted (line 6) | public class BooleanCheckInverted method Test (line 8) | public void Test() method TestNullables (line 36) | public void TestNullables() method TestNaN (line 48) | public void TestNaN(double d, float f) method SomeFunc (line 61) | public static void SomeFunc(bool x) { } method IsNullOrEmpty (line 74) | public static bool IsNullOrEmpty(IList collection) => !(collecti... method IsNullOrEmpty1 (line 76) | public static bool IsNullOrEmpty1(IList collection) => !(collecti... method IsNullOrEmpty2 (line 78) | public static bool IsNullOrEmpty2(IList collection) => !(0 < col... method IsNullOrEmpty3 (line 80) | public static bool IsNullOrEmpty3(IList collection) => !((0) < (... method IsNullOrEmpty4 (line 82) | public static bool IsNullOrEmpty4(IList collection) => collectio... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BooleanCheckInverted.Fixed.cs class BooleanCheckInverted (line 6) | public class BooleanCheckInverted method Test (line 8) | public void Test() method TestNullables (line 36) | public void TestNullables() method TestNaN (line 48) | public void TestNaN(double d, float f) method SomeFunc (line 61) | public static void SomeFunc(bool x) { } method IsNullOrEmpty (line 74) | public static bool IsNullOrEmpty(IList collection) => !(collecti... method IsNullOrEmpty1 (line 76) | public static bool IsNullOrEmpty1(IList collection) => !(collecti... method IsNullOrEmpty2 (line 78) | public static bool IsNullOrEmpty2(IList collection) => !(0 < col... method IsNullOrEmpty3 (line 80) | public static bool IsNullOrEmpty3(IList collection) => !((0) < (... method IsNullOrEmpty4 (line 82) | public static bool IsNullOrEmpty4(IList collection) => collectio... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BooleanCheckInverted.Latest.cs class BooleanCheckInvertedTests (line 11) | public class BooleanCheckInvertedTests method NullableSuppression (line 13) | public void NullableSuppression() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BooleanCheckInverted.cs class BooleanCheckInverted (line 6) | public class BooleanCheckInverted method Test (line 8) | public void Test() method TestNullables (line 38) | public void TestNullables() method TestNaN (line 50) | public void TestNaN(double d, float f) method SomeFunc (line 63) | public static void SomeFunc(bool x) { } method IsNullOrEmpty (line 76) | public static bool IsNullOrEmpty(IList collection) => !(collecti... method IsNullOrEmpty1 (line 78) | public static bool IsNullOrEmpty1(IList collection) => !(collecti... method IsNullOrEmpty2 (line 80) | public static bool IsNullOrEmpty2(IList collection) => !(0 < col... method IsNullOrEmpty3 (line 82) | public static bool IsNullOrEmpty3(IList collection) => !((0) < (... method IsNullOrEmpty4 (line 84) | public static bool IsNullOrEmpty4(IList collection) => !(collect... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BooleanLiteralUnnecessary.Fixed.cs class BooleanLiteralUnnecessary (line 8) | public class BooleanLiteralUnnecessary method BooleanLiteralUnnecessary (line 10) | public BooleanLiteralUnnecessary(bool a, bool b, bool? c, Item item) method Repro_2618 (line 107) | public void Repro_2618(Item item) method SomeFunc (line 113) | public static void SomeFunc(bool x) { } method Foo (line 115) | private bool Foo() method Foo (line 120) | private bool Foo(bool a) method Bar (line 125) | private bool Bar() method M (line 130) | private void M() method IsPattern (line 148) | private void IsPattern(bool a, bool c) class Repro4465 (line 162) | private class Repro4465 method LiteralInTernaryCondition (line 164) | public int LiteralInTernaryCondition(bool condition, int result) method LiteralInTernaryBranch (line 171) | public bool LiteralInTernaryBranch(bool condition) method ThrowExpressionIsIgnored (line 178) | public void ThrowExpressionIsIgnored(bool condition, int number) method Repro_7462 (line 190) | public void Repro_7462(object obj) class Item (line 196) | public class Item class SocketContainer (line 201) | public class SocketContainer class Socket (line 208) | public class Socket class Repro7999CodeFixError (line 214) | class Repro7999CodeFixError method Method (line 216) | void Method(bool cond) class ObjectIsBool (line 233) | class ObjectIsBool method Object (line 235) | void Object(object obj, Exception exc) method ConvertibleToBool (line 241) | void ConvertibleToBool(IComparable comparable, IComparable compa... class MaybeBooleans (line 250) | class MaybeBooleans method Dynamic (line 253) | public void Dynamic(dynamic bag) // The behavior of a dynamic object ... method NullableBool (line 260) | public void NullableBool(bool? flag) method NullableStruct (line 273) | public void NullableStruct(YesNo? yesNo) type YesNo (line 279) | public struct YesNo class ViewBag (line 287) | class ViewBag : DynamicObject method TryGetMember (line 289) | public override bool TryGetMember(GetMemberBinder binder, out object... method TrySetMember (line 294) | public override bool TrySetMember(SetMemberBinder binder, object val... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BooleanLiteralUnnecessary.Latest.Fixed.cs class CodeFixProviderRepro (line 8) | public class CodeFixProviderRepro method Foo (line 10) | public static bool Foo(string? x, bool y) => !(x == null) && y; class Repro4465 (line 14) | public class Repro4465 method Foo (line 16) | public void Foo(string key) class ConvertibleGenericTypes (line 23) | class ConvertibleGenericTypes method ConvertibleToBool (line 25) | void ConvertibleToBool(T1 unconstrained, T2 constrainedToS... class Repro (line 39) | public class Repro method Reproducers (line 41) | void Reproducers(bool condition) method SomeMethod (line 54) | public bool? SomeMethod() method SomeMethod2 (line 59) | public bool SomeMethod2() method IsNotPattern (line 65) | void IsNotPattern(bool a, bool? b) method Repro_2618 (line 100) | public void Repro_2618(Item item) class Item (line 107) | public class Item class NullableWarningSuppression (line 112) | public class NullableWarningSuppression method Test (line 114) | public void Test(bool b) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BooleanLiteralUnnecessary.Latest.cs class CodeFixProviderRepro (line 8) | public class CodeFixProviderRepro method Foo (line 10) | public static bool Foo(string? x, bool y) => x == null ? false : y; class Repro4465 (line 14) | public class Repro4465 method Foo (line 16) | public void Foo(string key) class ConvertibleGenericTypes (line 23) | class ConvertibleGenericTypes method ConvertibleToBool (line 25) | void ConvertibleToBool(T1 unconstrained, T2 constrainedToS... class Repro (line 39) | public class Repro method Reproducers (line 41) | void Reproducers(bool condition) method SomeMethod (line 54) | public bool? SomeMethod() method SomeMethod2 (line 59) | public bool SomeMethod2() method IsNotPattern (line 65) | void IsNotPattern(bool a, bool? b) method Repro_2618 (line 102) | public void Repro_2618(Item item) class Item (line 109) | public class Item class NullableWarningSuppression (line 114) | public class NullableWarningSuppression method Test (line 116) | public void Test(bool b) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BooleanLiteralUnnecessary.cs class BooleanLiteralUnnecessary (line 8) | public class BooleanLiteralUnnecessary method BooleanLiteralUnnecessary (line 10) | public BooleanLiteralUnnecessary(bool a, bool b, bool? c, Item item) method Repro_2618 (line 123) | public void Repro_2618(Item item) method SomeFunc (line 129) | public static void SomeFunc(bool x) { } method Foo (line 131) | private bool Foo() method Foo (line 136) | private bool Foo(bool a) method Bar (line 141) | private bool Bar() method M (line 146) | private void M() method IsPattern (line 164) | private void IsPattern(bool a, bool c) class Repro4465 (line 178) | private class Repro4465 method LiteralInTernaryCondition (line 180) | public int LiteralInTernaryCondition(bool condition, int result) method LiteralInTernaryBranch (line 187) | public bool LiteralInTernaryBranch(bool condition) method ThrowExpressionIsIgnored (line 194) | public void ThrowExpressionIsIgnored(bool condition, int number) method Repro_7462 (line 206) | public void Repro_7462(object obj) class Item (line 212) | public class Item class SocketContainer (line 217) | public class SocketContainer class Socket (line 224) | public class Socket class Repro7999CodeFixError (line 230) | class Repro7999CodeFixError method Method (line 232) | void Method(bool cond) class ObjectIsBool (line 249) | class ObjectIsBool method Object (line 251) | void Object(object obj, Exception exc) method ConvertibleToBool (line 257) | void ConvertibleToBool(IComparable comparable, IComparable compa... class MaybeBooleans (line 266) | class MaybeBooleans method Dynamic (line 269) | public void Dynamic(dynamic bag) // The behavior of a dynamic object ... method NullableBool (line 276) | public void NullableBool(bool? flag) method NullableStruct (line 289) | public void NullableStruct(YesNo? yesNo) type YesNo (line 295) | public struct YesNo class ViewBag (line 303) | class ViewBag : DynamicObject method TryGetMember (line 305) | public override bool TryGetMember(GetMemberBinder binder, out object... method TrySetMember (line 310) | public override bool TrySetMember(SetMemberBinder binder, object val... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BreakOutsideSwitch.cs class BreakOutsideSwitch (line 5) | public class BreakOutsideSwitch method BreakOutsideSwitch (line 7) | public BreakOutsideSwitch(int n) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/BypassingAccessibility.Latest.cs type Record (line 16) | public record Record class ZeroOverheadMemberAccess (line 36) | class ZeroOverheadMemberAccess method M1 (line 38) | [UnsafeAccessor(UnsafeAccessorKind.StaticField, Name = "aPrivateStatic... method M2 (line 41) | [UnsafeAccessor(UnsafeAccessorKind.Field, Name = nameof(UserData.aPubl... method M3 (line 45) | [UnsafeAccessorAttribute(UnsafeAccessorKind.Field, Name = "aProtectedI... method M4 (line 48) | [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "aProtectedField")] ... method M5 (line 51) | [UnsafeAccessor(UnsafeAccessorKindAlias.Field, Name = "aPrivateProtect... method M6 (line 54) | [UnsafeAccessorAttributeAlias(UnsafeAccessorKind.Field, Name = "aPriva... method M7 (line 57) | [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "k_... method M8 (line 60) | [UnsafeAccessor(UnsafeAccessorKind.Field, Name = " BindingFlags.NonPublic; class BindingFlagsImposter (line 53) | public class BindingFlagsImposter class Derived (line 58) | public class Derived method DoWork (line 60) | [Obsolete(nameof(BindingFlags.NonPublic))] // Compliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CallToAsyncMethodShouldNotBeBlocking.Latest.cs type ISomeInterface (line 5) | public interface ISomeInterface method StaticVirtualMembersInInterfaces (line 7) | static abstract Task StaticVirtualMembersInInterfaces(); class SomeClass (line 10) | public class SomeClass : ISomeInterface method StaticVirtualMembersInInterfaces (line 12) | public static Task StaticVirtualMembersInInterfaces() class TestClass (line 18) | public class TestClass method Method (line 20) | void Method() method ExtendedScopeNameOfInAttribute_ThreadSleep (line 28) | [Obsolete(nameof(Thread.Sleep))] // Compliant method ExtendedScopeNameOfInAttribute_TaskResult (line 34) | [Obsolete(nameof(Task.Result))] // Compliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CallToAsyncMethodShouldNotBeBlocking.TopLevelStatements.cs class Test (line 34) | public class Test method FooInClass (line 36) | Task FooInClass(Task task) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CallToAsyncMethodShouldNotBeBlocking.cs class Program (line 10) | public class Program method GetFooAsync (line 12) | private static async Task GetFooAsync() method GetNameAsync (line 19) | private static Task GetNameAsync() method nop (line 24) | void nop(int i) { } method ResultExamples (line 26) | public void ResultExamples() method WaitExamples (line 46) | public void WaitExamples(UnrelatedType unrelated) method WaitAnyExamples (line 61) | private void WaitAnyExamples() method WaitAllExamples (line 67) | private void WaitAllExamples() method SleepAsync (line 73) | private async Task SleepAsync() method SleepVoid (line 80) | private void SleepVoid() method SleepTask (line 85) | private Task SleepTask() method Main (line 92) | public static void Main(string[] args) // All of the calls from Main m... method Run (line 103) | public void Run(Task task) method Run (line 117) | public Task Run(Task task) method RunParenthesizedLambdaExpression (line 138) | public Task RunParenthesizedLambdaExpression(Task task) method TaskResultInFunctionCall (line 146) | public Task TaskResultInFunctionCall(Task task) method MultipleTasks (line 154) | public Task MultipleTasks(Task task) method ToString (line 166) | public override string ToString() method AccessAwaited (line 171) | static async Task AccessAwaited(string[] args) method AccessResultInLinq (line 190) | static async Task AccessResultInLinq(Task[] tasks) method AccessResultInElementAccessor (line 196) | static async Task AccessResultInElementAccessor(Task[] tasks) method SubsequentChecksAreNotDisabledByAwait (line 202) | static async Task SubsequentChecksAreNotDisabledByAwait(string[] args) method AccessAwaitedWaitAllFP (line 214) | static async Task AccessAwaitedWaitAllFP(string[] args) method AccessNotAwaited (line 234) | static async Task AccessNotAwaited(string[] args) method NotAnAwait (line 272) | static async Task NotAnAwait(string[] args) method NoAwaitAtAll (line 284) | static async Task NoAwaitAtAll(string[] args) method BranchingWhenAll (line 295) | static async Task BranchingWhenAll(string[] args, int intValue) method TaskFromResultFP (line 313) | static async Task TaskFromResultFP(string[] args) method GetValueTask (line 325) | public static Task GetValueTask(int num) method TaskIsNull (line 330) | public void TaskIsNull(Task[] arr) class TaskLike (line 336) | public class TaskLike method WhenAll (line 338) | public static Task WhenAll(params Task[] tasks) { return null; } method When (line 339) | public static Task When(params Task[] tasks) { return null; } method S6422_AzureFunction (line 342) | [FunctionName("Sample")] class UnrelatedType (line 349) | public class UnrelatedType method Wait (line 351) | public void Wait() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CallerInformationParametersShouldBeLast.Latest.Partial.cs class PartialConstructorCompliantAttributeInImplementation (line 4) | public partial class PartialConstructorCompliantAttributeInImplementation method PartialConstructorCompliantAttributeInImplementation (line 6) | public partial PartialConstructorCompliantAttributeInImplementation(st... class PartialConstructorCompliantAttributeInDefinition (line 9) | public partial class PartialConstructorCompliantAttributeInDefinition method PartialConstructorCompliantAttributeInDefinition (line 11) | public partial PartialConstructorCompliantAttributeInDefinition(string... class PartialConstructorNonCompliantAttributeInImplementation (line 14) | public partial class PartialConstructorNonCompliantAttributeInImplementa... method PartialConstructorNonCompliantAttributeInImplementation (line 16) | public partial PartialConstructorNonCompliantAttributeInImplementation... class PartialConstructorNonCompliantAttributeInDefinition (line 19) | public partial class PartialConstructorNonCompliantAttributeInDefinition method PartialConstructorNonCompliantAttributeInDefinition (line 21) | public partial PartialConstructorNonCompliantAttributeInDefinition(str... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CallerInformationParametersShouldBeLast.Latest.cs class TestProgram (line 8) | class TestProgram method OuterMethod (line 10) | public void OuterMethod() { class Debug (line 24) | public static class Debug method AssertCompliant_01 (line 26) | public static void AssertCompliant_01(bool condition, [CallerArgumentE... method AssertCompliant_02 (line 27) | public static void AssertCompliant_02(bool condition = true, [CallerAr... method AssertNoncompliant (line 28) | public static void AssertNoncompliant([CallerArgumentExpression("condi... type MyInterface (line 31) | interface MyInterface method Method (line 33) | static abstract void Method(string callerFilePath, string other); class DerivedClass (line 36) | class DerivedClass : MyInterface method Method (line 38) | public static void Method([CallerFilePath] string callerFilePath = "",... class PrimaryConstructorClassCompliant (line 43) | class PrimaryConstructorClassCompliant(string other, [CallerFilePath] st... class PrimaryConstructorClassNoncompliant (line 45) | class PrimaryConstructorClassNoncompliant([CallerFilePath] string caller... type PrimaryConstructorRecordNoncompliant (line 47) | record PrimaryConstructorRecordNoncompliant([CallerFilePath] string call... type PrimaryConstructorRecordStructNoncompliant (line 49) | record struct PrimaryConstructorRecordStructNoncompliant([CallerFilePath... class PartialConstructorCompliantAttributeInImplementation (line 52) | public partial class PartialConstructorCompliantAttributeInImplementation method PartialConstructorCompliantAttributeInImplementation (line 54) | public partial PartialConstructorCompliantAttributeInImplementation(st... class PartialConstructorCompliantAttributeInDefinition (line 57) | public partial class PartialConstructorCompliantAttributeInDefinition method PartialConstructorCompliantAttributeInDefinition (line 59) | public partial PartialConstructorCompliantAttributeInDefinition(string... class PartialConstructorNonCompliantAttributeInImplementation (line 62) | public partial class PartialConstructorNonCompliantAttributeInImplementa... method PartialConstructorNonCompliantAttributeInImplementation (line 64) | public partial PartialConstructorNonCompliantAttributeInImplementation... class PartialConstructorNonCompliantAttributeInDefinition (line 67) | public partial class PartialConstructorNonCompliantAttributeInDefinition method PartialConstructorNonCompliantAttributeInDefinition (line 69) | public partial PartialConstructorNonCompliantAttributeInDefinition([Ca... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CallerInformationParametersShouldBeLast.cs class Program (line 5) | class Program method Method1 (line 7) | public void Method1(string callerFilePath) { } method Method2 (line 8) | public void Method2([CallerFilePath]string callerFilePath = "") { } method Method3 (line 9) | public void Method3(string other, [CallerFilePath]string callerFilePat... method Method4 (line 10) | public void Method4([CallerFilePath]string callerFilePath = "", string... method Method5 (line 12) | public void Method5([CallerFilePath]string callerFilePath = "", string... method Method6 (line 14) | public void Method6(string first, [CallerFilePath]string callerFilePat... method Method7 (line 18) | public void Method7([CallerFilePath]string callerFilePath = "", method Method8 (line 25) | public void Method8([CallerMemberName]string callerMemberName = null, method Method9 (line 28) | public void Method9([System.Runtime.CompilerServices.CallerFilePath] s... method Method10 (line 30) | public void Method10([System.Runtime.CompilerServices.CallerFilePathAt... method Method11 (line 32) | public void Method11([CallerFilePathAttribute] string callerFilePath =... method Program (line 34) | public Program([CallerFilePath]string callerFilePath = "", string othe... method Program (line 35) | public Program(int other, [CallerFilePath]string callerFilePath = "") { } class BaseClass (line 40) | class BaseClass method Method1 (line 42) | public virtual void Method1(string callerFilePath, string other) { } type MyInterface (line 45) | interface MyInterface method Method2 (line 47) | void Method2(string callerFilePath, string other); class DerivedClass (line 50) | class DerivedClass : BaseClass, MyInterface method Method1 (line 52) | public override void Method1([CallerFilePath]string callerFilePath = "... method Method2 (line 56) | public void Method2([CallerFilePath]string callerFilePath = "", string... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CallerInformationParametersShouldBeLastInvalidSyntax.cs class InvalidSyntax (line 5) | class InvalidSyntax method Method0 (line 7) | public void Method0() {} method Method3 (line 11) | public void Method3([CallerFilePath]) { } method Method4 (line 12) | public void Method4([CallerFilePath],string other) { } method Method5 (line 13) | public void Method5([CallerFilePath] string, string other) { } method Method6 (line 14) | public void Method6([CallerFilePathAttribute string parameter) { } method Method6 (line 16) | public void Method6([CallerLineNumber][CallerFilePath]string callerFil... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CastConcreteTypeToInterface.cs type IMyInterface (line 6) | public interface IMyInterface method DoStuff (line 8) | void DoStuff(); type IMyInterface2 (line 10) | public interface IMyInterface2 class MyClass1 (line 14) | public class MyClass1 : IMyInterface method DoStuff (line 18) | public void DoStuff() class DowncastExampleProgram (line 24) | public static class DowncastExampleProgram method EntryPoint (line 26) | static void EntryPoint(IMyInterface interfaceRef) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CastShouldNotBeDuplicated.Latest.cs class Fruit (line 7) | class Fruit { public int Prop; } class FruitList (line 8) | class FruitList { public List Prop; } class Vegetable (line 9) | class Vegetable { } type Water (line 10) | struct Water { } class Foo (line 11) | class Foo { public int x; } class Complex (line 12) | class Complex { public object x; } class Program (line 14) | class Program method Foo (line 18) | public void Foo(Object x, Object y) method Bar (line 137) | public void Bar(object x, object y) method FooBar (line 172) | public void FooBar(object x) method Baz (line 180) | public void Baz(object x, object y) method NonExistingType (line 202) | public void NonExistingType() method TakeIdentifierIntoAccount (line 212) | public void TakeIdentifierIntoAccount(object x) method List (line 221) | public void List(Object x, Object y) class MyClass (line 234) | class MyClass method ListPattern (line 236) | void ListPattern() class EmptyFruit (line 258) | class EmptyFruit { } class SomeClass (line 260) | class SomeClass method SwitchStatement (line 264) | public void SwitchStatement(object[] array) method SwitchExpression (line 279) | public void SwitchExpression(object[] array) => class WithAliasAnyType (line 290) | class WithAliasAnyType method ValidCases (line 292) | void ValidCases(Person person) method InvalidCases (line 297) | void InvalidCases(object obj) class Repro_223 (line 337) | class Repro_223 method NumericTypes (line 339) | void NumericTypes(object obj) method NullableValueTypes (line 357) | void NullableValueTypes(object obj) method UsingLanguageKeywordAndFrameworkName (line 370) | void UsingLanguageKeywordAndFrameworkName(object obj) method Enums (line 398) | void Enums(object obj) method UserDefinedStructs (line 411) | void UserDefinedStructs(object obj) type AnEnum (line 429) | enum AnEnum { Value1, Value2 } type AStruct (line 430) | struct AStruct { } type ARecordStruct (line 431) | record struct ARecordStruct { } type AReadonlyRefStruct (line 432) | readonly ref struct AReadonlyRefStruct { } class FieldKeyword (line 435) | public class FieldKeyword FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CastShouldNotBeDuplicated.cs class Fruit (line 4) | class Fruit type SomeStruct (line 9) | struct SomeStruct { } class Program (line 11) | class Program method Foo (line 17) | public void Foo(Object x) method IgnoreMemberAccess (line 34) | public void IgnoreMemberAccess(Fruit arg) method Bar (line 76) | public void Bar(object x) method WithStructs (line 89) | public void WithStructs(object x) method IsFollowedByAs (line 102) | public void IsFollowedByAs(object x) { method IsFollowedByIs (line 120) | public void IsFollowedByIs(object x) { method TakeIdentifierIntoAccount (line 134) | public void TakeIdentifierIntoAccount(object x) method UnknownFoo (line 155) | public void UnknownFoo(object x) class Bar (line 164) | public class Bar { } class Foo (line 166) | public class Foo method Process (line 168) | public void Process(object message) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CatchEmpty.cs class CatchEmpty (line 9) | class CatchEmpty method Test (line 11) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CatchRethrow.Fixed.cs class CatchRethrow (line 5) | class CatchRethrow method doSomething (line 7) | private void doSomething( ) { throw new NotSupportedException() ; } method Test (line 8) | public void Test() class Repro8199 (line 94) | public class Repro8199 method SomeMethod (line 96) | public void SomeMethod() => throw new NotSupportedException(); method LogException (line 97) | public bool LogException(Exception ex) => false; method CatchWithFilter (line 99) | public void CatchWithFilter() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CatchRethrow.cs class CatchRethrow (line 5) | class CatchRethrow method doSomething (line 7) | private void doSomething( ) { throw new NotSupportedException() ; } method Test (line 8) | public void Test() class Repro8199 (line 148) | public class Repro8199 method SomeMethod (line 150) | public void SomeMethod() => throw new NotSupportedException(); method LogException (line 151) | public bool LogException(Exception ex) => false; method CatchWithFilter (line 153) | public void CatchWithFilter() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CertificateValidationCheck.Latest.Partial.cs class PartialClass (line 7) | public partial class PartialClass method FindInvalid (line 9) | public static partial RemoteCertificateValidationCallback FindInvalid() class CertValidatorCrossFile (line 17) | public static class CertValidatorCrossFile method GetNoncompliantCallback (line 19) | public static RemoteCertificateValidationCallback GetNoncompliantCallb... method GetCompliantCallback (line 24) | public static RemoteCertificateValidationCallback GetCompliantCallback() method InvalidValidation (line 29) | private static bool InvalidValidation(object sender, X509Certificate c... method CompliantValidation (line 34) | private static bool CompliantValidation(object sender, X509Certificate... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CertificateValidationCheck.Latest.cs type ICertValidation (line 6) | interface ICertValidation method CreateRQ (line 8) | HttpWebRequest CreateRQ() method InitAsArgument (line 13) | public void InitAsArgument(RemoteCertificateValidationCallback callback) method Execute (line 18) | static void Execute(ICertValidation certValidation) class StaticLocalFunctionCase (line 25) | class StaticLocalFunctionCase method Foo (line 27) | public void Foo() type CertificateValidationChecks (line 38) | record CertificateValidationChecks type AssignmentPositionalRecord (line 156) | record AssignmentPositionalRecord(string Value) class PartialClass (line 174) | public partial class PartialClass method FindInvalid (line 176) | public static partial RemoteCertificateValidationCallback FindInvalid(); method CreateRQ (line 178) | HttpWebRequest CreateRQ() method Init (line 183) | public void Init() method Execute (line 188) | static void Execute() class NullConditionalAssignment (line 194) | public class NullConditionalAssignment method Callback (line 203) | ShouldNotTrigger?.Callback += (sender, chain, certificate, SslPolicyEr... method Callback (line 204) | ShouldNotTrigger?.Callback += (sender, chain, certificate, SslPolicyEr... type RelatedSignatureType (line 219) | record RelatedSignatureType type NonrelatedSignatureType (line 224) | record NonrelatedSignatureType class CrossFileStaticMethodTest (line 231) | public class CrossFileStaticMethodTest method TestCrossFileCallbacks (line 233) | public void TestCrossFileCallbacks() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CertificateValidationCheck.cs class CertificateValidationChecks (line 11) | class CertificateValidationChecks method FalseNegatives (line 13) | void FalseNegatives() method DirectAddHandlers (line 24) | void DirectAddHandlers() method MultipleHandlers (line 70) | void MultipleHandlers() method GenericHandlerSignature (line 86) | void GenericHandlerSignature() method PassedAsArgument (line 103) | void PassedAsArgument() method DelegateReturnedByFunction (line 137) | void DelegateReturnedByFunction(HttpClientHandler httpHandler) method ConstructorArguments (line 149) | void ConstructorArguments() method InitAsArgument (line 172) | void InitAsArgument(RemoteCertificateValidationCallback Callback) //... method InitAsOptionalArgument (line 179) | void InitAsOptionalArgument(RemoteCertificateValidationCallback Callba... method InitAsArgumentRecursive (line 184) | void InitAsArgumentRecursive(RemoteCertificateValidationCallback Callb... method InitAsArgumentRecursiveNoInvocation (line 192) | void InitAsArgumentRecursiveNoInvocation(RemoteCertificateValidationCa... method CreateRQ (line 204) | static HttpWebRequest CreateRQ() method IsValid (line 209) | bool IsValid(X509Certificate crt) method Log (line 214) | void Log(X509Certificate crt) method InvalidValidation (line 223) | static bool InvalidValidation(object sender, X509Certificate certifica... method InvalidValidationAsArgument (line 228) | bool InvalidValidationAsArgument(object sender, X509Certificate certif... method CompliantValidation (line 233) | static bool CompliantValidation(object sender, X509Certificate certifi... method CompliantValidationPositiveA (line 238) | bool CompliantValidationPositiveA(object sender, X509Certificate certi... method CompliantValidationPositiveB (line 251) | bool CompliantValidationPositiveB(object sender, X509Certificate certi... method CompliantValidationNegative (line 256) | bool CompliantValidationNegative(object sender, X509Certificate certif... method AdvInvalidTry (line 276) | bool AdvInvalidTry(object sender, X509Certificate certificate, X509Cha... method AdvInvalidWithTryObstacles (line 290) | bool AdvInvalidWithTryObstacles(object sender, X509Certificate certifi... method AdvCompliantWithTryObstacles (line 307) | bool AdvCompliantWithTryObstacles(object sender, X509Certificate certi... method AdvInvalidWithObstacles (line 324) | bool AdvInvalidWithObstacles(object sender, X509Certificate certificat... method AdvCompliantWithObstacles (line 333) | bool AdvCompliantWithObstacles(object sender, X509Certificate certific... method AdvCompliantWithException (line 341) | bool AdvCompliantWithException(object sender, X509Certificate certific... method AdvCompliantWithExceptionAndRethrow (line 350) | bool AdvCompliantWithExceptionAndRethrow(object sender, X509Certificat... method FindInvalid (line 372) | static RemoteCertificateValidationCallback FindInvalid() method FindLambdaValidator (line 377) | static RemoteCertificateValidationCallback FindLambdaValidator() method FindDangerous (line 382) | static Func q ?? throw new ArgumentNullException(nam... type PrimaryConstructorStruct (line 190) | public struct PrimaryConstructorStruct(string s, string q) method GetQ (line 194) | public string GetQ() method GetQLambda (line 199) | public string GetQLambda() => q ?? throw new ArgumentNullException(nam... class PrimaryConstructor2 (line 202) | public class PrimaryConstructor2(string Prop) class TestClass (line 204) | public class TestClass class Extensions (line 213) | public static class Extensions method extension (line 215) | extension(IEnumerable source) method Compliant (line 224) | public static void Compliant(this IEnumerable source) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckArgumentException.cs class CustomArgumentException (line 6) | public class CustomArgumentException : ArgumentException method CustomArgumentException (line 8) | public CustomArgumentException() method CustomArgumentException (line 11) | public CustomArgumentException(string message) method CustomArgumentException (line 15) | public CustomArgumentException(string message, Exception inner) method CustomArgumentException (line 20) | public CustomArgumentException(string message, string paramName) method CustomArgumentException (line 24) | public CustomArgumentException(string message, string paramName, Excep... class Program (line 30) | class Program method Foo (line 34) | void Foo(int a) method Foo0 (line 44) | void Foo0(int a) method Foo1 (line 50) | void Foo1(int a) method Foo2 (line 59) | void Foo2(int a) method Foo3 (line 67) | void Foo3(int a, Program p) method Foo4 (line 78) | void Foo4(int a) method Foo5 (line 86) | void Foo5(int a) method Foo6 (line 94) | void Foo6(int a, int @b) method Foo7 (line 110) | void Foo7(int a) method Foo8 (line 123) | void Foo8(int a) method NullMessage (line 136) | void NullMessage(string item, int Length) method ComplexCase (line 172) | void ComplexCase(int a) method Bar2 (line 184) | void Bar2(int a) method Bar3 (line 190) | void Bar3(int a) method Bar4 (line 196) | void Bar4(int a) class ReproForIssue2488 (line 203) | class ReproForIssue2488 class ReproForIssue2469 (line 224) | class ReproForIssue2469 class Repro_4180 (line 231) | public class Repro_4180 method Method (line 234) | public void Method(MissingType argument) // Error [CS0246] class Repro_4423 (line 246) | public class Repro_4423 method InsideLocalFunction (line 248) | public void InsideLocalFunction() method ValidationDoneByLocalMethod (line 258) | public void ValidationDoneByLocalMethod(string methodArg) method LocalMethodValidatingMethodArgument (line 271) | public void LocalMethodValidatingMethodArgument(string methodArg) method SendItToSomewhere (line 285) | public void SendItToSomewhere(Action a, string methodArg) class Repro_5226 (line 295) | public class Repro_5226 method NamedInverted (line 297) | public void NamedInverted(int a) method NamedNotInverted (line 302) | public void NamedNotInverted(int a) method ShuffledPositions (line 307) | public void ShuffledPositions(int a) class Repro_8319 (line 314) | public class Repro_8319 method Bar (line 316) | public void Bar(int x) method Wrapper (line 324) | static void Wrapper(Action action) => action(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_ComplexRegex.cs class CheckFileLicense_ComplexRegex (line 10) | class CheckFileLicense_ComplexRegex FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_DefaultValues.Fixed.cs class Foo (line 11) | class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_DefaultValues.cs class Foo (line 3) | class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_ForcingEmptyLinesKo.cs class Foo (line 6) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_ForcingEmptyLinesOk.cs class Foo (line 6) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_MultiLineLicenseStartWithNamespace.cs class Foo (line 22) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_MultiLineLicenseStartWithUsing.cs class UnlicensedFile (line 24) | public class UnlicensedFile FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_MultiSingleLineLicenseStartWithAdditionalComment.cs class Foo (line 8) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_MultiSingleLineLicenseStartWithAdditionalCommentOnSameLine.cs class Foo (line 6) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_MultiSingleLineLicenseStartWithNamespace.cs class Foo (line 6) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_NoLicenseStartWithNamespace.Fixed.cs class Foo (line 4) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_NoLicenseStartWithNamespace.cs class Foo (line 3) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_NoLicenseStartWithUsing.Fixed.cs class Foo (line 6) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_NoLicenseStartWithUsing.cs class Foo (line 9) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_OutdatedLicenseStartWithNamespace.Fixed.cs class Foo (line 22) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_OutdatedLicenseStartWithNamespace.cs class Foo (line 16) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_OutdatedLicenseStartWithUsing.Fixed.cs class Foo (line 24) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_OutdatedLicenseStartWithUsing.cs class Foo (line 6) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_SingleLineLicenseStartWithNamespace.cs class Foo (line 4) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_SingleLineLicenseStartWithUsing.cs class Foo (line 6) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_YearDifference.Fixed.cs class Foo (line 22) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CheckFileLicense_YearDifference.cs class Foo (line 22) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassAndMethodName.MethodName.Latest.Partial.cs class PartialEvents (line 3) | public partial class PartialEvents FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassAndMethodName.MethodName.Latest.cs type IMyInterface (line 3) | public interface IMyInterface method foo (line 5) | void foo(); method Foo (line 7) | void Foo(); method foo (line 105) | static abstract void foo(); method Foo (line 107) | static abstract void Foo(); type FooRecord (line 10) | public record FooRecord : IMyInterface type PositionalRecord (line 36) | public record PositionalRecord(string Value) type Base (line 44) | public record Base type Derived (line 48) | public record Derived : Base type WithLocalFunctions (line 56) | public record WithLocalFunctions type FSM (line 68) | record FSM // Noncompliant {{Rename record 'FSM' to match pascal case na... type FSM2 (line 71) | record FSM2(string Param); type AbcDEFgh (line 75) | record AbcDEFgh { } type Ab4DEFgh (line 76) | record Ab4DEFgh { } type Ab4DEFGh (line 77) | record Ab4DEFGh { } type _AbABaa (line 79) | record _AbABaa { } type 你好 (line 81) | record 你好 { } type AbcDEFgh2 (line 83) | record AbcDEFgh2(string Param); type Ab4DEFgh2 (line 84) | record Ab4DEFgh2(string Param); type Ab4DEFGh2 (line 85) | record Ab4DEFGh2(string Param); type _AbABaa2 (line 87) | record _AbABaa2(string Param); type 你好2 (line 89) | record 你好2(string Param); type IEnumerableExtensionsTest (line 94) | record IEnumerableExtensionsTest { } type IEnumerableExtensionsTests (line 95) | record IEnumerableExtensionsTests { } type IEnumerableExtensionsTest2 (line 97) | record IEnumerableExtensionsTest2(string Param); type IEnumerableExtensionsTests2 (line 98) | record IEnumerableExtensionsTests2(string Param); type IMyInterface (line 103) | public interface IMyInterface method foo (line 5) | void foo(); method Foo (line 7) | void Foo(); method foo (line 105) | static abstract void foo(); method Foo (line 107) | static abstract void Foo(); type FooRecord (line 110) | public record FooRecord : IMyInterface type FSM (line 118) | record struct FSM // Noncompliant {{Rename record struct 'FSM' to match ... type FSM2 (line 122) | record struct FSM2(string Param); type AbcDEFgh (line 126) | record struct AbcDEFgh { } type Ab4DEFgh (line 127) | record struct Ab4DEFgh { } type Ab4DEFGh (line 128) | record struct Ab4DEFGh { } type _AbABaa (line 130) | record struct _AbABaa { } type 你好 (line 132) | record struct 你好 { } type AbcDEFgh2 (line 134) | record struct AbcDEFgh2(string Param); type Ab4DEFgh2 (line 135) | record struct Ab4DEFgh2(string Param); type Ab4DEFGh2 (line 136) | record struct Ab4DEFGh2(string Param); type _AbABaa2 (line 138) | record struct _AbABaa2(string Param); type 你好2 (line 140) | record struct 你好2(string Param); type IEnumerableExtensionsTest (line 145) | record struct IEnumerableExtensionsTest { } type IEnumerableExtensionsTests (line 146) | record struct IEnumerableExtensionsTests { } type IEnumerableExtensionsTest2 (line 148) | record struct IEnumerableExtensionsTest2(string Param); type IEnumerableExtensionsTests2 (line 149) | record struct IEnumerableExtensionsTests2(string Param); class PartialPropertyClass (line 154) | public partial class PartialPropertyClass class PartialPropertyClass (line 160) | public partial class PartialPropertyClass class Extensions (line 177) | public static class Extensions method extension (line 179) | extension(int number) class Events (line 190) | public class Events class PartialEvents (line 196) | public partial class PartialEvents FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassAndMethodName.MethodName.Partial.cs class SomeClass (line 13) | public partial class SomeClass method MY_METHOD (line 15) | partial void MY_METHOD(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassAndMethodName.MethodName.cs type IMyInterface (line 3) | public interface IMyInterface method foo (line 5) | void foo(); method Foo (line 7) | void Foo(); class FooClass (line 10) | public class FooClass : IMyInterface method a (line 12) | void a() { } method A (line 13) | void A() { } method foo (line 14) | void foo() { } method foo (line 15) | void IMyInterface.foo() { } method Foo (line 16) | void Foo() { } method Foo (line 17) | void IMyInterface.Foo() { } method bar (line 19) | void method Do_Some_Test (line 26) | void Do_Some_Test() { } method Do_Some_Test_ (line 27) | void Do_Some_Test_() { } method ____ (line 28) | void ____() { } method Application_Start (line 29) | protected void Application_Start() { } method ____MessageBox (line 31) | [System.Runtime.InteropServices.DllImport("User32.dll")] method Should_define_convention_that_returns_metadata_module_type (line 36) | public void Should_define_convention_that_returns_metadata_module_type... method Should_Define_Convention_That_Returns_Metadata_Module_Type (line 38) | public void Should_Define_Convention_That_Returns_Metadata_Module_Type... method Should_return_JSON_serialized_querystring (line 40) | public void Should_return_JSON_serialized_querystring() { } method IsLocal_should_return_true_if_userHostAddr_is_localhost_IPV4 (line 42) | public void IsLocal_should_return_true_if_userHostAddr_is_localhost_IP... method 你好 (line 44) | public void 你好() { } method Łódź (line 46) | public void Łódź() { } method ArrowedMethod (line 48) | public int ArrowedMethod() => 42; class MMMM (line 59) | [System.Runtime.InteropServices.ComImport(), method MMMMMethod (line 63) | public abstract void MMMMMethod(); class Base (line 66) | public class Base method foo (line 68) | public virtual void foo() { } class Derived (line 70) | public class Derived : Base method foo (line 72) | public override void foo() // Compliant class SomeClass (line 78) | public partial class SomeClass method MY_METHOD (line 80) | partial void MY_METHOD() class AllowTwoLettersAcronyms (line 86) | public class AllowTwoLettersAcronyms method IOStream (line 88) | public void IOStream() { } method AddUIIntegrationTypes (line 89) | public void AddUIIntegrationTypes() { } method MyEOF (line 90) | public void MyEOF() { } method MyEOFile (line 91) | public void MyEOFile() { } class WithLocalFunctions (line 94) | public class WithLocalFunctions method Method (line 96) | public void Method() class Invalid (line 104) | public class Invalid FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassAndMethodName.Partial.cs class ELN (line 13) | public partial class ELN { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassAndMethodName.Tests.cs type I_Foo (line 1) | interface I_Foo { } type I_I_Foo (line 2) | interface I_I_Foo { } type i_foo (line 4) | interface i_foo { } class Ab_Cd_Ef (line 6) | class Ab_Cd_Ef { } class Foo_2 (line 7) | class Foo_2 { } class IFoo_2 (line 9) | class IFoo_2 { } class _Foo (line 10) | class _Foo { } class Foo_ (line 11) | class Foo_ { } class myClass_bar (line 13) | class myClass_bar // Noncompliant {{Rename class 'myClass_bar' to match ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassAndMethodName.TopLevelStatement.Test.cs class Foo_Bar (line 4) | class Foo_Bar { } class inner_class (line 5) | class inner_class { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassAndMethodName.TopLevelStatement.cs class InnerClass (line 5) | class InnerClass { } class inner_class (line 7) | class inner_class { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassAndMethodName.cs class FSM (line 6) | class FSM // Noncompliant {{Rename class 'FSM' to match pascal case nami... class IEnumerableExtensions (line 11) | static class IEnumerableExtensions // Compliant class foo (line 15) | class foo // Noncompliant {{Rename class 'foo' to match pascal case nami... type foo (line 21) | interface foo // Noncompliant {{Rename interface 'foo' to match pascal c... type Foo (line 25) | interface Foo // Noncompliant {{Rename interface 'Foo' to match pascal ... type IFoo (line 29) | interface IFoo type IIFoo (line 33) | interface IIFoo type I (line 37) | interface I type II (line 41) | interface II type IIIFoo (line 45) | interface IIIFoo // Compliant type IWithDefaultMembers (line 49) | interface IWithDefaultMembers method foo (line 51) | public void foo() { } class Foo (line 56) | partial class Foo class MyClass (line 60) | class MyClass class I (line 62) | class I class IFoo2 (line 67) | class IFoo2 // Noncompliant {{Rename class 'IFoo2' to match pascal case ... class Foo_2 (line 71) | class Foo_2 { } class Iden42TityFoo (line 73) | class Iden42TityFoo class Foo (line 77) | partial class class AbClass_Bar (line 82) | partial class type ILMarker (line 87) | struct ILMarker // Compliant type SVsLog (line 92) | [System.Runtime.InteropServices.ComImport(), class IILMarker (line 98) | class IILMarker { } type IILMarker (line 102) | interface IILMarker { } type ITVImageScraper (line 104) | interface ITVImageScraper { } class A4 (line 106) | class A4 { } class AA4 (line 107) | class AA4 { } class AbcDEFgh (line 109) | class AbcDEFgh { } class Ab4DEFgh (line 110) | class Ab4DEFgh { } class Ab4DEFGh (line 111) | class Ab4DEFGh { } class TTTestClassTTT (line 113) | class TTTestClassTTT { } class TTT44 (line 114) | class TTT44 { } class ABCDEFGHIJK (line 115) | class ABCDEFGHIJK { } class Abcd4a (line 116) | class Abcd4a { } class A_B_C (line 118) | class A_B_C { } class AB (line 120) | class AB { } class AbABaa (line 121) | class AbABaa { } class _AbABaa (line 122) | class _AbABaa { } class AbABaa_ (line 123) | class AbABaa_ { } class 你好 (line 125) | class 你好 { } class ELN (line 130) | public partial class ELN { } class IOStream (line 135) | class IOStream { } class MyIOStream (line 136) | class MyIOStream { } class AddUIIntegration (line 137) | class AddUIIntegration { } class TokenEOF (line 138) | class TokenEOF { } class EOFile (line 139) | class EOFile { } class IEnumerableExtensionsTest (line 145) | class IEnumerableExtensionsTest { } class IEnumerableExtensionsTests (line 146) | class IEnumerableExtensionsTests { } type IStructTest (line 148) | struct IStructTest { } type IStructTests (line 149) | struct IStructTests { } type BadPrefixTest (line 151) | interface BadPrefixTest { } type BadPrefixTests (line 152) | interface BadPrefixTests { } class _UnderscoreTest (line 154) | class _UnderscoreTest { } class _UnderscoreTests (line 155) | class _UnderscoreTests { } class NormalTest (line 157) | class NormalTest { } class NormalTests (line 158) | class NormalTests { } class IMassiveProtest (line 160) | class IMassiveProtest { } class IMassiveProtests (line 161) | class IMassiveProtests { } class IEnumerableTEST (line 163) | class IEnumerableTEST { } class IEnumerableTESTS (line 164) | class IEnumerableTESTS { } class IEnumerableTestS (line 165) | class IEnumerableTestS { } class ITest (line 167) | class ITest { } class ITests (line 168) | class ITests { } class IfTest (line 170) | class IfTest { } class IfTests (line 171) | class IfTests { } class XTest (line 173) | class XTest { } class XTests (line 174) | class XTests { } class StructWithDllImportRepro (line 180) | public class StructWithDllImportRepro method ReadProcessMemory (line 182) | [DllImport("kernel32.dll", SetLastError = true, ExactSpelling = true)] type IMAGE_NT_HEADERS32 (line 185) | [StructLayout(LayoutKind.Sequential)] class B2b (line 194) | public class B2b // Noncompliant {{Rename class 'B2b' to match pascal ca... class B2bSomethingCalculator (line 197) | public class B2bSomethingCalculator // Noncompliant FP class L10nService (line 200) | public class L10nService // Noncompliant FP FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassNamedException.Interop.cs class UnamanagedException (line 5) | class UnamanagedException: System.Runtime.InteropServices._Exception // ... method GetBaseException (line 13) | public Exception GetBaseException() => null; method GetObjectData (line 15) | public void GetObjectData(SerializationInfo info, StreamingContext con... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassNamedException.Latest.cs type RecordException (line 1) | record RecordException { } type RecordStructException (line 2) | record struct RecordStructException { } type RecordClassException (line 3) | record class RecordClassException { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassNamedException.cs class CustomException (line 3) | class CustomException { } class Customexception (line 5) | class Customexception { } class CustomEXCEPTION (line 6) | class CustomEXCEPTION { } class ExceptionHandler (line 8) | class ExceptionHandler { } class SimpleExceptionClass (line 9) | class SimpleExceptionClass { } class SimpleClass (line 10) | class SimpleClass { } class OuterClass (line 12) | class OuterClass class InnerException (line 14) | class InnerException { } class GenericClassDoesNotExtendException (line 17) | class GenericClassDoesNotExtendException { } class GenericClassExtendsException (line 19) | class GenericClassExtendsException : Exception { } class SimpleGenericClass (line 20) | class SimpleGenericClass { } type IEmptyInterfaceException (line 22) | interface IEmptyInterfaceException { } type StructException (line 23) | struct StructException { } type EnumException (line 24) | enum EnumException { } class ExtendsException (line 26) | class ExtendsException: Exception { } class AlsoExtendsIt (line 27) | class AlsoExtendsIt : Exception { } class ImplementsAnInterfaceAndExtendsException (line 28) | class ImplementsAnInterfaceAndExtendsException: class ExtendsNullReferenceException (line 30) | class ExtendsNullReferenceException : NullReferenceException { } class ExtendsCustomException (line 32) | class ExtendsCustomException: CustomException { } class PartialClassDoesNotExtendException (line 34) | partial class PartialClassDoesNotExtendException { } class PartialClassExtendsException (line 36) | partial class PartialClassExtendsException { } class PartialClassExtendsException (line 37) | partial class PartialClassExtendsException: Exception { } class StaticException (line 39) | static class StaticException { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassNotInstantiatable.Latest.Partial.cs class PartialPublicConstructor (line 3) | partial class PartialPublicConstructor method PartialPublicConstructor (line 5) | public partial PartialPublicConstructor() { } class PartialPrivateConstructor (line 8) | partial class PartialPrivateConstructor // Noncompliant method PartialPrivateConstructor (line 10) | private partial PartialPrivateConstructor() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassNotInstantiatable.Latest.cs type Person (line 8) | public record Person(string FirstName, string LastName); type EmptyRecord (line 10) | public record EmptyRecord { } type Person1 (line 12) | public record Person1 // Noncompliant {{This record can't be instantiate... type Person2 (line 19) | public record Person2 // Noncompliant {{This record can't be instantiate... type Person3 (line 27) | public sealed record Person3 // Compliant type Person4 (line 35) | public record Person4(string FirstName) // Compliant type Person5 (line 40) | public record Person5(string FirstName) // Compliant type StaticUsage (line 45) | public record StaticUsage // Noncompliant type OuterRecord (line 51) | public record OuterRecord // Compliant type MyGenericRecord (line 64) | public record MyGenericRecord class MyGenericRecord2 (line 70) | public class MyGenericRecord2 method MyGenericRecord2 (line 72) | private MyGenericRecord2() { } method Create (line 73) | public object Create() => new MyGenericRecord2(); class MyAttribute (line 76) | public class MyAttribute : System.Attribute { } type WithAttribute1 (line 78) | [My] type WithAttribute2 (line 84) | public record WithAttribute2 class Foo (line 90) | public class Foo method Foo (line 96) | private Foo() { } class Baz (line 99) | public class Baz { } class Bar (line 101) | public class Bar // Noncompliant method Bar (line 107) | private Bar() { } method Bar (line 125) | private Bar() { } type Person (line 113) | file record Person(string FirstName, string LastName); type Person1 (line 115) | file record Person1 // Noncompliant {{This record can't be instantiated;... class Baz (line 121) | file class Baz { } class Bar (line 123) | file class Bar // Noncompliant method Bar (line 107) | private Bar() { } method Bar (line 125) | private Bar() { } class PartialPublicConstructor (line 131) | partial class PartialPublicConstructor method PartialPublicConstructor (line 133) | public partial PartialPublicConstructor(); class PartialPrivateConstructor (line 136) | partial class PartialPrivateConstructor // Noncompliant {{This class can... method PartialPrivateConstructor (line 138) | private partial PartialPrivateConstructor(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassNotInstantiatable.cs class Class0 (line 8) | public class Class0 method M (line 10) | public void M() { } class Class1 (line 13) | public class Class1 // Noncompliant {{This class can't be instantiated; ... method Class1 (line 16) | private Class1() { } class Class1b (line 18) | public sealed class Class1b // Noncompliant {{This class can't be instan... method Class1b (line 20) | private Class1b() { } method Class1b (line 21) | private Class1b(int i) { } method M (line 22) | public void M() { } class Class2 (line 25) | public class Class2 // Compliant, suggested solution of S1118 method Class2 (line 27) | private Class2() { } method M (line 29) | public static void M() { } class Class3 (line 32) | public sealed class Class3 // Compliant method Class3 (line 34) | private Class3() { } method M (line 36) | public void M() { } class Class4 (line 40) | public sealed class Class4 // Compliant method M (line 42) | public void M() { } class Class6 (line 45) | public class Class6 // Compliant method Class6 (line 47) | private Class6() { } class Intermediate (line 49) | public class Intermediate class Nested (line 51) | public class Nested : Class6 // Noncompliant method Nested (line 53) | private Nested() class Class7 (line 61) | public sealed class Class7 // Noncompliant method Class7 (line 63) | private Class7() { } method M (line 65) | public void M() { } class MyClassGeneric (line 69) | public class MyClassGeneric method MyClassGeneric (line 71) | private MyClassGeneric() class Nested (line 75) | public class Nested : MyClassGeneric { } class MyClassGeneric2 (line 78) | public class MyClassGeneric2 method MyClassGeneric2 (line 80) | private MyClassGeneric2() method Create (line 84) | public object Create() class MyAttribute (line 90) | public class MyAttribute : System.Attribute { } class WithAttribute1 (line 92) | [My] method WithAttribute1 (line 95) | private WithAttribute1() class WithAttribute2 (line 100) | public class WithAttribute2 method WithAttribute2 (line 102) | [My] class Repro_3329 (line 109) | public class Repro_3329 : System.Runtime.InteropServices.SafeHandle // C... method Repro_3329 (line 111) | private Repro_3329() : base(IntPtr.Zero, true) { } method ReleaseHandle (line 113) | protected override bool ReleaseHandle() => true; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassShouldNotBeEmpty.Inheritance.cs class DefaultImplementation (line 7) | class DefaultImplementation : AbstractBaseWithoutAbstractMethods { } class CustomException (line 8) | class CustomException : Exception { } class CustomAttribute (line 9) | class CustomAttribute : Attribute { } class EmptyPageModel (line 10) | class EmptyPageModel : PageModel { } class CustomActionResult (line 11) | class CustomActionResult : ActionResult { } class SubClass (line 16) | class SubClass : BaseClass { } class NoImplementation (line 21) | class NoImplementation : AbstractBaseWithAbstractMethods { } class BaseClass (line 24) | class BaseClass class AbstractBaseWithAbstractMethods (line 29) | abstract class AbstractBaseWithAbstractMethods method AbstractMethod (line 31) | public abstract void AbstractMethod(); class AbstractBaseWithoutAbstractMethods (line 34) | abstract class AbstractBaseWithoutAbstractMethods method DefaultMethod (line 36) | public virtual void DefaultMethod() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassShouldNotBeEmpty.Latest.Partial.cs class PartialConstructor (line 3) | public partial class PartialConstructor method PartialConstructor (line 5) | public partial PartialConstructor() { } class PartialEvent (line 8) | public partial class PartialEvent FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassShouldNotBeEmpty.Latest.cs type RecordWithParameters (line 5) | record RecordWithParameters(int Parameter); type RecordWithProperty (line 7) | record RecordWithProperty type RecordWithField (line 12) | record RecordWithField type RecordWithMethod (line 16) | record RecordWithMethod type RecordWithMethodOverride (line 20) | record RecordWithMethodOverride type RecordWithIndexer (line 24) | record RecordWithIndexer type RecordWithDelegate (line 28) | record RecordWithDelegate type RecordWithEvent (line 32) | record RecordWithEvent type NotEmptyGenericRecord (line 37) | record NotEmptyGenericRecord(T RecordMember); type NotEmptyGenericRecordWithContraint (line 39) | record NotEmptyGenericRecordWithContraint(T RecordMember) where T : c... type EmptyRecordProvidingParameterToBase (line 41) | record EmptyRecordProvidingParameterToBase() : RecordWithParameters(42); type EmptyRecord (line 46) | record EmptyRecord(); type EmptyRecordWithEmptyBody (line 48) | record EmptyRecordWithEmptyBody() { }; type EmptyChildWithoutBrackets (line 50) | record EmptyChildWithoutBrackets : EmptyRecord; type EmptyChildRecord (line 52) | record EmptyChildRecord() : EmptyRecord(); type EmptyGenericRecord (line 54) | record EmptyGenericRecord(); type EmptyGenericRecordWithContraint (line 56) | record EmptyGenericRecordWithContraint() where T : class; type ConstructorIsPublicAlready (line 58) | record ConstructorIsPublicAlready : EmptyRecord { } type BaseRecordWithProtectedConstructor (line 60) | record BaseRecordWithProtectedConstructor type WidensConstructorVisibility (line 65) | record WidensConstructorVisibility : BaseRecordWithProtectedConstructor { } type EmptyPartialRecord (line 70) | partial record EmptyPartialRecord(); type IMarker (line 76) | interface IMarker { } type ImplementsMarker (line 77) | record ImplementsMarker : IMarker { } type ImplementsEmptyRecordAndMarker (line 78) | record ImplementsEmptyRecordAndMarker : Noncompliant.EmptyRecord, IMarke... type NotEmptyRecordClass1 (line 83) | record class NotEmptyRecordClass1(int RecordMember); type NotEmptyRecordClass2 (line 84) | record class NotEmptyRecordClass2() type EmptyRecordClass (line 92) | record class EmptyRecordClass(); type EmptyRecordClassWithEmptyBody (line 94) | record class EmptyRecordClassWithEmptyBody() { }; type EmptyChildWithoutBrackets (line 96) | record class EmptyChildWithoutBrackets : EmptyRecordClass; type EmptyRecordStruct (line 100) | record struct EmptyRecordStruct(); type EmptyRecordStructWithEmptyBody (line 101) | record struct EmptyRecordStructWithEmptyBody() { }; class ChildClass (line 106) | class ChildClass() : BaseClass(42) { } class ChildClassWithParameters (line 108) | class ChildClassWithParameters(int value) : BaseClass(value) { } class BaseClass (line 110) | class BaseClass(int value) { } class ChildClass (line 115) | class ChildClass() : BaseClass() { } class BaseClass (line 117) | class BaseClass() class PartialConstructor (line 123) | public partial class PartialConstructor method PartialConstructor (line 125) | public partial PartialConstructor(); class PartialEvent (line 128) | public partial class PartialEvent FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassShouldNotBeEmpty.cs class ClassWithProperty (line 7) | class ClassWithProperty class ClassWithField (line 11) | class ClassWithField class ClassWithMethod (line 15) | class ClassWithMethod method Method (line 17) | void Method() { } class ClassWithIndexer (line 19) | class ClassWithIndexer class ClassWithDelegate (line 23) | class ClassWithDelegate class ClassWithEvent (line 27) | class ClassWithEvent class GenericNotEmpty (line 32) | class GenericNotEmpty method Method (line 34) | void Method(T arg) { } class GenericNotEmptyWithConstraints (line 37) | class GenericNotEmptyWithConstraints method Method (line 40) | void Method(T arg) { } class PartialNotEmpty (line 43) | partial class PartialNotEmpty class PartialEmpty (line 48) | partial class PartialEmpty { } class ClassWithAttribute (line 50) | [ComVisible(true)] class ClassWithMultipleAttributes (line 53) | [ComVisible(true), Obsolete] class OuterClass (line 56) | class OuterClass class InnerEmpty1 (line 58) | class InnerEmpty1 { } class InnerEmpty2 (line 59) | private class InnerEmpty2 { } class InnerEmpty3 (line 60) | protected class InnerEmpty3 { } class InnerEmpty4 (line 61) | internal class InnerEmpty4 { } class InnerEmpty5 (line 62) | protected internal class InnerEmpty5 { } class InnerEmpty6 (line 63) | public class InnerEmpty6 { } class InnerEmptyWithComments (line 65) | public class InnerEmptyWithComments // Noncompliant class InnerNonEmpty (line 70) | class InnerNonEmpty class IntegerList (line 76) | class IntegerList : List { } class StringLookup (line 77) | class StringLookup : Dictionary { } type IIntegerSet (line 78) | interface IIntegerSet : ISet { } class Conditional (line 80) | class Conditional // Compliant - it's not emp... method ToString (line 83) | public override string ToString() class Empty (line 93) | class Empty { } class PublicEmpty (line 96) | public class PublicEmpty { } class InternalEmpty (line 98) | internal class InternalEmpty { } class EmptyWithComments (line 100) | class EmptyWithComments // Noncompliant class StaticEmpty (line 105) | static class StaticEmpty { } class AbstractEmpty (line 107) | abstract class AbstractEmpty { } class GenericEmpty (line 109) | class GenericEmpty { } class GenericEmptyWithConstraints (line 111) | class GenericEmptyWithConstraints // Noncompliant class SomeCommand (line 130) | class SomeCommand { } class SomeEvent (line 131) | class SomeEvent { } class SomeMessage (line 132) | class SomeMessage { } class Some_Command (line 133) | class Some_Command { } class SomeQuery (line 134) | class SomeQuery { } class Someevent (line 135) | class Someevent { } class SOMEMESSAGE (line 136) | class SOMEMESSAGE { } class SomeCommandHandler (line 137) | class SomeCommandHandler { } class MessageHandler (line 138) | class MessageHandler { } class Command (line 139) | class Command { } class Event (line 140) | class Event { } class Message (line 141) | class Message { } class Query (line 142) | class Query { } class AssemblyDoc (line 145) | class AssemblyDoc { } class NamespaceDoc (line 146) | class NamespaceDoc { } class PublicClassWithPublicConstructor (line 151) | public class PublicClassWithPublicConstructor { public PublicClassWithPu... method PublicClassWithPublicConstructor (line 151) | public PublicClassWithPublicConstructor() { } class PublicClassWithInternalConstructor (line 152) | public class PublicClassWithInternalConstructor { internal PublicClassWi... method PublicClassWithInternalConstructor (line 152) | internal PublicClassWithInternalConstructor() { } class PublicClassWithProtectedConstructor (line 153) | public class PublicClassWithProtectedConstructor { protected PublicClass... method PublicClassWithProtectedConstructor (line 153) | protected PublicClassWithProtectedConstructor() { } class InternalClassWithPublicConstructor (line 154) | internal class InternalClassWithPublicConstructor { public InternalClass... method InternalClassWithPublicConstructor (line 154) | public InternalClassWithPublicConstructor() { } class InternalClassWithInternalConstructor (line 155) | internal class InternalClassWithInternalConstructor { internal InternalC... method InternalClassWithInternalConstructor (line 155) | internal InternalClassWithInternalConstructor() { } class InternalClassWithProtectedConstructor (line 156) | internal class InternalClassWithProtectedConstructor { protected Interna... method InternalClassWithProtectedConstructor (line 156) | protected InternalClassWithProtectedConstructor() { } class ConstructorIsPublicAlready1 (line 158) | public class ConstructorIsPublicAlready1 : PublicClassWithPublicConstruc... class WidensConstructorAccessibility1 (line 159) | public class WidensConstructorAccessibility1 : PublicClassWithInternalCo... class WidensConstructorAccessibility2 (line 160) | public class WidensConstructorAccessibility2 : PublicClassWithProtectedC... class ConstructorIsPublicAlready2 (line 162) | internal class ConstructorIsPublicAlready2 : PublicClassWithPublicConstr... class ConstructorIsInternalAlready1 (line 163) | internal class ConstructorIsInternalAlready1 : PublicClassWithInternalCo... class WidensConstructorAccessibility3 (line 164) | internal class WidensConstructorAccessibility3 : PublicClassWithProtecte... class ConstructorIsInternalAlready2 (line 165) | internal class ConstructorIsInternalAlready2 : InternalClassWithPublicCo... class ConstructorIsInternalAlready3 (line 166) | internal class ConstructorIsInternalAlready3 : InternalClassWithInternal... class WidensConstructorAccessibility4 (line 167) | internal class WidensConstructorAccessibility4 : InternalClassWithProtec... class ClassWithNestedClasses (line 169) | public class ClassWithNestedClasses class ProtectedClassWithPublicConstructor (line 171) | protected class ProtectedClassWithPublicConstructor { public Protected... method ProtectedClassWithPublicConstructor (line 171) | public ProtectedClassWithPublicConstructor() { } class ProtectedClassWithInternalConstructor (line 172) | protected class ProtectedClassWithInternalConstructor { internal Prote... method ProtectedClassWithInternalConstructor (line 172) | internal ProtectedClassWithInternalConstructor() { } class ProtectedClassWithProtectedConstructor (line 173) | protected class ProtectedClassWithProtectedConstructor { protected Pro... method ProtectedClassWithProtectedConstructor (line 173) | protected ProtectedClassWithProtectedConstructor() { } class PrivateClassWithPublicConstructor (line 174) | private class PrivateClassWithPublicConstructor { public PrivateClassW... method PrivateClassWithPublicConstructor (line 174) | public PrivateClassWithPublicConstructor() { } class PrivateClassWithInternalConstructor (line 175) | private class PrivateClassWithInternalConstructor { internal PrivateCl... method PrivateClassWithInternalConstructor (line 175) | internal PrivateClassWithInternalConstructor() { } class PrivateClassWithProtectedConstructor (line 176) | private class PrivateClassWithProtectedConstructor { protected Private... method PrivateClassWithProtectedConstructor (line 176) | protected PrivateClassWithProtectedConstructor() { } class ConstructorIsPublicAlready3 (line 178) | protected class ConstructorIsPublicAlready3 : PublicClassWithPublicCon... class WidensConstructorAccessibility5 (line 179) | protected class WidensConstructorAccessibility5 : PublicClassWithInter... class ConstructorIsProtectedAlready1 (line 180) | protected class ConstructorIsProtectedAlready1 : PublicClassWithProtec... class ConstructorIsProtectedAlready2 (line 181) | protected class ConstructorIsProtectedAlready2 : ProtectedClassWithPub... class WidensConstructorAccessibility6 (line 182) | protected class WidensConstructorAccessibility6 : ProtectedClassWithIn... class ConstructorIsProtectedAlready3 (line 183) | protected class ConstructorIsProtectedAlready3 : ProtectedClassWithPro... class PrivateClass1 (line 185) | private class PrivateClass1 : PublicClassWithPublicConstructor { } class PrivateClass2 (line 186) | private class PrivateClass2 : PublicClassWithInternalConstructor { } class PrivateClass3 (line 187) | private class PrivateClass3 : PublicClassWithProtectedConstructor { } class PrivateClass4 (line 188) | private class PrivateClass4 : InternalClassWithPublicConstructor { } class PrivateClass5 (line 189) | private class PrivateClass5 : InternalClassWithInternalConstructor { } class PrivateClass6 (line 190) | private class PrivateClass6 : InternalClassWithProtectedConstructor { } class PrivateClass7 (line 191) | private class PrivateClass7 : ProtectedClassWithPublicConstructor { } class PrivateClass8 (line 192) | private class PrivateClass8 : ProtectedClassWithInternalConstructor { } class PrivateClass9 (line 193) | private class PrivateClass9 : ProtectedClassWithProtectedConstructor { } class PrivateClass10 (line 194) | private class PrivateClass10 : ProtectedClassWithPublicConstructor { } class PrivateClass11 (line 195) | private class PrivateClass11 : ProtectedClassWithInternalConstructor { } class PrivateClass12 (line 196) | private class PrivateClass12 : ProtectedClassWithProtectedConstructor { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassWithEqualityShouldImplementIEquatable.Latest.cs class MyCompliantClass (line 1) | class MyCompliantClass // Noncompliant method Equals (line 3) | public bool Equals(MyCompliantClass other) type C (line 9) | public sealed record C // Compliant, records implement IEquatable by design class Sample (line 17) | public class Sample { } class ClassicExtensions (line 19) | public static class ClassicExtensions // Compliant, extension methods do... method Equals (line 21) | public static bool Equals(this Sample self, Sample other) class NewExtensions (line 27) | public static class NewExtensions // Compliant, extension methods doesn'... method extension (line 29) | extension(Sample sample) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassWithEqualityShouldImplementIEquatable.cs class MyCompliantClass (line 6) | class MyCompliantClass : IEquatable // Compliant method Equals (line 8) | public bool Equals(MyCompliantClass other) class ClassWithEqualsT (line 14) | class ClassWithEqualsT // Noncompliant {{Implement 'IEquatable // Compliant method Equals (line 38) | public new bool Equals(Bar other) => false; class FooBar (line 41) | public sealed class FooBar : MyEquatable // Compliant - does not de... method Equals (line 43) | public new bool Equals(Bar other) => false; class BarBar (line 46) | public sealed class BarBar : MyEquatable // Noncompliant method Equals (line 48) | public new bool Equals(Bar other) => false; method Equals (line 49) | public new bool Equals(BarBar other) => false; class BarFoo (line 52) | public sealed class BarFoo : MyEquatable, IEquatable2 // Co... method Equals (line 54) | public new bool Equals(Bar other) => false; method Equals (line 55) | public new bool Equals(BarFoo other) => false; class MyEquatable (line 58) | public abstract class MyEquatable : IEquatable method Equals (line 61) | public bool Equals(T other) => true; type IEquatable2 (line 64) | public interface IEquatable2 : IEquatable { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassWithOnlyStaticMember.Latest.Partial.cs class PartialStaticProperty (line 3) | public partial class PartialStaticProperty //Noncompliant {{Add a 'prote... class StaticPartialConstructor (line 11) | public partial class StaticPartialConstructor // Noncompliant {{Add a 'p... method StaticPartialConstructor (line 13) | static partial StaticPartialConstructor(); class StaticPartialEvent (line 18) | public partial class StaticPartialEvent // Noncompliant {{Add a 'protect... class PartialConstructor (line 22) | public partial class PartialConstructor method PartialConstructor (line 24) | partial PartialConstructor() { } class InstancePartialEvent (line 27) | public partial class InstancePartialEvent FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassWithOnlyStaticMember.Latest.cs type IVirtualMethods (line 2) | public interface IVirtualMethods method StaticVirtualMembersInInterfaces (line 4) | virtual static string StaticVirtualMembersInInterfaces(string s1, stri... class VirtualMethods (line 9) | public class VirtualMethods : IVirtualMethods // Compliant, classes that... type IAbstractMethods (line 14) | public interface IAbstractMethods method StaticVirtualMembersInInterfaces (line 16) | static abstract bool StaticVirtualMembersInInterfaces(); class AbstractMethods (line 19) | public class AbstractMethods : IAbstractMethods // Compliant, classes th... method StaticVirtualMembersInInterfaces (line 21) | public static bool StaticVirtualMembersInInterfaces() => true; class PrimaryCtorClass (line 24) | public class PrimaryCtorClass() // Noncompliant {{Remove this primary co... method Concatenate (line 26) | public static string Concatenate(string s1, string s2) class PrimaryCtorClassWithParams (line 34) | public class PrimaryCtorClassWithParams(int i) // Compliant There is a c... method Concatenate (line 36) | public static string Concatenate(string s1, string s2) class PartialStaticProperty (line 44) | public partial class PartialStaticProperty // Noncompliant {{Add a 'prot... class TestClass (line 52) | public static class TestClass method extension (line 54) | extension(TestClass) class StaticFieldKeyword (line 60) | public class StaticFieldKeyword // Noncompliant {{Add a 'protected' cons... class FieldKeyword (line 65) | public class FieldKeyword class StaticPartialConstructor (line 70) | public partial class StaticPartialConstructor // Noncompliant {{Add a 'p... method StaticPartialConstructor (line 72) | static partial StaticPartialConstructor(); class PartialConstructor (line 75) | public partial class PartialConstructor method PartialConstructor (line 77) | partial PartialConstructor(); class StaticPartialEvent (line 80) | public partial class StaticPartialEvent // Noncompliant {{Add a 'protect... class InstancePartialEvent (line 85) | public partial class InstancePartialEvent FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassWithOnlyStaticMember.TopLevelStatements.cs type StringUtils (line 3) | public record StringUtils // Compliant. We should not encourage people t... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ClassWithOnlyStaticMember.cs type IMyInterface (line 6) | public interface IMyInterface type MyStruct (line 11) | public struct MyStruct // Compliant, we don't care about structs method Concatenate (line 13) | public static string Concatenate(string s1, string s2) class StringUtils (line 20) | public class StringUtils // Noncompliant {{Add a 'protected' constructor... method Concatenate (line 23) | public static string Concatenate(string s1, string s2) class StringUtils22 (line 30) | public sealed class StringUtils22 //Noncompliant method Concatenate (line 32) | public static string Concatenate(string s1, string s2) class StringUtilsAsBase (line 39) | public class StringUtilsAsBase method StringUtilsAsBase (line 41) | public StringUtilsAsBase() //Noncompliant {{Hide this public construct... method Concatenate (line 43) | public static string Concatenate(string s1, string s2) class SealedStringUtilsAsBase (line 50) | public sealed class SealedStringUtilsAsBase method SealedStringUtilsAsBase (line 52) | public SealedStringUtilsAsBase() //Noncompliant {{Hide this public con... method Concatenate (line 54) | public static string Concatenate(string s1, string s2) class BaseClass (line 62) | public class BaseClass //Compliant, has no methods at all class StringUtilsDerived (line 65) | public class StringUtilsDerived : BaseClass method Concatenate (line 67) | public static string Concatenate(string s1, string s2) type IInterface (line 74) | public interface IInterface class StringUtilsIf (line 76) | public class StringUtilsIf : IInterface method Concatenate (line 78) | public static string Concatenate(string s1, string s2) class StringUtils2 (line 85) | public static class StringUtils2 method Concatenate (line 87) | public static string Concatenate(string s1, string s2) class StringUtils3 (line 93) | public class StringUtils3 method StringUtils3 (line 95) | protected StringUtils3() method Concatenate (line 98) | public static string Concatenate(string s1, string s2) class StringUtils4 (line 104) | public class StringUtils4 method Concatenate (line 106) | public static StringUtils4 Concatenate() class StringUtils5 (line 111) | public class StringUtils5 method Concatenate (line 113) | public static void Concatenate(StringUtils5 p) class StringUtils6 (line 117) | public class StringUtils6 class StringUtils7 (line 122) | public class StringUtils7 class AbstractClass (line 127) | public abstract class AbstractClass method Answer (line 129) | public static int Answer() => 42; class TestClass (line 132) | public class TestClass // Noncompliant {{Add a 'protected' constructor o... method SomeMethod (line 134) | public static void SomeMethod() { } class AnotherTestClass (line 138) | public class AnotherTestClass : TestClass // FN FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CloudNative/AzureFunctionsCatchExceptions.cs class AnotherAttribute (line 6) | public class AnotherAttribute : Attribute method AnotherAttribute (line 8) | public AnotherAttribute(string name) { } class Functions (line 11) | public static class Functions method NotAnAzureFunction (line 17) | public static void NotAnAzureFunction() // Compliant method WithAnotherAttribute (line 22) | [Another("Something")] method NoTryCatch_Body (line 28) | [FunctionName("Sample")] method NoTryCatch_Arrow (line 35) | [FunctionName("Sample")] method NoTryCatchAsync (line 39) | [FunctionName("Sample")] method Empty (line 45) | [FunctionName("Sample")] method Unreachable (line 51) | [FunctionName("Sample")] method Harmless (line 58) | [FunctionName("Sample")] method PropertyAccess (line 79) | [FunctionName("Sample")] method TryFinally (line 89) | [FunctionName("Sample")] method TryFinally_WithMethod (line 101) | [FunctionName("Sample")] method InvocationInCatch_All (line 113) | [FunctionName("Sample")] method InvocationInCatch_Specific (line 125) | [FunctionName("Sample")] method DoSomething (line 137) | private static string DoSomething() => null; class AttributeVariants (line 140) | public static class AttributeVariants method ClassName (line 142) | [FunctionNameAttribute("ClassName")] method NamespaceName (line 148) | [Microsoft.Azure.WebJobs.FunctionNameAttribute("NamespaceName")] method GlobalName (line 154) | [global::Microsoft.Azure.WebJobs.FunctionNameAttribute("GlobalName")] method DoSomething (line 160) | private static void DoSomething() { } class CatchScenarios (line 163) | public static class CatchScenarios method OuterCatch (line 165) | [FunctionName("Sample")] method OuterCatchFullName (line 178) | [FunctionName("Sample")] method OuterCatchGlobalName (line 191) | [FunctionName("Sample")] method OuterCatchNoVariable (line 204) | [FunctionName("Sample")] method OuterCatchNoType (line 217) | [FunctionName("Sample")] method OuterCatchSpecific (line 230) | [FunctionName("Sample")] method OuterCatchSpecificAndAll (line 243) | [FunctionName("Sample")] method OuterCatchSpecificAndAll_When (line 259) | [FunctionName("Sample")] method OuterCatchWhen (line 275) | [FunctionName("Sample")] method OuterCatchWhenAlwaysTrue (line 288) | [FunctionName("Sample")] method DoSomething (line 301) | private static void DoSomething() { } class NestedTry (line 304) | public static class NestedTry method NestedCatch (line 306) | [FunctionName("Sample")] method NestedCatch_Multi (line 321) | [FunctionName("Sample")] method NestedCatch_Deep (line 346) | [FunctionName("Sample")] method InvocationOutside_BeforeTry (line 368) | [FunctionName("Sample")] method InvocationOutside_BeforeIf (line 384) | [FunctionName("Sample")] method InvocationOutside_AfterTry (line 400) | [FunctionName("Sample")] method InvocationOutside_AfterIf (line 416) | [FunctionName("Sample")] method InvocationOutside_NestedDeep (line 432) | [FunctionName("Sample")] method NestedTry_OuterSpecificInnerAll (line 455) | [FunctionName("Sample")] method NestedTry_InCatch (line 473) | [FunctionName("Sample")] method NestedTry_InFinally (line 491) | [FunctionName("Sample")] method DoSomething (line 509) | private static void DoSomething() { } class NonStatic (line 512) | public class NonStatic method InstanceMethod (line 516) | [FunctionName("Sample")] method StaticMethod (line 522) | [FunctionName("Sample")] method DoSomething (line 528) | private static void DoSomething() { } class ConditionalAccess (line 531) | public class ConditionalAccess method OnArgument (line 535) | [FunctionName("Sample")] method OnInvocation_Method (line 541) | [FunctionName("Sample")] method OnInvocation_Property (line 547) | [FunctionName("Sample")] method DoSomething (line 553) | private ConditionalAccess DoSomething() => null; class Foo (line 556) | public class Foo method CheckLicense (line 560) | [FunctionName(nameof(CheckLicense))] method NameOfOutsideTry (line 572) | [FunctionName("Sample")] method NameOfOutsideTryWithNameOfMethodInScope (line 584) | [FunctionName("Sample")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CloudNative/AzureFunctionsLogFailures.cs class LogInCatchClause (line 14) | public static class LogInCatchClause method EmptyCatchClause (line 16) | [FunctionName("Sample")] method LogLevelInvalid (line 24) | [FunctionName("Sample")] method LogExceptionInCatchClause (line 37) | [FunctionName("Sample")] method LogExceptionInCatchClauseWithErrorAndTrace (line 47) | [FunctionName("Sample")] method MissingFunctionNameAttribute (line 59) | public static void MissingFunctionNameAttribute(ILogger log) method LogExceptionInWrappedLogger (line 65) | [FunctionName("Sample")] method LogExceptionLoggedInLocalFunction (line 76) | [FunctionName("Sample")] method LogExceptionLoggedInLambda (line 86) | [FunctionName("Sample")] method LogExceptionLoggedInAnonymousFunction (line 96) | [FunctionName("Sample")] method LogExceptionIsPassedInLambda (line 106) | [FunctionName("Sample")] method LogExceptionLoggedInUnreachableCode (line 118) | [FunctionName("Sample")] method LogExceptionNotEveryCodePathContainsLog (line 129) | [FunctionName("Sample")] method LogExceptionFromWebApi (line 143) | [FunctionName("Sample")] method LogExceptionToUndefinedMethod (line 153) | [FunctionName("Sample")] method CallLogIsEnabled (line 163) | [FunctionName("Sample")] method LogExceptionInNestedCatch (line 173) | [FunctionName("Sample")] method LoggerGetsPassedToFunction (line 187) | [FunctionName("Sample")] method WrappedLoggerGetsPassedToFunction (line 197) | [FunctionName("Sample")] method CustomExtensionMethod (line 207) | [FunctionName("Sample")] method NoILoggerInTheEntryPoint (line 217) | [FunctionName("Sample")] method LogWithLogLevelTrace (line 226) | [FunctionName("Sample")] method LogWithLogLevelError (line 236) | [FunctionName("Sample")] method LogWithNonConstantLogLevel (line 246) | [FunctionName("Sample")] method LoggerHelper (line 257) | private static void LoggerHelper(ILogger logger) { } class DependencyInjectionField (line 261) | public class DependencyInjectionField method InjectedLoggerIsUsed (line 269) | [FunctionName("Sample")] method InjectedLoggerFieldIsNotUsed (line 279) | [FunctionName("Sample")] class DependencyInjectionProperty (line 287) | public class DependencyInjectionProperty method InjectedLoggerPropertyIsNotUsed (line 291) | [FunctionName("Sample")] class DependencyInjectionMethod (line 299) | public class DependencyInjectionMethod method Logger (line 301) | private ILogger Logger() => null; method InjectedLoggerMethodIsNotUsed (line 303) | [FunctionName("Sample")] class DerivedViaProperty (line 311) | public class DerivedViaProperty : DependencyInjectionProperty method InjectedLoggerFromBaseIsNotUsed (line 313) | [FunctionName("Sample")] class DerivedViaField (line 321) | public class DerivedViaField : DependencyInjectionField method InjectedLoggerFromBaseIsNotAccessible (line 323) | [FunctionName("Sample")] class GenericLogger (line 331) | public class GenericLogger method InjectedLoggerFromBaseIsNotUsed (line 335) | [FunctionName("Sample")] class UseILoggerAlias (line 343) | public class UseILoggerAlias method InjectedAliasedILogger (line 347) | [FunctionName("Sample")] class LogInExceptionFilter (line 356) | public static class LogInExceptionFilter method LogExceptionInExceptionFilter (line 358) | [FunctionName("Sample")] method LogExceptionInExceptionFilterWrongLogLevel (line 367) | [FunctionName("Sample")] method LogExceptionInExceptionFilterCustomExtensionMethod (line 378) | [FunctionName("Sample")] method LogExceptionInExceptionFilterLocalLambdaCapture (line 388) | [FunctionName("Sample")] method LogExceptionInExceptionFilterLocalFunctionOutsideCatchCapturesILogger (line 398) | [FunctionName("Sample")] method True (line 409) | private static bool True(Action a) => true; class CustomLoggerExtensions (line 412) | public static class CustomLoggerExtensions method LogInformationCustomExtension (line 414) | public static bool LogInformationCustomExtension(this ILogger logger, ... method LogTrace (line 459) | public static void LogTrace(this CustomLogger logger) { } method LogError (line 460) | public static void LogError(this CustomLogger logger) { } method SomeExtensionMethod (line 461) | public static void SomeExtensionMethod(this CustomLogger logger) { } type ILogger (line 419) | public interface ILogger { void LogError(string message); } method LogError (line 419) | void LogError(string message); class CustomILoggerStaticEntryPoint (line 421) | public class CustomILoggerStaticEntryPoint method CustomLoggerIsCompliant (line 423) | [FunctionName("Sample")] class CustomILoggerDependencyInjection (line 431) | public class CustomILoggerDependencyInjection method Logger (line 433) | protected ILogger Logger() => null; method CustomILoggerInScopeIsMustNotBeCalled (line 435) | [FunctionName("Sample")] class CustomLogger (line 446) | public class CustomLogger : ILogger method Log (line 448) | public void Log(LogLevel logLevel, EventId eventId, TState sta... method IsEnabled (line 449) | public bool IsEnabled(LogLevel logLevel) => true; method BeginScope (line 450) | public IDisposable BeginScope(TState state) => null; method SomeOtherMethodOnCustomLogger (line 452) | public void SomeOtherMethodOnCustomLogger() { } method Log (line 453) | public void Log(LogLevel logLevel, string message) { } method Log (line 454) | public void Log(string message) { } method Log (line 640) | void ILogger.Log(LogLevel logLevel, EventId eventId, TState st... method IsEnabled (line 641) | bool ILogger.IsEnabled(LogLevel logLevel) => true; method BeginScope (line 642) | IDisposable ILogger.BeginScope(TState state) => null; class CustomLoggerExtensions (line 457) | public static class CustomLoggerExtensions method LogInformationCustomExtension (line 414) | public static bool LogInformationCustomExtension(this ILogger logger, ... method LogTrace (line 459) | public static void LogTrace(this CustomLogger logger) { } method LogError (line 460) | public static void LogError(this CustomLogger logger) { } method SomeExtensionMethod (line 461) | public static void SomeExtensionMethod(this CustomLogger logger) { } class CustomLoggerStaticEntryPoint (line 464) | public class CustomLoggerStaticEntryPoint method CustomLoggerIsCompliant (line 466) | [FunctionName("Sample")] method CustomLoggerIsInScopeButNotCalled (line 477) | [FunctionName("Sample")] method CustomParameterLoggerIsInScopeButNotCalled (line 485) | [FunctionName("Sample")] method CustomParameterLoggerIsInScopeAndCalled (line 492) | [FunctionName("Sample")] method CustomParameterLoggerIsInScopeButCalledWithInsufficentLogLevel (line 502) | [FunctionName("Sample")] method CustomParameterLoggerIsInScopeAndSomeNonInterfaceLogMethodIsCalledWithInsufficentLogLevel (line 512) | [FunctionName("Sample")] method CustomParameterLoggerIsInScopeAndSomeNonInterfaceLogMethodIsCalledWithSufficentLogLevel (line 522) | [FunctionName("Sample")] method CustomParameterLoggerIsInScopeAndSomeNonInterfaceLogMethodIsCalledWithoutLogLevelArgument (line 532) | [FunctionName("Sample")] class CustomLoggerDependencyInjection (line 543) | public class CustomLoggerDependencyInjection method CustomLoggerInScopeMustBeCalled (line 547) | [FunctionName("Sample")] method CustomLoggerLogCalled (line 554) | [FunctionName("Sample")] method CustomLoggerLogCalledWithUnsufficientLogLevel (line 564) | [FunctionName("Sample")] method CustomLoggerOtherMethodCalled (line 574) | [FunctionName("Sample")] method CustomLoggerNonLoggingMethodIsEnabledFromILogger (line 584) | [FunctionName("Sample")] method CustomLoggerNonLoggingMethodBeginScopeFromILogger (line 594) | [FunctionName("Sample")] method CustomLoggerOtherExtensionMethodCalled (line 604) | [FunctionName("Sample")] method CustomLoggerSpecialNamedExtensionInvalidMethodCalled (line 614) | [FunctionName("Sample")] method CustomLoggerSpecialNamedExtensionValidMethodCalled (line 624) | [FunctionName("Sample")] method CastedToILoggerCallsLogError (line 649) | [FunctionName("Sample")] method CastedToILoggerCallsLogTrace (line 659) | [FunctionName("Sample")] method CastedToILoggerCallsLogInstanceMethodWithLogLevelTrace (line 669) | [FunctionName("Sample")] class CustomLogger (line 638) | public class CustomLogger : ILogger method Log (line 448) | public void Log(LogLevel logLevel, EventId eventId, TState sta... method IsEnabled (line 449) | public bool IsEnabled(LogLevel logLevel) => true; method BeginScope (line 450) | public IDisposable BeginScope(TState state) => null; method SomeOtherMethodOnCustomLogger (line 452) | public void SomeOtherMethodOnCustomLogger() { } method Log (line 453) | public void Log(LogLevel logLevel, string message) { } method Log (line 454) | public void Log(string message) { } method Log (line 640) | void ILogger.Log(LogLevel logLevel, EventId eventId, TState st... method IsEnabled (line 641) | bool ILogger.IsEnabled(LogLevel logLevel) => true; method BeginScope (line 642) | IDisposable ILogger.BeginScope(TState state) => null; class CustomLoggerDependencyInjection (line 645) | public class CustomLoggerDependencyInjection method CustomLoggerInScopeMustBeCalled (line 547) | [FunctionName("Sample")] method CustomLoggerLogCalled (line 554) | [FunctionName("Sample")] method CustomLoggerLogCalledWithUnsufficientLogLevel (line 564) | [FunctionName("Sample")] method CustomLoggerOtherMethodCalled (line 574) | [FunctionName("Sample")] method CustomLoggerNonLoggingMethodIsEnabledFromILogger (line 584) | [FunctionName("Sample")] method CustomLoggerNonLoggingMethodBeginScopeFromILogger (line 594) | [FunctionName("Sample")] method CustomLoggerOtherExtensionMethodCalled (line 604) | [FunctionName("Sample")] method CustomLoggerSpecialNamedExtensionInvalidMethodCalled (line 614) | [FunctionName("Sample")] method CustomLoggerSpecialNamedExtensionValidMethodCalled (line 624) | [FunctionName("Sample")] method CastedToILoggerCallsLogError (line 649) | [FunctionName("Sample")] method CastedToILoggerCallsLogTrace (line 659) | [FunctionName("Sample")] method CastedToILoggerCallsLogInstanceMethodWithLogLevelTrace (line 669) | [FunctionName("Sample")] class LoggerNotInScopeStaticFunction (line 693) | public class LoggerNotInScopeStaticFunction method ILoggerNotImported (line 695) | [FunctionName("Sample")] class LoggerNotInScopeInstance (line 703) | public class LoggerNotInScopeInstance method ILoggerNotImported (line 707) | [FunctionName("Sample")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CloudNative/AzureFunctionsReuseClients.ArmClient.cs class Function1 (line 7) | public static class Function1 method Run (line 9) | [FunctionName("Sample")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CloudNative/AzureFunctionsReuseClients.CosmosClient.cs class Function1 (line 6) | public static class Function1 method Run (line 8) | [FunctionName("Sample")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CloudNative/AzureFunctionsReuseClients.DocumentClient.cs class Function1 (line 7) | public static class Function1 method Run (line 9) | [FunctionName("Sample")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CloudNative/AzureFunctionsReuseClients.HttpClient.CSharp9.cs class FunctionApp1 (line 12) | public class FunctionApp1 method DifferentAssigments (line 16) | [FunctionName("Sample")] method PassThrough (line 32) | private static HttpClient PassThrough(HttpClient httpClient) => httpCl... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CloudNative/AzureFunctionsReuseClients.HttpClient.cs class Function1 (line 12) | public static class Function1 method Run (line 14) | [FunctionName("DefaultSample")] class FunctionApp1 (line 29) | public class FunctionApp1 method FunctionApp1 (line 44) | static FunctionApp1() method Assignments (line 49) | [FunctionName("Sample")] method NotAnAzureFunction (line 70) | public static void NotAnAzureFunction() method AssignInCondition (line 75) | [FunctionName("Sample")] method AssignInConditionWithLock (line 84) | [FunctionName("Sample")] method AssignWithClientFactory (line 99) | [FunctionName("Sample")] method AssigntoLocal (line 105) | [FunctionName("Sample")] method WrapInUsingBlock (line 111) | [FunctionName("Sample")] method NoAssignment (line 119) | [FunctionName("Sample")] method NoAssignmentAndCall (line 125) | [FunctionName("Sample")] method AssignmentOfInvocationResult (line 131) | [FunctionName("Sample")] method PassThrough (line 137) | private static HttpClient PassThrough(HttpClient httpClient) => httpCl... method FunctionApp1 (line 159) | public FunctionApp1(HttpClient httpClient) method FunctionApp1 (line 165) | public FunctionApp1() method Assignments (line 171) | [FunctionName("Sample")] class FunctionApp1 (line 152) | public class FunctionApp1 method FunctionApp1 (line 44) | static FunctionApp1() method Assignments (line 49) | [FunctionName("Sample")] method NotAnAzureFunction (line 70) | public static void NotAnAzureFunction() method AssignInCondition (line 75) | [FunctionName("Sample")] method AssignInConditionWithLock (line 84) | [FunctionName("Sample")] method AssignWithClientFactory (line 99) | [FunctionName("Sample")] method AssigntoLocal (line 105) | [FunctionName("Sample")] method WrapInUsingBlock (line 111) | [FunctionName("Sample")] method NoAssignment (line 119) | [FunctionName("Sample")] method NoAssignmentAndCall (line 125) | [FunctionName("Sample")] method AssignmentOfInvocationResult (line 131) | [FunctionName("Sample")] method PassThrough (line 137) | private static HttpClient PassThrough(HttpClient httpClient) => httpCl... method FunctionApp1 (line 159) | public FunctionApp1(HttpClient httpClient) method FunctionApp1 (line 165) | public FunctionApp1() method Assignments (line 171) | [FunctionName("Sample")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CloudNative/AzureFunctionsReuseClients.ServiceBusV5.cs class Function1 (line 7) | public static class Function1 method Run (line 9) | [FunctionName("Sample")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CloudNative/AzureFunctionsReuseClients.ServiceBusV7.cs class Function1 (line 7) | public static class Function1 method Run (line 9) | [FunctionName("Sample")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CloudNative/AzureFunctionsReuseClients.Storage.cs class Function1 (line 10) | public static class Function1 method Run (line 12) | [FunctionName("Sample")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CloudNative/AzureFunctionsStateless.Latest.Partial.cs class StaticPartialClass (line 6) | public static partial class StaticPartialClass method Update (line 10) | public static partial void Update(int value) => FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CloudNative/AzureFunctionsStateless.Latest.cs class AzureFunctionsStatic (line 6) | public static class AzureFunctionsStatic method SideEffects (line 10) | [FunctionName("Sample")] method WithArg (line 16) | private static void WithArg(int value) { } class StaticPartialClass (line 19) | public static partial class StaticPartialClass method Update (line 22) | [FunctionName("Sample")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CloudNative/AzureFunctionsStateless.cs class AnotherAttribute (line 6) | public class AnotherAttribute : Attribute method AnotherAttribute (line 8) | public AnotherAttribute(string name) { } class StaticClass (line 11) | public static class StaticClass method Update (line 16) | public static void Update(int value) => class InstanceClass (line 20) | public class InstanceClass method UpdateStatic (line 28) | public static void UpdateStatic(int value) => method UpdateInstance (line 31) | public void UpdateInstance(int value) => class Something (line 37) | public static class Something class AzureFunctionsStatic (line 43) | public static class AzureFunctionsStatic method WithAnotherAttribute (line 50) | [Another("Something")] method NoAttribute (line 56) | public static void NoAttribute() method Write (line 61) | [FunctionName("Sample")] method WriteArrow (line 102) | [FunctionName("Sample")] method AsyncTask (line 106) | [FunctionName("Sample")] method ReadLocal (line 113) | [FunctionName("Sample")] method SideEffects (line 127) | [FunctionName("Sample")] method RefOut (line 138) | [FunctionName("Sample")] method Nested (line 154) | [FunctionName("Sample")] method Calculate (line 167) | private static int Calculate() => method WithArg (line 170) | private static void WithArg(int value) { } method WithRef (line 172) | private static void WithRef(ref int value) => method WithOut (line 175) | private static void WithOut(out int value) => method WithOut (line 178) | private static void WithOut(out int value, int outOfOrder) => class AzureFunctionsInstance (line 183) | public class AzureFunctionsInstance method Write (line 185) | [FunctionName("Sample")] class Operators (line 192) | public static class Operators method Unary (line 198) | [FunctionName("Sample")] method CompoundAssignment (line 212) | [FunctionName("Sample")] class Collections (line 231) | public static class Collections method Add (line 238) | [FunctionName("Sample")] method Remove (line 247) | [FunctionName("Sample")] method Update (line 256) | [FunctionName("Sample")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CloudNative/DurableEntityInterfaceRestrictions.CSharp11.cs type IStaticVirtualMembersInInterfaces (line 5) | public interface IStaticVirtualMembersInInterfaces method Method (line 7) | static virtual bool Method(string firstParam, string secondParam) => f... type IStaticVirtualMembersInInterfacesCompliant (line 10) | public interface IStaticVirtualMembersInInterfacesCompliant method Method (line 12) | static virtual void Method(string firstParam) => Console.WriteLine(fir... class UseDurableEntityContext (line 15) | public class UseDurableEntityContext method Overloads (line 20) | public void Overloads() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CloudNative/DurableEntityInterfaceRestrictions.cs type IValid (line 5) | public interface IValid method VoidNoArg (line 7) | void VoidNoArg(); method VoidArgInt (line 8) | void VoidArgInt(int count); method VoidArgStr (line 9) | void VoidArgStr(string name); method TaskNoArg (line 11) | Task TaskNoArg(); method TaskArg (line 12) | Task TaskArg(int count); method TaskIntNoArg (line 14) | Task TaskIntNoArg(); method TaskIntArg (line 15) | Task TaskIntArg(int count); method TaskStrNoArg (line 17) | Task TaskStrNoArg(); method TaskStrArg (line 18) | Task TaskStrArg(int count); type IEmpty (line 21) | public interface IEmpty type IInheritsEmptyWithValid (line 26) | public interface IInheritsEmptyWithValid : IEmpty method Valid (line 28) | void Valid(); type IInheritsValidIsEmpty (line 31) | public interface IInheritsValidIsEmpty : IValid type IInheritsValidIsEmpty2 (line 36) | public interface IInheritsValidIsEmpty2 : IInheritsValidIsEmpty type IInheritsEmptyIsEmpty (line 41) | public interface IInheritsEmptyIsEmpty : IEmpty type IInheritsInvalid (line 46) | public interface IInheritsInvalid : IInvalid method SomethingValid (line 48) | void SomethingValid(); type IInvalid (line 51) | public interface IInvalid : IMoreArguments type IMoreArguments (line 56) | public interface IMoreArguments method Valid (line 58) | void Valid(); method Method (line 59) | void Method(int first, string second); type IReturnsInt (line 62) | public interface IReturnsInt method Valid (line 64) | void Valid(); method Method (line 65) | int Method(); type IReturnsTaskArray (line 68) | public interface IReturnsTaskArray method Valid (line 70) | void Valid(); method Method (line 71) | Task[] Method(); type IReturnsObject (line 74) | public interface IReturnsObject method Valid (line 76) | void Valid(); method Method (line 77) | object Method(); type IGenericInterface (line 80) | public interface IGenericInterface method Valid (line 82) | void Valid(); method Method (line 83) | void Method(T arg); type IGenericMethod (line 86) | public interface IGenericMethod method Valid (line 88) | void Valid(); method Method (line 89) | void Method(T arg); type IProperty (line 92) | public interface IProperty method Valid (line 94) | void Valid(); type IIndexer (line 98) | public interface IIndexer method Valid (line 100) | void Valid(); type IEvent (line 104) | public interface IEvent method Valid (line 106) | void Valid(); class NotInterfaceClass (line 110) | public class NotInterfaceClass { } type NotInterfaceStruct (line 111) | public struct NotInterfaceStruct { } class UseDurableEntityClient (line 113) | public class UseDurableEntityClient method UnrelatedMethods (line 118) | public async Task UnrelatedMethods() method Compliant (line 124) | public async Task Compliant() method Overloads (line 132) | public async Task Overloads() method Reasons (line 141) | public async Task Reasons() method WithTypeParameter (line 160) | public async Task WithTypeParameter() method FromDurableClient (line 165) | public async Task FromDurableClient(IDurableClient inheritedClient) class UseDurableOrchestrationContext (line 171) | public class UseDurableOrchestrationContext method UnrelatedMethods (line 176) | public void UnrelatedMethods() method Overloads (line 181) | public void Overloads() method Errors (line 188) | public void Errors() class UseDurableEntityContext (line 196) | public class UseDurableEntityContext method Overloads (line 201) | public void Overloads() class AnotherType (line 210) | public class AnotherType method SignalEntityAsync (line 212) | public void SignalEntityAsync() { } method SignalEntityAsync (line 213) | public void SignalEntityAsync() { } method Use (line 215) | private static void Use(AnotherType client) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CognitiveComplexity.Latest.Partial.cs class PartialProperty (line 1) | public partial class PartialProperty class PartialConstructor (line 12) | public partial class PartialConstructor method PartialConstructor (line 14) | public partial PartialConstructor() // Noncompliant {{Refactor this c... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CognitiveComplexity.Latest.cs type MyRecord (line 56) | record MyRecord class AndOrConditionsComplexity (line 75) | class AndOrConditionsComplexity method SimpleNot (line 77) | bool SimpleNot(object o) => // should be 0 method And (line 80) | void And(int o) // Noncompliant {{Refactor this method to reduce its C... method AndOr (line 88) | bool AndOr(int o) => // Noncompliant {{Refactor this method to reduce ... method ChainedConditions (line 93) | bool ChainedConditions(int number) => // Noncompliant {{Refactor this ... method ChainedConditionsWithParentheses (line 97) | bool ChainedConditionsWithParentheses(int number) => // Noncompliant {... method ChainedSimilarConditionsWithParentheses (line 101) | bool ChainedSimilarConditionsWithParentheses(int one, int two) => // N... method ChainedDifferentConditionsWithParentheses (line 107) | bool ChainedDifferentConditionsWithParentheses(int one, int? two) => /... method AndOrNot (line 113) | bool AndOrNot(object o) => // Noncompliant {{Refactor this method to r... class StaticLambda (line 120) | class StaticLambda class Fruit (line 133) | abstract class Fruit { public List Prop; } class Apple (line 134) | class Apple : Fruit { } class Orange (line 135) | class Orange : Fruit { } class TestProgram (line 137) | class TestProgram method TargetTypedConditional (line 139) | static void TargetTypedConditional(bool isTrue, Apple[] apples, Fruit[... type Record (line 148) | record Record class MethodsComplexity (line 166) | class MethodsComplexity method ListPattern (line 168) | void ListPattern() // Noncompliant {{Refactor this method to reduce it... type IStaticVirtualMembersInInterfaces (line 180) | public interface IStaticVirtualMembersInInterfaces method Method (line 182) | static virtual void Method(string firstParam, string secondParam) // N... class LocalFunctionTest (line 192) | class LocalFunctionTest method Foo (line 194) | void Foo(int x) // Noncompliant {{Refactor this method to reduce its C... class PartialProperty (line 230) | public partial class PartialProperty class Extensions (line 235) | public static class Extensions method extension (line 237) | extension(Extensions) class FieldKeyWord (line 251) | public class FieldKeyWord class PartialConstructor (line 260) | public partial class PartialConstructor method PartialConstructor (line 262) | public partial PartialConstructor(); class NullConditionalAssignment (line 265) | public class NullConditionalAssignment class FieldClass (line 267) | public class FieldClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CognitiveComplexity.cs class MethodsComplexity (line 7) | class MethodsComplexity method Zero (line 9) | void Zero() { } method If (line 11) | void If() // Noncompliant {{Refactor this method to reduce its Cogniti... method IfElseIfElse (line 20) | void IfElseIfElse() // Noncompliant {{Refactor this method to reduce i... method IfNestedInElse (line 38) | void IfNestedInElse() // Noncompliant {{Refactor this method to reduce... method IfElseNestedInIf (line 55) | void IfElseNestedInIf() // Noncompliant {{Refactor this method to redu... method MultipleIfNested (line 73) | void MultipleIfNested() // Noncompliant {{Refactor this method to redu... method Switch (line 86) | void Switch() // Noncompliant {{Refactor this method to reduce its Cog... method NestedSwitch (line 100) | void NestedSwitch() // Noncompliant {{Refactor this method to reduce i... method SwitchWithNestedIf (line 118) | void SwitchWithNestedIf() // Noncompliant {{Refactor this method to re... method SwitchExpression (line 135) | void SwitchExpression(int count) // Noncompliant {{Refactor this metho... method NestedSwitchExpression (line 145) | void NestedSwitchExpression(bool first, bool second) // Noncompliant {... method MultipleSwitchExpression (line 160) | void MultipleSwitchExpression(bool first, bool second) // Noncompliant... method TernaryOperator (line 177) | void TernaryOperator() // Noncompliant {{Refactor this method to reduc... method NestedTernaryOperator (line 183) | void NestedTernaryOperator() // Noncompliant {{Refactor this method to... method NullConditional (line 193) | void NullConditional() // Compliant - Null conditional operators shoul... method NullCoalescence (line 201) | void NullCoalescence() // Compliant - Null coalescence operators shoul... method NullCoalescenceAssignment (line 208) | void NullCoalescenceAssignment() // Compliant - Null coalescence opera... method TernaryOperatorWihtInnerTernayOperator (line 215) | void TernaryOperatorWihtInnerTernayOperator() // Noncompliant {{Refact... method While (line 222) | void While() // Noncompliant {{Refactor this method to reduce its Cogn... method NestedWhile (line 231) | void NestedWhile() // Noncompliant {{Refactor this method to reduce it... method For (line 244) | void For() // Noncompliant {{Refactor this method to reduce its Cognit... method NestedFor (line 253) | void NestedFor() // Noncompliant {{Refactor this method to reduce its ... method Foreach (line 266) | void Foreach() // Noncompliant {{Refactor this method to reduce its Co... method NestedForeach (line 274) | void NestedForeach() // Noncompliant {{Refactor this method to reduce ... method DoWhile (line 286) | void DoWhile() // Noncompliant {{Refactor this method to reduce its Co... method NestedDoWhile (line 295) | void NestedDoWhile() // Noncompliant {{Refactor this method to reduce ... method TryCatch (line 308) | void TryCatch() // Noncompliant {{Refactor this method to reduce its C... method TryCatchIf (line 321) | void TryCatchIf() // Noncompliant {{Refactor this method to reduce its... method NestedTryCatch (line 338) | void NestedTryCatch() // Noncompliant {{Refactor this method to reduce... method TryCatchFinally (line 355) | void TryCatchFinally() // Noncompliant {{Refactor this method to reduc... method TryFinally (line 372) | void TryFinally() method EmptyMethodBody (line 384) | void EmptyMethodBody() => Console.Write(""); method IfMethodBody (line 386) | bool IfMethodBody(bool a, bool b, bool c) => a && b || c; method MethodWithInnerMethod (line 391) | void MethodWithInnerMethod() // Noncompliant {{Refactor this method to... class PropertiesComplexity (line 404) | class PropertiesComplexity class EventsComplexity (line 454) | class EventsComplexity class ConstructorsComplexity (line 478) | class ConstructorsComplexity method ConstructorsComplexity (line 480) | ConstructorsComplexity() method ConstructorsComplexity (line 485) | ConstructorsComplexity(string foo) // Noncompliant {{Refactor this con... class DestructorsComplexity (line 495) | class DestructorsComplexity class DestructorsComplexity2 (line 503) | class DestructorsComplexity2 class OperatorsComplexity (line 515) | class OperatorsComplexity class RecursionsComplexity (line 533) | class RecursionsComplexity method DirectRecursionComplexity (line 535) | void DirectRecursionComplexity() method DirectRecursionComplexity_DifferentArguments (line 542) | void DirectRecursionComplexity_DifferentArguments() method DirectRecursionComplexity_DifferentArguments (line 547) | void DirectRecursionComplexity_DifferentArguments(int arg) method IndirectRecursionComplexity (line 551) | void IndirectRecursionComplexity() method TmpIndirectRecursion (line 556) | void TmpIndirectRecursion() method IndirectRecursionFromLocalLambda (line 561) | void IndirectRecursionFromLocalLambda() class AndOrConditionsComplexity (line 570) | class AndOrConditionsComplexity method SimpleAnd (line 572) | void SimpleAnd() method SimpleAnd2 (line 577) | void SimpleAnd2() // Noncompliant {{Refactor this method to reduce its... method SimpleOr (line 583) | void SimpleOr() // Noncompliant {{Refactor this method to reduce its C... method SimpleNot (line 589) | void SimpleNot() method AndOr (line 594) | void AndOr() // Noncompliant {{Refactor this method to reduce its Cogn... method AndOrIf (line 601) | void AndOrIf(bool a, bool b, bool c, bool d, bool e, bool f) // Noncom... method AndNotIf (line 616) | void AndNotIf(bool a, bool b, bool c, bool d) // Noncompliant {{Refact... method AndOrNot1 (line 627) | void AndOrNot1(bool a, bool b, bool c, bool d) // Noncompliant {{Refac... method AndOrNot2 (line 640) | void AndOrNot2(bool a, bool b, bool c, bool d) // Noncompliant {{Refac... method AndNot3 (line 652) | void AndNot3(bool a, bool b, bool c, bool d) // Noncompliant {{Refacto... method AndNotParenthesis (line 659) | void AndNotParenthesis(bool a, bool b, bool c) // Noncompliant {{Refac... method ChainedConditionsWithParentheses (line 669) | void ChainedConditionsWithParentheses(bool a, bool b, bool c, bool d) ... class GotoComplexity (line 676) | class GotoComplexity method Foo (line 678) | void Foo() // Noncompliant {{Refactor this method to reduce its Cognit... method Bar (line 686) | void Bar() // Noncompliant {{Refactor this method to reduce its Cognit... class LambdasComplexity (line 702) | class LambdasComplexity method SimpleFunc (line 725) | void SimpleFunc() method BlockFunc (line 730) | void BlockFunc() method IfFunc (line 738) | void IfFunc() // Noncompliant {{Refactor this method to reduce its Cog... method SimpleAction (line 753) | void SimpleAction() method BlockAction (line 758) | void BlockAction() method IfAction (line 766) | void IfAction() // Noncompliant {{Refactor this method to reduce its C... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CollectionEmptinessChecking.Fixed.cs class CollectionEmptinessChecking (line 6) | public class CollectionEmptinessChecking method HasContent1 (line 8) | private static bool HasContent1(IEnumerable l) method HasContent1b (line 12) | private static bool HasContent1b(IEnumerable l) method HasContent2 (line 16) | private static bool HasContent2(List l) method HasContent2b (line 20) | private static bool HasContent2b(List l) method IsNotEmpty1 (line 25) | private static bool IsNotEmpty1(List l) method IsNotEmpty2 (line 29) | private static bool IsNotEmpty2(List l) method IsEmpty1 (line 33) | private static bool IsEmpty1(List l) method IsEmpty2 (line 37) | private static bool IsEmpty2(List l) method IsEmpty2b (line 41) | private static bool IsEmpty2b(List l) method IsEmpty4 (line 45) | private static bool IsEmpty4(List l) method IsEmpty4b (line 49) | private static bool IsEmpty4b(List l) method HasContentWithCondition (line 53) | private static bool HasContentWithCondition(List numbers) method IsEmptyWithCondition (line 57) | private static bool IsEmptyWithCondition(List numbers) method WithReferencedCondition (line 61) | public static bool WithReferencedCondition(int[] n) method Include (line 65) | static bool Include(int n) class NotAsExtension (line 71) | public class NotAsExtension method IsEmpty (line 73) | bool IsEmpty(int[] n) method HasAny (line 77) | bool HasAny(int[] n) method RightExpression (line 81) | bool RightExpression(int[] n) method WithCondition (line 85) | bool WithCondition(int[] n) method NotAnIdentifier (line 89) | bool NotAnIdentifier(string str) class Complex (line 95) | public class Complex method Nested (line 97) | bool Nested(string[] words) method Composed (line 101) | bool Composed(int[] a, int[] b, int[] c) class Compliant (line 107) | public class Compliant method Any (line 109) | bool Any(List list) method NotAny (line 113) | bool NotAny(List list) method NotAnExtension (line 117) | bool NotAnExtension(Compliant model) method NotAMethod (line 121) | bool NotAMethod(int value) method SizeDepedent (line 125) | bool SizeDepedent(int[] numbers) method Undefined (line 134) | bool Undefined(object model) method Count (line 139) | int Count() { return 42; } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CollectionEmptinessChecking.Latest.cs class Enumerable (line 5) | public static class Enumerable FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CollectionEmptinessChecking.cs class CollectionEmptinessChecking (line 6) | public class CollectionEmptinessChecking method HasContent1 (line 8) | private static bool HasContent1(IEnumerable l) method HasContent1b (line 13) | private static bool HasContent1b(IEnumerable l) method HasContent2 (line 17) | private static bool HasContent2(List l) method HasContent2b (line 21) | private static bool HasContent2b(List l) method IsNotEmpty1 (line 26) | private static bool IsNotEmpty1(List l) method IsNotEmpty2 (line 30) | private static bool IsNotEmpty2(List l) method IsEmpty1 (line 34) | private static bool IsEmpty1(List l) method IsEmpty2 (line 38) | private static bool IsEmpty2(List l) method IsEmpty2b (line 42) | private static bool IsEmpty2b(List l) method IsEmpty4 (line 46) | private static bool IsEmpty4(List l) method IsEmpty4b (line 50) | private static bool IsEmpty4b(List l) method HasContentWithCondition (line 54) | private static bool HasContentWithCondition(List numbers) method IsEmptyWithCondition (line 58) | private static bool IsEmptyWithCondition(List numbers) method WithReferencedCondition (line 62) | public static bool WithReferencedCondition(int[] n) method Include (line 66) | static bool Include(int n) class NotAsExtension (line 72) | public class NotAsExtension method IsEmpty (line 74) | bool IsEmpty(int[] n) method HasAny (line 79) | bool HasAny(int[] n) method RightExpression (line 83) | bool RightExpression(int[] n) method WithCondition (line 87) | bool WithCondition(int [] n) method NotAnIdentifier (line 91) | bool NotAnIdentifier(string str) class Complex (line 97) | public class Complex method Nested (line 99) | bool Nested(string[] words) method Composed (line 105) | bool Composed(int[] a, int[] b, int[] c) class Compliant (line 114) | public class Compliant method Any (line 116) | bool Any(List list) method NotAny (line 120) | bool NotAny(List list) method NotAnExtension (line 124) | bool NotAnExtension(Compliant model) method NotAMethod (line 128) | bool NotAMethod(int value) method SizeDepedent (line 132) | bool SizeDepedent(int[] numbers) method Undefined (line 141) | bool Undefined(object model) method Count (line 146) | int Count() { return 42; } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CollectionPropertiesShouldBeReadOnly.Latest.cs type TestRecord (line 10) | public record TestRecord type Message (line 23) | [DataContract] type SerializableMessage (line 31) | [Serializable] type S4004Base (line 37) | public abstract record S4004Base type S4004Abstract (line 42) | public record S4004Abstract : S4004Base type IS4004 (line 47) | public interface IS4004 type S4004InterfaceImplicit (line 54) | public record S4004InterfaceImplicit : IS4004 type IS4004 (line 63) | public interface IS4004 class S4004InterfaceImplicit (line 69) | public class S4004InterfaceImplicit : IS4004 class NewCollectionTypes (line 79) | public class NewCollectionTypes type INewCollectionTypes (line 85) | public interface INewCollectionTypes class PartialProperties (line 91) | public partial class PartialProperties class PartialProperties (line 96) | public partial class PartialProperties FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CollectionPropertiesShouldBeReadOnly.cs class Program (line 8) | public class Program class PrivateClass (line 34) | private class PrivateClass class InternalClass (line 39) | internal class InternalClass type PrivateInterface (line 44) | private interface PrivateInterface type PublicInterface (line 50) | public interface PublicInterface class Message (line 57) | [DataContract] class SerializableMessage (line 74) | [Serializable] class S4004Base (line 82) | public abstract class S4004Base class S4004Abstract (line 87) | public class S4004Abstract : S4004Base type IS4004 (line 92) | public interface IS4004 class S4004InterfaceImplicit (line 97) | public class S4004InterfaceImplicit : IS4004 class S4004InterfaceExplicit (line 102) | public class S4004InterfaceExplicit : IS4004 FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CollectionPropertiesShouldBeReadOnly.razor.cs class Sample (line 6) | public partial class Sample FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CollectionQuerySimplification.Latest.cs class EntityFrameworkReproGH3604 (line 7) | public class EntityFrameworkReproGH3604 class MyEntity (line 9) | public class MyEntity class MyDbContext (line 14) | public class MyDbContext : Microsoft.EntityFrameworkCore.DbContext method GetEntitiesFromEntityFrameworkCoreDbContext (line 19) | public void GetEntitiesFromEntityFrameworkCoreDbContext(MyDbContext db... method GetEntitiesFromEntityFrameworkCoreDbSet (line 31) | public void GetEntitiesFromEntityFrameworkCoreDbSet(Microsoft.EntityFr... method GetEntitiesFromEntityFrameworkDbSet_TEntity (line 43) | public void GetEntitiesFromEntityFrameworkDbSet_TEntity(System.Data.En... method GetEntitiesFromEntityFrameworkDbSet (line 55) | public void GetEntitiesFromEntityFrameworkDbSet(System.Data.Entity.DbS... method GetEntitiesFromEntityFrameworkObjectQuery_TEntity (line 63) | public void GetEntitiesFromEntityFrameworkObjectQuery_TEntity(System.D... method SomeTest (line 75) | public bool SomeTest(MyEntity entity) class Extensions (line 84) | public static class Extensions method NonCompliantMethod (line 91) | public bool NonCompliantMethod() { return source.Select(x => x as obje... method CompliantMethod (line 92) | public bool CompliantMethod() { return source.OfType().Any(x =... class FieldKeyword (line 96) | public class FieldKeyword class NullConditionalAssignment (line 111) | public class NullConditionalAssignment method Test (line 113) | public void Test(List strings) class Tester (line 119) | public class Tester class SimpleLambdaParameters (line 125) | public class SimpleLambdaParameters method Test (line 130) | public void Test(List source) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CollectionQuerySimplification.NetFx.cs class MyEntity (line 3) | public class MyEntity class DataLinq (line 8) | public class DataLinq method GetEntitiesFromLinqToSqlTable (line 10) | public void GetEntitiesFromLinqToSqlTable(System.Data.Linq.Table coll) method CheckCondition (line 55) | public bool CheckCondition(object x) method Method (line 60) | public void Method(IEnumerable ints) type SyntaxList (line 66) | public partial struct SyntaxList : IReadOnlyList, IEquatab... method Method (line 72) | public void Method(IEnumerable ints) method CreateList (line 76) | private static SyntaxList CreateList(List items) => defa... method GetEnumerator (line 78) | public IEnumerator GetEnumerator() => null; method GetEnumerator (line 80) | IEnumerator IEnumerable.GetEnumerator() => null; method Equals (line 82) | public bool Equals(SyntaxList other) => true; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CollectionsShouldImplementGenericInterface.CSharp10.cs type TestRecordStruct_01 (line 8) | record struct TestRecordStruct_01 : IList { } type TestRecordStruct_02 (line 11) | record struct TestRecordStruct_02 : IEnumerable { } type TestRecordStruct_03 (line 12) | record struct TestRecordStruct_03 : ICollection { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CollectionsShouldImplementGenericInterface.CSharp9.cs type TestRecord_01 (line 8) | record TestRecord_01 : CollectionBase { } type TestRecord_02 (line 11) | record TestRecord_02 : IList { } type TestRecord_03 (line 12) | record TestRecord_03 : IEnumerable { } type TestRecord_04 (line 13) | record TestRecord_04 : ICollection { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CollectionsShouldImplementGenericInterface.cs class TestClass_CollectionBase (line 8) | class TestClass_CollectionBase : CollectionBase { } class TestClass_IList (line 10) | class TestClass_IList : IList { } class TestClass_IEnumerable (line 11) | class TestClass_IEnumerable : IEnumerable { } class TestClass_ICollection (line 12) | class TestClass_ICollection : ICollection { } class TestClass_TwoInterfaces (line 14) | class TestClass_TwoInterfaces : IEnumerable, ICollection { } class TestClass_NonGenericAndGenericCollection (line 17) | class TestClass_NonGenericAndGenericCollection : IEnumerable, ICollectio... class TestClass_GenericAndNonGeneric (line 18) | class TestClass_GenericAndNonGeneric : ICollection, IEnumerable { } class TestClass_NonGenericAndIList (line 19) | class TestClass_NonGenericAndIList : IEnumerable, IList { } class TestClass_NonGenericAndGeneric (line 20) | class TestClass_NonGenericAndGeneric : IEnumerable, IEnumerable { } class TestClass_GenericBaseAndNonGeneric (line 21) | class TestClass_GenericBaseAndNonGeneric : Collection, IEnumerab... class TestClass_WithTypeParameter_1 (line 22) | class TestClass_WithTypeParameter_1 : IEnumerable, IList { } class TestClass_WithTypeParameter_2 (line 23) | class TestClass_WithTypeParameter_2 : IEnumerable, ICollection, IColl... class TestClass_MultipleInterfaces (line 25) | class TestClass_MultipleInterfaces : IEnumerable, IList, IEnumerable { } class Derived (line 36) | class Derived : BaseClassEnumerable, IEnumerable { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CommentFixme.cs class FixMe (line 36) | class FixMe method FixMe (line 38) | public FixMe() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CommentTodo.cs class Todo (line 37) | class Todo method Todo (line 39) | public Todo() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CommentedOutCode.MultiLine.Fixed.cs class Fixes (line 1) | class Fixes method SingleLine (line 3) | int SingleLine() { return 42; } method SingleLineWithSpacing (line 5) | int SingleLineWithSpacing() { return 42; } method SeperateLine (line 12) | int SeperateLine() { return 42; } method WithinLine (line 14) | int WithinLine() { return 42; } method MultipleLines (line 16) | int MultipleLines() { return 42; } method MultipleLinesWithSpace (line 18) | int MultipleLinesWithSpace() class Repro_8819 (line 25) | class Repro_8819 method IncorrectRemovalOfNewLine (line 27) | void IncorrectRemovalOfNewLine() method CorrectRemovalOfCommentedOutLine (line 32) | void CorrectRemovalOfCommentedOutLine() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CommentedOutCode.MultiLine.ToFix.cs class Fixes (line 7) | class Fixes method SingleLine (line 9) | int SingleLine() { return 42; } method SingleLineWithSpacing (line 11) | int SingleLineWithSpacing() { return 42; } method SeperateLine (line 18) | int SeperateLine() { return 42; } method WithinLine (line 21) | int /* return 17; */ WithinLine() { return 42; } method MultipleLines (line 23) | int MultipleLines() { return 42; } method MultipleLinesWithSpace (line 30) | int MultipleLinesWithSpace() class Repro_8819 (line 43) | class Repro_8819 method IncorrectRemovalOfNewLine (line 45) | void IncorrectRemovalOfNewLine() method CorrectRemovalOfCommentedOutLine (line 54) | void CorrectRemovalOfCommentedOutLine() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CommentedOutCode.SingleLine.Fixed.cs class Fixes (line 2) | class Fixes method SingleLine (line 4) | int SingleLine() { return 42; } method SingleLineWithSpacing (line 6) | int SingleLineWithSpacing() { return 42; } method SeperateLine (line 8) | int SeperateLine() { return 42; } method MultipleLines (line 10) | int MultipleLines() { return 42; } class Repro_8819 (line 15) | class Repro_8819 method IncorrectRemovalOfNewLine (line 17) | void IncorrectRemovalOfNewLine() method CorrectRemovalOfCommentedOutLine (line 22) | void CorrectRemovalOfCommentedOutLine() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CommentedOutCode.SingleLine.ToFix.cs class Fixes (line 3) | class Fixes method SingleLine (line 5) | int SingleLine() { return 42; } method SingleLineWithSpacing (line 7) | int SingleLineWithSpacing() { return 42; } method SeperateLine (line 9) | int SeperateLine() { return 42; } method MultipleLines (line 12) | int MultipleLines() { return 42; } class Repro_8819 (line 22) | class Repro_8819 method IncorrectRemovalOfNewLine (line 24) | void IncorrectRemovalOfNewLine() method CorrectRemovalOfCommentedOutLine (line 31) | void CorrectRemovalOfCommentedOutLine() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CommentedOutCode.cs class CommentedOutCode (line 95) | public class CommentedOutCode method SentenceWithSemicolon (line 98) | void SentenceWithSemicolon() class CommentedOutCode2 (line 253) | public class CommentedOutCode2 class X (line 258) | class X { } class Y (line 260) | class Y { } class Z (line 262) | class Z { } class Repro_8819 (line 266) | class Repro_8819 method LineTerminators (line 268) | void LineTerminators() method CommentedOutCommentsSeparatedByEmptyLine (line 301) | void CommentedOutCommentsSeparatedByEmptyLine() method CommentedOutCommentsSeparatedByMultiLineComment (line 308) | void CommentedOutCommentsSeparatedByMultiLineComment() method CommentedOutCommentsSeparatedByBlock (line 315) | void CommentedOutCommentsSeparatedByBlock() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CommentedOutCode_Nonconcurrent.cs class CommentedOutCode (line 95) | public class CommentedOutCode method M (line 97) | public void M() class CommentedOutCode2 (line 174) | public class CommentedOutCode2 class X (line 179) | class X { } class Y (line 181) | class Y { } class Z (line 183) | class Z { } class A (line 187) | public class A { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CommentsShouldNotBeEmpty.cs class SingleLine (line 3) | [Obsolete] // Ipsem Lorum method Method (line 101) | void Method() class SingleLineDocumentation (line 142) | [Obsolete] /// Ipsem Lorum class MultiLine (line 189) | [Obsolete] /* Ipsem Lorum */ class MultiLineDocumentation (line 287) | [Obsolete] /** Ipsem Lorum */ FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ComparableInterfaceImplementation.Latest.cs type RecordMissingAll (line 6) | public record RecordMissingAll : IComparable // Noncompliant {{When impl... type RecordMissingOperators (line 12) | public record RecordMissingOperators : IComparable // Nonc... method CompareTo (line 122) | public int CompareTo(FileStruct other) => Value.CompareTo(other.Value); class FileClass (line 125) | file class FileClass : IComparable // Noncompliant FP - file-... method CompareTo (line 127) | public int CompareTo(FileClass other) => 0; type FileRecordStruct (line 130) | file record struct FileRecordStruct(int Value) : IComparable // Noncompli... class FileClassNonGeneric (line 140) | file class FileClassNonGeneric : IComparable // Noncompliant FP - file-s... method CompareTo (line 142) | public int CompareTo(object obj) => 0; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ComparableInterfaceImplementation.cs class Compliant (line 6) | public class Compliant : IComparable // Compliant method CompareTo (line 10) | public int CompareTo(object obj) method Compare (line 15) | private static int Compare(Compliant left, Compliant right) method Equals (line 35) | public override bool Equals(object obj) method CompareTo (line 473) | public int CompareTo(Compliant obj) method Compare (line 478) | private static int Compare(Compliant left, Compliant right) method Equals (line 498) | public override bool Equals(object obj) class DerivedCompliant (line 72) | public class DerivedCompliant : Compliant, IComparable // Compliant class MissingEquals (line 76) | public class MissingEquals : IComparable // Noncompliant {{When implemen... method CompareTo (line 81) | public int CompareTo(object obj) method Compare (line 86) | private static int Compare(MissingEquals left, MissingEquals right) method CompareTo (line 540) | public int CompareTo(MissingEquals obj) method Compare (line 545) | private static int Compare(MissingEquals left, MissingEquals right) class DifferentEquals (line 137) | public class DifferentEquals : IComparable // Noncompliant {{When implem... method CompareTo (line 142) | public int CompareTo(object obj) method Compare (line 147) | private static int Compare(DifferentEquals left, DifferentEquals right) method Equals (line 167) | public bool Equals(object obj, string someParam) method Equals (line 173) | public bool Equals(object obj) method Equals (line 178) | public bool Equals() method Equals (line 187) | public bool Equals() => true; method CompareTo (line 601) | public int CompareTo(DifferentEquals obj) method Compare (line 606) | private static int Compare(DifferentEquals left, DifferentEquals right) method Equals (line 626) | public bool Equals(object obj, string someParam) method Equals (line 632) | public bool Equals(object obj) class MissingGreaterThan (line 220) | public class MissingGreaterThan : IComparable // Noncompliant {{When imp... method CompareTo (line 225) | public int CompareTo(object obj) method Compare (line 230) | private static int Compare(MissingGreaterThan left, MissingGreaterThan... method Equals (line 250) | public override bool Equals(object obj) method CompareTo (line 673) | public int CompareTo(MissingGreaterThan obj) method Compare (line 678) | private static int Compare(MissingGreaterThan left, MissingGreaterThan... method Equals (line 698) | public override bool Equals(object obj) class MissingNotEqual (line 277) | public class MissingNotEqual : IComparable // Noncompliant {{When implem... method CompareTo (line 282) | public int CompareTo(object obj) method Compare (line 287) | private static int Compare(MissingNotEqual left, MissingNotEqual right) method Equals (line 307) | public override bool Equals(object obj) method CompareTo (line 730) | public int CompareTo(MissingNotEqual obj) method Compare (line 735) | private static int Compare(MissingNotEqual left, MissingNotEqual right) method Equals (line 755) | public override bool Equals(object obj) class MissingGreaterThanOrEqualTo (line 334) | public class MissingGreaterThanOrEqualTo : IComparable // Noncompliant {... method CompareTo (line 339) | public int CompareTo(object obj) method Compare (line 344) | private static int Compare(MissingGreaterThanOrEqualTo left, MissingGr... method Equals (line 364) | public override bool Equals(object obj) method CompareTo (line 787) | public int CompareTo(MissingGreaterThanOrEqualTo obj) method Compare (line 792) | private static int Compare(MissingGreaterThanOrEqualTo left, MissingGr... method Equals (line 812) | public override bool Equals(object obj) class MissingLessThanOrEqualTo (line 396) | public class MissingLessThanOrEqualTo : IComparable // Noncompliant {{Wh... method CompareTo (line 401) | public int CompareTo(object obj) method Compare (line 406) | private static int Compare(MissingLessThanOrEqualTo left, MissingLessT... method Equals (line 426) | public override bool Equals(object obj) method CompareTo (line 849) | public int CompareTo(MissingLessThanOrEqualTo obj) method Compare (line 854) | private static int Compare(MissingLessThanOrEqualTo left, MissingLessT... method Equals (line 874) | public override bool Equals(object obj) type Struct (line 458) | public struct Struct : IComparable // Noncompliant {{When implementing I... method CompareTo (line 460) | public int CompareTo(object obj) class Compliant (line 469) | public class Compliant : IComparable // Compliant method CompareTo (line 10) | public int CompareTo(object obj) method Compare (line 15) | private static int Compare(Compliant left, Compliant right) method Equals (line 35) | public override bool Equals(object obj) method CompareTo (line 473) | public int CompareTo(Compliant obj) method Compare (line 478) | private static int Compare(Compliant left, Compliant right) method Equals (line 498) | public override bool Equals(object obj) class MissingEquals (line 535) | public class MissingEquals : IComparable // Noncompliant ... method CompareTo (line 81) | public int CompareTo(object obj) method Compare (line 86) | private static int Compare(MissingEquals left, MissingEquals right) method CompareTo (line 540) | public int CompareTo(MissingEquals obj) method Compare (line 545) | private static int Compare(MissingEquals left, MissingEquals right) class DifferentEquals (line 596) | public class DifferentEquals : IComparable // Noncompli... method CompareTo (line 142) | public int CompareTo(object obj) method Compare (line 147) | private static int Compare(DifferentEquals left, DifferentEquals right) method Equals (line 167) | public bool Equals(object obj, string someParam) method Equals (line 173) | public bool Equals(object obj) method Equals (line 178) | public bool Equals() method Equals (line 187) | public bool Equals() => true; method CompareTo (line 601) | public int CompareTo(DifferentEquals obj) method Compare (line 606) | private static int Compare(DifferentEquals left, DifferentEquals right) method Equals (line 626) | public bool Equals(object obj, string someParam) method Equals (line 632) | public bool Equals(object obj) class MissingGreaterThan (line 668) | public class MissingGreaterThan : IComparable // Non... method CompareTo (line 225) | public int CompareTo(object obj) method Compare (line 230) | private static int Compare(MissingGreaterThan left, MissingGreaterThan... method Equals (line 250) | public override bool Equals(object obj) method CompareTo (line 673) | public int CompareTo(MissingGreaterThan obj) method Compare (line 678) | private static int Compare(MissingGreaterThan left, MissingGreaterThan... method Equals (line 698) | public override bool Equals(object obj) class MissingNotEqual (line 725) | public class MissingNotEqual : IComparable // Noncompli... method CompareTo (line 282) | public int CompareTo(object obj) method Compare (line 287) | private static int Compare(MissingNotEqual left, MissingNotEqual right) method Equals (line 307) | public override bool Equals(object obj) method CompareTo (line 730) | public int CompareTo(MissingNotEqual obj) method Compare (line 735) | private static int Compare(MissingNotEqual left, MissingNotEqual right) method Equals (line 755) | public override bool Equals(object obj) class MissingGreaterThanOrEqualTo (line 782) | public class MissingGreaterThanOrEqualTo : IComparable // No... method CompareTo (line 913) | public int CompareTo(object obj) method CompareTo (line 918) | public int CompareTo(NonCompliant obj) method Compare (line 923) | private static int Compare(NonCompliant left, NonCompliant right) class ContainerWithPrivateTypes (line 946) | public class ContainerWithPrivateTypes class PrivateComparable (line 948) | private class PrivateComparable : IComparable // Compliant -... method CompareTo (line 950) | public int CompareTo(object obj) => 0; type PrivateComparableStruct (line 953) | private struct PrivateComparableStruct : IComparable // Compliant method CompareTo (line 955) | public int CompareTo(object obj) => 0; class PrivateGenericComparable (line 958) | private sealed class PrivateGenericComparable : IComparable 0; class PrivateBothComparable (line 963) | private class PrivateBothComparable : IComparable, IComparable 0; method CompareTo (line 966) | public int CompareTo(PrivateBothComparable other) => 0; class InternalComparable (line 970) | internal class InternalComparable : IComparable // N... method CompareTo (line 972) | public int CompareTo(InternalComparable other) => 0; type InternalComparableStruct (line 975) | internal struct InternalComparableStruct : IComparable 0; class InternalContainerWithNestedPrivate (line 980) | internal class InternalContainerWithNestedPrivate class NestedPrivateComparable (line 982) | private class NestedPrivateComparable : IComparable // Compliant becau... method CompareTo (line 984) | public int CompareTo(object obj) => 0; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CompareNaN.Latest.cs class CompareNaN (line 4) | class CompareNaN method ListPattern (line 6) | void ListPattern() class NullConditionalAssignment (line 17) | class NullConditionalAssignment class MyClass (line 19) | class MyClass method TestMethod (line 23) | public void TestMethod() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CompareNaN.cs type Point (line 6) | struct Point { public float X; public float Y; } class CompareNaN (line 7) | class CompareNaN method TestDouble (line 9) | void TestDouble() method TestFloat (line 39) | void TestFloat() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalSimplification.BeforeCSharp8.Fixed.cs class ConditionalSimplification (line 5) | class ConditionalSimplification method NullCoalesceAssignment (line 7) | void NullCoalesceAssignment(object a, object b) class FPRepro_4962 (line 23) | class FPRepro_4962 method TestFunction (line 25) | public static string TestFunction(string key1, string key2) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalSimplification.BeforeCSharp8.cs class ConditionalSimplification (line 5) | class ConditionalSimplification method NullCoalesceAssignment (line 7) | void NullCoalesceAssignment(object a, object b) class FPRepro_4962 (line 27) | class FPRepro_4962 method TestFunction (line 29) | public static string TestFunction(string key1, string key2) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalSimplification.CSharp8.Fixed.cs class TestCases (line 1) | public class TestCases method SameBaseType (line 3) | public void SameBaseType(bool condition) class X (line 29) | class X { } class Y (line 30) | class Y { } class Base (line 31) | class Base { } class A (line 32) | class A : Base { } class B (line 33) | class B : Base { } class Example (line 37) | public class Example method Fallback (line 42) | public Example Fallback(Example other) class Repro_134362 (line 53) | class Repro_134362 method Method (line 55) | public void Method(bool condition1, bool condition2) method Method2 (line 69) | public void Method2(bool condition1, bool condition2) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalSimplification.CSharp8.cs class TestCases (line 1) | public class TestCases method SameBaseType (line 3) | public void SameBaseType(bool condition) class X (line 29) | class X { } class Y (line 30) | class Y { } class Base (line 31) | class Base { } class A (line 32) | class A : Base { } class B (line 33) | class B : Base { } class Example (line 37) | public class Example method Fallback (line 42) | public Example Fallback(Example other) class Repro_134362 (line 53) | class Repro_134362 method Method (line 55) | public void Method(bool condition1, bool condition2) method Method2 (line 69) | public void Method2(bool condition1, bool condition2) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalSimplification.FromCSharp10.Fixed.cs class Fruit (line 12) | class Fruit { public List Prop; } class FPRepro_5789 (line 14) | class FPRepro_5789 method SomeMethod (line 17) | public void SomeMethod() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalSimplification.FromCSharp10.cs class Fruit (line 13) | class Fruit { public List Prop; } class FPRepro_5789 (line 15) | class FPRepro_5789 method SomeMethod (line 18) | public void SomeMethod() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalSimplification.FromCSharp8.Fixed.cs class ConditionalSimplification (line 9) | class ConditionalSimplification method Identity (line 11) | object Identity(object o) method IdentityAnyOtherMethod (line 15) | object IdentityAnyOtherMethod(object o) method Test (line 19) | int Test(object a, object b, object y, bool condition) method WithIntArg (line 136) | object WithIntArg(int arg) => null; method IsNull1 (line 138) | object IsNull1(object a, object b) method IsNull2 (line 143) | object IsNull2(object a, object b) method LambdasAreIgnored (line 149) | Action LambdasAreIgnored(bool condition, object a, Action action) method X (line 210) | void X() { } method Y (line 211) | void Y() { } method Foo (line 212) | void Foo(int a, string b, Action c) { } method Bar (line 213) | void Bar(Func func) { } class X (line 216) | class X { } class Y (line 217) | class Y { } class Base (line 219) | class Base { } class A (line 220) | class A : Base { } class B (line 221) | class B : Base { } class T (line 223) | class T method XXX (line 225) | public static void XXX() method Bar (line 241) | private static void Bar(string name, bool? value) { } class Repro_3468 (line 245) | public class Repro_3468 method NestedTernary (line 247) | public int NestedTernary(bool condition1, bool condition2, int a, int ... method NestedExpressionWithTernary (line 259) | public int NestedExpressionWithTernary(bool condition1, bool condition... method NestedSwitch (line 271) | public int NestedSwitch(bool condition1, bool condition2, int a, int b... method NestedExpressionWithSwitch (line 287) | public int NestedExpressionWithSwitch(bool condition1, bool condition2... method NestedNullCoalescing (line 303) | public int? NestedNullCoalescing(bool condition, int? a, int b) method NestedNullCoalescingAssignment (line 308) | public int? NestedNullCoalescingAssignment(bool condition, int? a, int b) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalSimplification.FromCSharp8.cs class ConditionalSimplification (line 9) | class ConditionalSimplification method Identity (line 11) | object Identity(object o) method IdentityAnyOtherMethod (line 15) | object IdentityAnyOtherMethod(object o) method Test (line 19) | int Test(object a, object b, object y, bool condition) method WithIntArg (line 230) | object WithIntArg(int arg) => null; method IsNull1 (line 232) | object IsNull1(object a, object b) method IsNull2 (line 244) | object IsNull2(object a, object b) method LambdasAreIgnored (line 257) | Action LambdasAreIgnored(bool condition, object a, Action action) method X (line 318) | void X() { } method Y (line 319) | void Y() { } method Foo (line 320) | void Foo(int a, string b, Action c) { } method Bar (line 321) | void Bar(Func func) { } class X (line 324) | class X { } class Y (line 325) | class Y { } class Base (line 327) | class Base { } class A (line 328) | class A : Base { } class B (line 329) | class B : Base { } class T (line 331) | class T method XXX (line 333) | public static void XXX() method Bar (line 356) | private static void Bar(string name, bool? value) { } class Repro_3468 (line 360) | public class Repro_3468 method NestedTernary (line 362) | public int NestedTernary(bool condition1, bool condition2, int a, int ... method NestedExpressionWithTernary (line 374) | public int NestedExpressionWithTernary(bool condition1, bool condition... method NestedSwitch (line 386) | public int NestedSwitch(bool condition1, bool condition2, int a, int b... method NestedExpressionWithSwitch (line 402) | public int NestedExpressionWithSwitch(bool condition1, bool condition2... method NestedNullCoalescing (line 418) | public int? NestedNullCoalescing(bool condition, int? a, int b) method NestedNullCoalescingAssignment (line 430) | public int? NestedNullCoalescingAssignment(bool condition, int? a, int b) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalSimplification.FromCSharp9.Fixed.cs class Fruit (line 99) | abstract class Fruit { } class Apple (line 100) | class Apple : Fruit { } class Orange (line 101) | class Orange : Fruit { } class Repro_NET3554 (line 104) | public class Repro_NET3554 class Result (line 106) | class Result method Result (line 110) | private Result() { } method Method (line 113) | Result Method(T value) where T : class FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalSimplification.FromCSharp9.cs class Fruit (line 128) | abstract class Fruit { } class Apple (line 129) | class Apple : Fruit { } class Orange (line 130) | class Orange : Fruit { } class Repro_NET3554 (line 133) | public class Repro_NET3554 class Result (line 135) | class Result method Result (line 139) | private Result() { } method Method (line 142) | Result Method(T value) where T : class FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalStructureSameCondition.CSharp10.cs class SomeClass (line 3) | abstract class SomeClass method Somemethod (line 7) | public void Somemethod() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalStructureSameCondition.CSharp9.cs class Fruit (line 74) | abstract class Fruit class Apple (line 79) | class Apple : Fruit { } class Orange (line 80) | class Orange : Fruit { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalStructureSameCondition.cs class ConditionalStructureSameCondition1 (line 9) | class ConditionalStructureSameCondition1 method SimpleTest (line 15) | public void SimpleTest() method Test (line 30) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalStructureSameImplementation_If.Latest.cs class FieldKeyword (line 9) | class FieldKeyword FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalStructureSameImplementation_If.cs class ConditionalStructureSameCondition_If (line 9) | class ConditionalStructureSameCondition_If method DoSomething1 (line 15) | public void DoSomething1() { } method DoSomething2 (line 16) | public void DoSomething2() { } method Test_SingleLineBlocks (line 18) | public void Test_SingleLineBlocks() method Test_MultilineBlocks (line 35) | public void Test_MultilineBlocks() method Test_Overloads (line 87) | public void Test_Overloads() method ExceptionOfException (line 103) | public void ExceptionOfException(int a) method Exception (line 115) | public void Exception(int a) method ElseIfChain (line 131) | public bool ElseIfChain(int s) class IntExtension (line 229) | public static class IntExtension method FooInt (line 231) | public static int FooInt(this int a) => 0; class UnresolvedSymbols (line 236) | public class UnresolvedSymbols method Method (line 238) | public string Method(string first, string second) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalStructureSameImplementation_Switch.Latest.cs class ConditionalStructureSameCondition_Switch (line 9) | class ConditionalStructureSameCondition_Switch method SwitchExpression (line 11) | public int SwitchExpression(int a) class FieldKeyword (line 26) | class FieldKeyword FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalStructureSameImplementation_Switch.cs class ConditionalStructureSameCondition_Switch (line 9) | class ConditionalStructureSameCondition_Switch method doTheRest (line 12) | private void doTheRest() { throw new NotSupportedException(); } method DoSomething (line 13) | private void DoSomething() { throw new NotSupportedException(); } method DoSomething (line 14) | private void DoSomething(int i) { throw new NotSupportedException(); } method DoSomethingDifferent (line 15) | private void DoSomethingDifferent() { throw new NotSupportedException(... method DoSomething2 (line 16) | private void DoSomething2() { throw new NotSupportedException(); } method Test_SingleLine (line 18) | public void Test_SingleLine() method Test_Multiline (line 63) | public void Test_Multiline() method SwitchDifferentBranchDifferentOverloads (line 147) | public int SwitchDifferentBranchDifferentOverloads(object o) class ValueConverter (line 179) | public static class ValueConverter method ToInt32 (line 181) | public static int ToInt32(float f) => 0; method ToInt32 (line 182) | public static int ToInt32(bool b) => 0; method SwitchDifferentSameAction (line 185) | public int SwitchDifferentSameAction(object o) method SwitchDifferentSameExtensionMethod (line 209) | public int SwitchDifferentSameExtensionMethod(object o) method ExceptionOfException (line 228) | public void ExceptionOfException(int a) method Exception (line 254) | public void Exception(int a) class IntExtension (line 288) | public static class IntExtension method FooInt (line 290) | public static int FooInt(this int a, string s) => 0; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalsShouldStartOnNewLine.Latest.cs class MyClass (line 5) | class MyClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalsShouldStartOnNewLine.cs class Program (line 5) | class Program method Foo (line 7) | void Foo() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalsWithSameCondition.CSharp10.cs class ConditionalsWithSameCondition (line 3) | class ConditionalsWithSameCondition method Foo (line 5) | public void Foo() class Fruit (line 14) | class Fruit FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalsWithSameCondition.CSharp9.TopLevelStatements.cs class Fruit (line 136) | abstract class Fruit class Apple (line 142) | class Apple : Fruit method Deconstruct (line 146) | public void Deconstruct(out string x, out string y) => (x, y) = (Taste... method FunctionInClassAndTopLevelStatement (line 148) | void FunctionInClassAndTopLevelStatement(Apple a) class Orange (line 159) | class Orange : Fruit { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalsWithSameCondition.CSharp9.cs class ConditionalsWithSameCondition (line 1) | class ConditionalsWithSameCondition method Foo (line 3) | public void Foo() method doTheThing (line 96) | void doTheThing(object o) { } method PositionalPattern (line 98) | public void PositionalPattern(Apple a) class Fruit (line 112) | abstract class Fruit class Apple (line 118) | class Apple : Fruit method Deconstruct (line 122) | public void Deconstruct(out string x, out string y) => (x, y) = (Taste... class Orange (line 125) | class Orange : Fruit { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConditionalsWithSameCondition.cs class ConditionalsWithSameCondition (line 9) | class ConditionalsWithSameCondition method doTheThing (line 11) | public void doTheThing(object o) method Test (line 18) | public void Test() method TestSw (line 56) | public void TestSw() method EquivalentChecksForNull (line 70) | public void EquivalentChecksForNull(object o) class Coverage (line 80) | public class Coverage method AssignedToFieldWithSameName (line 84) | public void AssignedToFieldWithSameName(string name) method Undefined (line 93) | public void Undefined(string sameAsUndefinedField) method NameMismatch (line 102) | public void NameMismatch(string otherName) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConstructorArgumentValueShouldExist.Latest.Partial.cs class MyExtension3 (line 6) | public partial class MyExtension3 : MarkupExtension class NonCompliantPartialConstructor (line 18) | public partial class NonCompliantPartialConstructor : MarkupExtension method NonCompliantPartialConstructor (line 20) | public partial NonCompliantPartialConstructor(object value1) { Value1 ... method ProvideValue (line 21) | public override object ProvideValue(IServiceProvider serviceProvider) ... class CompliantPartialConstructor (line 24) | public partial class CompliantPartialConstructor : MarkupExtension method CompliantPartialConstructor (line 26) | public partial CompliantPartialConstructor(object value1) { Value1 = v... method ProvideValue (line 27) | public override object ProvideValue(IServiceProvider serviceProvider) ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConstructorArgumentValueShouldExist.Latest.cs class MyExtension3 (line 4) | public class MyExtension3 : MarkupExtension method MyExtension3 (line 6) | public MyExtension3(object value1) { Value1 = value1; } method ProvideValue (line 11) | public override object ProvideValue(IServiceProvider serviceProvider) ... method MyExtension3 (line 36) | public MyExtension3(object value1) { Value1 = value1; } method ProvideValue (line 37) | public override object ProvideValue(IServiceProvider serviceProvider) ... type IServiceProvider (line 18) | public interface IServiceProvider { } class MarkupExtension (line 20) | public abstract class MarkupExtension method ProvideValue (line 22) | public abstract object ProvideValue(IServiceProvider serviceProvider); class ConstructorArgumentAttribute (line 25) | public class ConstructorArgumentAttribute : Attribute method ConstructorArgumentAttribute (line 27) | public ConstructorArgumentAttribute(string argumentName) { } class MyExtension3 (line 34) | public partial class MyExtension3 : MarkupExtension method MyExtension3 (line 6) | public MyExtension3(object value1) { Value1 = value1; } method ProvideValue (line 11) | public override object ProvideValue(IServiceProvider serviceProvider) ... method MyExtension3 (line 36) | public MyExtension3(object value1) { Value1 = value1; } method ProvideValue (line 37) | public override object ProvideValue(IServiceProvider serviceProvider) ... class NonCompliantPartialConstructor (line 45) | public partial class NonCompliantPartialConstructor : MarkupExtension method NonCompliantPartialConstructor (line 47) | public partial NonCompliantPartialConstructor(object value1); class CompliantPartialConstructor (line 52) | public partial class CompliantPartialConstructor : MarkupExtension method CompliantPartialConstructor (line 54) | public partial CompliantPartialConstructor(object value1); class NonCompliantExtensions (line 59) | public static class NonCompliantExtensions method extension (line 62) | extension(NonCompliantStaticExtensionProperty ext) class CompliantExtensions (line 75) | public static class CompliantExtensions method extension (line 77) | extension(CompliantStaticExtensionProperty ext) class NonCompliantStaticExtensionProperty (line 90) | public class NonCompliantStaticExtensionProperty : MarkupExtension method NonCompliantStaticExtensionProperty (line 92) | public NonCompliantStaticExtensionProperty(object value1) { this.Value... method ProvideValue (line 93) | public override object ProvideValue(IServiceProvider serviceProvider) ... class NonCompliantInstanceExtensionProperty (line 96) | public class NonCompliantInstanceExtensionProperty : MarkupExtension method NonCompliantInstanceExtensionProperty (line 98) | public NonCompliantInstanceExtensionProperty(object value1) { this.Val... method ProvideValue (line 99) | public override object ProvideValue(IServiceProvider serviceProvider) ... class CompliantStaticExtensionProperty (line 103) | public class CompliantStaticExtensionProperty : MarkupExtension method CompliantStaticExtensionProperty (line 105) | public CompliantStaticExtensionProperty(object value1) { this.Value1 =... method ProvideValue (line 106) | public override object ProvideValue(IServiceProvider serviceProvider) ... class CompliantInstanceExtensionProperty (line 109) | public class CompliantInstanceExtensionProperty : MarkupExtension method CompliantInstanceExtensionProperty (line 111) | public CompliantInstanceExtensionProperty(object value1) { this.Value1... method ProvideValue (line 112) | public override object ProvideValue(IServiceProvider serviceProvider) ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConstructorArgumentValueShouldExist.cs class MyExtension1 (line 6) | public class MyExtension1 : MarkupExtension method MyExtension1 (line 8) | public MyExtension1(object value1) { Value1 = value1; } method ProvideValue (line 13) | public override object ProvideValue(IServiceProvider serviceProvider) ... class MyExtension2 (line 16) | public class MyExtension2 : MarkupExtension method MyExtension2 (line 18) | public MyExtension2(object value1) { Value1 = value1; } method ProvideValue (line 23) | public override object ProvideValue(IServiceProvider serviceProvider) ... class MyExtension3 (line 26) | public class MyExtension3 : MarkupExtension method MyExtension3 (line 28) | public MyExtension3(object value1) { Value1 = value1; } method ProvideValue (line 34) | public override object ProvideValue(IServiceProvider serviceProvider) ... class MyExtension4 (line 37) | public class MyExtension4 : MarkupExtension method MyExtension4 (line 39) | public MyExtension4(object value1) { Value1 = value1; } method ProvideValue (line 44) | public override object ProvideValue(IServiceProvider serviceProvider) ... class MyExtension5 (line 47) | public class MyExtension5 : MarkupExtension method MyExtension5 (line 49) | public MyExtension5(object value1) { Value1 = value1; } method ProvideValue (line 56) | public override object ProvideValue(IServiceProvider serviceProvider) ... class MyExtension6 (line 59) | public class MyExtension6 : MarkupExtension method MyExtension6 (line 61) | public MyExtension6(object value1) { Value1 = value1; } method ProvideValue (line 66) | public override object ProvideValue(IServiceProvider serviceProvider) ... class MyExtension7 (line 69) | public class MyExtension7 : MarkupExtension method MyExtension7 (line 71) | public MyExtension7(object value1) { Value1 = value1; } method ProvideValue (line 76) | public override object ProvideValue(IServiceProvider serviceProvider) ... class MyExtension8 (line 79) | public class MyExtension8 : MarkupExtension method MyExtension8 (line 81) | public MyExtension8(object value1) { Value1 = value1; } method ProvideValue (line 86) | public override object ProvideValue(IServiceProvider serviceProvider) ... class MyExtension9 (line 89) | public class MyExtension9 : MarkupExtension method MyExtension9 (line 91) | public MyExtension9(object value1) { Value1 = value1; } method ProvideValue (line 97) | public override object ProvideValue(IServiceProvider serviceProvider) ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConstructorOverridableCall.Latest.Partial.cs class PartialConstructor (line 4) | public abstract partial class PartialConstructor method PartialConstructor (line 6) | public partial PartialConstructor(PartialConstructor other) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConstructorOverridableCall.Latest.cs class PartialConstructor (line 3) | public abstract partial class PartialConstructor method PartialConstructor (line 5) | public partial PartialConstructor(PartialConstructor other); method DoSomething (line 7) | public abstract void DoSomething(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConstructorOverridableCall.Nancy.cs class NancyModule (line 7) | public class NancyModule method Get (line 9) | public virtual void Get(string path, Func action) { } class SampleModule (line 13) | public class SampleModule : Nancy.NancyModule method SampleModule (line 15) | public SampleModule() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConstructorOverridableCall.cs class ParentAbstract (line 6) | public abstract class ParentAbstract method ParentAbstract (line 8) | protected ParentAbstract(ParentAbstract other) method DoSomething (line 21) | public abstract void DoSomething(); class Parent (line 24) | public class Parent method Parent (line 26) | public Parent() method DoSomething (line 34) | public virtual void DoSomething() // can be overridden method DoSomething2 (line 38) | public void DoSomething2() class Child (line 44) | public class Child : Parent method Child (line 48) | public Child(string foo) // leads to call DoSomething() in Parent cons... method DoSomething (line 53) | public override void DoSomething() class BaseClass (line 59) | public class BaseClass method BaseClass (line 61) | public BaseClass(int a) method DoSomething (line 65) | public virtual int DoSomething() { return 0; } method DoSomething (line 66) | public virtual int DoSomething(int a) { return 0; } class InlineBaseThisCall (line 69) | public class InlineBaseThisCall : BaseClass method InlineBaseThisCall (line 71) | public InlineBaseThisCall() : this(DoSomething()) { } method InlineBaseThisCall (line 72) | public InlineBaseThisCall(int a) : base(DoSomething(a)) { } class LocalFuncion (line 76) | public class LocalFuncion : BaseClass method LocalFuncion (line 78) | public LocalFuncion() : base(0) class Class1 (line 93) | public class Class1 method Class1 (line 95) | public Class1() method DoSomething (line 100) | public virtual void DoSomething() { } class ClassA2 (line 103) | public class ClassA2 : Class1 method ClassA2 (line 105) | public ClassA2() class ClassA3 (line 111) | public class ClassA3 : ClassA2 method ClassA3 (line 115) | public ClassA3(string name) method DoSomething (line 121) | public override void DoSomething() class ClassB2 (line 127) | public class ClassB2 : Class1 method ClassB2 (line 129) | public ClassB2() method DoSomething (line 134) | public sealed override void DoSomething() { } class ClassB3 (line 137) | public class ClassB3 : ClassB2 method ClassB3 (line 141) | public ClassB3(string name) class ClassC2 (line 147) | public sealed class ClassC2 : Class1 method ClassC2 (line 149) | public ClassC2() method DoSomething (line 154) | public override void DoSomething() { } class ClassD2 (line 157) | public sealed class ClassD2 : Class1 method ClassD2 (line 159) | public ClassD2() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConsumeValueTaskCorrectly.Latest.cs class Repro_FN_6779 (line 5) | class Repro_FN_6779 class SomeService (line 7) | class SomeService method DoThing1 (line 9) | public ValueTask DoThing1() => ValueTask.CompletedTask; method DoThing2 (line 10) | public ValueTask DoThing2() => ValueTask.CompletedTask; class Consumer (line 13) | class Consumer method ConsumeTasks (line 15) | public async Task ConsumeTasks() class Test (line 30) | class Test method MethodAsync (line 32) | static ValueTask MethodAsync(ValueTask task) => method AnotherMethodAsync (line 37) | static async ValueTask AnotherMethodAsync(ValueTask ta... class NullConditionalAssignment (line 44) | public class NullConditionalAssignment class Tester (line 58) | public class Tester FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ConsumeValueTaskCorrectly.cs class ValueTaskProvider (line 7) | class ValueTaskProvider method ReadAsync (line 9) | public ValueTask ReadAsync() => new ValueTask(); method Foo (line 10) | public void Foo(int x) { } class Tests (line 14) | class Tests method Foo1 (line 19) | public async void Foo1(ValueTaskProvider stream) method Foo2 (line 28) | public void Foo2(ValueTaskProvider stream) method Foo3 (line 35) | public async void Foo3(ValueTaskProvider stream) method Foo4 (line 44) | public async void Foo4(ValueTaskProvider stream) method Foo5 (line 52) | public void Foo5(ValueTaskProvider stream) method Foo6 (line 59) | public void Foo6(ValueTaskProvider stream) method Foo7 (line 65) | public void Foo7(ValueTaskProvider stream) method Foo8 (line 81) | public void Foo8(ValueTask valueTask) method Foo9 (line 91) | public void Foo9(ValueTaskProvider stream) method Foo10 (line 103) | public void Foo10(ValueTaskProvider stream) method Foo11 (line 115) | public async void Foo11(ValueTaskProvider stream, bool b, string s, in... method Foo12 (line 136) | public void Foo12(ValueTaskProvider stream) method Foo13 (line 145) | public void Foo13(ValueTaskProvider stream) method Foo14 (line 155) | public async void Foo14(ValueTaskProvider stream) method Foo15 (line 173) | public void Foo15(ValueTaskProvider stream) method Foo16 (line 184) | public void Foo16() method Foo17 (line 191) | public async void Foo17(ValueTask valueTask) method Foo18 (line 201) | public async void Foo18(ValueTask valueTask) method FooFalseNegative (line 214) | public void FooFalseNegative(ValueTaskProvider stream) method FooFalseNegative2 (line 222) | public async void FooFalseNegative2(ValueTask valueTask) method GetResult (line 235) | private async Task GetResult(ValueTask valueTask) => await v... method Compliant1 (line 237) | public async void Compliant1(ValueTaskProvider stream) method Compliant2 (line 243) | public void Compliant2(ValueTaskProvider stream) method Compliant3 (line 249) | public void Compliant3(ValueTaskProvider stream) method Compliant4 (line 258) | public void Compliant4(ValueTask valueTask) method Compliant5 (line 266) | public async void Compliant5(ValueTaskProvider stream, bool b, string ... method Compliant6 (line 287) | public async void Compliant6(ValueTaskProvider stream) method Compliant7 (line 301) | public async void Compliant7(ValueTaskProvider stream) method Compliant8 (line 319) | public async void Compliant8(ValueTask valueTask) class DifferentSyntaxes (line 330) | class DifferentSyntaxes method Foo1 (line 332) | public void Foo1(ValueTask valueTask) method Foo2 (line 343) | public int Foo2(ValueTask valueTask) => valueTask.Result; method Foo3 (line 352) | public string Foo3(ValueTask valueTask) method DifferentSyntaxes (line 359) | public DifferentSyntaxes(ValueTaskProvider stream) class StressTest (line 389) | class StressTest method Foo18 (line 391) | public async void Foo18(ValueTask valueTask) class Repro_1360 (line 423) | internal class Repro_1360 method MethodCallChain (line 425) | public static async Task MethodCallChain() method StaticMethodCallChain (line 434) | public static async Task StaticMethodCallChain() method MethodCallChainThreeMethods (line 442) | public static async Task MethodCallChainThreeMethods() method MethodCallChainTwoMethods (line 450) | public static async Task MethodCallChainTwoMethods() method InstanceValueTask (line 459) | public ValueTask InstanceValueTask() => new ValueTask(1); method StaticValueTask (line 460) | public static ValueTask StaticValueTask() => new ValueTask(1); method Factory (line 461) | public static Repro_1360 Factory() => new Repro_1360(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CryptographicKeyShouldNotBeTooShort.BeforeNet7.cs class Program (line 14) | public class Program method ConstArgumentResolution (line 16) | public void ConstArgumentResolution() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CryptographicKeyShouldNotBeTooShort.Latest.cs type TestRecord (line 7) | record TestRecord class NullConditionalAssignment (line 107) | public class NullConditionalAssignment FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/CryptographicKeyShouldNotBeTooShort.cs class Program (line 14) | public class Program method ConstArgumentResolution (line 22) | public void ConstArgumentResolution() class SystemSecurityCryptographyDSA (line 45) | public class SystemSecurityCryptographyDSA method DefaultConstructors (line 47) | public void DefaultConstructors(CspParameters cspParameters) method CompliantKeySizeConstructors (line 55) | public void CompliantKeySizeConstructors() method NonCompliantKeySizeConstructors (line 61) | public void NonCompliantKeySizeConstructors(CspParameters parameters) method CompliantKeySizeSet (line 71) | public void CompliantKeySizeSet() method NoncompliantKeySizeSet (line 80) | public void NoncompliantKeySizeSet() method CompliantCreate (line 92) | public void CompliantCreate() method NoncompliantCreate (line 99) | public void NoncompliantCreate() class SystemSecurityCryptographyRSA (line 107) | public class SystemSecurityCryptographyRSA method DefaultConstructors (line 110) | public void DefaultConstructors() method CompliantKeySizeConstructors (line 117) | public void CompliantKeySizeConstructors(CspParameters parameters) method NonCompliantKeySizeConstructors (line 125) | public void NonCompliantKeySizeConstructors(CspParameters parameters) method CompliantKeySizeSet (line 133) | public void CompliantKeySizeSet() method NoncompliantKeySizeSet (line 142) | public void NoncompliantKeySizeSet() method CompliantCreate (line 154) | public void CompliantCreate() method NoncompliantCreate (line 161) | public void NoncompliantCreate() class SystemSecurityCryptographyEC (line 168) | public class SystemSecurityCryptographyEC method CompliantConstructors (line 170) | public void CompliantConstructors() method NonCompliantConstructors (line 187) | public void NonCompliantConstructors() method CompliantKeySizeSet (line 194) | public void CompliantKeySizeSet() method CompliantGenerateKey (line 209) | public void CompliantGenerateKey() method NoncompliantGenerateKey (line 224) | public void NoncompliantGenerateKey() method CompliantCreate (line 233) | public void CompliantCreate() method NoncompliantCreate (line 244) | public void NoncompliantCreate() class SystemSecurityCryptographyAES (line 251) | public class SystemSecurityCryptographyAES method CompliantAES (line 253) | public void CompliantAES() class BouncyCastleCryptography (line 285) | public class BouncyCastleCryptography method CompliantParametersGenerator (line 287) | public void CompliantParametersGenerator() method NoncompliantParametersGenerator (line 307) | public void NoncompliantParametersGenerator(int arg) method CompliantGetByName (line 326) | public void CompliantGetByName() method NoncompliantGetByName (line 398) | public void NoncompliantGetByName(string arg) class CustomCryptography (line 446) | public class CustomCryptography : RSA method UseCompliantKeyLength (line 448) | public void UseCompliantKeyLength() method UseNoncompliantKeyLength (line 453) | public void UseNoncompliantKeyLength() method ExportParameters (line 459) | public override RSAParameters ExportParameters(bool includePrivatePara... method ImportParameters (line 464) | public override void ImportParameters(RSAParameters parameters) class CustomClassWithSameMethods (line 470) | public class CustomClassWithSameMethods method Create (line 474) | public void Create() { } method Create (line 475) | public void Create(int value) { } method Create (line 476) | public void Create(ECCurve value) { } method Create (line 477) | public void Create(string value) { } method GenerateKey (line 478) | public void GenerateKey() { } method GenerateKey (line 479) | public void GenerateKey(ECCurve value) { } method GenerateKey (line 480) | public void GenerateKey(string value) { } method GetByName (line 481) | public void GetByName() { } method GetByName (line 482) | public void GetByName(string value) { } method GetByName (line 483) | public void GetByName(bool value) { } method Init (line 484) | public void Init() { } method Init (line 485) | public void Init(int value) { } method Init (line 486) | public void Init(string value) { } method AnotherMethod (line 487) | public void AnotherMethod() { } method Test (line 489) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DangerousGetHandleShouldNotBeCalled.CSharp9.cs type R (line 7) | record R FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DangerousGetHandleShouldNotBeCalled.cs class Program (line 7) | class Program method GetRegistryKeyHandle (line 9) | private static IntPtr GetRegistryKeyHandle(RegistryKey rKey) method DangerousGetHandle (line 31) | private static IntPtr DangerousGetHandle() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DatabasePasswordsShouldBeSecure.Latest.cs class NoncompliantDbContext (line 6) | public class NoncompliantDbContext : DbContext method OnConfiguring (line 10) | protected override void OnConfiguring(DbContextOptionsBuilder optionsB... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DatabasePasswordsShouldBeSecure.Net5.cs class NoncompliantDbContext (line 5) | public class NoncompliantDbContext : DbContext method OnConfiguring (line 7) | protected override void OnConfiguring(DbContextOptionsBuilder optionsB... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DatabasePasswordsShouldBeSecure.NetCore31.cs class NoncompliantDbContext (line 5) | public class NoncompliantDbContext : DbContext method OnConfiguring (line 7) | protected override void OnConfiguring(DbContextOptionsBuilder optionsB... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DatabasePasswordsShouldBeSecure.cs class NoncompliantDbContext (line 6) | public class NoncompliantDbContext : DbContext method getBuilder (line 9) | private DbContextOptionsBuilder getBuilder() => null; method OnConfiguring (line 11) | protected override void OnConfiguring(DbContextOptionsBuilder optionsB... method Method (line 39) | protected void Method(DbContextOptionsBuilder g... method ExplicitInvocation (line 46) | public void ExplicitInvocation(DbContextOptionsBuilder optionsBuilder) method StringConcatAndInterpolation (line 51) | public void StringConcatAndInterpolation(string a) method ConstantPropagation (line 75) | public void ConstantPropagation() method MethodResult (line 83) | public void MethodResult() method Compliant (line 89) | public void Compliant(DbContextOptionsBuilder optionsBuilder, string p... class OptionsBuilderExtensions (line 134) | public static class OptionsBuilderExtensions method UseSqlServer (line 136) | public static DbContextOptionsBuilder UseSqlServer(this DbContextOptio... method UseNpgsql (line 137) | public static DbContextOptionsBuilder UseNpgsql(this DbContextOptionsB... method UseMySQL (line 138) | public static DbContextOptionsBuilder UseMySQL(this DbContextOptionsBu... class Foo (line 141) | public class Foo method UseSqlServer (line 143) | public void UseSqlServer(string connectionString) { } class CustomCodeSameName (line 151) | public class CustomCodeSameName : Microsoft.EntityFrameworkCore.DbContext method OnConfiguring (line 154) | protected override void OnConfiguring(Microsoft.EntityFrameworkCore.Db... method Foo (line 167) | void Foo(string s) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DateAndTimeShouldNotBeUsedasTypeForPrimaryKey.EntityFrameworkCore.cs class TemporalTypes (line 5) | class TemporalTypes class DateOnlyKey (line 7) | class DateOnlyKey class TimeOnlyKey (line 12) | class TimeOnlyKey class ClassWithPrimaryKeyAttribute (line 18) | class ClassWithPrimaryKeyAttribute class PrimaryKeyWithSingleProperty (line 22) | [PrimaryKey(nameof(KeyProperty))] class PrimaryKeyWithMultipleProperties (line 28) | [PrimaryKey(nameof(DateProperty), nameof(IntProperty))] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DateAndTimeShouldNotBeUsedasTypeForPrimaryKey.FluentApi.cs class FluentApi (line 4) | class FluentApi class PersonDbContext (line 6) | class PersonDbContext: DbContext method OnModelCreating (line 10) | protected override void OnModelCreating(ModelBuilder modelBuilder) class Person (line 17) | class Person FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DateAndTimeShouldNotBeUsedasTypeForPrimaryKey.Latest.cs type RecordEntity (line 6) | record RecordEntity class Entity (line 11) | class Entity { } class Extensions (line 13) | static class Extensions method extension (line 15) | extension(Entity entity) class FieldKeyWord (line 21) | class FieldKeyWord FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DateAndTimeShouldNotBeUsedasTypeForPrimaryKey.NoReferenceToEntityFramework.cs class Entity (line 3) | class Entity class DateTimeKey (line 8) | class DateTimeKey FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DateAndTimeShouldNotBeUsedasTypeForPrimaryKey.cs class TemporalTypes (line 9) | class TemporalTypes class Entity (line 11) | class Entity class DateTimeKey (line 17) | class DateTimeKey class DateTimeOffsetKey (line 22) | class DateTimeOffsetKey class TimeSpanKey (line 27) | class TimeSpanKey class DateTimeNoKey (line 32) | class DateTimeNoKey class DifferentCasing (line 37) | class DifferentCasing class TemporalTypeWithFullName (line 42) | class TemporalTypeWithFullName class AliasedTemporalType (line 47) | class AliasedTemporalType class NonTemporalTypes (line 53) | class NonTemporalTypes class IntKey (line 55) | class IntKey class GuidKey (line 60) | class GuidKey class StringKey (line 65) | class StringKey class Attributes (line 71) | class Attributes class SingleKeyAttribute (line 73) | class SingleKeyAttribute class KeyAndOtherAttributes (line 79) | class KeyAndOtherAttributes class KeyAndOtherAttributeLists (line 85) | class KeyAndOtherAttributeLists class KeyWithAttributeName (line 92) | class KeyWithAttributeName class KeyAttributeWithFullName (line 98) | class KeyAttributeWithFullName class AliasedKeyAttribute (line 104) | class AliasedKeyAttribute class NoKeyAttribute (line 110) | class NoKeyAttribute class ForeignKeyRelationship (line 116) | class ForeignKeyRelationship class Author (line 118) | class Author class Book (line 125) | class Book class PropertyTypes (line 135) | class PropertyTypes class NotProperties (line 137) | class NotProperties method Id (line 140) | public DateTime Id() => DateTime.Now; class StaticProperty (line 143) | class StaticProperty class StaticPropertyInStaticClass (line 148) | static class StaticPropertyInStaticClass class NotPublicProperty (line 153) | class NotPublicProperty class NotReadWriteProperty (line 159) | class NotReadWriteProperty class FullProperty (line 164) | class FullProperty class NonClassTypes (line 175) | class NonClassTypes type StructEntity (line 177) | struct StructEntity type IEntity (line 182) | interface IEntity FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DateTimeFormatShouldNotBeHardcoded.Latest.cs class DateTimeFormatShouldNotBeHardcoded (line 4) | public class DateTimeFormatShouldNotBeHardcoded method Noncompliant (line 6) | public void Noncompliant(DateOnly dateOnly, TimeOnly timeOnly) method Compliant (line 13) | public void Compliant(DateOnly dateOnly, TimeOnly timeOnly) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DateTimeFormatShouldNotBeHardcoded.cs class DateTimeFormatShouldNotBeHardcoded (line 4) | public class DateTimeFormatShouldNotBeHardcoded method Noncompliant (line 8) | public void Noncompliant(DateTimeOffset dateTimeOffset, TimeSpan timeS... method Compliant (line 29) | public void Compliant(DateTimeOffset dateTimeOffset, TimeSpan timeSpan) class MyDate (line 42) | static class MyDate method ToString (line 44) | public static string ToString(string str) => str; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DeadStores.Latest.cs class C (line 346) | public class C method Log (line 349) | public static void Log() { } method FunctionPointer (line 350) | unsafe void FunctionPointer() method StaticLambda (line 356) | Action StaticLambda() => type R (line 366) | record R class UnsafeContexts (line 385) | class UnsafeContexts method IteratorTests (line 388) | IEnumerable IteratorTests(int test) class Extensions (line 409) | static class Extensions method extension (line 411) | extension(string s) class FieldKeyword (line 421) | class FieldKeyword class Partial (line 434) | partial class Partial method Partial (line 437) | partial Partial(); method Partial (line 456) | partial Partial() class Partial (line 440) | partial class Partial method Partial (line 437) | partial Partial(); method Partial (line 456) | partial Partial() class Sample (line 463) | class Sample class CustomCompoundAssignment (line 474) | class CustomCompoundAssignment method Method (line 483) | void Method(CustomCompoundAssignment x) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DeadStores.RoslynCfg.cs class Resource (line 8) | public class Resource : IDisposable method Dispose (line 12) | public void Dispose() method DoSomething (line 15) | public int DoSomething() method DoSomethingElse (line 19) | public int DoSomethingElse() method IgnoredValues (line 24) | public void IgnoredValues() method NonignoredValues (line 77) | private void NonignoredValues() method ExpressionResultsInConstantIgnoredValue (line 99) | public void ExpressionResultsInConstantIgnoredValue() method Defaults (line 120) | public void Defaults() method TypeSpecificDefaultValues (line 139) | public void TypeSpecificDefaultValues() class DeadStores (line 156) | public class DeadStores method doSomething (line 160) | int doSomething() => 1; method doSomethingElse (line 161) | int doSomethingElse() => 1; method calculateRate (line 163) | void calculateRate(int a, int b) method X (line 201) | void X(out int i) { i = 10; } method calculateRate2 (line 203) | void calculateRate2(int a, int b) method storeI (line 224) | void storeI(int i) { } method calculateRate3 (line 226) | void calculateRate3(int a, int b) method pow (line 240) | int pow(int a, int b) method Assignment (line 254) | public void Assignment(DeadStores sender) method Unary (line 325) | public void Unary() method LoopControlVariable (line 351) | public void LoopControlVariable() method Discard (line 371) | public void Discard(int arg) method Use (line 377) | private void Use(int arg) { } method Use (line 378) | private void Use(bool arg) { } method Use (line 379) | private void Use(string arg) { } method SomeString (line 380) | private string SomeString() => null; method Switch (line 382) | public void Switch() method Switch1 (line 403) | public int Switch1(int x) method Switch2 (line 422) | public int Switch2(int x) method Method (line 472) | public List Method(int i) method Method2 (line 487) | public List Method2(int i) method Method3 (line 498) | public List Method3(int i) method Method4 (line 509) | public List Method4(int i) method Method5 (line 521) | public List Method5(out int i, ref int j) method Method5Call1 (line 533) | public void Method5Call1(out int i) method Method5Call2 (line 539) | public void Method5Call2() method UsedAsOutInstance (line 545) | public int UsedAsOutInstance() method Method6 (line 565) | public List Method6() method Method7_Foreach (line 575) | public List Method7_Foreach() method ForEach_AssignedBefore_UsedAfter (line 591) | private void ForEach_AssignedBefore_UsedAfter(string[] args) method ForEach_AssignedBefore_UsedAfterNested (line 601) | private void ForEach_AssignedBefore_UsedAfterNested(string[] args) method ForEach_AssignedIn_UsedAfter (line 614) | private int ForEach_AssignedIn_UsedAfter(string[] args) method ForEach_AssignedIn_UsedAfter_Nested (line 625) | private void ForEach_AssignedIn_UsedAfter_Nested(string[] args) method ForEach_NestedLock_AssignedIn_UsedAfter (line 639) | private void ForEach_NestedLock_AssignedIn_UsedAfter(string[] args) method Unused (line 653) | public void Unused() method ConditionalEvaluation (line 665) | private void ConditionalEvaluation(bool b1, bool b2, object coalesce, ... method SimpleAssignment (line 675) | private void SimpleAssignment() method Arrow (line 686) | private void Arrow(int arg) => class NameOfTest (line 695) | private class NameOfTest method nameof (line 716) | private static string nameof(int i) class ActorBase (line 722) | private class ActorBase method Create (line 724) | public virtual int Create() class CSharp8 (line 739) | public class CSharp8 type IWithDefaultImplementation (line 742) | public interface IWithDefaultImplementation method Total (line 748) | decimal Total(decimal discount) class StaticLocalFunctions (line 759) | public class StaticLocalFunctions method DoSomething (line 761) | public int DoSomething(int a) class SwitchExpressions (line 775) | public class SwitchExpressions method Compute (line 777) | int Compute(int a, bool isOK) class NullCoalescingAssignment (line 789) | public class NullCoalescingAssignment method Compute (line 791) | int[] Compute(int[] arr) class AkkaSnippet (line 803) | public class AkkaSnippet method OnlyFinally (line 805) | internal void OnlyFinally(object actor) method OnlyFinally_WithTryInside (line 817) | internal void OnlyFinally_WithTryInside(object actor) method Finally_Followed_By_Deadstore (line 836) | internal void Finally_Followed_By_Deadstore(object actor) method SnippetTwo (line 849) | internal void SnippetTwo(object actor) method SnippetThree (line 862) | internal void SnippetThree(object actor, int i) method Foo (line 878) | private void Foo(object obj) { } class ReproGithubIssue2311 (line 881) | public class ReproGithubIssue2311 method SwitchCaseWithWhenAndLocalScope (line 883) | private void SwitchCaseWithWhenAndLocalScope(object sender, DateTimeKi... method SwitchCaseWithLocalScope (line 901) | private void SwitchCaseWithLocalScope(object sender, DateTimeKind e) method SwitchCase (line 919) | private void SwitchCase(object sender, DateTimeKind e) class NullConditionalOperatorInTry (line 934) | class NullConditionalOperatorInTry method Method (line 936) | private void Method(bool condition) method M (line 944) | void M(int i, int j) class ObjectInitializer (line 951) | class ObjectInitializer method Method (line 955) | void Method() class TernaryInTry (line 963) | class TernaryInTry method Method (line 965) | void Method(out string param, string param2) class OutParameter (line 977) | class OutParameter method Method (line 979) | void Method(out string param) class ReproGithubIssue697 (line 987) | public class ReproGithubIssue697 method DoStuff (line 989) | private bool DoStuff() => true; method Foo (line 991) | public void Foo() method Bar (line 1005) | public void Bar(bool cond) class ReproGithubIssue2393 (line 1025) | public class ReproGithubIssue2393 method RetryOnException (line 1027) | public static void RetryOnException(int retries) method ComplexRetryOnException (line 1046) | public static void ComplexRetryOnException(int retries) method LoopWithFinally (line 1078) | public void LoopWithFinally() method DoNothing (line 1094) | private static void DoNothing() { } method DoNothing (line 1095) | private static void DoNothing(bool b) { } class ReproIssues (line 1098) | public static class ReproIssues method WithNonIgnored_Declaration (line 1101) | public static long WithNonIgnored_Declaration(string path) method WithNonIgnored_Assignment (line 1115) | public static long WithNonIgnored_Assignment(string path) method WithConstantValue (line 1131) | public static long WithConstantValue(string path) method WithMinus1 (line 1146) | public static long WithMinus1(string path) method WithClassConstant (line 1161) | public static long WithClassConstant(string path) method WithCastedNull (line 1176) | public static string WithCastedNull(string path) method WithDefault (line 1190) | public static string WithDefault(string path) class FooBarBaz (line 1206) | public class FooBarBaz method Start (line 1208) | public int Start() method Archive (line 1228) | public void Archive() { } class ReproGithubIssue2426 (line 1232) | public class ReproGithubIssue2426 method VarPatternCheck (line 1234) | public int VarPatternCheck(string value) class Verify2607 (line 1248) | public class Verify2607 method DeadStore (line 1250) | public static void DeadStore(int[] array) class TupleReturn (line 1273) | public class TupleReturn method M (line 1275) | public static (int foo, int bar) M(string text) method UnusedTuple (line 1281) | public void UnusedTuple() method UsedTuple (line 1286) | public void UsedTuple() method Use (line 1293) | private void Use((int, int) t) { } class Issue_3126 (line 1297) | public class Issue_3126 method VariableDeclarator_WithLocalFunction (line 1299) | public string VariableDeclarator_WithLocalFunction() method Assignment_WithLocalFunction (line 1310) | public string Assignment_WithLocalFunction() method PrefixExpression_WithLocalFunction (line 1322) | public int PrefixExpression_WithLocalFunction() method PostfixExpression_WithLocalFunction (line 1334) | public int PostfixExpression_WithLocalFunction() class Repro_3304 (line 1348) | public class Repro_3304 method WithRefKeyword (line 1350) | public void WithRefKeyword(int[] values) class Repro_3348 (line 1358) | public class Repro_3348 method Indices (line 1360) | public int Indices(int[] values) method Ranges (line 1366) | public int[] Ranges(int[] values) class Repro_3719 (line 1375) | public class Repro_3719 method UseVariableInLocalPredicate (line 1377) | public void UseVariableInLocalPredicate() class Repro_2303 (line 1396) | public class Repro_2303 method WithRefKeywrod (line 1398) | public void WithRefKeywrod() class Repro_2766 (line 1411) | public class Repro_2766 method WithTryCatch (line 1413) | public int WithTryCatch() method GetValues (line 1431) | private (string name, int count) GetValues() => ("foo", 1); method DoWork (line 1433) | private void DoWork() => throw new InvalidOperationException("bang"); class Repro_2761 (line 1437) | public class Repro_2761 method CreateDirectory (line 1439) | public static void CreateDirectory(string directory) class Repro_4948 (line 1469) | public class Repro_4948 method UsedInFinally (line 1473) | public void UsedInFinally() method UsedInFinally_NestedInLambda (line 1487) | public void UsedInFinally_NestedInLambda() method UsedInFinally_Throw (line 1510) | public void UsedInFinally_Throw() method UsedInFinally_Throw_FilteredCatch (line 1523) | public void UsedInFinally_Throw_FilteredCatch() method UsedInFinally_Throw_CatchAll (line 1544) | public void UsedInFinally_Throw_CatchAll() method UsedInFinally_AfterOtherAssignment (line 1562) | public void UsedInFinally_AfterOtherAssignment() method SomethingThatCanThrow (line 1582) | private void SomethingThatCanThrow() { } method Use (line 1583) | private void Use(int arg) { } class Repro_4949 (line 1587) | public class Repro_4949 method TryReturns_Loop (line 1589) | public void TryReturns_Loop() method SomethingThatCanThrow (line 1607) | private void SomethingThatCanThrow() { } class PeachValidation (line 1611) | public class PeachValidation method ReadInFinallyAfterCatch (line 1614) | public int ReadInFinallyAfterCatch() method ReadAfterCatchAll_WithType (line 1635) | public int ReadAfterCatchAll_WithType(bool condition) method ReadAfterCatchAll_NoType (line 1654) | public int ReadAfterCatchAll_NoType(bool condition) method ReadInCatch_WithBranching (line 1673) | public void ReadInCatch_WithBranching(bool condition) method NestedCatchAndRethrow (line 1695) | public void NestedCatchAndRethrow() method AssignmentInTernary (line 1717) | void AssignmentInTernary(bool condition, string st) method AssignmentInSwitch (line 1725) | void AssignmentInSwitch() method ReassignAfterUsing (line 1743) | void ReassignAfterUsing(IDisposable data) method CanThrow (line 1754) | private int CanThrow() => method Log (line 1757) | private void Log(int value) { } method LoopInsideTryCatch (line 1759) | void LoopInsideTryCatch(List list, bool condition) method LoopInsideTryCatch_Finally (line 1775) | void LoopInsideTryCatch_Finally(List list, bool condition) method LoopAndBranchingInsideTryCatch_Finally (line 1792) | void LoopAndBranchingInsideTryCatch_Finally(List list, bool co... method VariableReassignedInCatch (line 1830) | void VariableReassignedInCatch() method VariableUsedInOuterFinally (line 1856) | void VariableUsedInOuterFinally(bool condition) method Method (line 1886) | void Method(int arg) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DeadStores.SonarCfg.cs class Resource (line 8) | public class Resource : IDisposable method Dispose (line 10) | public void Dispose() method DoSomething (line 13) | public int DoSomething() method DoSomethingElse (line 17) | public int DoSomethingElse() method IgnoredValues (line 22) | public void IgnoredValues() method ExpressionResultsInConstantIgnoredValue (line 62) | public void ExpressionResultsInConstantIgnoredValue() method Defaults (line 83) | public void Defaults() method TypeSpecificDefaultValues (line 102) | public void TypeSpecificDefaultValues() class DeadStores (line 118) | public class DeadStores method doSomething (line 122) | int doSomething() => 1; method doSomethingElse (line 123) | int doSomethingElse() => 1; method calculateRate (line 125) | void calculateRate(int a, int b) method X (line 163) | void X(out int i) { i = 10; } method calculateRate2 (line 165) | void calculateRate2(int a, int b) method storeI (line 186) | void storeI(int i) { } method calculateRate3 (line 188) | void calculateRate3(int a, int b) method pow (line 202) | int pow(int a, int b) method Assignment (line 216) | public void Assignment(DeadStores sender) method Use (line 287) | private void Use(int arg) { } method Use (line 288) | private void Use(bool arg) { } method Use (line 289) | private void Use(string arg) { } method SomeString (line 290) | private string SomeString() => null; method Switch (line 292) | public void Switch() method Switch1 (line 313) | public int Switch1(int x) method Switch2 (line 332) | public int Switch2(int x) method Method (line 382) | public List Method(int i) method Method2 (line 397) | public List Method2(int i) method Method3 (line 409) | public List Method3(int i) method Method4 (line 420) | public List Method4(int i) method Method5 (line 432) | public List Method5(out int i, ref int j) method Method5Call1 (line 444) | public void Method5Call1(out int i) method Method5Call2 (line 450) | public void Method5Call2() method Method6 (line 456) | public List Method6() method Method7_Foreach (line 466) | public List Method7_Foreach() method Unused (line 482) | public void Unused() method SimpleAssignment (line 490) | private void SimpleAssignment(bool b1, bool b2) class NameOfTest (line 497) | private class NameOfTest method nameof (line 518) | private static string nameof(int i) class ActorBase (line 524) | private class ActorBase method Create (line 526) | public virtual int Create() class CSharp8 (line 541) | public class CSharp8 type IWithDefaultImplementation (line 544) | public interface IWithDefaultImplementation method Total (line 550) | decimal Total(decimal discount) class StaticLocalFunctions (line 562) | public class StaticLocalFunctions method DoSomething (line 564) | public int DoSomething(int a) class SwitchExpressions (line 578) | public class SwitchExpressions method Compute (line 580) | int Compute(int a, bool isOK) class NullCoalescingAssignment (line 592) | public class NullCoalescingAssignment method Compute (line 594) | int[] Compute(int[] arr) class AkkaSnippet (line 606) | public class AkkaSnippet method OnlyFinally (line 608) | internal void OnlyFinally(object actor) method OnlyFinally_WithTryInside (line 620) | internal void OnlyFinally_WithTryInside(object actor) method Finally_Followed_By_Deadstore (line 639) | internal void Finally_Followed_By_Deadstore(object actor) method SnippetTwo (line 652) | internal void SnippetTwo(object actor) method SnippetThree (line 665) | internal void SnippetThree(object actor, int i) method Foo (line 681) | private void Foo(object obj) { } class ReproGithubIssue2311 (line 684) | public class ReproGithubIssue2311 method SwitchCaseWithWhenAndLocalScope (line 686) | private void SwitchCaseWithWhenAndLocalScope(object sender, DateTimeKi... method SwitchCaseWithLocalScope (line 704) | private void SwitchCaseWithLocalScope(object sender, DateTimeKind e) method SwitchCase (line 722) | private void SwitchCase(object sender, DateTimeKind e) class ReproGithubIssue697 (line 737) | public class ReproGithubIssue697 method DoStuff (line 739) | private bool DoStuff() => true; method Foo (line 741) | public void Foo() method Bar (line 755) | public void Bar(bool cond) class ReproGithubIssue2393 (line 775) | public class ReproGithubIssue2393 method RetryOnException (line 777) | public static void RetryOnException(int retries) method ComplexRetryOnException (line 796) | public static void ComplexRetryOnException(int retries) method Bar (line 827) | public void Bar() method DoNothing (line 843) | private static void DoNothing() { } method DoNothing (line 844) | private static void DoNothing(bool b) { } class ReproIssues (line 847) | public static class ReproIssues method WithConstantValue (line 850) | public static long WithConstantValue(string path) method WithMinus1 (line 865) | public static long WithMinus1(string path) method WithClassConstant (line 880) | public static long WithClassConstant(string path) method WithCastedNull (line 895) | public static string WithCastedNull(string path) method WithDefault (line 909) | public static string WithDefault(string path) class FooBarBaz (line 925) | public class FooBarBaz method Start (line 927) | public int Start() method Archive (line 947) | public void Archive() { } class ReproGithubIssue2426 (line 951) | public class ReproGithubIssue2426 method VarPatternCheck (line 953) | public int VarPatternCheck(string value) class Verify2607 (line 967) | public class Verify2607 method DeadStore (line 969) | public static void DeadStore(int[] array) class TupleReturn (line 992) | public class TupleReturn method M (line 994) | public static (int foo, int bar) M(string text) method UnusedTuple_FalseNegative (line 1000) | public void UnusedTuple_FalseNegative() class Issue_3126 (line 1007) | public class Issue_3126 method VariableDeclarator_WithLocalFunction (line 1009) | public string VariableDeclarator_WithLocalFunction() method Assignment_WithLocalFunction (line 1020) | public string Assignment_WithLocalFunction() method PrefixExpression_WithLocalFunction (line 1032) | public int PrefixExpression_WithLocalFunction() method PostfixExpression_WithLocalFunction (line 1044) | public int PostfixExpression_WithLocalFunction() class Repro_3304 (line 1058) | public class Repro_3304 method WithRefKeyword (line 1060) | public void WithRefKeyword(int[] values) class Repro_3348 (line 1068) | public class Repro_3348 method Indices (line 1070) | public int Indices(int[] values) method Ranges (line 1076) | public int[] Ranges(int[] values) class Repro_3719 (line 1085) | public class Repro_3719 method UseVariableInLocalPredicate (line 1087) | public void UseVariableInLocalPredicate() class Repro_2303 (line 1106) | public class Repro_2303 method WithRefKeywrod (line 1108) | public void WithRefKeywrod() class Repro_2766 (line 1121) | public class Repro_2766 method WithTryCatch (line 1123) | public int WithTryCatch() method GetValues (line 1141) | private (string name, int count) GetValues() => ("foo", 1); method DoWork (line 1143) | private void DoWork() => throw new InvalidOperationException("bang"); class Repro_2761 (line 1147) | public class Repro_2761 method CreateDirectory (line 1149) | public static void CreateDirectory(string directory) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DebugAssertHasNoSideEffects.Latest.cs type R (line 9) | record R class Foo (line 28) | class Foo method Contains (line 30) | public bool Contains(string arg) => true; method Put (line 31) | public bool Put() => true; class ConditionalAssignment (line 34) | class ConditionalAssignment method Method (line 37) | void Method(ConditionalAssignment x) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DebugAssertHasNoSideEffects.cs class Foo (line 6) | class Foo method Me (line 8) | public Foo Me() => null; method Contains (line 10) | public bool Contains(string arg) => true; method DoStuff (line 11) | public bool DoStuff() => true; method Destroy (line 12) | public bool Destroy() => true; method Remove (line 13) | public bool Remove(string arg) => true; method RemoveMe (line 14) | public bool RemoveMe() => true; method Delete (line 15) | public bool Delete() => true; method Put (line 16) | public bool Put() => true; method Set (line 17) | public bool Set() => true; method Add (line 18) | public bool Add() => true; method Pop (line 19) | public bool Pop() => true; method Update (line 20) | public bool Update() => true; method Retain (line 21) | public bool Retain() => true; method Insert (line 22) | public bool Insert() => true; method Push (line 23) | public bool Push() => true; method Append (line 24) | public bool Append() => true; method Clear (line 25) | public bool Clear() => true; method Dequeue (line 26) | public bool Dequeue() => true; method Enqueue (line 27) | public bool Enqueue() => true; method Dispose (line 28) | public bool Dispose() => true; method CanAddItem (line 29) | public bool CanAddItem() => true; method SetEquals (line 30) | public bool SetEquals() => true; class Program (line 33) | class Program method Test (line 35) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DebuggerDisplayUsesExistingMembers.Latest.cs class RawStringLiterals (line 5) | class RawStringLiterals class AccessModifiers (line 35) | public class AccessModifiers class BaseClass (line 37) | public class BaseClass class SubClass (line 48) | public class SubClass : BaseClass type SomeRecord (line 55) | [DebuggerDisplay("{RecordProperty}")] type SomeRecordStruct (line 65) | [DebuggerDisplay("{RecordProperty1} bla bla {RecordProperty2}")] class ConstantInterpolatedStrings (line 83) | public class ConstantInterpolatedStrings class NotAProperty (line 89) | public class NotAProperty { } type DefaultInterfaceImplementations (line 92) | public interface DefaultInterfaceImplementations class PartialProperty (line 103) | public partial class PartialProperty class PartialProperty (line 108) | [DebuggerDisplay("{Name}")] // Noncompliant class OtherPartialProperty (line 115) | [DebuggerDisplay("{UserName}")] // Compliant class OtherPartialProperty (line 121) | public partial class OtherPartialProperty class EscapeChar (line 127) | public class EscapeChar class Expressions (line 143) | [DebuggerDisplay("""{Method()}""")] ... method Method (line 157) | private string Method() => ""; class Sample (line 160) | [DebuggerDisplay("{this.ExtensionMethod()}")] // C... class Base (line 175) | public class Base { } class Extensions (line 177) | static class Extensions method BaseExtensionMethod (line 179) | public static string BaseExtensionMethod(this Base b) => "Extension is... method extension (line 180) | extension(Base b) method ExtensionMethod (line 185) | public static string ExtensionMethod(this Sample s) => "Regular Extens... method extension (line 186) | extension(Sample s) method extension (line 192) | extension(string s) method extension (line 198) | extension(Exception e) method extension (line 205) | extension(StaticClass) method ExtensionMethod (line 228) | public static string ExtensionMethod(this BadSample s) => "Regular Ext... method extension (line 229) | extension(BadSample s) class StaticClass (line 212) | static class StaticClass { } class BadSample (line 217) | [DebuggerDisplay("{this.ExtensionMethod()}")] // Noncompliant ... class Extensions (line 226) | static class Extensions method BaseExtensionMethod (line 179) | public static string BaseExtensionMethod(this Base b) => "Extension is... method extension (line 180) | extension(Base b) method ExtensionMethod (line 185) | public static string ExtensionMethod(this Sample s) => "Regular Extens... method extension (line 186) | extension(Sample s) method extension (line 192) | extension(string s) method extension (line 198) | extension(Exception e) method extension (line 205) | extension(StaticClass) method ExtensionMethod (line 228) | public static string ExtensionMethod(this BadSample s) => "Regular Ext... method extension (line 229) | extension(BadSample s) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DebuggerDisplayUsesExistingMembers.cs class PropertiesAndFields (line 4) | class PropertiesAndFields type TopLevelEnum (line 69) | [DebuggerDisplay("{this.ToString()}")] // Compliant, valid when debu... class NestedTypes (line 75) | [DebuggerDisplay("{SomeProperty}")] class NestedClass (line 83) | [DebuggerDisplay("{ExistingProperty}")] type NestedStruct (line 93) | [DebuggerDisplay("{ExistingProperty}")] type NestedEnum (line 103) | [DebuggerDisplay("{42}")] class Delegates (line 109) | public class Delegates class Indexers (line 118) | public class Indexers class MultipleAttributes (line 129) | [DebuggerDisplay("{SomeProperty}"), DebuggerDisplay("{SomeField}"), Debu... class CaseSensitivity (line 151) | public class CaseSensitivity class NonAlphanumericChars (line 163) | public class NonAlphanumericChars class Whitespaces (line 172) | public class Whitespaces class NoQuotesModifier (line 185) | public class NoQuotesModifier class OtherModifier (line 198) | public class OtherModifier class OptionalAttributeParameter (line 210) | public class OptionalAttributeParameter class Inheritance (line 222) | public class Inheritance class BaseClass (line 224) | public class BaseClass class SubClass (line 229) | public class SubClass : BaseClass class AccessModifiers (line 236) | public class AccessModifiers class BaseClass (line 238) | public class BaseClass class SubClass (line 252) | public class SubClass : BaseClass class AttributeTargets (line 262) | public class AttributeTargets class InvalidAttributes (line 271) | public class InvalidAttributes class Test (line 281) | public class Test class Repo_Net575 (line 288) | public class Repo_Net575 class Multiline (line 301) | [DebuggerDisplay(@" class Recursion (line 314) | [DebuggerDisplay("{this.Recurse}")] method Method (line 332) | public Recursion Method() { return Recurse; } class VoidTest (line 335) | [DebuggerDisplay("{this.VoidMethod()}")] // Noncompliant method VoidMethod (line 339) | public void VoidMethod() { } class StaticClassTest (line 342) | [DebuggerDisplay("{StaticClass}")] ... class StaticClass (line 353) | public static class StaticClass method StaticMethod (line 357) | public static string StaticMethod() => "42"; class NestedStaticClassTest (line 360) | [DebuggerDisplay("{this.NestedStaticClass.StaticField}")] // Compl... class NestedStaticClass (line 367) | public static class NestedStaticClass method StaticMethod (line 371) | public static string StaticMethod() => "42"; class ImplicitMembers (line 375) | [DebuggerDisplay("{this..ctor")] // FN https://sonarsou... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DeclareEventHandlersCorrectly.cs class Foo (line 17) | public class Foo where TEventArgs : EventArgs class NamedType (line 44) | public class NamedType { } class Bar (line 47) | public class Bar class ProviderChangedEventArgs (line 61) | public class ProviderChangedEventArgs : EventArgs { } type ILocalizationProvider (line 65) | public interface ILocalizationProvider class BaseClass (line 71) | public abstract class BaseClass class Repro3453 (line 77) | public class Repro3453 : BaseClass, ILocalizationProvider class DisposableClass (line 101) | public class DisposableClass : IDisposable method Dispose (line 110) | public void Dispose() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DeclareTypesInNamespaces.FileScopedNamespace.cs class Foo (line 3) | class Foo { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DeclareTypesInNamespaces.Latest.cs type PositionalRecord (line 1) | record PositionalRecord(string FirstParam, string SecondParam); type RecordStruct (line 3) | record struct RecordStruct // Noncompliant type RecordClass (line 8) | record class RecordClass // Noncompliant type InterfaceWithInnerType (line 13) | interface InterfaceWithInnerType // Noncompliant type InnerInterface (line 15) | interface InnerInterface { } class Extensions (line 18) | static class Extensions // Noncompliant method extension (line 20) | extension(string s) { } type PositionalRecordInNamespace (line 25) | record PositionalRecordInNamespace(string FirstParam, string SecondParam); type RecordStructInNamespace (line 27) | record struct RecordStructInNamespace; type RecordClassInNamespace (line 29) | record class RecordClassInNamespace; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DeclareTypesInNamespaces.TopLevelStatements.Partial.cs class Program (line 2) | public partial class Program { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DeclareTypesInNamespaces.TopLevelStatements.cs class Program (line 3) | public partial class Program { } class Foo (line 5) | class Foo // Noncompliant {{Move 'Foo' into a named namespace.}} class InnerFoo (line 7) | class InnerFoo { } class Program (line 12) | class Program { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DeclareTypesInNamespaces.cs class Foo (line 4) | public class Foo // Noncompliant {{Move 'Foo' into a named namespace.}} class InnerFoo (line 6) | class InnerFoo // Compliant - we want to report only on the outer class type Bar (line 11) | public struct Bar // Noncompliant {{Move 'Bar' into a named namespace.}} type InnerBar (line 13) | struct InnerBar // Compliant - we want to report only on the outer struct type InnerEnu (line 17) | enum InnerEnu // Compliant - we want to report only on outer enum type Enu (line 22) | public enum Enu // Noncompliant {{Move 'Enu' into a named namespace.}} class Program (line 29) | class Program { } type MyStruct (line 31) | struct MyStruct { } type MyInt (line 33) | public interface MyInt { } type Enu (line 35) | public enum Enu FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DeclareTypesInNamespaces2.cs class Foo2 (line 4) | public class Foo2 // Noncompliant {{Move 'Foo2' into a named namespace.}} class InnerFoo (line 6) | class InnerFoo // Compliant - we want to report only on the outer class type Bar2 (line 11) | public struct Bar2 // Noncompliant {{Move 'Bar2' into a named namespace.}} type InnerBar (line 13) | struct InnerBar // Compliant - we want to report only on the outer struct type InnerEnu (line 17) | enum InnerEnu // Compliant - we want to report only on outer enum type Enu2 (line 22) | public enum Enu2 // Noncompliant {{Move 'Enu2' into a named namespace.}} class Program (line 29) | class Program { } type MyStruct (line 31) | struct MyStruct { } type MyInt (line 33) | public interface MyInt { } type Enu (line 35) | public enum Enu FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DefaultSectionShouldBeFirstOrLast.cs class Program (line 5) | public class Program method Foo (line 7) | public void Foo(int a) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DelegateSubtraction.Latest.cs class DelegateSubtraction (line 6) | public class DelegateSubtraction method Test (line 10) | private static void Test() type R (line 48) | record R class Repro_8467 (line 63) | class Repro_8467 method SwitchStatement (line 65) | void SwitchStatement(Action action) class PartialProperty (line 76) | public partial class PartialProperty method TestPartialProperties (line 83) | public void TestPartialProperties() class PartialProperty (line 101) | public partial class PartialProperty method TestPartialProperties (line 83) | public void TestPartialProperties() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DelegateSubtraction.cs class DelegateSubtraction (line 5) | public class DelegateSubtraction method Test (line 9) | private static void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposableMemberInNonDisposableClass.CSharp9.cs class ResourceHolder (line 8) | public class ResourceHolder // Noncompliant {{Implement 'IDisposable' ... method OpenResource (line 12) | public void OpenResource(string path) method CloseResource (line 16) | public void CloseResource() type RecordInit (line 22) | public record RecordInit type RecordConstruct (line 34) | public record RecordConstruct // Noncompliant {{Implement 'IDisposable' ... type RecordDispose (line 43) | public record RecordDispose : IDisposable class PartialMethod1 (line 56) | partial class PartialMethod1 : IDisposable method Dispose (line 59) | public partial void Dispose(); method MyDispose (line 60) | partial void MyDispose(); method Dispose (line 65) | public partial void Dispose() => MyDispose(); method MyDispose (line 66) | partial void MyDispose() => _disposable.Dispose(); class PartialMethod1 (line 63) | partial class PartialMethod1 method Dispose (line 59) | public partial void Dispose(); method MyDispose (line 60) | partial void MyDispose(); method Dispose (line 65) | public partial void Dispose() => MyDispose(); method MyDispose (line 66) | partial void MyDispose() => _disposable.Dispose(); class PartialMethod2 (line 69) | partial class PartialMethod2 // Noncompliant method Dispose (line 71) | public partial void Dispose(); method MyDispose (line 72) | partial void MyDispose(); method Dispose (line 78) | public partial void Dispose() => MyDispose(); method MyDispose (line 79) | partial void MyDispose() => _disposable.Dispose(); class PartialMethod2 (line 75) | partial class PartialMethod2 // Noncompliant method Dispose (line 71) | public partial void Dispose(); method MyDispose (line 72) | partial void MyDispose(); method Dispose (line 78) | public partial void Dispose() => MyDispose(); method MyDispose (line 79) | partial void MyDispose() => _disposable.Dispose(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposableMemberInNonDisposableClass.NetCore.cs class TestClass (line 5) | public class TestClass : IAsyncDisposable method MethodAsync (line 9) | public Task MethodAsync() method DisposeAsync (line 15) | public ValueTask DisposeAsync() class C1 (line 22) | public class C1 // Noncompliant, needs to implement IDisposable or IAsyn... method Init (line 26) | public void Init() => disposable = new AsyncDisposable(); class C2 (line 29) | public class C2 : IAsyncDisposable // Implements IAsyncDisposable method Init (line 33) | public void Init() => disposable = new AsyncDisposable(); method DisposeAsync (line 35) | public ValueTask DisposeAsync() => disposable.DisposeAsync(); class AsyncDisposable (line 38) | public class AsyncDisposable : IAsyncDisposable method DisposeAsync (line 40) | public ValueTask DisposeAsync() => new ValueTask(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposableMemberInNonDisposableClass.cs class ResourceHolder (line 9) | public class ResourceHolder // Noncompliant {{Implement 'IDisposable' ... method OpenResource (line 13) | public void OpenResource(string path) method CloseResource (line 17) | public void CloseResource() class ResourceHolder2 (line 23) | public class ResourceHolder2 : IDisposable method OpenResource (line 26) | public void OpenResource(string path) method CloseResource (line 30) | public void CloseResource() method Dispose (line 35) | public void Dispose() // FN, it does not dispose fs class ResourceHolder3 (line 40) | public abstract class ResourceHolder3 // Noncompliant method ResourceHolder3 (line 44) | protected ResourceHolder3(string path) method Dispose (line 49) | public virtual void Dispose() class ResourceHolder4 (line 54) | public class ResourceHolder4 : ResourceHolder3 // Compliant; it doesn't ... method ResourceHolder4 (line 56) | ResourceHolder4(string path) : base(path) { } method OpenResource (line 57) | public void OpenResource(string path) method CloseResource (line 61) | public void CloseResource() class ResourceHolder5 (line 67) | public class ResourceHolder5 : ResourceHolder2 //Compliant class ObserverVsOwner (line 71) | public class ObserverVsOwner // Noncompliant {{Implement 'IDisposable' i... method ObserverVsOwner (line 79) | public ObserverVsOwner(string path) class TestWithTasks (line 85) | public class TestWithTasks // Noncompliant {{Implement 'IDisposable' in ... class ExpressionBodied (line 92) | public class ExpressionBodied // Noncompliant {{Implement 'IDisposable' ... method ExpressionBodied (line 95) | ExpressionBodied(int i) => fs = new FileStream("eee", FileMode.Open); type IService (line 98) | public interface IService type DisposableStruct (line 103) | public ref struct DisposableStruct // Compliant - FN method OpenResource (line 107) | public void OpenResource(string path) class Repro_2957 (line 114) | public class Repro_2957 // Noncompliant {{Implement 'IDisposable' in thi... method Repro_2957 (line 118) | public Repro_2957() class DisposableStuff (line 123) | private sealed class DisposableStuff : IDisposable method Dispose (line 125) | public void Dispose() { } class PartialMethod1 (line 129) | partial class PartialMethod1 : IDisposable method Dispose (line 132) | public void Dispose() method MyDispose (line 136) | partial void MyDispose(); method MyDispose (line 141) | partial void MyDispose() class PartialMethod1 (line 139) | partial class PartialMethod1 : IDisposable method Dispose (line 132) | public void Dispose() method MyDispose (line 136) | partial void MyDispose(); method MyDispose (line 141) | partial void MyDispose() class PartialMethod2 (line 147) | partial class PartialMethod2 // Noncompliant method Dispose (line 150) | public void Dispose() method MyDispose (line 154) | partial void MyDispose(); method MyDispose (line 159) | partial void MyDispose() class PartialMethod2 (line 157) | partial class PartialMethod2 // Noncompliant method Dispose (line 150) | public void Dispose() method MyDispose (line 154) | partial void MyDispose(); method MyDispose (line 159) | partial void MyDispose() class PartialMethod3 (line 165) | partial class PartialMethod3 : IDisposable method Dispose (line 168) | public void Dispose() method MyDispose (line 172) | partial void MyDispose(); method MyDispose (line 177) | partial void MyDispose() class PartialMethod3 (line 175) | partial class PartialMethod3 method Dispose (line 168) | public void Dispose() method MyDispose (line 172) | partial void MyDispose(); method MyDispose (line 177) | partial void MyDispose() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposableNotDisposed.ILogger.cs class DisposableNotDisposed_ILogger (line 4) | public class DisposableNotDisposed_ILogger method ILoggerTests (line 6) | public void ILoggerTests(ILogger logger) method ILoggerTCategoryNameTests (line 16) | public void ILoggerTCategoryNameTests(ILogger field_fs6.DisposeAs... class ImplementsAsyncDisposable (line 101) | public sealed class ImplementsAsyncDisposable : IAsyncDisposable method ImplementsAsyncDisposable (line 105) | public ImplementsAsyncDisposable() method DisposeAsync (line 110) | public async ValueTask DisposeAsync() class AsyncDisposableTest (line 116) | public class AsyncDisposableTest class FluentAssertionsTest (line 121) | public class FluentAssertionsTest method FluentAssertionTypes (line 123) | public void FluentAssertionTypes() type Struct (line 135) | public ref struct Struct method Dispose (line 137) | public void Dispose() class Consumer (line 142) | public class Consumer method Method (line 144) | public void Method() class Foo (line 151) | class Foo method Bar (line 153) | public void Bar(object cond) method Lambdas (line 166) | public void Lambdas() type MyRecord (line 185) | record MyRecord class DisposableNotDisposed (line 232) | public class DisposableNotDisposed type InnerStruct (line 234) | private struct InnerStruct method InnerStruct (line 236) | public InnerStruct() { } class FieldKeyWord (line 242) | class FieldKeyWord FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposableNotDisposed.cs class DisposableNotDisposed (line 9) | public class DisposableNotDisposed class InnerClass (line 25) | private class InnerClass method Return (line 30) | private FileStream Return() method DisposableNotDisposed (line 36) | public DisposableNotDisposed() : this(field_fs10) // Error [CS0120] method DisposableNotDisposed (line 40) | public DisposableNotDisposed(FileStream fs) method Conditions (line 120) | private void Conditions(bool cond, string x) method NoOperation (line 129) | private void NoOperation(FileStream fs) class Empty (line 135) | public class Empty class ImplementsDisposable (line 139) | public sealed class ImplementsDisposable : IDisposable method ImplementsDisposable (line 143) | public ImplementsDisposable() method Dispose (line 148) | public void Dispose() class DisposableTest (line 154) | public class DisposableTest class Repro_8365 (line 160) | class Repro_8365 method NotDisposed (line 162) | void NotDisposed(string filePath) method Disposed (line 167) | void Disposed(string filePath) class Repro_8336_1 (line 174) | public class Repro_8336_1 : IDisposable method Repro_8336_1 (line 178) | public Repro_8336_1() => method Dispose (line 181) | public void Dispose() => class Repro_8336_2 (line 185) | public class Repro_8336_2 : IDisposable method Repro_8336_2 (line 189) | public Repro_8336_2() => method Dispose (line 192) | public void Dispose() class Repro_ExplicitIDisposableCast (line 199) | public class Repro_ExplicitIDisposableCast : IDisposable method Repro_ExplicitIDisposableCast (line 203) | public Repro_ExplicitIDisposableCast() => method Dispose (line 206) | public void Dispose() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposableReturnedFromUsing.Latest.cs type R (line 6) | record R class DisposableReturnedFromUsing (line 18) | public class DisposableReturnedFromUsing method Method (line 20) | public FileStream Method(string path) method MethodSingleNoncompliantVariables (line 30) | public FileStream MethodSingleNoncompliantVariables(string path) method MethodMultipleNoncompliantVariables (line 40) | public FileStream MethodMultipleNoncompliantVariables(string path) method MethodWithSwitch (line 50) | public FileStream MethodWithSwitch(string x) type Struct (line 61) | public ref struct Struct method Dispose (line 63) | public void Dispose() method Foo (line 68) | public Struct Foo() method Bar (line 76) | public Struct Bar() method FooBar (line 83) | public Struct FooBar() method BarFoo (line 90) | public Struct BarFoo() class ConditionalAssignment (line 98) | class ConditionalAssignment method Method (line 102) | FileStream Method(ConditionalAssignment x) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposableReturnedFromUsing.cs class DisposableReturnedFromUsing (line 8) | public class DisposableReturnedFromUsing method WriteToFile (line 12) | public FileStream WriteToFile(string path, string text) method WriteToFile2 (line 24) | public FileStream WriteToFile2(string path, string text) method WriteToFile3 (line 34) | public FileStream WriteToFile3(string path, string text) method WriteToFile4 (line 42) | public void WriteToFile4(string path, string text) method Method (line 57) | FileStream Method(DisposableReturnedFromUsing x) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposableTypesNeedFinalizers.CSharp11.cs type Foo (line 4) | public record Foo : IDisposable // Noncompliant {{Implement a finalizer ... type Bar (line 17) | public record Bar : IDisposable // Compliant type RecordWithParamsNoFinalizer (line 35) | public record RecordWithParamsNoFinalizer(string X) : IDisposable // Non... type RecordWithParamsWithFinalizer (line 48) | public record RecordWithParamsWithFinalizer(string X) : IDisposable // C... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposableTypesNeedFinalizers.CSharp9.cs type Foo (line 4) | public record Foo : IDisposable // Noncompliant {{Implement a finalizer ... type Bar (line 17) | public record Bar : IDisposable // Compliant type RecordWithParamsNoFinalizer (line 35) | public record RecordWithParamsNoFinalizer(string X) : IDisposable // Non... type RecordWithParamsWithFinalizer (line 48) | public record RecordWithParamsWithFinalizer(string X) : IDisposable // C... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposableTypesNeedFinalizers.cs class Foo (line 8) | public class Foo : IDisposable // Noncompliant {{Implement a finalizer t... method Dispose (line 14) | protected virtual void Dispose(bool disposing) method Dispose (line 30) | public void Dispose() class Foo_Compliant (line 35) | public class Foo_Compliant : IDisposable // Error [CS0535] method Dispose (line 40) | protected virtual void Dispose(bool disposing) { } class Foo_01 (line 50) | public class Foo_01 : IDisposable // Noncompliant class Foo_02 (line 56) | public class Foo_02 : IDisposable // Noncompliant class Foo_03 (line 62) | public class Foo_03 : IDisposable // Noncompliant class Foo_04 (line 67) | public class Foo_04 : IDisposable // Noncompliant method Dispose (line 71) | public void Dispose() {} class Foo_06 (line 74) | public class Foo_06 : IDisposable // Error [CS0535] class Foo_07 (line 79) | public class Foo_07 FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposeFromDispose.CSharp10.cs type R1 (line 12) | record struct R1 : IDisposable type R2 (line 22) | record struct R2 : IDisposable type PositionalRecordStruct (line 32) | public record struct PositionalRecordStruct(FileStream fs) : IDisposable FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposeFromDispose.CSharp7_2.cs type ReadonlyDisposableRefStruct (line 8) | public readonly ref struct ReadonlyDisposableRefStruct method ReadonlyDisposableRefStruct (line 12) | public ReadonlyDisposableRefStruct(string path) method CloseResource (line 17) | public void CloseResource() method CleanUp (line 22) | public void CleanUp() method Dispose (line 27) | public void Dispose() type DisposableRefStruct (line 32) | public ref struct DisposableRefStruct method OpenResource (line 36) | public void OpenResource(string path) method CloseResource (line 41) | public void CloseResource() method CleanUp (line 46) | public void CleanUp() method Dispose (line 51) | public void Dispose() class OuterClass (line 56) | public class OuterClass : IDisposable class InnerClass (line 60) | class InnerClass : IDisposable method M (line 62) | public void M(OuterClass outter) method Dispose (line 67) | public void Dispose() { } method Dispose (line 70) | public void Dispose() { } class BaseClass (line 73) | public class BaseClass : IDisposable method Dispose (line 77) | public void Dispose() { } class Derived (line 81) | public class Derived : BaseClass, IDisposable method Cleanup (line 83) | public void Cleanup() => stream.Dispose(); class Conditional (line 86) | public class Conditional: IDisposable method MemberBinding (line 90) | private void MemberBinding() method ThisMemberBinding (line 95) | private void ThisMemberBinding() method ThisAndMemberBinding (line 100) | private void ThisAndMemberBinding() method Ternary (line 105) | private void Ternary() method InvocationWithoutName (line 110) | private void InvocationWithoutName() method Dispose (line 116) | public void Dispose() { } class DisposedInDispose (line 119) | public class DisposedInDispose: IDisposable method Cleanup (line 123) | public void Cleanup() => fs.Dispose(); method Dispose (line 124) | public void Dispose() => fs.Dispose(); class DisposedInImplicitDispose (line 127) | public class DisposedInImplicitDispose : IDisposable method Cleanup (line 131) | public void Cleanup() => fs.Dispose(); method Dispose (line 132) | void IDisposable.Dispose() => fs.Dispose(); class OtherDisposedInDispose (line 135) | public class OtherDisposedInDispose : IDisposable method Cleanup (line 140) | public void Cleanup() => fs1.Dispose(); method Dispose (line 141) | public void Dispose() => fs2.Dispose(); class NotIDisposeDisposeInDispose (line 144) | public class NotIDisposeDisposeInDispose : IDisposable method Dispose (line 147) | public void Dispose(bool someParam) { } method Cleanup (line 148) | public void Cleanup() => d.Dispose(); method Dispose (line 149) | public void Dispose() => d.Dispose(true); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposeFromDispose.CSharp8.cs class ResourceHolder (line 7) | public class ResourceHolder : IDisposable method OpenResource (line 10) | public void OpenResource(string path) method CloseResource (line 14) | public void CloseResource() method CleanUp (line 19) | public void CleanUp() method Dispose (line 25) | public void Dispose() class NonDisposable (line 30) | public class NonDisposable method OpenResource (line 33) | public void OpenResource(string path) method CleanUp (line 38) | public void CleanUp() class ResourceHolder2 (line 44) | public class ResourceHolder2 : IDisposable method OpenResource (line 47) | public void OpenResource(string path) method CloseResource (line 51) | public void CloseResource() method CloseResource2 (line 58) | public void CloseResource2() method Dispose (line 66) | public void Dispose() class Class (line 74) | public class Class : IDisposable method Class (line 78) | public Class() method Dispose (line 83) | void IDisposable.Dispose() type DisposableRefStruct (line 89) | public ref struct DisposableRefStruct method OpenResource (line 93) | public void OpenResource(string path) method CloseResource (line 98) | public void CloseResource() method CleanUp (line 103) | public void CleanUp() method Dispose (line 108) | public void Dispose() type ReadonlyDisposableRefStruct (line 113) | public readonly ref struct ReadonlyDisposableRefStruct method ReadonlyDisposableRefStruct (line 117) | public ReadonlyDisposableRefStruct(string path) method CloseResource (line 122) | public void CloseResource() method CleanUp (line 127) | public void CleanUp() method Dispose (line 132) | public void Dispose() type FakeDisposableRefStruct (line 137) | public ref struct FakeDisposableRefStruct method OpenResource (line 141) | public void OpenResource(string path) method CloseResource (line 146) | public void CloseResource() method CleanUp (line 151) | public void CleanUp() method Dispose (line 156) | private void Dispose() type DisposableStruct (line 161) | public struct DisposableStruct : IDisposable method OpenResource (line 164) | public void OpenResource(string path) method CloseResource (line 168) | public void CloseResource() method CleanUp (line 173) | public void CleanUp() method Dispose (line 178) | public void Dispose() type DisposableStructCorrect (line 184) | public struct DisposableStructCorrect : IDisposable method OpenResource (line 187) | public void OpenResource(string path) method CloseResource (line 191) | public void CloseResource() method Dispose (line 196) | public void Dispose() type MyTestDisposableRefStruct (line 202) | public ref struct MyTestDisposableRefStruct method Dispose (line 204) | public void Dispose() type RefStructResourceHolder (line 209) | public ref struct RefStructResourceHolder method OpenResource (line 215) | public void OpenResource(string path) method CleanUp (line 220) | public void CleanUp() method Dispose (line 225) | public void Dispose() type NotDisposableRefStruct (line 231) | public ref struct NotDisposableRefStruct method Dispose (line 233) | public void Dispose(bool shouldDispose) method Dispose (line 236) | public string Dispose() type NotDisposableRefStructHolder1 (line 242) | public ref struct NotDisposableRefStructHolder1 method OpenResource (line 246) | public void OpenResource(string path) method CleanUp (line 251) | public void CleanUp() method Dispose (line 255) | public void Dispose() type NotDisposableRefStructHolder2 (line 260) | public ref struct NotDisposableRefStructHolder2 method OpenResource (line 264) | public void OpenResource(string path) method CleanUp (line 269) | public void CleanUp() method Dispose (line 273) | public void Dispose() type AnotherDisposableRefStruct (line 280) | public ref struct AnotherDisposableRefStruct method Dispose (line 282) | public void Dispose() { } method Dispose (line 283) | public void Dispose(bool x) { } method Dispose (line 284) | public void Dispose() { } method AnotherMethod (line 285) | public void AnotherMethod() { } type AnotherDisposableRefStructHolder1 (line 288) | public ref struct AnotherDisposableRefStructHolder1 method Cleanup (line 292) | public void Cleanup() method Dispose (line 297) | public void Dispose() type AnotherDisposableRefStructHolder2 (line 303) | public ref struct AnotherDisposableRefStructHolder2 method Cleanup (line 307) | public void Cleanup() method Dispose (line 312) | public void Dispose() type AnotherDisposableRefStructHolder3 (line 317) | public ref struct AnotherDisposableRefStructHolder3 method Cleanup (line 321) | public void Cleanup() method Dispose (line 326) | public void Dispose() type AnotherDisposableRefStructHolder4 (line 331) | public ref struct AnotherDisposableRefStructHolder4 method Cleanup (line 335) | public void Cleanup() method Dispose (line 340) | public void Dispose() class NullSupression (line 345) | public class NullSupression: IDisposable method NullSupressionOperator (line 349) | private void NullSupressionOperator() method NullSupressionAndNullCoalescing (line 354) | private void NullSupressionAndNullCoalescing() method ThisNullSupressionAndNullCoalescing (line 359) | private void ThisNullSupressionAndNullCoalescing() method Dispose (line 364) | public void Dispose() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposeFromDispose.CSharp9.Part1.cs type R1 (line 12) | record R1 : IDisposable type R2 (line 23) | record R2 : IDisposable class ResourceHolder (line 58) | public partial class ResourceHolder : IDisposable method CleanUp (line 60) | public partial void CleanUp() => method Dispose (line 63) | public partial void Dispose() => class ResourceHolder2 (line 67) | public partial class ResourceHolder2 : IDisposable method CleanUp (line 69) | public void CleanUp() => class ResourceHolder3 (line 73) | public partial class ResourceHolder3 : IDisposable method CleanUp (line 75) | public partial void CleanUp() => method Dispose (line 78) | public partial void Dispose(); class ResourceHolder4 (line 81) | public partial class ResourceHolder4 : IDisposable method CleanUp (line 83) | public void CleanUp() => method Dispose (line 86) | public partial void Dispose(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposeFromDispose.CSharp9.Part2.cs class ResourceHolder (line 4) | public partial class ResourceHolder : IDisposable method CleanUp (line 8) | public partial void CleanUp(); method Dispose (line 10) | public partial void Dispose(); class ResourceHolder2 (line 13) | public partial class ResourceHolder2 : IDisposable method Dispose (line 17) | public void Dispose() => class ResourceHolder3 (line 21) | public partial class ResourceHolder3 : IDisposable method CleanUp (line 25) | public partial void CleanUp(); method Dispose (line 27) | public partial void Dispose() => class ResourceHolder4 (line 31) | public partial class ResourceHolder4 : IDisposable method Dispose (line 35) | public partial void Dispose() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposeNotImplementingDispose.Latest.Partial.cs type MyPartial3 (line 1) | public partial record MyPartial3 FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposeNotImplementingDispose.Latest.cs type RefStruct (line 5) | public ref struct RefStruct method Dispose (line 7) | public void Dispose() // ok type R (line 12) | public record R type GarbageDisposalExceptionBase (line 17) | public record GarbageDisposalExceptionBase : IDisposable type MyPartial (line 30) | public partial record MyPartial type MyPartial (line 35) | public partial record MyPartial type MyPartial2 (line 40) | public partial record MyPartial2 : IDisposable type MyPartial2 (line 45) | public partial record MyPartial2 : IDisposable type MyPartial3 (line 50) | public partial record MyPartial3 type Struct (line 65) | public record struct Struct type DisposableStruct (line 72) | public struct DisposableStruct : IDisposable method DisposableStruct (line 74) | public DisposableStruct() { } method Dispose (line 75) | public void Dispose() { } type PositionalRecordStruct (line 78) | public record struct PositionalRecordStruct(string Value) type DisposablePositionalRecordStruct (line 85) | public record struct DisposablePositionalRecordStruct(string Value) : ID... type IStaticAbstractMethod (line 90) | public interface IStaticAbstractMethod method Dispose (line 92) | static abstract void Dispose(); type IStaticVirtualMethod (line 95) | public interface IStaticVirtualMethod method Dispose (line 97) | static virtual void Dispose() { } class Sample (line 100) | class Sample { } class Extensions (line 102) | static class Extensions method extension (line 104) | extension(Sample s) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DisposeNotImplementingDispose.cs type IMine (line 7) | public interface IMine method Dispose (line 9) | void Dispose(); type IMine2 (line 13) | public interface IMine2 : IDisposable method Dispose (line 15) | void Dispose(); class Mine0 (line 18) | public class Mine0 : IDisposable method Dispose (line 20) | public void Dispose() { } class Mine1 (line 23) | public class Mine1 : IMine method Dispose (line 25) | public void Dispose() { } class Mine2 (line 27) | public class Mine2 : IMine2 method Dispose (line 29) | public void Dispose() { } class Mine3 (line 32) | public class Mine3 : ISomeUnknown // Error [CS0246] - unknown type method Dispose (line 34) | public void Dispose() { } class Mine4 (line 37) | public class Mine4 : ISomeUnknown, ISomeUnknown2 // Error [CS0246,CS0246... method Dispose (line 39) | public void Dispose() { } class GarbageDisposal (line 42) | public class GarbageDisposal method Dispose (line 44) | private int Dispose() // Noncompliant method Dummy (line 50) | private void Dummy() class GarbageDisposalExceptionBase (line 55) | public class GarbageDisposalExceptionBase : IDisposable method Dispose (line 57) | protected virtual void Dispose(bool disposing) method Dispose (line 61) | public void Dispose() class GarbageDisposalException (line 68) | public class GarbageDisposalException : GarbageDisposalExceptionBase method Dispose (line 70) | protected override void Dispose(bool disposing) class NoRealDisposalDone (line 76) | public class NoRealDisposalDone : IDisposable method Dummy (line 78) | private void Dummy() { } method Dispose (line 80) | public void Dispose() class GarbageDisposalException2 (line 87) | public class GarbageDisposalException2 : SomeUnknownType // Error [CS024... method Dispose (line 89) | protected override void Dispose(bool disposing) class MyStream (line 95) | public class MyStream : Stream method Flush (line 103) | public override void Flush() method Read (line 108) | public override int Read(byte[] buffer, int offset, int count) method Seek (line 113) | public override long Seek(long offset, SeekOrigin origin) method SetLength (line 118) | public override void SetLength(long value) method Write (line 123) | public override void Write(byte[] buffer, int offset, int count) method Dispose (line 128) | protected override void Dispose(bool disposing) class MyPartial (line 134) | public partial class MyPartial method Dispose (line 140) | void Dispose() { } class MyPartial (line 138) | public partial class MyPartial method Dispose (line 140) | void Dispose() { } type Struct (line 143) | public struct Struct method Dispose (line 145) | public void Dispose() // Noncompliant {{Either implement 'IDisposable.... type DisposableStruct (line 150) | public struct DisposableStruct : IDisposable method Dispose (line 152) | public void Dispose() class DisposableExtensions (line 161) | public static class DisposableExtensions method Dispose (line 163) | public static void Dispose(this Lazy lazy) // Compliant class Parent (line 177) | public class Parent : IDisposable method Dispose (line 179) | public virtual void Dispose() class Child (line 185) | public class Child : Parent method Dispose (line 187) | public override void Dispose() method Dispose (line 193) | protected virtual void Dispose(bool flag) // Noncompliant FP, if the ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCallAssemblyGetExecutingAssembly.CSharp9.cs type R (line 8) | record R FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCallAssemblyGetExecutingAssembly.cs class Program (line 6) | class Program method Main (line 8) | public static void Main() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCallAssemblyLoadInvalidMethods.CSharp9.cs type R (line 16) | record R FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCallAssemblyLoadInvalidMethods.Evidence.cs class Program (line 8) | public class Program method Load (line 10) | void Load() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCallAssemblyLoadInvalidMethods.cs class Program (line 8) | public class Program method AssemblyLoadFrom (line 10) | void AssemblyLoadFrom() method AssemblyLoadFile (line 18) | void AssemblyLoadFile() method AssemblyLoadWithPartialName (line 25) | void AssemblyLoadWithPartialName() class NET2099 (line 40) | public class NET2099 method OnAssemblyResolve (line 42) | private static Assembly OnAssemblyResolve(object sender, ResolveEventA... method OnTypeResolve (line 47) | private static Assembly OnTypeResolve(object sender, ResolveEventArgs ... method OnResourceResolve (line 52) | private static Assembly OnResourceResolve(object sender, ResolveEventA... method OnReflectionOnlyAssemblyResolve (line 57) | private static Assembly OnReflectionOnlyAssemblyResolve(object sender,... method Main (line 62) | static void Main() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCallExitMethods.CSharp9.cs type R (line 12) | record R FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCallExitMethods.cs class Program (line 7) | class Program method Foo (line 9) | public void Foo() method Bar (line 31) | public static void Bar() class MyProgram (line 44) | class MyProgram method Main (line 46) | public static void Main() class MyProgram1 (line 61) | class MyProgram1 method Main (line 63) | public static async Task Main(string[] args) class MyProgram2 (line 71) | class MyProgram2 method Main (line 73) | public static int Main(string[] args) class Application (line 81) | static class Application method Exit (line 83) | public static void Exit() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCallGCCollectMethod.Latest.cs type R (line 7) | record R FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCallGCCollectMethod.cs class Program (line 7) | class Program method Foo (line 9) | void Foo() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCallGCCollectMethodAD0001.cs class GC (line 4) | public class GC method GetTotalMemory (line 6) | long GetTotalMemory(); method Foo (line 8) | void Foo() => FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCallGCSuppressFinalize.Net5.cs type R1 (line 5) | record R1 : IAsyncDisposable type R2 (line 18) | record R2 : IDisposable FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCallGCSuppressFinalize.NetCore.cs class Implicit (line 7) | public class Implicit : IAsyncDisposable method Method (line 9) | public void Method() method DisposeAsync (line 14) | public async ValueTask DisposeAsync() method DisposeAsyncCore (line 21) | protected virtual ValueTask DisposeAsyncCore() => default; class Explicit (line 24) | public class Explicit : IAsyncDisposable method Method (line 26) | public void Method() method DisposeAsync (line 31) | async ValueTask IAsyncDisposable.DisposeAsync() method DisposeAsyncCore (line 38) | protected virtual ValueTask DisposeAsyncCore() => default; class FakeA (line 41) | public class FakeA method DisposeAsync (line 43) | public async ValueTask DisposeAsync() method DisposeAsync (line 50) | public async ValueTask DisposeAsync(bool argument) method DisposeAsyncCore (line 57) | protected virtual ValueTask DisposeAsyncCore() => default; class FakeB (line 60) | public class FakeB method DisposeAsync (line 62) | public async void DisposeAsync() method DisposeAsyncCore (line 69) | protected virtual ValueTask DisposeAsyncCore() => default; class FakeInterface (line 72) | public class FakeInterface : IFake method DisposeAsync (line 74) | public async ValueTask DisposeAsync() method DisposeAsyncCore (line 81) | protected virtual ValueTask DisposeAsyncCore() => default; type IFake (line 84) | public interface IFake method DisposeAsync (line 86) | ValueTask DisposeAsync(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCallGCSuppressFinalize.cs class FooNotIDisposable (line 5) | class FooNotIDisposable method Foo (line 9) | void Foo() class FooDisposable (line 16) | class FooDisposable : IDisposable method Foo (line 18) | void Foo() method Dispose (line 23) | public void Dispose() method Dispose (line 29) | protected virtual void Dispose(bool disposing) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCatchNullReferenceException.CSharp9.cs type R (line 30) | record R FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCatchNullReferenceException.cs class Program (line 5) | class Program method Foo (line 7) | int Foo(string s) method Bar (line 20) | void Bar(Action doSomething, Action logException) method FooBar (line 33) | int FooBar(string s) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCatchSystemException.CSharp9.cs type R (line 30) | record R FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCatchSystemException.cs class DummyType (line 6) | public class DummyType : Exception { } class Program (line 8) | class Program method Method (line 10) | public void Method() method Method (line 98) | [FunctionName("Sample")] class Program (line 96) | class Program method Method (line 10) | public void Method() method Method (line 98) | [FunctionName("Sample")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCheckZeroSizeCollection.Latest.cs type R (line 147) | record R class CSharp13 (line 168) | class CSharp13 method NewCollectionTypes (line 170) | void NewCollectionTypes(OrderedDictionary orderedDictionary,... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCheckZeroSizeCollection.cs class FooProperty (line 7) | class FooProperty class FooMethod (line 16) | class FooMethod method Count (line 18) | public int Count() => 0; class DummyHolder (line 21) | class DummyHolder method GetEnumerable (line 24) | public List GetEnumerable() { return null; } method GetArray (line 27) | public string[] GetArray() { return null; } method GetHolder (line 30) | public DummyHolder GetHolder() { return null; } class Program (line 33) | class Program method TestCountMethod (line 39) | public void TestCountMethod() method TestComplexAccess (line 81) | public void TestComplexAccess() method TestCountProperty (line 95) | public void TestCountProperty() method TestLengthProperty (line 105) | public void TestLengthProperty() method TestInterfacesAndReadonlyCollections (line 121) | private void TestInterfacesAndReadonlyCollections(IList list, ICo... class OnString (line 139) | class OnString method LengthWithoutMeaning (line 141) | static bool LengthWithoutMeaning(string str) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCopyArraysInProperties.Latest.cs type R (line 6) | record R class TestCase (line 29) | class TestCase class CSharp13Enumerables (line 63) | class CSharp13Enumerables class PartialProperty (line 90) | public partial class PartialProperty method CloneInMethod (line 153) | public string[] CloneInMethod() class PartialProperty (line 105) | public partial class PartialProperty method CloneInMethod (line 153) | public string[] CloneInMethod() class Extensions (line 160) | static class Extensions method extension (line 162) | extension(Extensions) class FieldKeyword (line 168) | class FieldKeyword class NullCoalesceAssignment (line 177) | class NullCoalesceAssignment class DictionaryTypes (line 196) | class DictionaryTypes FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotCopyArraysInProperties.cs class NotCompliantCases (line 8) | class NotCompliantCases class CompliantCases (line 63) | class CompliantCases method CloneInMethod (line 110) | public string[] CloneInMethod() method NewCollectionInMethod (line 115) | public List NewCollectionInMethod() class Parent (line 145) | class Parent method Parent (line 148) | public Parent(string[] children) => this.children = children; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotDecreaseMemberVisibility.Concurrent.cs class A (line 6) | class A method Method_01 (line 8) | public void Method_01(int count) { } method Method_02 (line 10) | public void Method_02(int count) { } method Method_03 (line 12) | public void Method_03(int count) { } method Method_04 (line 14) | protected void Method_04(int count) { } method Method_05 (line 16) | public void Method_05(int count, string foo, params object[] args) { } method Method_06 (line 18) | public void Method_06(T count) { } method Method_07 (line 20) | public virtual void Method_07(int count) { } method Method_08 (line 22) | public virtual void Method_08(int count) { } method Method_09 (line 24) | public void Method_09(int count) { } method Method_11 (line 28) | public void Method_11(int count) { } method Method_12 (line 30) | public void Method_12(T obj, V obj2) { } method Method_13 (line 32) | public void Method_13(T obj, IEnumerable obj2) { } method Method_14 (line 34) | public void Method_14(int count) { } method Method_15 (line 36) | public void Method_15(out int count) { count = 2; } method Method_16 (line 38) | public void Method_16(ref int count) { } method Method_17 (line 40) | public virtual void Method_17(int count) { } class B (line 64) | class B : A class C (line 68) | class C : B method Method_01 (line 70) | private void Method_01(int count) { } method Method_02 (line 73) | protected void Method_02(int count) { } method Method_03 (line 75) | void Method_03(int count) { } method Method_04 (line 77) | private void Method_04(int count) { } method Method_05 (line 79) | private void Method_05(int something, string something2, params object... method Method_06 (line 81) | private void Method_06(T count) { } method Method_07 (line 84) | private virtual void Method_07(int count) { } method Method_08 (line 87) | private override void Method_08(int count) { } method Method_09 (line 89) | private new void Method_09(int count) { } method Method_10 (line 91) | private void Method_10(int count) { } method Method_11 (line 93) | private void Method_11(int count) { } method Method_12 (line 95) | private void Method_12(T obj, V obj2) { } method Method_13 (line 97) | private void Method_13(T obj, IEnumerable obj2) { } method Method_14 (line 99) | private void Method_14(int count) { } method Method_15 (line 101) | private void Method_15(int count) { } method Method_16 (line 103) | private void Method_16(out int count) { count = 2; } method Method_17 (line 106) | private override void Method_17(int count) { } class Foo (line 134) | class Foo method Method_01 (line 136) | public void Method_01(int count) { } class Bar (line 139) | sealed class Bar : Foo method Method_01 (line 141) | private void Method_01(int count) { } class Class1 (line 147) | public class Class1 method SomeMethod (line 149) | internal void SomeMethod(string s) { } class Class2 (line 152) | public class Class2 : Class1 method SomeMethod (line 154) | private void SomeMethod(string s) { } class Class3 (line 160) | public class Class3 : AppendedNamespaceForConcurrencyTest.OtherNamespace... method SomeMethod (line 162) | private void SomeMethod(string s) { } class BaseClass (line 168) | public class BaseClass class DescendantClass (line 177) | public class DescendantClass : BaseClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotDecreaseMemberVisibility.Latest.Partial.cs class DescendantClass (line 6) | public partial class DescendantClass : BaseClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotDecreaseMemberVisibility.Latest.cs type IMyInterface (line 6) | public interface IMyInterface method MyMethod (line 8) | public static virtual void MyMethod() { } type IMyOtherInterface (line 11) | public interface IMyOtherInterface : IMyInterface method MyMethod (line 13) | private static void MyMethod() { } class MyClass (line 16) | public class MyClass where T : IMyOtherInterface method MyClass (line 18) | public MyClass(IMyOtherInterface other) type A (line 24) | record A type B (line 84) | record B : A type C (line 88) | record C : B type Foo (line 155) | record Foo type Bar (line 160) | sealed record Bar : Foo type FooBase (line 168) | record FooBase(string X) type Foo (line 173) | record Foo(string X) : FooBase(X) type Class1 (line 181) | public record Class1 type Class2 (line 186) | public record Class2 : Class1 type Class3 (line 194) | public record Class3 : OtherNamespace.Class1 type BaseClass (line 202) | public record BaseClass type DescendantClass (line 211) | public record DescendantClass : BaseClass class BaseClass (line 222) | public class BaseClass class DescendantClass (line 232) | public partial class DescendantClass : BaseClass class AnotherClass (line 243) | public class AnotherClass : BaseClass type IFoo (line 254) | public interface IFoo method SomeMethod (line 256) | public void SomeMethod(int count) { } type IBar (line 259) | public interface IBar : IFoo method SomeMethod (line 261) | private void SomeMethod(int count) { } class Consumer (line 264) | public class Consumer method Consumer (line 266) | public Consumer(IBar bar) class Base (line 275) | class Base method SomeMethod (line 277) | public void SomeMethod(int count) { } class Derived (line 279) | class Derived : Base { } class Extensions (line 281) | static class Extensions method extension (line 283) | extension(Derived d) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotDecreaseMemberVisibility.cs class A (line 6) | class A method Method_01 (line 8) | public void Method_01(int count) { } method Method_02 (line 10) | public void Method_02(int count) { } method Method_03 (line 12) | public void Method_03(int count) { } method Method_04 (line 14) | protected void Method_04(int count) { } method Method_05 (line 16) | public void Method_05(int count, string foo, params object[] args) { } method Method_06 (line 18) | public void Method_06(T count) { } method Method_07 (line 20) | public virtual void Method_07(int count) { } method Method_08 (line 22) | public virtual void Method_08(int count) { } method Method_09 (line 24) | public void Method_09(int count) { } method Method_11 (line 28) | public void Method_11(int count) { } method Method_12 (line 30) | public void Method_12(T obj, V obj2) { } method Method_13 (line 32) | public void Method_13(T obj, IEnumerable obj2) { } method Method_14 (line 34) | public void Method_14(int count) { } method Method_15 (line 36) | public void Method_15(out int count) { count = 2; } method Method_16 (line 38) | public void Method_16(ref int count) { } method Method_17 (line 40) | public virtual void Method_17(int count) { } class B (line 64) | class B : A class C (line 68) | class C : B method Method_01 (line 70) | private void Method_01(int count) { } method Method_02 (line 73) | protected void Method_02(int count) { } method Method_03 (line 75) | void Method_03(int count) { } method Method_04 (line 77) | private void Method_04(int count) { } method Method_05 (line 79) | private void Method_05(int something, string something2, params object... method Method_06 (line 81) | private void Method_06(T count) { } method Method_07 (line 84) | private virtual void Method_07(int count) { } method Method_08 (line 87) | private override void Method_08(int count) { } method Method_09 (line 89) | private new void Method_09(int count) { } method Method_10 (line 91) | private void Method_10(int count) { } method Method_11 (line 93) | private void Method_11(int count) { } method Method_12 (line 95) | private void Method_12(T obj, V obj2) { } method Method_13 (line 97) | private void Method_13(T obj, IEnumerable obj2) { } method Method_14 (line 99) | private void Method_14(int count) { } method Method_15 (line 101) | private void Method_15(int count) { } method Method_16 (line 103) | private void Method_16(out int count) { count = 2; } method Method_17 (line 106) | private override void Method_17(int count) { } class Foo (line 134) | class Foo method Method_01 (line 136) | public void Method_01(int count) { } class Bar (line 139) | sealed class Bar : Foo method Method_01 (line 141) | private void Method_01(int count) { } class Class1 (line 147) | public class Class1 method SomeMethod (line 149) | internal void SomeMethod(string s) { } class Class2 (line 152) | public class Class2 : Class1 method SomeMethod (line 154) | private void SomeMethod(string s) { } class Class3 (line 160) | public class Class3 : OtherNamespace.Class1 method SomeMethod (line 162) | private void SomeMethod(string s) { } class BaseClass (line 168) | public class BaseClass method DoSomething (line 191) | protected virtual void DoSomething(IEnumerable numbers) { } class DescendantClass (line 177) | public class DescendantClass : BaseClass class BaseClass (line 189) | public class BaseClass method DoSomething (line 191) | protected virtual void DoSomething(IEnumerable numbers) { } class DerivedClass (line 194) | public class DerivedClass : BaseClass method DoSomething (line 196) | private void DoSomething(IEnumerable numbers) { } class Class1 (line 202) | public class Class1 method SomeMethod (line 149) | internal void SomeMethod(string s) { } class Class2 (line 208) | public class Class2 : Class1 method SomeMethod (line 154) | private void SomeMethod(string s) { } class Class3 (line 220) | public class Class3 : Class1 method SomeMethod (line 162) | private void SomeMethod(string s) { } class Class4 (line 231) | public class Class4 class Class5 (line 237) | public class Class5 : Class4 class Base (line 251) | class Base method SomeMethod (line 253) | public void SomeMethod(int count) { } class Derived (line 255) | class Derived : Base { } class Extensions (line 257) | static class Extensions method SomeMethod (line 259) | private static void SomeMethod(this Derived d, int count) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotExposeListT.Latest.cs type IMust (line 8) | public interface IMust method InterfaceMethod (line 10) | public abstract List InterfaceMethod(); class Base (line 13) | public abstract class Base method Method (line 15) | public abstract List Method(); class Overriding (line 19) | public class Overriding : Base, IMust method Method (line 21) | public override List Method() => null; method InterfaceMethod (line 24) | List IMust.InterfaceMethod() => null; class Bar (line 27) | public class Bar method Method1 (line 29) | public List Method1(T arg) => null; type R (line 32) | public record R type R2 (line 58) | public record R2(List Property); class PartialProperties (line 60) | public partial class PartialProperties class PartialProperties (line 65) | public partial class PartialProperties FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotExposeListT.cs class Bar (line 7) | public class Bar method Method1 (line 9) | public List Method1(T arg) => null; method Method2 (line 12) | private List Method2(T arg) => null; method Method3 (line 14) | private object Method3(int arg) => null; method Method4 (line 16) | public List Method4(List someParam) => null; method Method5 (line 20) | public IList Method5(ICollection someParam) => null; method Bar (line 28) | public Bar(List> bars) { } method ProtectedMethod (line 30) | protected List ProtectedMethod() => null; method ProtectedInternalMethod (line 33) | protected internal List ProtectedInternalMethod() => null; method InternalMethod (line 35) | internal List InternalMethod() => null; method Foo (line 39) | public void Foo() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotHardcodeCredentials.CustomValues.cs class Program (line 8) | class Program method Test (line 10) | public void Test() method StandardAPI (line 22) | public void StandardAPI(SecureString secureString, string nonHardcoded... class NoWordBound (line 38) | public class NoWordBound method Method (line 41) | public void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotHardcodeCredentials.DefaultValues.Latest.cs class Program (line 5) | class Program method SomeMethod (line 7) | private static string SomeMethod() => null; method Concatenations (line 9) | public void Concatenations() method Test (line 25) | public void Test() class Program (line 23) | class Program method SomeMethod (line 7) | private static string SomeMethod() => null; method Concatenations (line 9) | public void Concatenations() method Test (line 25) | public void Test() class Tests (line 38) | class Tests method RawStringLiterals (line 40) | void RawStringLiterals() method Utf8StringLiterals (line 53) | void Utf8StringLiterals() method NewlinesInStringInterpolation (line 67) | void NewlinesInStringInterpolation(string someInput) class PrimaryConstructor (line 81) | class PrimaryConstructor(string ctorParam = "Password=123") // Noncompliant method Test (line 83) | public void Test(string methodParam = "Password=123") // Noncompliant class EscapeSequence (line 92) | class EscapeSequence method Examples (line 94) | void Examples() class NullConditionalAssignment (line 112) | public class NullConditionalAssignment class Sample (line 114) | public class Sample FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotHardcodeCredentials.DefaultValues.cs class Program (line 8) | class Program method SomeMethod (line 21) | private static string SomeMethod() => ""; method Test (line 23) | public void Test(string user) method DefaultKeywords (line 76) | public void DefaultKeywords() method Constants (line 91) | public void Constants() method Concatenations (line 104) | public void Concatenations(string arg) method Interpolations (line 154) | public void Interpolations(string arg) method StringFormat (line 166) | public void StringFormat(string arg, IFormatProvider formatProvider, s... method RefVariable (line 191) | public void RefVariable() method FillRef (line 198) | private void FillRef(ref string arg) => method StandardAPI (line 201) | public void StandardAPI(SecureString secureString, string nonHardcoded... method CompliantParameterUse (line 252) | public void CompliantParameterUse(string pwd) method WordInVariableNameAndValue (line 269) | public void WordInVariableNameAndValue() method UriWithUserInfo (line 290) | public void UriWithUserInfo(string pwd, string domain) method LiteralAsArgument (line 327) | public void LiteralAsArgument(string pwd, string server) method OpenConn (line 337) | private SqlConnection OpenConn(string connectionString) method SecretConnectionStringFunction (line 366) | public string SecretConnectionStringFunction() method SecretConnectionStringFunction_OK (line 371) | public string SecretConnectionStringFunction_OK() method SecretConnectionStringFunction2 (line 376) | public string SecretConnectionStringFunction2() => "Server = localhost... method SecretConnectionStringFunction2_OK (line 377) | public string SecretConnectionStringFunction2_OK() => "Nothing to see ... method SecretConnectionStringFunction3 (line 379) | public string SecretConnectionStringFunction3() => @"Server = localhos... method SecretConnectionStringFunction3_OK (line 380) | public string SecretConnectionStringFunction3_OK() => @"Nothing to see... class SqlConnection (line 383) | class SqlConnection : IDisposable method SqlConnection (line 385) | public SqlConnection(string connectionString) { } method Open (line 386) | public void Open() { } method Dispose (line 387) | public void Dispose() { } class FalseNegatives (line 390) | class FalseNegatives method Foo (line 394) | public void Foo(string user) class Configuration (line 402) | class Configuration FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotHardcodeCredentials.SecureString.cs class Issue_7323 (line 6) | class Issue_7323 method Noncompliant (line 9) | public void Noncompliant() method Compliant (line 22) | public void Compliant(String password) class Tests (line 36) | class Tests method Characters (line 38) | public void Characters() method Constant (line 51) | public void Constant() method ForEachOverString (line 65) | public void ForEachOverString() method FromUnmodifiedVariable_ForLoop (line 78) | public void FromUnmodifiedVariable_ForLoop() method FromUnmodifiedVariable_ForEachLoop (line 90) | public void FromUnmodifiedVariable_ForEachLoop() method FromBytes (line 102) | public void FromBytes() method FromCharArray (line 114) | public void FromCharArray() class AppendCharFromOtherType (line 127) | class AppendCharFromOtherType method AppendChar (line 129) | void AppendChar(char c) { } method Test (line 131) | void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotHardcodeSecrets.Latest.cs class Sample (line 3) | public class Sample class FieldWithBody (line 25) | public class FieldWithBody class Extensions (line 34) | public static class Extensions method extension (line 38) | extension(Exception ex) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotHardcodeSecrets.cs class Program (line 4) | public class Program class Test (line 38) | public class Test method SeaShark7VariableDeclaration (line 63) | public void SeaShark7VariableDeclaration() class Foo (line 125) | public class Foo method GetToken (line 127) | public Bar GetToken() => new Bar(); method GetAuthToken (line 128) | public string GetAuthToken() => "31bf3856ad364e35"; class Bar (line 131) | public class Bar class Scaffold (line 138) | public class Scaffold FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotHideBaseClassMethods.Concurrent.cs class Foo (line 6) | class Foo method SomePublicMethod (line 8) | public void SomePublicMethod(string s1, string s2) { } method SomeProtectedMethod (line 10) | protected void SomeProtectedMethod(string s1, string s2) { } method SomePrivateMethod (line 12) | private void SomePrivateMethod(string s1, string s2) { } method GenericMethod (line 14) | public void GenericMethod(T s1, string s2) { } method GenericMethod2 (line 16) | public void GenericMethod2(IEnumerable s1, string s2) { } class Bar (line 19) | class Bar : Foo method SomePublicMethod (line 21) | public void SomePublicMethod(string s1, object s2) { } method SomeProtectedMethod (line 23) | protected void SomeProtectedMethod(string s1, object o2) { } method SomePrivateMethod (line 25) | private void SomePrivateMethod(string s1, object o2) { } method SomePublicMethod (line 27) | public void SomePublicMethod(string s1, string s2) { } method GenericMethod (line 29) | public void GenericMethod(TType s1, object s2) { } method GenericMethod2 (line 31) | public void GenericMethod2(IEnumerable s1, object s2) { } class Bar2 (line 34) | class Bar2 : Foo class Bar3 (line 38) | class Bar3 : Bar2 method SomePublicMethod (line 40) | public void SomePublicMethod(string s1, object o2) { } class MultipleOverloadsBase (line 44) | class MultipleOverloadsBase method Method1 (line 46) | public bool Method1(object obj) => true; method Method1 (line 48) | public bool Method1(string obj) => true; class MultipleOverloadsDerived (line 51) | class MultipleOverloadsDerived : MultipleOverloadsBase method Method1 (line 53) | public bool Method1(object obj) => true; class Class1 (line 59) | class Class1 method SomeMethod (line 61) | internal void SomeMethod(string s) { } class Class2 (line 64) | class Class2 : Class1 method SomeMethod (line 66) | void SomeMethod(object s) { } class Class3 (line 72) | class Class3 : AppendedNamespaceForConcurrencyTest.OtherNamespace.Class1 method SomeMethod (line 74) | void SomeMethod(object s) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotHideBaseClassMethods.Latest.cs type Base (line 5) | public record Base type Bar (line 22) | record Bar : Base type Bar2 (line 36) | record Bar2 : Base type Bar3 (line 40) | record Bar3 : Bar2 type MultipleOverloadsBase (line 46) | record MultipleOverloadsBase type MultipleOverloadsDerived (line 53) | record MultipleOverloadsDerived : MultipleOverloadsBase type PrimaryConstructorBase (line 58) | record PrimaryConstructorBase(string X) type Derived (line 63) | record Derived(string X) : PrimaryConstructorBase(X) type IMyInterface (line 68) | interface IMyInterface method SomeMethod (line 70) | static virtual string SomeMethod(string s1, string s2) => $"{s1}{s2}"; class IMyClass (line 73) | class IMyClass : IMyInterface method SomeMethod (line 75) | static string SomeMethod(string s1, object s2) => "With object"; type Class1 (line 81) | record Class1 type Class2 (line 86) | record Class2 : Class1 type Class3 (line 94) | record Class3 : OtherNamespace.Class1 class Extensions (line 100) | public static class Extensions method SomePublicMethod (line 102) | public static void SomePublicMethod(MyLibrary.Base sender, string s1, ... method extension (line 104) | extension(MyLibrary.Base sender) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotHideBaseClassMethods.cs class Foo (line 6) | class Foo method SomePublicMethod (line 8) | public void SomePublicMethod(string s1, string s2) { } method SomeProtectedMethod (line 10) | protected void SomeProtectedMethod(string s1, string s2) { } method SomePrivateMethod (line 12) | private void SomePrivateMethod(string s1, string s2) { } method GenericMethod (line 14) | public void GenericMethod(T s1, string s2) { } method GenericMethod2 (line 16) | public void GenericMethod2(IEnumerable s1, string s2) { } class Bar (line 19) | class Bar : Foo method SomePublicMethod (line 21) | public void SomePublicMethod(string s1, object s2) { } method SomeProtectedMethod (line 23) | protected void SomeProtectedMethod(string s1, object o2) { } method SomePrivateMethod (line 25) | private void SomePrivateMethod(string s1, object o2) { } method SomePublicMethod (line 27) | public void SomePublicMethod(string s1, string s2) { } method GenericMethod (line 29) | public void GenericMethod(TType s1, object s2) { } method GenericMethod2 (line 31) | public void GenericMethod2(IEnumerable s1, object s2) { } class Bar2 (line 34) | class Bar2 : Foo class Bar3 (line 38) | class Bar3 : Bar2 method SomePublicMethod (line 40) | public void SomePublicMethod(string s1, object o2) { } class MultipleOverloadsBase (line 44) | class MultipleOverloadsBase method Method1 (line 46) | public bool Method1(object obj) => true; method Method1 (line 48) | public bool Method1(string obj) => true; class MultipleOverloadsDerived (line 51) | class MultipleOverloadsDerived : MultipleOverloadsBase method Method1 (line 53) | public bool Method1(object obj) => true; class Class1 (line 59) | class Class1 method SomeMethod (line 61) | internal void SomeMethod(string s) { } class Class2 (line 64) | class Class2 : Class1 method SomeMethod (line 66) | void SomeMethod(object s) { } class Class3 (line 72) | class Class3 : OtherNamespace.Class1 method SomeMethod (line 74) | void SomeMethod(object s) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotInstantiateSharedClasses.cs class SharedClass (line 5) | [PartCreationPolicy(CreationPolicy.Shared)] class SharedClassFullNamespace (line 8) | [System.ComponentModel.Composition.PartCreationPolicy(System.ComponentMo... class NonSharedClass (line 11) | [PartCreationPolicy(CreationPolicy.NonShared)] class AnyClass (line 14) | [PartCreationPolicy(CreationPolicy.Any)] class InvalidAttrParameter (line 17) | [PartCreationPolicy(Foo)] // Error [CS0103] - Foo doesn't exist class NoAttrParameter (line 20) | [PartCreationPolicy()] // Error [CS7036] class NoAttr (line 23) | class NoAttr { } class Program (line 25) | class Program method Bar (line 27) | public void Bar() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotLockOnSharedResource.Latest.cs class LockOnThisOrType (line 7) | public class LockOnThisOrType(string myStringField) method RawStringLiterals (line 9) | public void RawStringLiterals() method NewlinesInStringInterpolation (line 15) | void NewlinesInStringInterpolation() method MyLockingMethod (line 24) | public void MyLockingMethod() method EscapeChar (line 30) | public void EscapeChar() class LockOnLockType (line 37) | public class LockOnLockType method LockOnLock (line 40) | public void LockOnLock() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotLockOnSharedResource.cs class LockOnThisOrType (line 6) | public class LockOnThisOrType method MyLockingMethod (line 10) | public void MyLockingMethod() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotLockWeakIdentityObjects.Latest.cs class Program (line 6) | class Program method Test (line 10) | private void Test() class LockOnLockType (line 16) | public class LockOnLockType method LockOnLock (line 19) | public void LockOnLock() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotLockWeakIdentityObjects.cs class DoNotLockWeakIdentityObjects (line 7) | class DoNotLockWeakIdentityObjects method Test (line 20) | private void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotMarkEnumsWithFlags.cs type NoFlags (line 5) | public enum NoFlags // Compliant - no flags attribute type Color (line 11) | [FlagsAttribute] type Days (line 20) | [FlagsAttribute] type Color2 (line 32) | [FlagsAttribute] type Color3 (line 43) | [FlagsAttribute] type Color4 (line 52) | [FlagsAttribute] type NegativeValues (line 61) | [Flags] type HugeValues (line 73) | [Flags] type EnumFoo (line 79) | [Flags] type EnumFoo2 (line 82) | [Flags] type EnumFoo3 (line 91) | [Flags] type EnumFoo4 (line 102) | [Flags] type EByte (line 114) | [Flags] type ESByte (line 122) | [Flags] type EShort (line 130) | [Flags] type EUShort (line 138) | [Flags] type EInt (line 146) | [Flags] type EUInt (line 154) | [Flags] type ELong (line 162) | [Flags] type EULong (line 170) | [Flags] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotNestTernaryOperators.cs class Program (line 5) | class Program method Foo (line 7) | public bool Foo() method FooImpl (line 13) | public bool FooImpl(bool isMale, bool isMarried) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotNestTypesInArguments.Latest.cs class A (line 5) | public partial class A method M (line 7) | private partial void M(IDictionary, IList> args) { } class B (line 11) | public class B method Nullable (line 13) | public void Nullable(Dictionary?, string>? args) { } method Ref (line 15) | public void Ref(ref ICollection> arg) { } method Ref (line 17) | public void Ref(ref ICollection arg) { } method In (line 19) | public void In(in ICollection> arg) { } method In (line 21) | public void In(in ICollection arg) { } method Functions (line 23) | public void Functions() type ISome (line 31) | public interface ISome method M (line 33) | void M(IList> arg); type Some (line 36) | public abstract record Some type C (line 41) | public record C : Some, ISome FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotNestTypesInArguments.Latest.partial.cs class A (line 5) | public partial class A method M (line 7) | private partial void M(IDictionary, IList> args); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotNestTypesInArguments.cs class GlobalClass (line 8) | public class GlobalClass { } class Foo (line 12) | public class Foo method DoSomething (line 16) | public void DoSomething(ICollection> outerCollect) { } method Method_NoArgs (line 18) | public void Method_NoArgs() { } method Method_Array (line 19) | public void Method_Array(object[] arg) { } method GenericMethod_Array (line 20) | public void GenericMethod_Array(T[] arg) { } method Method_ListOfArrays (line 21) | public void Method_ListOfArrays(List arg) { } method Method_ArrayOfLists (line 22) | public void Method_ArrayOfLists(List[] arg) { } method Method_DeepGeneric (line 24) | public void Method_DeepGeneric(Tuple, object>... method Method_DeepMethod (line 25) | public void Method_DeepMethod(Tuple>> arg) { } method Method_MultiArgs (line 27) | public void Method_MultiArgs(List> arg1, method Method_ArraysAndGenerics (line 33) | public void Method_ArraysAndGenerics(ICollection[]>[] a... method Method_NestedFunc (line 38) | public void Method_NestedFunc(Func> arg) { } method Method_NestedFunc1 (line 39) | public void Method_NestedFunc1(Func, ICollection... method Method_NestedFunc2 (line 40) | public void Method_NestedFunc2(Func, ICollection... method Method_NestedFunc3 (line 41) | public void Method_NestedFunc3(Func, ICollection... method Method_NestedFunc4 (line 42) | public void Method_NestedFunc4(Func, ICollection... method Method_NestedFunc16 (line 43) | public void Method_NestedFunc16(Func, ICollection[], List... method Method_NestedAction (line 48) | public void Method_NestedAction(Action arg) { } method Method_NestedAction1 (line 49) | public void Method_NestedAction1(Action> arg) { } method Method_NestedAction2 (line 50) | public void Method_NestedAction2(Action, ICollection<... method Method_NestedAction3 (line 51) | public void Method_NestedAction3(Action, ICollection<... method Method_NestedAction4 (line 52) | public void Method_NestedAction4(Action, ICollection<... method Method_NestedAction16 (line 53) | public void Method_NestedAction16(Action, ICollection... method Method_NestedActionArrays (line 54) | public void Method_NestedActionArrays(Action[], List<... method Method_NestedAction_Level2 (line 56) | public void Method_NestedAction_Level2(Action, List) arg) { } method Method_TupleList (line 64) | public void Method_TupleList(List<(int, string)> arg) { } method Method_TupleNested (line 65) | public void Method_TupleNested((Task>, Task>) data... method Method_TupleListNested (line 66) | public void Method_TupleListNested(List<(Task, Task)> arg... method Method_Alias (line 68) | public void Method_Alias(global::GlobalClass> arg) { } method Method_QualifiedName (line 69) | public void Method_QualifiedName(System.Collections.Generic.List(List>> arg) { } method Method_WithUsing (line 74) | public void Method_WithUsing(ComplexType arg) { } method Method_Out (line 76) | public void Method_Out(out ICollection> arg) { arg = ... method Method_Out_Compliant (line 77) | public void Method_Out_Compliant(out ICollection arg) { arg = nul... class WithLocalFunctions (line 80) | public class WithLocalFunctions method Method (line 82) | public void Method() class Repro_3277 (line 89) | public class Repro_3277 method QuestionMark (line 91) | public void QuestionMark(List list) method Explicit (line 95) | public void Explicit(List> list) // Noncompliant, there'... class External (line 103) | public abstract class External method DoWork (line 105) | public abstract void DoWork(IDictionary> data); class UserCode (line 108) | public class UserCode : External method DoWork (line 110) | public override void DoWork(IDictionary> data) { } type IAbstractClassInterface (line 116) | public interface IAbstractClassInterface method AbstractInterfaceMethod (line 118) | void AbstractInterfaceMethod(Task> data); type IImplicit (line 121) | public interface IImplicit method ImplicitMethod (line 123) | void ImplicitMethod(Task> data); type IExplicit (line 126) | public interface IExplicit method ExplicitMethod (line 128) | void ExplicitMethod(Task> data); class AbstractClass (line 131) | public abstract class AbstractClass : IAbstractClassInterface method AbstractInterfaceMethod (line 133) | public abstract void AbstractInterfaceMethod(Task> data); method AbstractClassMethod (line 135) | public abstract void AbstractClassMethod(Task> data); method VirtualMethod (line 137) | public virtual void VirtualMethod(Task> data) { } method ShadowedMethod (line 139) | public void ShadowedMethod(Task> data) { } class DerivedClass (line 142) | public class DerivedClass : AbstractClass, IImplicit, IExplicit method ImplicitMethod (line 144) | public void ImplicitMethod(Task> data) { } method ExplicitMethod (line 146) | void IExplicit.ExplicitMethod(Task> data) { } method AbstractInterfaceMethod (line 148) | public override void AbstractInterfaceMethod(Task> data) { } method AbstractClassMethod (line 150) | public override void AbstractClassMethod(Task> data) { } method VirtualMethod (line 152) | public override void VirtualMethod(Task> data) { } method ShadowedMethod (line 154) | public new void ShadowedMethod(Task> data) { } type Struct (line 157) | public struct Struct : IImplicit, IExplicit method ImplicitMethod (line 159) | public void ImplicitMethod(Task> data) { } method ExplicitMethod (line 161) | void IExplicit.ExplicitMethod(Task> data) { } class Noncompliant (line 167) | class Noncompliant class Compliant (line 180) | class Compliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotOverloadOperatorEqual.Latest.cs type MyType (line 4) | record MyType class MyClass (line 14) | class MyClass : IEqualityOperators class Sample (line 23) | class Sample { } class Extensions (line 25) | static class Extensions method extension (line 27) | extension(Sample) class CustomCompoundAssignment (line 35) | class CustomCompoundAssignment FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotOverloadOperatorEqual.cs class MyType (line 6) | class MyType class MyTypeWithAdditionOverload (line 20) | class MyTypeWithAdditionOverload class MyTypeWithSubstractionOverload (line 38) | class MyTypeWithSubstractionOverload type ComparableTypeMyStruct (line 56) | struct ComparableTypeMyStruct class GenericComparableType (line 69) | class GenericComparableType : IComparable method CompareTo (line 71) | public int CompareTo(GenericComparableType other) class ComparableType (line 87) | class ComparableType : IComparable method CompareTo (line 89) | public int CompareTo(object obj) class EquatableType (line 105) | class EquatableType : IEquatable method Equals (line 107) | public bool Equals(EquatableType other) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotOverwriteCollectionElements.Latest.cs class CSharp11 (line 4) | class CSharp11 method OverwriteDictionary (line 8) | void OverwriteDictionary() method OverwriteArray (line 14) | void OverwriteArray() method SameIndexOnArray (line 22) | void SameIndexOnArray(CustomIndexer obj) class CustomIndexer (line 28) | public class CustomIndexer class CSharp13 (line 38) | class CSharp13 method NewCollectionTypes (line 42) | void NewCollectionTypes() class CSharp14 (line 49) | class CSharp14 method NullConditionalAccess (line 51) | void NullConditionalAccess(List items) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotOverwriteCollectionElements.cs class TestCases (line 6) | class TestCases method SameIndexOnDictionary (line 10) | void SameIndexOnDictionary(Dictionary dict) method SameIndexOnArray (line 18) | void SameIndexOnArray(int[] array) method Parenthesis_Indexer (line 24) | void Parenthesis_Indexer(int[] array) method Parenthesis_Invocation (line 30) | void Parenthesis_Invocation(Dictionary dict) method SameIndexOnList (line 36) | void SameIndexOnList(List list) method ListAdd (line 42) | void ListAdd(List list) method ICollectionAdd (line 49) | void ICollectionAdd(ICollection collection) method SameIndexOnArray (line 56) | void SameIndexOnArray(CustomIndexerOneArg obj) method SameIndexOnArray (line 62) | void SameIndexOnArray(CustomIndexerMultiArg obj) method SameIndexSpacedOut (line 68) | void SameIndexSpacedOut(string[] names) method NonSequentialAccessOnSameIndex (line 75) | void NonSequentialAccessOnSameIndex(int[] values) method NonConstantConsecutiveIndexAccess (line 83) | void NonConstantConsecutiveIndexAccess(int[] values) method IncrementDecrementIndexAccess (line 90) | void IncrementDecrementIndexAccess(int[] values) method IDictionaryAdd (line 106) | void IDictionaryAdd(IDictionary dict) method DictionaryAdd (line 114) | void DictionaryAdd(Dictionary dict) method ListRemove (line 120) | void ListRemove(List list) method IDictionaryAddOnMultiMemberAccess (line 127) | void IDictionaryAddOnMultiMemberAccess(TestCases c) method IDictionaryAddWithThis (line 133) | void IDictionaryAddWithThis() method DoNotReportOnNonDictionaryAdd (line 139) | void DoNotReportOnNonDictionaryAdd(CustomAdd c) method AccessOnMethodCall (line 145) | void AccessOnMethodCall() method GetArray (line 151) | int[] GetArray() method InitTowns (line 156) | void InitTowns(IDictionary towns, string y) method MemberBinding (line 162) | void MemberBinding(IDictionary dictionary) class InheritanceTest (line 169) | class InheritanceTest : Dictionary method AddToBaseField (line 171) | void AddToBaseField() method MyAdd (line 177) | void MyAdd() method IncrementDecrementInvocation (line 183) | void IncrementDecrementInvocation(Dictionary dict) class RegressionTests (line 200) | public class RegressionTests method NullReference (line 209) | public void NullReference() method Foo (line 219) | public void Foo() method Bar (line 225) | public void Bar() method FooBar (line 231) | public void FooBar() class MyTestClass1 (line 238) | public static class MyTestClass1 class MyTestClass2 (line 243) | public static class MyTestClass2 class CustomIndexerOneArg (line 248) | public class CustomIndexerOneArg class CustomIndexerMultiArg (line 257) | public class CustomIndexerMultiArg class CustomAdd (line 266) | public class CustomAdd method Add (line 268) | public void Add(int a, int b) { } class TestSameClassMultipleInstance (line 271) | public class TestSameClassMultipleInstance class MyContainer (line 273) | public class MyContainer method MyContainer (line 282) | public MyContainer() method Foo (line 288) | public void Foo() class Repro (line 305) | public class Repro method DifferentObjectSameProperty (line 307) | public void DifferentObjectSameProperty() method SamePropertyDifferentIndex (line 318) | public void SamePropertyDifferentIndex() method FNBecauseOfTheOrder (line 326) | public void FNBecauseOfTheOrder() method NoncompliantWithSameIndex (line 336) | public void NoncompliantWithSameIndex() method DifferentIndexes (line 346) | public void DifferentIndexes() method CompliantDeeplyNested (line 356) | public void CompliantDeeplyNested() method NonCompliantDeeplyNested (line 371) | public void NonCompliantDeeplyNested() class ClassWithListProperty (line 389) | private class ClassWithListProperty class ClassWithNested (line 395) | private class ClassWithNested FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotShiftByZeroOrIntSize.CSharp10.cs class Foo (line 5) | class Foo method RightShift (line 7) | public void RightShift() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotShiftByZeroOrIntSize.CSharp11.cs class Program (line 3) | class Program method UnsignedRightShiftOperator (line 5) | void UnsignedRightShiftOperator(int i, ulong q) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotShiftByZeroOrIntSize.cs class Foo (line 5) | class Foo method Test (line 7) | private void Test() method NonIntegerTypes (line 47) | private void NonIntegerTypes() method Lambda (line 65) | private void Lambda() method ParanthesesAttack (line 70) | private void ParanthesesAttack() method Next (line 91) | public byte Next() => 1; method GetInt (line 93) | public int GetInt() method RightShift (line 101) | private int RightShift() method ImproveShiftingBehavior (line 126) | private void ImproveShiftingBehavior() type Int8Enum (line 139) | enum Int8Enum : byte type Int16Enum (line 150) | enum Int16Enum : short type Int32Enum (line 161) | enum Int32Enum : int type Int64Enum (line 170) | enum Int64Enum : long FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotTestThisWithIsOperator.CSharp10.cs class Program (line 6) | class Program method Program (line 10) | public Program(object o, object i) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotTestThisWithIsOperator.CSharp11.cs class SomeClass (line 6) | public class SomeClass : ArrayList method SomeMethod (line 8) | public void SomeMethod() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotTestThisWithIsOperator.CSharp9.cs class Program (line 6) | class Program method Program (line 11) | public Program(object o, object i) method SomeMethod (line 198) | public bool SomeMethod(object o) type R (line 237) | record R FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotTestThisWithIsOperator.cs class Program (line 5) | class Program method Program (line 7) | public Program(object o) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotThrowFromDestructors.CSharp9.cs type Program (line 5) | record Program type C (line 43) | record C FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotThrowFromDestructors.cs class Program (line 5) | class Program method Foo (line 7) | public void Foo() method Program (line 12) | public Program() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotUseCollectionInItsOwnMethodCalls.cs class Program (line 7) | class Program : IEqualityComparer method Equals (line 9) | public bool Equals(int left, int right) => left == right; method GetHashCode (line 11) | public int GetHashCode(int obj) => 42; method UnexpectedBehavior (line 13) | void UnexpectedBehavior() method AlwaysSameCollection (line 23) | void AlwaysSameCollection() method AlwaysEmptyCollection (line 44) | void AlwaysEmptyCollection() method AlwaysTrue (line 59) | void AlwaysTrue() method AlwaysFalse (line 78) | void AlwaysFalse() method ValidCases (line 88) | void ValidCases() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotUseDateTimeNow.cs class Test (line 6) | class Test method TestCases (line 8) | void TestCases() class CustomTypeCalledDateTime (line 46) | class CustomTypeCalledDateTime type DateTime (line 48) | public struct DateTime method CustomTypeCalledDateTime (line 53) | CustomTypeCalledDateTime() class FakeNameOf (line 59) | class FakeNameOf method nameof (line 61) | string nameof(object o) => ""; method UsesFakeNameOfMethod (line 63) | void UsesFakeNameOfMethod() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotUseLiteralBoolInAssertions.MsTest.cs class Foo (line 6) | class Foo method Test (line 8) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotUseLiteralBoolInAssertions.NUnit.cs class Foo (line 5) | class Foo method Test (line 7) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotUseLiteralBoolInAssertions.NUnit4.cs class FooNUnit4 (line 6) | class FooNUnit4 method Test (line 8) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotUseLiteralBoolInAssertions.Xunit.cs class Foo (line 5) | class Foo method Test (line 7) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotUseLiteralBoolInAssertions.XunitV3.cs class XUnitV3Tests (line 6) | class XUnitV3Tests method Test (line 8) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotUseOutRefParameters.CSharp11.cs class S3874 (line 6) | public class S3874 : I3874 method SetRef (line 8) | public static void SetRef(ref I3874 obj) // compliant because this is ... method SetOut (line 13) | public static void SetOut(out I3874 obj) // compliant because this is ... type I3874 (line 19) | public interface I3874 method SetRef (line 21) | static abstract void SetRef(ref I3874 obj); method SetOut (line 22) | static abstract void SetOut(out I3874 obj); type DefaultInterfaceImplementations (line 25) | public interface DefaultInterfaceImplementations method PrivateRefInst (line 27) | private void PrivateRefInst(ref int i) { } method PrivateRef (line 28) | private static void PrivateRef(ref int i) { } method RefInst (line 29) | void RefInst(ref int i) { } method OutInst (line 30) | void OutInst(out int i) { i = 1; } method Ref (line 31) | static void Ref(ref int i) { } method Out (line 32) | static void Out(out int i) { i = 1; } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotUseOutRefParameters.CSharp9.cs type IProgram (line 6) | public interface IProgram method Method1 (line 8) | void Method1(out string value); method Method2 (line 10) | void Method2(ref string value); method TryMethod2 (line 12) | bool TryMethod2(out string value); type AbstractRecord (line 15) | public abstract record AbstractRecord type OverridenRecord (line 22) | public record OverridenRecord : AbstractRecord type InternalRecord (line 29) | internal record InternalRecord type Record (line 36) | public record Record FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotUseOutRefParameters.cs type IProgram (line 7) | public interface IProgram method Method1 (line 9) | void Method1(out string value); method Method2 (line 11) | void Method2(ref string value); method TryMethod (line 13) | void TryMethod(out string value); method TryMethod1 (line 15) | bool TryMethod1(ref string value); method TryMethod2 (line 17) | bool TryMethod2(out string value); class AbstractProgram (line 20) | public abstract class AbstractProgram method Method1 (line 22) | public abstract void Method1(out string value); method Method2 (line 23) | public abstract void Method2(ref string value); method TryMethod (line 24) | public abstract void TryMethod(out string value); method TryMethod1 (line 25) | public abstract bool TryMethod1(ref string value); method TryMethod2 (line 26) | public abstract bool TryMethod2(out string value); class OverridenProgram (line 29) | public class OverridenProgram : AbstractProgram method Method1 (line 31) | public override void Method1(out string value) { value = "a"; } method Method2 (line 32) | public override void Method2(ref string value) { } method TryMethod (line 33) | public override void TryMethod(out string value) { value = "a"; } method TryMethod1 (line 34) | public override bool TryMethod1(ref string value) { return false; } method TryMethod2 (line 35) | public override bool TryMethod2(out string value) { value = "a"; retur... class InternalProgram (line 38) | internal class InternalProgram method Method1 (line 40) | public void Method1(out string value) { value = "a"; } method Method2 (line 41) | public void Method2(ref string value) { } method TryMethod (line 42) | public void TryMethod(out string value) { value = "a"; } method TryMethod1 (line 43) | public bool TryMethod1(ref string value) { return false; } method TryMethod2 (line 44) | public bool TryMethod2(out string value) { value = "a"; return true; } class Program (line 47) | public class Program method Method1 (line 49) | public void Method1(out string value1, out string value2) { value1 = "... method Method1 (line 53) | public void Method1(out string value) { value = "a"; } method Method2 (line 55) | public void Method2(ref string value) { } method TryMethod (line 57) | public void TryMethod(out string value) { value = "a"; } method TryMethod1 (line 59) | public bool TryMethod1(ref string value) { return true; } method TryMethod2 (line 61) | public bool TryMethod2(out string value) { value = "a"; return true; } class S3874 (line 65) | public class S3874 : I3874 method SetRef (line 67) | public void SetRef(ref I3874 obj) // compliant because this is interfa... method SetOut (line 72) | public void SetOut(out I3874 obj) // compliant because this is interfa... type I3874 (line 78) | public interface I3874 method SetRef (line 80) | void SetRef(ref I3874 obj); method SetOut (line 81) | void SetOut(out I3874 obj); class Person (line 85) | public class Person method Person (line 91) | public Person(string fname, string mname, string lname) method Deconstruct (line 98) | public void Deconstruct(out string fname, out string lname) // Compliant, method Deconstruct (line 105) | public void Deconstruct(out string fname, out string lname, string not... method Deconstruct (line 113) | public static void Deconstruct(out string foo) { foo = "foo"; } method Deconstruct (line 114) | public static int Deconstruct(ref int bar) { return bar; } method Method (line 115) | public static void Method(string foo) class PersonExtention (line 125) | public static class PersonExtention method Deconstruct (line 127) | public static void Deconstruct(this Person p, out string fname, out st... method Deconstruct (line 133) | public static void Deconstruct(this Person p, out string fname, out st... method Deconstruct (line 141) | public static int Deconstruct(this Person p, out int bar) { bar = 1; r... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotWriteToStandardOutput.cs class ConsoleLogging (line 7) | public class ConsoleLogging method GenerateKey (line 9) | private static byte[] GenerateKey(byte[] key) method LogDebug (line 28) | public static void LogDebug(string message) => method NestedMethod (line 31) | private static void NestedMethod() class Exceptions_MethodLevelConditionals (line 57) | internal class Exceptions_MethodLevelConditionals method LogDebugA (line 59) | [System.Diagnostics.Conditional("Wrong conditional")] // Error [CS0633] method LogDebugB (line 66) | [System.Diagnostics.Conditional("DEBUG")] method LogDebugC (line 72) | [System.Diagnostics.Conditional("debug")] // wrong case FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotWriteToStandardOutput_Conditionals1.cs class Tests (line 9) | class Tests method Method1 (line 13) | public void Method1() method DoStuff (line 18) | public void DoStuff() method DoStuff (line 25) | public void DoStuff() method Method2 (line 32) | public void Method2() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DoNotWriteToStandardOutput_Conditionals2.cs class Tests (line 6) | class Tests method Method1 (line 10) | public void Method1() method DoStuff (line 15) | public void DoStuff() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DontMixIncrementOrDecrementWithOtherOperators.Latest.cs class Program (line 5) | public class Program method Foo (line 7) | public void Foo() method Foo2 (line 36) | public void Foo2() method IntPtrArithmeticOperations (line 43) | public void IntPtrArithmeticOperations() method UnsignedIntPtrArithmeticOperations (line 72) | public void UnsignedIntPtrArithmeticOperations() method ObjectInitializer (line 102) | public void ObjectInitializer() class DataBuffer (line 116) | public class DataBuffer FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DontMixIncrementOrDecrementWithOtherOperators.cs class Program (line 5) | public class Program method Foo (line 7) | public void Foo() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DontUseTraceSwitchLevels.cs class Program (line 5) | public class Program method Noncompliant_TraceIfMethods (line 9) | public void Noncompliant_TraceIfMethods(bool condition) method Compliant_TraceMethods (line 19) | public void Compliant_TraceMethods(string arg) method WriteIf_Overloads (line 37) | public void WriteIf_Overloads(bool condition) method TraceSwitch_Properties (line 50) | public void TraceSwitch_Properties(bool condition) method Not_TraceClass (line 60) | public void Not_TraceClass(string arg) method Aliased_Trace (line 68) | public void Aliased_Trace(AliasedTraceSwitch aliasedTraceSwitch) method Custom_TraceSwitch (line 74) | public void Custom_TraceSwitch(CustomTraceSwitch customTraceSwitch) class CustomTraceSwitch (line 80) | public class CustomTraceSwitch : TraceSwitch method CustomTraceSwitch (line 82) | public CustomTraceSwitch(string displayName, string description) : b... class Test (line 90) | public class Test method Using_CustomClass (line 95) | public void Using_CustomClass(string arg) class Trace (line 109) | public static class Trace method WriteIf (line 111) | public static void WriteIf(bool condition, string message) { } method WriteIf (line 112) | public static void WriteIf(bool condition, string message, params obje... method WriteLineIf (line 113) | public static void WriteLineIf(bool condition, string message) { } method WriteLineIf (line 114) | public static void WriteLineIf(bool condition, string message, params ... class TraceSwitch (line 117) | public class TraceSwitch FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/DontUseTraceWrite.cs class Program (line 5) | public class Program method Noncompliant_TraceMethods (line 7) | public void Noncompliant_TraceMethods() method Compliant_TraceMethods (line 14) | public void Compliant_TraceMethods(string arg) method Write_Overloads (line 35) | public void Write_Overloads() method Not_TraceClass (line 44) | public void Not_TraceClass(string arg) method Aliased_Trace (line 57) | public void Aliased_Trace() class Test (line 66) | public class Test method Using_CustomTraceClass (line 68) | public void Using_CustomTraceClass(string arg) class Trace (line 77) | public static class Trace method Write (line 79) | public static void Write(string message) { } method Write (line 80) | public static void Write(string message, params object[] args) { } method WriteLine (line 81) | public static void WriteLine(string message) { } method WriteLine (line 82) | public static void WriteLine(string message, params object[] args) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyMethod.CSharp9.Comment.Fixed.cs type EmptyMethod (line 28) | record EmptyMethod type MyR (line 64) | abstract record MyR type MyR2 (line 73) | record MyR2 : MyR class M (line 80) | class M method M1 (line 82) | [ModuleInitializer] method M2 (line 88) | [ModuleInitializer] method M3 (line 94) | [ModuleInitializer] class C (line 103) | partial class C method Foo (line 105) | public partial void Foo(); method Bar (line 106) | public partial void Bar(); method Qix (line 107) | public partial void Qix(); method Foo (line 112) | public partial void Foo() method Bar (line 117) | public partial void Bar() method Qix (line 122) | public partial void Qix() class C (line 110) | partial class C method Foo (line 105) | public partial void Foo(); method Bar (line 106) | public partial void Bar(); method Qix (line 107) | public partial void Qix(); method Foo (line 112) | public partial void Foo() method Bar (line 117) | public partial void Bar() method Qix (line 122) | public partial void Qix() class PropertyAccessors (line 129) | class PropertyAccessors class Base (line 159) | class Base class Inherited (line 164) | class Inherited : Base class Hidden (line 174) | class Hidden : Base class EmptyProperty (line 185) | class EmptyProperty class LocalFunction (line 190) | class LocalFunction method FirstLevelInMethod (line 192) | void FirstLevelInMethod() method NestedInMethod (line 214) | void NestedInMethod() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyMethod.CSharp9.Throw.Fixed.cs type EmptyMethod (line 25) | record EmptyMethod type MyR (line 61) | abstract record MyR type MyR2 (line 70) | record MyR2 : MyR class M (line 77) | class M method M1 (line 79) | [ModuleInitializer] method M2 (line 85) | [ModuleInitializer] method M3 (line 91) | [ModuleInitializer] class C (line 100) | partial class C method Foo (line 102) | public partial void Foo(); method Bar (line 103) | public partial void Bar(); method Qix (line 104) | public partial void Qix(); method Foo (line 109) | public partial void Foo() method Bar (line 114) | public partial void Bar() method Qix (line 119) | public partial void Qix() class C (line 107) | partial class C method Foo (line 102) | public partial void Foo(); method Bar (line 103) | public partial void Bar(); method Qix (line 104) | public partial void Qix(); method Foo (line 109) | public partial void Foo() method Bar (line 114) | public partial void Bar() method Qix (line 119) | public partial void Qix() class PropertyAccessors (line 126) | class PropertyAccessors class Base (line 138) | class Base class Inherited (line 143) | class Inherited : Base class Hidden (line 148) | class Hidden : Base class EmptyProperty (line 154) | class EmptyProperty class LocalFunction (line 159) | class LocalFunction method FirstLevelInMethod (line 161) | void FirstLevelInMethod() method NestedInMethod (line 171) | void NestedInMethod() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyMethod.CSharp9.cs type EmptyMethod (line 25) | record EmptyMethod type MyR (line 60) | abstract record MyR type MyR2 (line 66) | record MyR2 : MyR class M (line 73) | class M method M1 (line 75) | [ModuleInitializer] method M2 (line 80) | [ModuleInitializer] method M3 (line 86) | [ModuleInitializer] class C (line 95) | partial class C method Foo (line 97) | public partial void Foo(); method Bar (line 98) | public partial void Bar(); method Qix (line 99) | public partial void Qix(); method Foo (line 104) | public partial void Foo() { } method Bar (line 106) | public partial void Bar() method Qix (line 111) | public partial void Qix() class C (line 102) | partial class C method Foo (line 97) | public partial void Foo(); method Bar (line 98) | public partial void Bar(); method Qix (line 99) | public partial void Qix(); method Foo (line 104) | public partial void Foo() { } method Bar (line 106) | public partial void Bar() method Qix (line 111) | public partial void Qix() class PropertyAccessors (line 118) | class PropertyAccessors class Base (line 132) | class Base class Inherited (line 137) | class Inherited : Base class Hidden (line 142) | class Hidden : Base class EmptyProperty (line 148) | class EmptyProperty class LocalFunction (line 153) | class LocalFunction method FirstLevelInMethod (line 155) | void FirstLevelInMethod() method NestedInMethod (line 165) | void NestedInMethod() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyMethod.Comment.Fixed.cs class EmptyMethod (line 8) | public class EmptyMethod method F2 (line 10) | void F2() method F3 (line 15) | void F3() method F4 (line 20) | [Conditional("DEBUG")] method ConditionalCompilation (line 26) | public void ConditionalCompilation() method ConditionalCompilationEmpty (line 33) | public void ConditionalCompilationEmpty() // Fixed method EmptyRegionTrivia (line 38) | public void EmptyRegionTrivia() // Fixed method F5 (line 43) | protected virtual void F5() method F6 (line 47) | extern void F6(); method F7 (line 49) | [DllImport("avifil32.dll")] class MyClass (line 53) | public abstract class MyClass method F1 (line 55) | public void F1() method F2 (line 60) | public abstract void F2(); class MyClass5 (line 63) | public class MyClass5 : MyClass method F2 (line 65) | public override void F2() type IInterface (line 70) | public interface IInterface method F1 (line 72) | public void F1() { } method F2 (line 74) | public virtual void F2() { } method F3 (line 76) | public abstract void F3(); class WithProp (line 79) | public class WithProp class Repro_7629 (line 91) | public class Repro_7629 type Interface_7629 (line 93) | interface Interface_7629 method MyMethod (line 95) | void MyMethod(); class MyClass_7629 (line 98) | class MyClass_7629 : Interface_7629 method MyMethod (line 100) | public void MyMethod() { } type FirstInterface (line 104) | interface FirstInterface method Explicit (line 106) | public void Explicit(); method SameMethod (line 107) | public void SameMethod(); type SecondInterface (line 110) | interface SecondInterface method SameMethod (line 112) | public void SameMethod(); class TestClass (line 115) | class TestClass : FirstInterface, SecondInterface method Explicit (line 117) | void FirstInterface.Explicit() { } method SameMethod (line 118) | public void SameMethod() { } class Awaitable (line 121) | public class Awaitable : INotifyCompletion method GetAwaiter (line 123) | public Awaitable GetAwaiter() => this; method GetResult (line 125) | public void GetResult() method OnCompleted (line 130) | public void OnCompleted(Action continuation) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyMethod.Latest.cs type IMyInterface (line 3) | interface IMyInterface method StaticVirtualMethod (line 5) | static virtual void StaticVirtualMethod() // Compliant (empty virtual ... method StaticAbstractMethod (line 10) | static abstract void StaticAbstractMethod(); class MyClass (line 13) | class MyClass : IMyInterface method StaticVirtualMethod (line 15) | public static void StaticVirtualMethod() { } method StaticAbstractMethod (line 17) | public static void StaticAbstractMethod() { } class Externals (line 20) | public unsafe partial class Externals method F (line 22) | [LibraryImport("ole32.dll")] method F (line 26) | [System.Runtime.InteropServices.DllImportAttribute("ole32.dll", EntryP... class WithModifiers (line 30) | abstract class WithModifiers type S (line 37) | public struct S method S (line 39) | public S() // Compliant - This will replace the default constructor class PartialProperty (line 44) | public partial class PartialProperty class PartialProperty (line 49) | public partial class PartialProperty FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyMethod.OverrideVirtual.cs class FooBase (line 1) | public class FooBase method Method (line 3) | public virtual void Method() class FooImpl (line 9) | public class FooImpl: FooBase method Method (line 11) | public override void Method() // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyMethod.Throw.Fixed.cs class EmptyMethod (line 8) | public class EmptyMethod method F2 (line 10) | void F2() method F3 (line 15) | void F3() method F4 (line 20) | [Conditional("DEBUG")] method ConditionalCompilation (line 26) | public void ConditionalCompilation() method ConditionalCompilationEmpty (line 33) | public void ConditionalCompilationEmpty() // Fixed method EmptyRegionTrivia (line 40) | public void EmptyRegionTrivia() // Fixed method F5 (line 47) | protected virtual void F5() method F6 (line 51) | extern void F6(); method F7 (line 53) | [DllImport("avifil32.dll")] class MyClass (line 57) | public abstract class MyClass method F1 (line 59) | public void F1() method F2 (line 64) | public abstract void F2(); class MyClass5 (line 67) | public class MyClass5 : MyClass method F2 (line 69) | public override void F2() type IInterface (line 74) | public interface IInterface method F1 (line 76) | public void F1() { } method F2 (line 78) | public virtual void F2() { } method F3 (line 80) | public abstract void F3(); class WithProp (line 83) | public class WithProp class Repro_7629 (line 95) | public class Repro_7629 type Interface_7629 (line 97) | interface Interface_7629 method MyMethod (line 99) | void MyMethod(); class MyClass_7629 (line 102) | class MyClass_7629 : Interface_7629 method MyMethod (line 104) | public void MyMethod() { } type FirstInterface (line 108) | interface FirstInterface method Explicit (line 110) | public void Explicit(); method SameMethod (line 111) | public void SameMethod(); type SecondInterface (line 114) | interface SecondInterface method SameMethod (line 116) | public void SameMethod(); class TestClass (line 119) | class TestClass : FirstInterface, SecondInterface method Explicit (line 121) | void FirstInterface.Explicit() { } method SameMethod (line 122) | public void SameMethod() { } class Awaitable (line 125) | public class Awaitable : INotifyCompletion method GetAwaiter (line 127) | public Awaitable GetAwaiter() => this; method GetResult (line 129) | public void GetResult() method OnCompleted (line 134) | public void OnCompleted(Action continuation) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyMethod.WithoutClosingBracket.Comment.Fixed.cs method F1 (line 9) | void F1() // Fixed FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyMethod.WithoutClosingBracket.cs method F1 (line 9) | void F1() // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyMethod.cs class EmptyMethod (line 8) | public class EmptyMethod method F2 (line 10) | void F2() method F3 (line 15) | void F3() method F4 (line 20) | [Conditional("DEBUG")] method ConditionalCompilation (line 25) | public void ConditionalCompilation() method ConditionalCompilationEmpty (line 32) | public void ConditionalCompilationEmpty() // Noncompliant method EmptyRegionTrivia (line 38) | public void EmptyRegionTrivia() // Noncompliant method F5 (line 44) | protected virtual void F5() method F6 (line 48) | extern void F6(); method F7 (line 50) | [DllImport("avifil32.dll")] class MyClass (line 54) | public abstract class MyClass method F1 (line 56) | public void F1() { } method F2 (line 59) | public abstract void F2(); class MyClass5 (line 62) | public class MyClass5 : MyClass method F2 (line 64) | public override void F2() type IInterface (line 69) | public interface IInterface method F1 (line 71) | public void F1() { } method F2 (line 73) | public virtual void F2() { } method F3 (line 75) | public abstract void F3(); class WithProp (line 78) | public class WithProp class Repro_7629 (line 87) | public class Repro_7629 type Interface_7629 (line 89) | interface Interface_7629 method MyMethod (line 91) | void MyMethod(); class MyClass_7629 (line 94) | class MyClass_7629 : Interface_7629 method MyMethod (line 96) | public void MyMethod() { } type FirstInterface (line 100) | interface FirstInterface method Explicit (line 102) | public void Explicit(); method SameMethod (line 103) | public void SameMethod(); type SecondInterface (line 106) | interface SecondInterface method SameMethod (line 108) | public void SameMethod(); class TestClass (line 111) | class TestClass : FirstInterface, SecondInterface method Explicit (line 113) | void FirstInterface.Explicit() { } method SameMethod (line 114) | public void SameMethod() { } class Awaitable (line 117) | public class Awaitable : INotifyCompletion method GetAwaiter (line 119) | public Awaitable GetAwaiter() => this; method GetResult (line 121) | public void GetResult() { } method OnCompleted (line 123) | public void OnCompleted(Action continuation) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyNamespace.CSharp10.NotEmpty.cs class EmptyNamespace (line 3) | public class EmptyNamespace { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyNamespace.Fixed.Batch.cs class EmptyNamespace (line 7) | public class EmptyNamespace FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyNamespace.Fixed.cs class EmptyNamespace (line 7) | public class EmptyNamespace FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyNamespace.cs class EmptyNamespace (line 7) | public class EmptyNamespace FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyNestedBlock.Latest.cs type S (line 1) | public struct S method S (line 3) | public S() // Compliant - This will replace the default constructor class PartialProperty (line 8) | public partial class PartialProperty class PartialProperty (line 13) | public partial class PartialProperty FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyNestedBlock.cs class EmptyNestedBlock (line 8) | public class EmptyNestedBlock method EmptyNestedBlock (line 10) | public EmptyNestedBlock() method F1 (line 18) | void F1(bool b) method F2 (line 84) | void F2() method ConditionalCompilation (line 89) | public void ConditionalCompilation(object obj) class EmptyClass (line 111) | public class EmptyClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyNestedBlock2.cs class EmptyNestedBlock (line 8) | public class EmptyNestedBlock method EmptyNestedBlock (line 10) | public EmptyNestedBlock() method F1 (line 18) | void F1(bool b) method F2 (line 84) | void F2() method ConditionalCompilation (line 89) | public void ConditionalCompilation(object obj) class EmptyClass (line 111) | public class EmptyClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyStatement.Fixed.cs class EmptyStatement (line 5) | public class EmptyStatement method EmptyStatement (line 9) | public EmptyStatement() method LoopBodyExclusions (line 18) | public void LoopBodyExclusions() method EmptyStatementInsideBlock (line 25) | public void EmptyStatementInsideBlock() method EmptyStatementAfterLoop (line 33) | public void EmptyStatementAfterLoop() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyStatement.Latest.cs type IMyInterface (line 3) | interface IMyInterface method StaticVirtualMethod (line 5) | static virtual void StaticVirtualMethod() method StaticAbstractMethod (line 10) | static abstract void StaticAbstractMethod(); class MyClass (line 13) | class MyClass : IMyInterface method StaticVirtualMethod (line 15) | public static void StaticVirtualMethod() method StaticAbstractMethod (line 20) | public static void StaticAbstractMethod() class PartialProperty (line 26) | public partial class PartialProperty class PartialProperty (line 31) | public partial class PartialProperty FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyStatement.TopLevelStatements.Fixed.cs type R (line 9) | record R FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyStatement.TopLevelStatements.cs type R (line 9) | record R FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EmptyStatement.cs class EmptyStatement (line 5) | public class EmptyStatement method EmptyStatement (line 9) | public EmptyStatement() method LoopBodyExclusions (line 22) | public void LoopBodyExclusions() method EmptyStatementInsideBlock (line 29) | public void EmptyStatementInsideBlock() method EmptyStatementAfterLoop (line 37) | public void EmptyStatementAfterLoop() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EncryptionAlgorithmsShouldBeSecure.cs class SecureAesCheck (line 6) | class SecureAesCheck method CtorSetsAllowedValue (line 11) | void CtorSetsAllowedValue(byte[] key1) method CtorSetsNotAllowedValue (line 16) | void CtorSetsNotAllowedValue() method InitializerSetsAllowedValue (line 21) | void InitializerSetsAllowedValue() method InitializerSetsNotAllowedValue (line 26) | void InitializerSetsNotAllowedValue() method PropertySetsNotAllowedValue (line 36) | void PropertySetsNotAllowedValue() method PropertySetsAllowedValue (line 46) | void PropertySetsAllowedValue(bool foo) class RSAEncryptionPaddingTest (line 52) | class RSAEncryptionPaddingTest method InvocationSetsAllowedValue (line 58) | void InvocationSetsAllowedValue(byte[] data, RSAEncryptionPadding padd... method InvocationSetsNotAllowedValue (line 75) | void InvocationSetsNotAllowedValue(byte[] data, RSA genericRSA) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EncryptionAlgorithmsShouldBeSecure_NetStandard21.cs class SecureAesCheck (line 6) | class SecureAesCheck method CtorSetsAllowedValue (line 11) | void CtorSetsAllowedValue(byte[] key1, ReadOnlySpan key2) method CtorSetsNotAllowedValue (line 17) | void CtorSetsNotAllowedValue() method InitializerSetsAllowedValue (line 22) | void InitializerSetsAllowedValue() method InitializerSetsNotAllowedValue (line 27) | void InitializerSetsNotAllowedValue() method PropertySetsNotAllowedValue (line 37) | void PropertySetsNotAllowedValue() method PropertySetsAllowedValue (line 47) | void PropertySetsAllowedValue(bool foo) class RSAEncryptionPaddingTest (line 53) | class RSAEncryptionPaddingTest method InvocationSetsAllowedValue (line 57) | void InvocationSetsAllowedValue(byte[] data, RSAEncryptionPadding padd... method InvocationSetsNotAllowedValue (line 71) | void InvocationSetsNotAllowedValue(byte[] data, RSA genericRSA) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EnumNameHasEnumSuffix.cs type MyEnum (line 3) | public enum MyEnum //Noncompliant {{Rename this enumeration to remove th... type MyFlags (line 8) | public enum MyFlags //Noncompliant {{Rename this enumeration to remove t... type MyEnum2 (line 12) | public enum MyEnum2 class ClassEnum (line 16) | public class ClassEnum FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EnumNameShouldFollowRegex.cs type MyEnum (line 5) | public enum MyEnum type myEnum (line 9) | public enum myEnum // Noncompliant {{Rename the enumeration 'myEnum' to ... type MyEnumTTTT (line 14) | public enum MyEnumTTTT // Noncompliant type MyFlagEnums (line 18) | [Flags] type MyFlagEnum (line 23) | [Flags] type myFlagEnums (line 29) | [Flags] type MyFlagEnumTTTTs (line 34) | [Flags] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EnumStorageNeedsToBeInt32.cs type Visibility (line 5) | public enum Visibility : sbyte // Noncompliant {{Change this enum storag... type Byte (line 12) | public enum Byte : byte { } type Short (line 13) | public enum Short : short { } type UShort (line 14) | public enum UShort : ushort { } type Default (line 16) | public enum Default { } type IntAlias (line 17) | public enum IntAlias : int { } type Int (line 18) | public enum Int : System.Int32 { } type Long (line 19) | public enum Long : long { } type ULong (line 20) | public enum ULong : ulong { } type UInt (line 21) | public enum UInt : uint { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EnumerableSumInUnchecked.cs class EnumerableSumInUnchecked (line 7) | public class EnumerableSumInUnchecked method Test (line 9) | public void Test(List list, List list2) method MySum (line 65) | void MySum() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EnumsShouldNotBeNamedReserved.cs type Color (line 5) | public enum Color type Reserved (line 15) | public enum Reserved FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EqualityOnFloatingPoint.CSharp11.cs class EqualityOnFloatingPoint (line 5) | public class EqualityOnFloatingPoint method HalfEqual (line 7) | bool HalfEqual(Half first, Half second) => method NFloatEqual (line 11) | bool NFloatEqual(NFloat first, NFloat second) => method IsEpsilon (line 14) | bool IsEpsilon(T value) where T : IFloatingPointIeee754 => method IsPi (line 17) | bool IsPi(T value) where T : IFloatingPointIeee754 => method IsNotE (line 20) | bool IsNotE(T value) where T : IFloatingPointIeee754 => method AreEqual (line 23) | bool AreEqual(T first, T second) where T : IFloatingPointIeee754 => method Equal (line 26) | bool Equal(T first, T second) where T : IBinaryFloatingPointIeee754... class ReportSpecificMessage_NaN (line 30) | public class ReportSpecificMessage_NaN method HalfNaN (line 32) | void HalfNaN(Half h) method NFloatNaN (line 39) | void NFloatNaN(NFloat nf) method M (line 45) | public void M(T t) where T : IFloatingPointIeee754 class ReportSpecificMessage_Infinities (line 52) | public class ReportSpecificMessage_Infinities method HalfInfinities (line 54) | void HalfInfinities(Half h) method NFloatInfinities (line 60) | void NFloatInfinities(NFloat nf) class ReportSpecificMessage (line 71) | public class ReportSpecificMessage method WithUsingStatic (line 73) | public void WithUsingStatic(double d) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EqualityOnFloatingPoint.cs class EqualityOnFloatingPoint (line 5) | public class EqualityOnFloatingPoint method Test (line 7) | void Test(float f, double d1, double d2, dynamic dyn) class ReportSpecificMessage_NaN (line 41) | public class ReportSpecificMessage_NaN method WithDoubleEquality (line 43) | public void WithDoubleEquality(int iPar, double dPar, float fPar) method WithDoubleInequality (line 58) | public void WithDoubleInequality(int iPar, double dPar, float fPar) method WithFloat (line 73) | public void WithFloat(int iPar, float fPar) method WithDoublePascalCase (line 84) | public void WithDoublePascalCase() method WithSingle (line 93) | public void WithSingle() class ReportSpecificMessage_Infinities (line 103) | public class ReportSpecificMessage_Infinities method WithDouble (line 105) | public void WithDouble(double d) method WithFloat (line 113) | public void WithFloat(float f) method WithDoublePascalCase (line 121) | public void WithDoublePascalCase(Double d) method WithSingle (line 127) | public void WithSingle(Single f) class ReportSpecificMessage (line 138) | public class ReportSpecificMessage method WithDoubleAlias (line 140) | public void WithDoubleAlias() method WithUsingStatic (line 155) | public void WithUsingStatic(double d) method WithLocalVar (line 164) | public void WithLocalVar(double d) class ReportSpecificMessage (line 153) | public class ReportSpecificMessage method WithDoubleAlias (line 140) | public void WithDoubleAlias() method WithUsingStatic (line 155) | public void WithUsingStatic(double d) method WithLocalVar (line 164) | public void WithLocalVar(double d) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EqualityOnModulus.cs class EqualityCheckOnModulus (line 7) | public class EqualityCheckOnModulus method isOdd (line 9) | public void isOdd(int x) method FakeCount (line 51) | public int FakeCount() => -1; class FakeList (line 54) | public class FakeList : List { method Count (line 55) | public int Count(int i) { return i; } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EquatableClassShouldBeSealed.CSharp9.cs type R (line 3) | public record R type Q (line 8) | public sealed record Q type RecordWithVirtualEquals (line 13) | public record RecordWithVirtualEquals : IEquatable... method Equals (line 7) | public virtual bool Equals(ClassWithVirtualEquals other) => true; class ClassWithAbstractEquals (line 10) | public abstract class ClassWithAbstractEquals : IEquatable true; class SealedClassImplementsIEquatable (line 20) | public sealed class SealedClassImplementsIEquatable : IEquatable true; class ClassImplementsIEquatable (line 25) | public class ClassImplementsIEquatable : IEquatable true; class ClassProperlyImplementsIEquatable (line 31) | public class ClassProperlyImplementsIEquatable : IEquatable true; class ClassHasEqualsMethod (line 36) | public class ClassHasEqualsMethod // Noncompliant method Equals (line 38) | public bool Equals(ClassHasEqualsMethod other) => true; class ComplexClass (line 41) | public class ComplexClass : IEquatable, IEquatable true; method Equals (line 44) | public bool Equals(ClassHasEqualsMethod other) => true; class BaseClass (line 47) | public abstract class BaseClass : IEquatable // Noncompliant method Equals (line 49) | public bool Equals(BaseClass other) => false; class SubClass (line 52) | public class SubClass : BaseClass { } class SubSubClass (line 53) | public class SubSubClass : SubClass { } class Foo (line 55) | public class Foo { } class Bar (line 57) | public class Bar : Foo, IEquatable // Noncompliant method Equals (line 59) | public bool Equals(Bar other) => false; class InternalClass (line 62) | internal class InternalClass : IEquatable // Compliant be... method Equals (line 64) | public bool Equals(InternalClass other) => false; class PrivateClass (line 66) | private class PrivateClass : IEquatable // Compliant bec... method Equals (line 68) | public bool Equals(PrivateClass other) => false; class AbstractBase (line 73) | public abstract class AbstractBase method Equals (line 76) | public override bool Equals(object obj) => obj is AbstractBase ab && E... method Equals (line 77) | private bool Equals(AbstractBase other) => other?.X == this.X; method GetHashCode (line 78) | public override int GetHashCode() => 0; class Derived (line 81) | public class Derived : AbstractBase method Equals (line 84) | public override bool Equals(object obj) => obj is Derived ab && Equals... method Equals (line 85) | private bool Equals(Derived other) => other.Y == this.Y && base.Equals... method GetHashCode (line 86) | public override int GetHashCode() => 0; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EscapeLambdaParameterTypeNamedScoped.CSharp11-13.cs class LambdaParameters (line 7) | class LambdaParameters method Noncompliant (line 11) | void Noncompliant() method Compliant (line 74) | void Compliant() method Compliant (line 124) | void Compliant() method Noncompliant (line 142) | void Noncompliant() method Pointer (line 160) | unsafe void Pointer() method Noncompliant (line 178) | void Noncompliant() method Compliant (line 189) | void Compliant() class @scoped (line 110) | class @scoped { } class @scoped (line 111) | class @scoped { } class LambdaParameters (line 116) | class LambdaParameters method Noncompliant (line 11) | void Noncompliant() method Compliant (line 74) | void Compliant() method Compliant (line 124) | void Compliant() method Noncompliant (line 142) | void Noncompliant() method Pointer (line 160) | unsafe void Pointer() method Noncompliant (line 178) | void Noncompliant() method Compliant (line 189) | void Compliant() type @scoped (line 167) | ref struct @scoped { } type @scoped (line 168) | ref struct @scoped { } class LambdaParameters (line 176) | class LambdaParameters method Noncompliant (line 11) | void Noncompliant() method Compliant (line 74) | void Compliant() method Compliant (line 124) | void Compliant() method Noncompliant (line 142) | void Noncompliant() method Pointer (line 160) | unsafe void Pointer() method Noncompliant (line 178) | void Noncompliant() method Compliant (line 189) | void Compliant() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EscapeLambdaParameterTypeNamedScoped.Latest.cs class LambdaParameters (line 11) | class LambdaParameters method Noncompliant (line 15) | void Noncompliant() method Compliant (line 59) | void Compliant() method Compliant (line 110) | void Compliant() method Noncompliant (line 128) | void Noncompliant() method Pointer (line 142) | unsafe void Pointer() method Noncompliant (line 160) | void Noncompliant() method Compliant (line 171) | void Compliant() class @scoped (line 95) | class @scoped { } class @scoped (line 97) | class @scoped { } class LambdaParameters (line 102) | class LambdaParameters method Noncompliant (line 15) | void Noncompliant() method Compliant (line 59) | void Compliant() method Compliant (line 110) | void Compliant() method Noncompliant (line 128) | void Noncompliant() method Pointer (line 142) | unsafe void Pointer() method Noncompliant (line 160) | void Noncompliant() method Compliant (line 171) | void Compliant() type @scoped (line 149) | ref struct @scoped { } type @scoped (line 150) | ref struct @scoped { } class LambdaParameters (line 158) | class LambdaParameters method Noncompliant (line 15) | void Noncompliant() method Compliant (line 59) | void Compliant() method Compliant (line 110) | void Compliant() method Noncompliant (line 128) | void Noncompliant() method Pointer (line 142) | unsafe void Pointer() method Noncompliant (line 160) | void Noncompliant() method Compliant (line 171) | void Compliant() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EscapeLambdaParameterTypeNamedScoped.TopLevelStatements.CSharp11-13.cs type @scoped (line 5) | ref struct @scoped { } type @scoped (line 7) | ref struct @scoped { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EscapeLambdaParameterTypeNamedScoped.TopLevelStatements.Latest.cs type @scoped (line 5) | ref struct @scoped { } type @scoped (line 7) | ref struct @scoped { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EventHandlerDelegateShouldHaveProperArguments.Latest.Partial.cs type R (line 3) | partial record R class PartialEvents (line 11) | partial class PartialEvents FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EventHandlerDelegateShouldHaveProperArguments.Latest.cs type R (line 3) | partial record R type IMyInterface (line 25) | interface IMyInterface method VirtualMethod (line 29) | static virtual void VirtualMethod(object sender, EventArgs e) where... class PartialEvents (line 38) | partial class PartialEvents method Method (line 45) | void Method(EventArgs e) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/EventHandlerDelegateShouldHaveProperArguments.cs class Foo (line 5) | class Foo class Program (line 10) | class Program method OnFoo (line 15) | protected void OnFoo(EventArgs e) method OnBar (line 43) | protected void OnBar(ResolveEventArgs e) method OnFooBar (line 48) | protected void OnFooBar(EventArgs e) method OnEvent (line 54) | protected void OnEvent() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExceptionRethrow.Fixed.cs class ExceptionType1 (line 5) | public class ExceptionType1 : Exception { } class ExceptionType2 (line 6) | public class ExceptionType2 : Exception { } class ExceptionRethrow (line 8) | public class ExceptionRethrow method Test (line 10) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExceptionRethrow.cs class ExceptionType1 (line 5) | public class ExceptionType1 : Exception { } class ExceptionType2 (line 6) | public class ExceptionType2 : Exception { } class ExceptionRethrow (line 8) | public class ExceptionRethrow method Test (line 10) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExceptionShouldNotBeThrownFromUnexpectedMethods.Latest.Partial.cs class PartialClass (line 3) | partial class PartialClass method PartialClass (line 5) | partial PartialClass(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExceptionShouldNotBeThrownFromUnexpectedMethods.Latest.cs class ModuleInitializerAttribute (line 6) | public class ModuleInitializerAttribute : Attribute { } class Foo (line 8) | public class Foo method M1 (line 10) | [ModuleInitializer] type Record1 (line 18) | record Record1 : IDisposable type Record2 (line 27) | record Record2 : IDisposable type IMyInterface (line 77) | interface IMyInterface class MyClass (line 88) | class MyClass : IMyInterface class PartialClass (line 97) | partial class PartialClass method PartialClass (line 99) | partial PartialClass() => throw new Exception(); class Sample (line 116) | class Sample { } class Extensions (line 118) | static class Extensions method extension (line 120) | extension(Sample) method extension (line 133) | extension(Sample s) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExceptionShouldNotBeThrownFromUnexpectedMethods.cs class ValidProgram (line 3) | class ValidProgram : IDisposable method ValidProgram (line 5) | static ValidProgram() method Equals (line 58) | public override bool Equals(object obj) method GetHashCode (line 63) | public override int GetHashCode() method ToString (line 68) | public override string ToString() method Dispose (line 73) | public void Dispose() class ValidRethrowProgram (line 114) | class ValidRethrowProgram : IDisposable method ValidRethrowProgram (line 116) | static ValidRethrowProgram() method Equals (line 151) | public override bool Equals(object obj) method Dispose (line 177) | public void Dispose() { } class InvalidProgram (line 180) | class InvalidProgram : IDisposable method InvalidProgram (line 182) | static InvalidProgram() method Equals (line 200) | public override bool Equals(object obj) method GetHashCode (line 205) | public override int GetHashCode() method ToString (line 210) | public override string ToString() method Dispose (line 215) | public void Dispose() type DisposableRefStruct (line 256) | ref struct DisposableRefStruct method Dispose (line 258) | public void Dispose() class ArrowMethods (line 264) | class ArrowMethods : IDisposable method ArrowMethods (line 266) | static ArrowMethods() => throw new Exception(); method Dispose (line 267) | public void Dispose() => throw new Exception(); method ToString (line 278) | public override string ToString() => class CompliantArrowMethods (line 286) | class CompliantArrowMethods : IDisposable method CompliantArrowMethods (line 288) | static CompliantArrowMethods() => throw new NotImplementedException(); method Dispose (line 289) | public void Dispose() => throw new NotImplementedException(); method Foo (line 298) | static void Foo() => throw new Exception(); method ToString (line 301) | public override string ToString() => class MultipleExceptions (line 309) | class MultipleExceptions method ToString (line 311) | public override string ToString() method Foo (line 326) | bool Foo() => true; class CodeCoverage (line 329) | class CodeCoverage : IDisposable method CodeCoverage (line 331) | static CodeCoverage() => throw new UnknownException(); method Dispose (line 332) | public void Dispose() method Equals (line 336) | public override bool Equals(object obj) method GetHashCode (line 341) | public override int GetHashCode() => 0; type S (line 344) | public struct S method S (line 346) | static S() class Equatable (line 352) | class Equatable : IEquatable method Equals (line 354) | public bool Equals(S other) => throw new Exception(); method Equals (line 355) | public bool Equals(string s) => throw new Exception(); class Sample (line 360) | class Sample { } method Equals (line 373) | public bool Equals(Sample s) => throw new Exception(); class Extensions (line 362) | static class Extensions method Equals (line 364) | public static bool Equals(this Sample x, object obj) => throw new Exce... method GetHashCode (line 365) | public static int GetHashCode(this Sample x) => throw new Exception(); method ToString (line 366) | public static string ToString(this Sample x) { throw new Exception(); } method Dispose (line 367) | public static void Dispose(this Sample x) { throw new Exception(); } class Sample (line 371) | class Sample : ICustom method Equals (line 373) | public bool Equals(Sample s) => throw new Exception(); type ICustom (line 375) | interface ICustom method Equals (line 377) | bool Equals(T t); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExceptionsNeedStandardConstructors.cs class MyException (line 6) | public class MyException : Exception // Noncompliant {{Implement the mis... method MyException (line 9) | public MyException() class My_01_Exception (line 14) | public class My_01_Exception : Exception // Noncompliant method My_01_Exception (line 16) | My_01_Exception() {} method My_01_Exception (line 18) | My_01_Exception(string message) { } method My_01_Exception (line 20) | My_01_Exception(string message, Exception innerException) {} method My_01_Exception (line 22) | My_01_Exception(SerializationInfo info, StreamingContext context) {} class My_02_Exception (line 25) | public class My_02_Exception : Exception // Compliant method My_02_Exception (line 27) | public My_02_Exception() { } method My_02_Exception (line 29) | public My_02_Exception(string message) { } method My_02_Exception (line 31) | public My_02_Exception(string message, Exception innerException) { } method My_02_Exception (line 33) | public My_02_Exception(SerializationInfo info, StreamingContext contex... class My_03_Exception (line 36) | public class My_03_Exception : Exception // Compliant method My_03_Exception (line 38) | public My_03_Exception() { } method My_03_Exception (line 40) | public My_03_Exception(string message) { } method My_03_Exception (line 42) | public My_03_Exception(string message, Exception innerException) { } method My_03_Exception (line 44) | private My_03_Exception(SerializationInfo info, StreamingContext conte... class My_04_Exception (line 47) | public sealed class My_04_Exception : Exception // Compliant method My_04_Exception (line 49) | public My_04_Exception() { } method My_04_Exception (line 51) | public My_04_Exception(string message) { } method My_04_Exception (line 53) | public My_04_Exception(string message, Exception innerException) { } method My_04_Exception (line 55) | protected My_04_Exception(SerializationInfo info, StreamingContext con... class My_05_Exception (line 58) | public sealed class My_05_Exception : Exception method My_05_Exception (line 60) | public My_05_Exception() { } method My_05_Exception (line 62) | public My_05_Exception(string message) { } method My_05_Exception (line 64) | public My_05_Exception(string message, Exception innerException) { } method My_05_Exception (line 66) | private My_05_Exception(SerializationInfo info, StreamingContext conte... class My_06_Exception (line 69) | public sealed class My_06_Exception : Exception // Compliant method My_06_Exception (line 71) | public My_06_Exception() { } method My_06_Exception (line 73) | public My_06_Exception(string message) { } method My_06_Exception (line 75) | public My_06_Exception(string message, Exception innerException) { } method My_06_Exception (line 77) | public My_06_Exception(SerializationInfo info, StreamingContext contex... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExceptionsShouldBeLogged.cs class TestCases (line 6) | public class TestCases method MultipleLogsInTheSameCatch (line 10) | public void MultipleLogsInTheSameCatch() method NoLogsInCatch (line 44) | public void NoLogsInCatch() method CallingMethodToLog (line 52) | public void CallingMethodToLog() method Log (line 61) | private void Log() method LogFromLambda (line 66) | public void LogFromLambda() method Call (line 86) | private void Call(Action action) method LogFromMultipleCatchBlocks (line 91) | private void LogFromMultipleCatchBlocks() method LogFromNestedCatchBlocks (line 108) | private void LogFromNestedCatchBlocks(Exception wrongException) method ReAssignment (line 137) | private void ReAssignment() method Filtering (line 147) | private void Filtering() method LogFromCatchBlockWithNoException (line 174) | public void LogFromCatchBlockWithNoException() method LogFromIfStatement (line 183) | public void LogFromIfStatement() method LogFromSwitchStatement (line 202) | public void LogFromSwitchStatement(bool condition) method LogFromCustomLogger (line 225) | public void LogFromCustomLogger() method LogOutsideCatchStatement (line 234) | public void LogOutsideCatchStatement() method ILoggerImplementation (line 239) | public void ILoggerImplementation(NullLogger logger) method PartialLogging (line 253) | public void PartialLogging() method LogInnerException (line 264) | public void LogInnerException() method LogFromCatchWithoutExceptionType (line 276) | public void LogFromCatchWithoutExceptionType() class CustomLogger (line 285) | public class CustomLogger method LogCritical (line 287) | public void LogCritical(string message) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExceptionsShouldBeLoggedOrThrown.cs class ExceptionsShouldBeEitherLoggedOrThrown (line 4) | public class ExceptionsShouldBeEitherLoggedOrThrown method Generic (line 6) | public void Generic(ILogger lo... method NonGeneric (line 63) | public void NonGeneric(ILogger logger) method Nested (line 73) | public void Nested(ILogger logger) method NoCatch (line 128) | public void NoCatch(ILogger logger, Exception exception) method Filtering (line 134) | public void Filtering(ILogger logger) method With (line 151) | private void With(CustomLogger logger) method LoggingFromAnotherMethod (line 160) | public void LoggingFromAnotherMethod(ILogger logger) method Log (line 170) | private void Log(ILogger logger, Exception e) method LogFromLambda (line 176) | public void LogFromLambda(ILogger logger) method ReAssignment (line 210) | private void ReAssignment(ILogger logger) method LogPartial_Compliant (line 227) | public void LogPartial_Compliant(ILogger logger) method LogPartial_Notcompliant (line 241) | public void LogPartial_Notcompliant(ILogger logger) method MultipleThrows (line 251) | public void MultipleThrows(ILogger logger) method LogFromCatchWithoutException (line 278) | public void LogFromCatchWithoutException(ILogger logger) method Branches (line 288) | public void Branches(ILogger logger, bool condition, object x) method Call (line 352) | private void Call(Action action) class CustomLogger (line 357) | private class CustomLogger : ILogger method Log (line 359) | public void Log(LogLevel logLevel, EventId eventId, TState s... method IsEnabled (line 361) | public bool IsEnabled(LogLevel logLevel) => true; method BeginScope (line 363) | public IDisposable BeginScope(TState state) => null; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExceptionsShouldBePublic.cs class PublicException (line 4) | public class PublicException : Exception // Compliant class InternalException (line 8) | internal class InternalException : Exception class InternalException2 (line 13) | class InternalException2 : Exception class PublicContainer (line 18) | public class PublicContainer // Compliant class PublicException (line 20) | public class PublicException : Exception // Compliant class PrivateClass (line 24) | private class PrivateClass // Compliant class InternalException (line 28) | internal class InternalException : Exception class InternalException2 (line 33) | class InternalException2 : Exception class ProtectedException (line 38) | protected class ProtectedException : OutOfMemoryException // Compliant class PrivateException2 (line 42) | private class PrivateException2 : Exception class InternalContainer (line 48) | internal class InternalContainer // Compliant class PublicException (line 50) | public class PublicException : Exception class PrivateClass (line 55) | private class PrivateClass // Compliant class ProtectedClass (line 59) | protected class ProtectedClass // Compliant class InternalException (line 63) | internal class InternalException : OutOfMemoryException // Compliant class ProtectedException (line 67) | protected class ProtectedException : OutOfMemoryException // Compliant class InternalException2 (line 71) | class InternalException2 : ApplicationException class PrivateException2 (line 76) | private class PrivateException2 : Exception class LastException (line 82) | internal class LastException : MiddleException { } class MiddleException (line 83) | public class MiddleException : FirstException { } class FirstException (line 84) | public class FirstException : Exception { } class Exception (line 88) | public class /* Missing identifier */ : Exception { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExceptionsShouldBeUsed.cs class CustomEx (line 7) | public class CustomEx : Exception class ExceptionsShouldBeUsed (line 11) | class ExceptionsShouldBeUsed method NotCompliant (line 13) | void NotCompliant() method Compliant (line 20) | Exception Compliant() method Foo (line 33) | void Foo(Exception ex) { } method CompliantArrow (line 35) | Exception CompliantArrow() => new Exception(); method CompliantOut (line 39) | void CompliantOut(out Exception e) method CompliantYield (line 46) | IEnumerable CompliantYield() method Method (line 53) | void Method(Exception e) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExcludeFromCodeCoverageAttributesNeedJustification.CSharp10.cs class NonCompliant (line 6) | class NonCompliant method Method (line 8) | public void Method(IEnumerable collection) method Call (line 23) | private void Call(Action action) => action(1); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExcludeFromCodeCoverageAttributesNeedJustification.CSharp9.cs type Record (line 10) | [ExcludeFromCodeCoverage] // Noncompliant {{Add a justification.}} FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExcludeFromCodeCoverageAttributesNeedJustification.cs class Noncompliant (line 5) | [ExcludeFromCodeCoverage] // Noncompliant ^2#23 {{Add a justification.}} method WithBrackets (line 8) | [ExcludeFromCodeCoverage()] // Noncompliant method FullyDeclaredNamespace (line 11) | [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] // Noncompliant method GloballyDeclaredNamespace (line 14) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] // N... method WithNull (line 17) | [ExcludeFromCodeCoverage(Justification = null)] // Noncompliant method WithEmptyString (line 20) | [ExcludeFromCodeCoverage(Justification = "")] // Noncompliant method WithWhiteSpace (line 23) | [ExcludeFromCodeCoverage(Justification = " ")] // Noncompliant method WithAlias (line 26) | [Alias(Justification = "")] // Noncompliant method Multiple (line 29) | [ExcludeFromCodeCoverage] // Noncompliant method Combined (line 33) | [ExcludeFromCodeCoverage, CLSCompliant(false)] method Noncompliant (line 37) | [ExcludeFromCodeCoverage] // Noncompliant method Method (line 40) | [ExcludeFromCodeCoverage] // Noncompliant type IInterface (line 47) | interface IInterface method Method (line 49) | [ExcludeFromCodeCoverage] // Noncompliant type ProgramStruct (line 53) | [ExcludeFromCodeCoverage] // Noncompliant method Method (line 56) | [ExcludeFromCodeCoverage] // Noncompliant class Compliant (line 60) | [ExcludeFromCodeCoverage(Justification = "justification")] method Compliant (line 63) | [ExcludeFromCodeCoverage(Justification = "justification")] method Method (line 66) | [ExcludeFromCodeCoverage(Justification = "justification")] type IComplaintInterface (line 76) | interface IComplaintInterface method Method (line 78) | [ExcludeFromCodeCoverage(Justification = "justification")] type ComplaintStruct (line 82) | [ExcludeFromCodeCoverage(Justification = "justification")] method Method (line 85) | [ExcludeFromCodeCoverage(Justification = "justification")] class NotApplicable (line 89) | class NotApplicable type Enum (line 91) | [CLSCompliant(false)] method NotApplicable (line 94) | NotApplicable() { } method Method (line 96) | void Method() { } method SameName (line 106) | [OtherNamespace.ExcludeFromCodeCoverage] class ExcludeFromCodeCoverageAttribute (line 112) | public class ExcludeFromCodeCoverageAttribute : Attribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExcludeFromCodeCoverageAttributesNeedJustification.net48.cs class Ignores (line 4) | [ExcludeFromCodeCoverage] method JustifcationDoesNotExist (line 7) | [ExcludeFromCodeCoverage(Justification = "not existing")] // Error[CS0... method WithBrackets (line 10) | [ExcludeFromCodeCoverage()] // Compliant: "Justification" property was... method FullyDeclaredNamespace (line 13) | [System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] method GloballyDeclaredNamespace (line 16) | [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage] method Multiple (line 19) | [ExcludeFromCodeCoverage] method Combined (line 23) | [ExcludeFromCodeCoverage, CLSCompliant(false)] method Ignores (line 26) | [ExcludeFromCodeCoverage] method Method (line 29) | [ExcludeFromCodeCoverage] type IInterface (line 36) | interface IInterface method Method (line 38) | [ExcludeFromCodeCoverage] type ProgramStruct (line 42) | [ExcludeFromCodeCoverage] method Method (line 45) | [ExcludeFromCodeCoverage] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExpectedExceptionAttributeShouldNotBeUsed.MsTest.cs class Program (line 6) | class Program method TestFoo1 (line 8) | [TestMethod] method WithAttributeSuffix (line 16) | [TestMethod] method FullyQualifiedAttribute (line 24) | [TestMethod] method UnrelatedAttribute (line 32) | [TestMethod] method TestFoo3 (line 40) | [TestMethod] method TestMultilineFalseNegative (line 47) | [TestMethod] method TestFoo5 (line 58) | [TestMethod] method TestFoo7 (line 62) | [TestMethod] method TestWithThrowsAssertation (line 76) | [TestMethod] class Repro_8300 (line 85) | class Repro_8300 method AssertInFinally (line 87) | [TestMethod] method NoAssertInFinally (line 102) | [TestMethod] method NoAssertInCatch (line 117) | [TestMethod] method AssertInCatch (line 132) | [TestMethod] method AssertInAllCatch (line 147) | [TestMethod] method AssertInAllCatch_InvocationBeforeAssert (line 162) | [TestMethod] method AssertInAllCatch_InvocationAfterAssert (line 178) | [TestMethod] method AssertInFinallyWithCatch (line 194) | [TestMethod] method AssertInCatchWithFinally (line 213) | [TestMethod] class ExpectedExceptionAttribute (line 236) | [AttributeUsage(AttributeTargets.Method)] method ExpectedExceptionAttribute (line 241) | public ExpectedExceptionAttribute(Type exceptionType) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExpectedExceptionAttributeShouldNotBeUsed.NUnit.cs class Program (line 6) | [TestFixture] method TestFoo2 (line 9) | [Test] method TestFoo4 (line 17) | [Test] method TestFoo6 (line 24) | [Test] method TestFoo8 (line 28) | [Test] method NoBody (line 42) | [Test] class Repro_8300 (line 48) | class Repro_8300 method AssertInFinally (line 50) | [Test] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExpressionComplexity.CSharp10.cs class SomeClass (line 19) | public class SomeClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExpressionComplexity.cs class ExpressionComplexity (line 8) | public class ExpressionComplexity method M (line 10) | public bool M() method call (line 108) | private bool call(bool v1, bool v2, bool v3) method call (line 113) | private bool call(Func p0) class Foo2 (line 119) | public class Foo2 class Repro_NET2428 (line 129) | public class Repro_NET2428 method Repro_NET2428 (line 137) | public Repro_NET2428(string prop1, string prop2, string prop3, string ... method Equals (line 146) | public override bool Equals(object obj) class With_IEquatable (line 157) | public class With_IEquatable : System.IEquatable method Equals (line 164) | bool System.IEquatable.Equals(With_IEquatable other) => method Equals (line 171) | public static bool Equals(With_IEquatable a, With_IEquatable b) => type With_Struct (line 179) | public struct With_Struct : System.IEquatable method Equals (line 187) | public bool Equals(With_Struct other) => class With_MixedOperators (line 195) | public class With_MixedOperators : System.IEquatable method Equals (line 202) | public bool Equals(With_MixedOperators other) => class With_GenericEquals (line 209) | public class With_GenericEquals : System.IEquatable other) => class With_PrivateEqualsHelper (line 225) | public class With_PrivateEqualsHelper method Equals (line 232) | private bool Equals(With_PrivateEqualsHelper other) => method Equals (line 238) | public override bool Equals(object obj) => class With_EqualsWithoutInterface (line 243) | public class With_EqualsWithoutInterface method Equals (line 251) | public bool Equals(With_EqualsWithoutInterface other) => type IMyRepresentation (line 261) | public interface IMyRepresentation { } class With_EqualsForBaseType (line 263) | public class With_EqualsForBaseType : IMyRepresentation, System.IEquatab... method Equals (line 271) | public bool Equals(With_EqualsForBaseType other) => method Equals (line 279) | public bool Equals(IMyRepresentation other) => // Compliant - impleme... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExtensionMethodShouldBeInSeparateNamespace.CSharp10.cs type Record (line 3) | public record class Record { } type RecordStruct (line 4) | public record struct RecordStruct { } class GlobalExtensions (line 6) | public static class GlobalExtensions method Bar (line 8) | public static void Bar(this Record r) { } method Bar (line 9) | public static void Bar(this RecordStruct r) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExtensionMethodShouldBeInSeparateNamespace.CSharp9.cs type GlobalRecord (line 3) | public record GlobalRecord { } type GlobalStruct (line 4) | public struct GlobalStruct { } class GlobalExtensions (line 6) | public static class GlobalExtensions method Bar (line 8) | public static void Bar(this GlobalRecord r) { } method Bar (line 9) | public static void Bar(this GlobalStruct r) { } type Foo (line 14) | public record Foo { } class MyExtensions (line 18) | public static class MyExtensions method Bar (line 20) | public static void Bar(this MyLibrary.Foo foo) { } method Bar (line 21) | public static void Bar(this GlobalRecord foo) { } type R (line 26) | public record R { } class Extensions (line 27) | public static class Extensions method Bar (line 29) | public static void Bar(this R r) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExtensionMethodShouldBeInSeparateNamespace.GeneratedCode.cs class GenClass (line 1) | [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExtensionMethodShouldBeInSeparateNamespace.cs class GlobalClass (line 3) | class GlobalClass type GlobalStruct (line 7) | struct GlobalStruct class GlobalNamespaceClass (line 11) | static class GlobalNamespaceClass method Qux (line 13) | static void Qux(this GlobalClass i) // Noncompliant method Quux (line 17) | static void Quux(this SomeNonExistingClass snec) // Error [CS0246] Err... method Strux (line 21) | static void Strux(this GlobalStruct s) { } class Program (line 26) | class Program class SubClass (line 28) | static class SubClass method Foobar (line 31) | static void Foobar(this Program p) // Noncompliant class Helpers1 (line 37) | static class Helpers1 method Foo (line 39) | static void Foo(this Program p) // Noncompliant {{Either move this ext... class Helpers2 (line 47) | static class Helpers2 method Bar (line 49) | static void Bar(this SomeNamespace.Program p) // Compliant method Baz (line 53) | static void Baz(this SomeNonExistingClass snec) // Error [CS0246] - un... type IFoo (line 61) | public interface IFoo { } type FooBar (line 63) | public enum FooBar { } type FooQux (line 65) | public struct FooQux { } class Outer (line 67) | public class Outer type IBaz (line 69) | public interface IBaz { } type BazBar (line 71) | public enum BazBar { } type BazQux (line 73) | public struct BazQux { } class FooHelpers (line 77) | public static class FooHelpers method FooInterface (line 79) | public static void FooInterface(this IFoo foo) // Compliant method BazInterface (line 83) | public static void BazInterface(this Outer.IBaz foo) // Compliant method FooEnum (line 87) | public static void FooEnum(this FooBar foo) // Compliant method BazEnum (line 91) | public static void BazEnum(this Outer.BazBar foo) // Compliant method FooStruct (line 95) | public static void FooStruct(this FooQux foo) // Compliant method BazStruct (line 99) | public static void BazStruct(this Outer.BazQux foo) // Compliant method FooGeneric (line 103) | public static T FooGeneric(this T foo) // Compliant class GenClassExtensions (line 111) | internal static class GenClassExtensions method SetSyncLaterError (line 113) | public static void SetSyncLaterError(this GenClass foo) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ExtensionMethodShouldNotExtendObject.cs class Compliant (line 3) | static class Compliant method ExtendsValueType (line 5) | static void ExtendsValueType(this int i) { } method ExtendsWithArguments (line 6) | static int ExtendsWithArguments(this int i, int n) method ExtendsReferenceType (line 10) | static void ExtendsReferenceType(this Exception i) { } method NotAnExtension (line 12) | static void NotAnExtension(object o) { } class NonCompliant (line 15) | static class NonCompliant method ExtendsObject (line 17) | static void ExtendsObject(this object obj) // Noncompliant {{Refactor ... method ExtendsWithArguments (line 22) | static void ExtendsWithArguments(this object obj, int other) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FieldShadowsParentField.CSharp9.cs type Fruit (line 1) | public record Fruit type Raspberry (line 7) | public record Raspberry : Fruit FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FieldShadowsParentField.cs class Fruit (line 5) | public class Fruit class Raspberry (line 11) | public class Raspberry : Fruit class Animal (line 22) | public class Animal { } class Dog (line 23) | public class Dog : Animal { } class AnimalContainer (line 25) | public class AnimalContainer class DogContainer (line 30) | public class DogContainer : AnimalContainer FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FieldShouldBeReadonly.Fixed.cs class Mod (line 6) | public class Mod method DoSomething (line 8) | public static void DoSomething(ref int x) method DoSomething2 (line 11) | public static void DoSomething2(out int x) class Person (line 17) | class Person method Person (line 33) | Person(int birthYear) method M (line 47) | private void M() class Partial (line 74) | partial class Partial method Partial (line 80) | public Partial() class Partial (line 78) | partial class Partial method Partial (line 80) | public Partial() class X (line 86) | class X method X (line 94) | public X() method Modif (line 106) | private void Modif(ref int i) { } type X1Struct (line 109) | struct X1Struct class X1Class (line 113) | class X1Class type Y1 (line 117) | struct Y1 class MyClass (line 122) | class MyClass method MyClass (line 133) | public MyClass() method M (line 145) | public void M() class Nested (line 151) | private class Nested method Nested (line 154) | public Nested() method Method (line 158) | private void Method() method ToggleField (line 328) | public void ToggleField() class Attributed (line 165) | class Attributed method Attributed (line 170) | public Attributed() class MyAttribute (line 176) | public class MyAttribute : Attribute { } class MyClassWithField (line 180) | public class MyClassWithField method Do (line 186) | public void Do() class SerializableClass (line 192) | [Serializable] method SerializableClass (line 197) | public SerializableClass() class DerivedFromSerializable (line 203) | public class DerivedFromSerializable : SerializableClass method DerivedFromSerializable (line 207) | public DerivedFromSerializable() class NullCoalesceAssignment (line 214) | public class NullCoalesceAssignment method DoSomething (line 218) | public void DoSomething() class TupleExpressionAssignment (line 224) | public class TupleExpressionAssignment method TupleExpressionAssignment (line 231) | public TupleExpressionAssignment() method SomeMethod (line 239) | public void SomeMethod() method NewValues (line 245) | private (string, string) NewValues() => ("FOO", "Bar"); type StructWithThisReassignmentToDefaultInMethod (line 249) | public struct StructWithThisReassignmentToDefaultInMethod method StructWithThisReassignmentToDefaultInMethod (line 254) | public StructWithThisReassignmentToDefaultInMethod(int number) method Reset (line 259) | public void Reset() type StructWithThisReassignmentToNewInMethod (line 265) | public struct StructWithThisReassignmentToNewInMethod method StructWithThisReassignmentToNewInMethod (line 270) | public StructWithThisReassignmentToNewInMethod(int number) method ReAssign (line 275) | public void ReAssign() type StructWithThisReassignmentInConstructor (line 281) | public struct StructWithThisReassignmentInConstructor method StructWithThisReassignmentInConstructor (line 286) | public StructWithThisReassignmentInConstructor(int number) class NestedStructWithThisReassignment (line 293) | public class NestedStructWithThisReassignment method NestedStructWithThisReassignment (line 298) | public NestedStructWithThisReassignment(int number) type NestedStruct (line 303) | public struct NestedStruct method NestedStruct (line 308) | public NestedStruct(int number) method Reset (line 313) | public void Reset() class MyClass (line 324) | public class MyClass method MyClass (line 133) | public MyClass() method M (line 145) | public void M() class Nested (line 151) | private class Nested method Nested (line 154) | public Nested() method Method (line 158) | private void Method() method ToggleField (line 328) | public void ToggleField() class BoolExtension (line 334) | public static class BoolExtension method Toggle (line 336) | public static void Toggle(this ref bool value) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FieldShouldBeReadonly.Latest.cs type Person (line 3) | record Person type PointerTypes (line 32) | record PointerTypes class Person2 (line 78) | class Person2 method Person2 (line 83) | Person2(int birthYear) class FieldReadOnly (line 89) | public class FieldReadOnly class FieldWriteOnly (line 100) | public class FieldWriteOnly class NullConditionalAssignment (line 111) | public class NullConditionalAssignment method Assign (line 115) | public void Assign() => FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FieldShouldBeReadonly.cs class Mod (line 6) | public class Mod method DoSomething (line 8) | public static void DoSomething(ref int x) method DoSomething2 (line 11) | public static void DoSomething2(out int x) class Person (line 17) | class Person method Person (line 34) | Person(int birthYear) method M (line 48) | private void M() class Partial (line 75) | partial class Partial method Partial (line 81) | public Partial() class Partial (line 79) | partial class Partial method Partial (line 81) | public Partial() class X (line 87) | class X method X (line 95) | public X() method Modif (line 107) | private void Modif(ref int i) { } type X1Struct (line 110) | struct X1Struct class X1Class (line 114) | class X1Class type Y1 (line 118) | struct Y1 class MyClass (line 123) | class MyClass method MyClass (line 134) | public MyClass() method M (line 146) | public void M() class Nested (line 152) | private class Nested method Nested (line 155) | public Nested() method Method (line 159) | private void Method() method ToggleField (line 329) | public void ToggleField() class Attributed (line 166) | class Attributed method Attributed (line 171) | public Attributed() class MyAttribute (line 177) | public class MyAttribute : Attribute { } class MyClassWithField (line 181) | public class MyClassWithField method Do (line 187) | public void Do() class SerializableClass (line 193) | [Serializable] method SerializableClass (line 198) | public SerializableClass() class DerivedFromSerializable (line 204) | public class DerivedFromSerializable : SerializableClass method DerivedFromSerializable (line 208) | public DerivedFromSerializable() class NullCoalesceAssignment (line 215) | public class NullCoalesceAssignment method DoSomething (line 219) | public void DoSomething() class TupleExpressionAssignment (line 225) | public class TupleExpressionAssignment method TupleExpressionAssignment (line 232) | public TupleExpressionAssignment() method SomeMethod (line 240) | public void SomeMethod() method NewValues (line 246) | private (string, string) NewValues() => ("FOO", "Bar"); type StructWithThisReassignmentToDefaultInMethod (line 250) | public struct StructWithThisReassignmentToDefaultInMethod method StructWithThisReassignmentToDefaultInMethod (line 255) | public StructWithThisReassignmentToDefaultInMethod(int number) method Reset (line 260) | public void Reset() type StructWithThisReassignmentToNewInMethod (line 266) | public struct StructWithThisReassignmentToNewInMethod method StructWithThisReassignmentToNewInMethod (line 271) | public StructWithThisReassignmentToNewInMethod(int number) method ReAssign (line 276) | public void ReAssign() type StructWithThisReassignmentInConstructor (line 282) | public struct StructWithThisReassignmentInConstructor method StructWithThisReassignmentInConstructor (line 287) | public StructWithThisReassignmentInConstructor(int number) class NestedStructWithThisReassignment (line 294) | public class NestedStructWithThisReassignment method NestedStructWithThisReassignment (line 299) | public NestedStructWithThisReassignment(int number) type NestedStruct (line 304) | public struct NestedStruct method NestedStruct (line 309) | public NestedStruct(int number) method Reset (line 314) | public void Reset() class MyClass (line 325) | public class MyClass method MyClass (line 134) | public MyClass() method M (line 146) | public void M() class Nested (line 152) | private class Nested method Nested (line 155) | public Nested() method Method (line 159) | private void Method() method ToggleField (line 329) | public void ToggleField() class BoolExtension (line 335) | public static class BoolExtension method Toggle (line 337) | public static void Toggle(this ref bool value) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FieldShouldNotBePublic.CSharp9.cs type Sample (line 1) | public record Sample class OuterClass (line 23) | public class OuterClass type InnerRecord (line 25) | public record InnerRecord FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FieldShouldNotBePublic.cs class MyClass (line 3) | public class MyClass class MyPublicSubClass (line 14) | public class MyPublicSubClass class MyPrivateSubClass (line 22) | private class MyPrivateSubClass class MyProtectedSubClass (line 30) | protected class MyProtectedSubClass class MyInternalSubClass (line 38) | internal class MyInternalSubClass type MyStruct (line 47) | public struct MyStruct type MyPublicSubStruct (line 56) | public struct MyPublicSubStruct type MyPrivateSubStruct (line 63) | private struct MyPrivateSubStruct type MyInternalSubStruct (line 70) | internal struct MyInternalSubStruct FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FieldsShouldBeEncapsulatedInProperties.CSharp12.cs class PublicClass (line 1) | public class PublicClass(int myValue, int notMyValue) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FieldsShouldBeEncapsulatedInProperties.CSharp9.cs type PublicClass (line 1) | public record PublicClass type InternalClass (line 19) | internal record InternalClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FieldsShouldBeEncapsulatedInProperties.Unity3D.cs class UnityMonoBehaviour (line 4) | public class UnityMonoBehaviour : UnityEngine.MonoBehaviour class UnityScriptableObject (line 9) | public class UnityScriptableObject : UnityEngine.ScriptableObject class InvalidCustomSerializableClass1 (line 14) | public class InvalidCustomSerializableClass1 : UnityEngine.Object class ValidCustomSerializableClass (line 19) | [Serializable] class MonoBehaviour (line 29) | public class MonoBehaviour { } class ScriptableObject (line 30) | public class ScriptableObject { } class Object (line 31) | public class Object { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FieldsShouldBeEncapsulatedInProperties.cs class PublicClass (line 7) | public class PublicClass class PrivateClass (line 14) | private class PrivateClass class ProtectedClass (line 22) | protected class ProtectedClass class InternalClass (line 31) | internal class InternalClass class InnerPublicClass (line 38) | public class InnerPublicClass class PrivateClass (line 43) | private class PrivateClass class ProtectedClass (line 51) | protected class ProtectedClass class PartialClass (line 60) | public partial class PartialClass class PartialClass (line 65) | partial class PartialClass type Struct (line 70) | public struct Struct type InteropStruct (line 75) | [StructLayout(LayoutKind.Explicit, Size = 16, CharSet = CharSet.Ansi)] class InteropClass (line 81) | [StructLayout(LayoutKind.Sequential)] class Repro_8504 (line 88) | [Serializable] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FieldsShouldNotDifferByCapitalization.CSharp9.cs type Fruit (line 1) | public record Fruit type Raspberry (line 7) | public record Raspberry : Fruit FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FieldsShouldNotDifferByCapitalization.cs class Fruit (line 5) | public class Fruit class Raspberry (line 11) | public class Raspberry : Fruit FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FileLines20.cs class FooBar (line 4) | public class FooBar method FooBar (line 6) | public FooBar() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FileLines9.cs class Foo (line 19) | public class Foo /* method Foo (line 34) | public Foo() { // TEST FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FileShouldEndWithEmptyNewLine_EmptyLine.cs class Program (line 5) | class Program FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FileShouldEndWithEmptyNewLine_NoEmptyLine.cs class Program (line 5) | class Program FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FinalizerShouldNotBeEmpty.CSharp9.cs type Record1 (line 1) | record Record1 type Record2 (line 9) | record Record2 type Record3 (line 17) | record Record3 type Record4 (line 25) | record Record4 FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FinalizerShouldNotBeEmpty.cs class Program (line 6) | class Program class Program1 (line 14) | class Program1 class Program2 (line 22) | class Program2 class Program3 (line 30) | class Program3 FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FindInsteadOfFirstOrDefault.Array.cs class FindInsteadOfFirstOrDefault (line 4) | public class FindInsteadOfFirstOrDefault method ArrayType (line 6) | public void ArrayType() method SpecialPattern (line 36) | public static void SpecialPattern(int[] data) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FindInsteadOfFirstOrDefault.Immutable.cs class FindInsteadOfFirstOrDefault (line 5) | public class FindInsteadOfFirstOrDefault class ImmutableHelperClass (line 7) | public static class ImmutableHelperClass method DoWorkReturnGroup (line 9) | public static ImmutableList DoWorkReturnGroup() => null; method DoWorkMethodGroup (line 10) | public static void DoWorkMethodGroup(Func, T> first... method ListBasic (line 13) | public void ListBasic(ImmutableList data) method ThroughLinq (line 24) | public void ThroughLinq(ImmutableList data) method ThroughFunction (line 31) | public void ThroughFunction() method ThroughLambda (line 38) | public void ThroughLambda(Func> lambda) method WithinALambda (line 45) | public void WithinALambda() method AsMethodGroup (line 51) | public void AsMethodGroup(ImmutableList data) method Miscellaneous (line 56) | public void Miscellaneous(ImmutableList data) method Nullable (line 61) | public static void Nullable(ImmutableList data = null) method SpecialPattern (line 68) | public static void SpecialPattern(ImmutableList list1, ImmutableL... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FindInsteadOfFirstOrDefault.Net.cs class FindInsteadOfFirstOrDefault (line 5) | public class FindInsteadOfFirstOrDefault method List (line 7) | public void List(List data) method Array (line 14) | public void Array(int[] data) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FindInsteadOfFirstOrDefault.cs class FindInsteadOfFirstOrDefault (line 6) | public class FindInsteadOfFirstOrDefault class Dummy (line 8) | public class Dummy method FirstOrDefault (line 10) | public object FirstOrDefault() => null; method FirstOrDefault (line 11) | public object FirstOrDefault(Func predicate) => null; class AnotherDummy (line 14) | public class AnotherDummy method UnrelatedType (line 19) | public void UnrelatedType(Dummy dummy, AnotherDummy anotherDummy) class MyList (line 33) | public class MyList : List method Fluent (line 35) | public MyList Fluent() => this; class HiddenList (line 38) | public class HiddenList : List method FirstOrDefault (line 40) | public int? FirstOrDefault(Func predicate) => null; class HelperClass (line 43) | public static class HelperClass method DoWorkReturnGroup (line 45) | public static List DoWorkReturnGroup() => null; method DoWorkMethodGroup (line 46) | public static void DoWorkMethodGroup(Func, T> first... method FilterMethod (line 48) | public static bool FilterMethod(int nb) => true; method FilterMethod (line 51) | public bool FilterMethod(int nb) => true; method ListBasic (line 53) | public void ListBasic(List data) method ThroughLinq (line 66) | public void ThroughLinq(List data) method ThroughFunction (line 73) | public void ThroughFunction() method ThroughLambda (line 80) | public void ThroughLambda(Func> lambda) method WithinALambda (line 87) | public void WithinALambda() method AsMethodGroup (line 93) | public void AsMethodGroup(List data) method Miscellaneous (line 98) | public void Miscellaneous(List data) method FirstOrdefaultNotHidden (line 103) | public static void FirstOrdefaultNotHidden(MyList data) method FirstOrdefaultHidden (line 110) | public static void FirstOrdefaultHidden(HiddenList data) method Nullable (line 116) | public static void Nullable(List data = null) method SpecialPattern (line 123) | public static void SpecialPattern(List data) method FluentNullable (line 133) | public static void FluentNullable(MyList data = null) class ExpressionTree (line 170) | public class ExpressionTree method InExpressionTree (line 172) | public void InExpressionTree() method Repro_7964 (line 177) | public List Repro_7964(IQueryable> values) => ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FlagsEnumWithoutInitializer.cs type FruitType (line 4) | [System.Flags] type FruitType2 (line 12) | enum FruitType2 // Compliant type FruitType3 (line 19) | [Flags] type FruitType4 (line 27) | [System.Flags] type FruitType5 (line 35) | [System.Flags] type FruitType6 (line 43) | [System.Flags] type FruitType7 (line 52) | [System.Flags] type FruitType8 (line 62) | [System.Flags] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FlagsEnumZeroMember.cs type X (line 3) | [System.Flags] type Y (line 10) | [System.Flags] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ForLoopConditionAlwaysFalse.CSharp11.cs class Program (line 5) | class Program method LoopTest (line 7) | void LoopTest(int x, int y) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ForLoopConditionAlwaysFalse.CSharp9.cs class Program (line 5) | class Program method LoopTest (line 7) | void LoopTest(int x, int y) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ForLoopConditionAlwaysFalse.cs class Program (line 5) | class Program method LoopTest (line 7) | void LoopTest(int x, int y) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ForLoopCounterChanged.Latest.cs type S (line 1) | public struct S method LoopCounterChange (line 3) | public void LoopCounterChange((int, int) t) method LocalNamedAsDiscard (line 71) | public void LocalNamedAsDiscard() class SomeClass (line 81) | public class SomeClass method CSharp11Compound (line 86) | public void CSharp11Compound((int, int) t) method NullConditionalAssignment (line 95) | public void NullConditionalAssignment(SomeClass arg) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ForLoopCounterChanged.cs class ForLoopCounterChanged (line 3) | public class ForLoopCounterChanged class Helper (line 5) | class Helper method ForLoopCounterChanged (line 11) | public ForLoopCounterChanged() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ForLoopCounterCondition.cs class ForLoopCounterCondition (line 3) | public class ForLoopCounterCondition method someMethod (line 5) | private int someMethod(HelperClass o) class HelperClass (line 10) | public class HelperClass method ForLoopCounterCondition (line 16) | public ForLoopCounterCondition() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ForLoopIncrementSign.cs class ForLoopIncrementSign (line 5) | public class ForLoopIncrementSign method TestMethod (line 9) | public void TestMethod(int x, int y, int z) method Update (line 88) | private void Update() method Condition (line 92) | private bool Condition() class Point (line 98) | public class Point FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ForeachLoopExplicitConversion.Fixed.cs type I (line 8) | interface I { } class A (line 9) | class A : I { } class B (line 10) | class B : A { } class ForeachLoopExplicitConversion (line 11) | class ForeachLoopExplicitConversion method S (line 13) | public void S(string s) method M1 (line 22) | public void M1(IEnumerable enumerable) method M2 (line 31) | public void M2(IEnumerable enumerable) method M3 (line 40) | public void M3(A[] array) method M4 (line 49) | public void M4(A[][] array) method M5 (line 60) | public void M5(ArrayList list) type IMyInterface (line 73) | public interface IMyInterface class Base (line 76) | public class Base class Derived (line 80) | public class Derived : Base, IMyInterface class OtherType (line 83) | public class OtherType class MyTest (line 91) | class MyTest method Test (line 93) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ForeachLoopExplicitConversion.Latest.Fixed.cs type I (line 9) | public interface I { } class A (line 10) | public class A : I { } class B (line 11) | public class B : A { } type Record (line 13) | record Record type RecordStruct (line 25) | record struct RecordStruct class FieldKeyword (line 38) | public class FieldKeyword FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ForeachLoopExplicitConversion.Latest.cs type I (line 8) | public interface I { } class A (line 9) | public class A : I { } class B (line 10) | public class B : A { } type Record (line 12) | record Record type RecordStruct (line 25) | record struct RecordStruct class FieldKeyword (line 38) | public class FieldKeyword FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ForeachLoopExplicitConversion.cs type I (line 7) | interface I { } class A (line 8) | class A : I { } class B (line 9) | class B : A { } class ForeachLoopExplicitConversion (line 10) | class ForeachLoopExplicitConversion method S (line 12) | public void S(string s) method M1 (line 21) | public void M1(IEnumerable enumerable) method M2 (line 30) | public void M2(IEnumerable enumerable) method M3 (line 40) | public void M3(A[] array) method M4 (line 49) | public void M4(A[][] array) method M5 (line 60) | public void M5(ArrayList list) type IMyInterface (line 73) | public interface IMyInterface class Base (line 76) | public class Base class Derived (line 80) | public class Derived : Base, IMyInterface class OtherType (line 83) | public class OtherType class MyTest (line 91) | class MyTest method Test (line 93) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FrameworkTypeNaming.cs class MyAttribute (line 4) | class MyAttribute : Attribute class AttributeOne (line 8) | class AttributeOne : Attribute // Noncompliant {{Make this class name en... class ExceptionOne (line 13) | class ExceptionOne : Exception // Noncompliant class MyEventArgsOne (line 17) | class MyEventArgsOne : EventArgs // Noncompliant class MyEventArgs (line 21) | class MyEventArgs class ExceptionTwo (line 26) | class ExceptionTwo : ExceptionOne // Compliant, the base class doesn't c... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FunctionComplexity.Latest.cs type FunctionComplexity (line 30) | public record FunctionComplexity type A (line 92) | public struct A method A (line 99) | public A() type B (line 107) | public struct B method B (line 114) | public B() // Noncompliant [6] class LocalFunctions (line 128) | public class LocalFunctions method MethodWithLocalfunctions (line 130) | public void MethodWithLocalfunctions() // Noncompliant [7] {{The Cyclo... class PartialProperty (line 158) | public partial class PartialProperty class PartialProperty (line 162) | public partial class PartialProperty FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FunctionComplexity.cs class FunctionComplexity (line 5) | public class FunctionComplexity method FunctionComplexity (line 9) | public FunctionComplexity() method M1 (line 33) | public void M1() method M2 (line 39) | public void M2() // Noncompliant [2] method Method23 (line 93) | public bool Method23(bool x) => x || x || x || x || x; method Foo (line 106) | private void Foo(Class c) // Noncompliant [10] class Class (line 116) | private class Class method NullCoalescenceAssignment (line 121) | void NullCoalescenceAssignment() // Noncompliant [11] method MethodWithLocalfunction (line 134) | public void MethodWithLocalfunction() // Noncompliant [12] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FunctionNestingDepth.CSharp9.cs type FunctionNestingDepth (line 37) | public record FunctionNestingDepth FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/FunctionNestingDepth.cs class FunctionNestingDepth (line 5) | public class FunctionNestingDepth method FunctionNestingDepth (line 7) | public FunctionNestingDepth() method M1 (line 38) | public void M1() method M2 (line 70) | public void M2() method M3 (line 86) | public int M3() => (new Func(() => method M4 (line 96) | public int M4() => (new Func(() => method SwitchStatement (line 105) | public void SwitchStatement() method M5 (line 219) | public static void M5() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericInheritanceShouldNotBeRecursive.CSharp9.cs type CA (line 1) | record CA { } type CB (line 2) | record CB { } type CC (line 3) | record CC { } type C0 (line 4) | record C0 : CA> { } type C1 (line 5) | record C1 : CA>> { } type C2 (line 6) | record C2 : CA>> { } type C3 (line 7) | record C3 : CA>> { } type C4 (line 8) | record C4 : CA>> { } type C5 (line 9) | record C5 : CC>, CB> { } type C6 (line 10) | record C6 : CC>, CB> { } type C7 (line 11) | record C7 : CA>>>>>>>>>>>>>... type C8 (line 12) | record C8(string parameter) : CA { } class CB (line 7) | class CB { } class CC (line 8) | class CC { } class C0 (line 10) | class C0 : CA> { } class C1 (line 12) | class C1 : CA>> { } class C2 (line 14) | class C2 : CA>> { } class C3 (line 17) | class C3 : CA>> { } class C4 (line 19) | class C4 : CA>> { } class C5 (line 21) | class C5 : CC>, CB> { } class C6 (line 23) | class C6 : CC>, CB> { } class C7 (line 25) | class C7 : CA>>>>>>>>>>>>> { } class C8 (line 28) | class C8 : IComparable>> { } type IA (line 34) | interface IA { } type IB (line 35) | interface IB { } type I0 (line 37) | interface I0 : IA> { } type I1 (line 39) | interface I1 : IA>> { } type I2 (line 41) | interface I2 : I0, IA>> { } type I3 (line 43) | interface I3 : IA>> { } type I4 (line 45) | interface I4 : IA>> { } type I5 (line 47) | interface I5 : IA>> { } type I6 (line 49) | interface I6 : IA>>>>>>>>>>... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericLoggerInjectionShouldMatchEnclosingType.Latest.cs class Correct (line 4) | public partial class Correct method Correct (line 6) | partial Correct(ILogger logger); method Correct (line 7) | partial Correct(ILogger logger); method Correct (line 12) | partial Correct(ILogger logger) { } method Correct (line 13) | partial Correct(ILogger logger) { } class Correct (line 10) | public partial class Correct method Correct (line 6) | partial Correct(ILogger logger); method Correct (line 7) | partial Correct(ILogger logger); method Correct (line 12) | partial Correct(ILogger logger) { } method Correct (line 13) | partial Correct(ILogger logger) { } class Wrong (line 16) | public class Wrong { } class PrimaryConstructorCorrect (line 19) | public class PrimaryConstructorCorrect(ILogger logger); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericLoggerInjectionShouldMatchEnclosingType.cs class Correct (line 4) | public class Correct : Base method Correct (line 6) | Correct(ILogger logger) : base(logger) { } method Correct (line 7) | Correct(ILogger logger, ILogger logger2) { } method Correct (line 9) | Correct(Wrapper logger) { } method Correct (line 10) | Correct(Wrapper logger) { } method Correct (line 11) | Correct(Wrapper logger, Wrapper logger2) { } method Correct (line 13) | Correct(ILogger logger) { } method Correct (line 15) | Correct(ILogger logger) { } method Correct (line 17) | Correct(ILogger logger) : base(logger) { } method Correct (line 19) | Correct(ILogger> logger) { } method Correct (line 21) | Correct(ILogger> logger) { } method Correct (line 24) | Correct(ILogger logger, ILogger logger2) { } method Correct (line 28) | Correct(ILogger logger, ILogger logger2, ILogger logger, Logger logger2) { } method Correct (line 35) | Correct(Logger logger) { } class Base (line 38) | public class Base method Base (line 40) | public Base(ILogger logger) { } method Base (line 41) | public Base(ILogger logger) { } method Base (line 42) | public Base() { } class Wrong (line 45) | public class Wrong { } class Wrapper (line 46) | public class Wrapper { } class Logger (line 48) | public class Logger : Logger { } method BeginScope (line 52) | public IDisposable BeginScope(TState x) => null; method IsEnabled (line 53) | public bool IsEnabled(LogLevel x) => false; method Log (line 54) | void ILogger.Log(LogLevel x1, EventId x2, TState x3, Exception... class Logger (line 50) | public class Logger : ILogger method BeginScope (line 52) | public IDisposable BeginScope(TState x) => null; method IsEnabled (line 53) | public bool IsEnabled(LogLevel x) => false; method Log (line 54) | void ILogger.Log(LogLevel x1, EventId x2, TState x3, Exception... class DerivedGeneric (line 57) | public class DerivedGeneric : Generic { } class Generic (line 59) | public class Generic method Generic (line 61) | Generic(ILogger> logger) { } method Generic (line 63) | Generic(ILogger> logger) { } method Generic (line 64) | Generic(ILogger> logger) { } method Generic (line 65) | Generic(ILogger logger) { } method Generic (line 66) | Generic(ILogger logger) { } method Generic (line 68) | public Generic() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericReadonlyFieldPropertyAssignment.AddConstraint.Fixed.cs type IPoint (line 9) | interface IPoint class PointManager (line 16) | partial class PointManager where T : class, IPoint method PointManager (line 19) | public PointManager(T point) method MovePointVertically (line 26) | public void MovePointVertically(int newX) class PointManager (line 38) | partial class PointManager where T : class, IPoint method PointManager (line 19) | public PointManager(T point) method MovePointVertically (line 26) | public void MovePointVertically(int newX) class PointManager (line 43) | partial class PointManager method PointManager (line 19) | public PointManager(T point) method MovePointVertically (line 26) | public void MovePointVertically(int newX) class PointManager2 (line 48) | class PointManager2 where T : class, IPoint method PointManager2 (line 51) | public PointManager2(T point) method MovePointVertically (line 56) | public void MovePointVertically(int newX) class PointManager3 (line 63) | class PointManager3 where T : struct, IPoint method PointManager3 (line 66) | public PointManager3(T point) method MovePointVertically (line 72) | public void MovePointVertically(int newX) class P2 (line 80) | class P2 where A : class, IPoint where B : A method P2 (line 85) | public P2(A a, B b) method Add (line 91) | public void Add(int i) class SelfReferencing2 (line 98) | class SelfReferencing2 where T : SelfReferencing2, IPoint method Add (line 102) | public void Add(int i) class PublicField (line 108) | class PublicField where T : IPoint class PublicFieldAccessor (line 113) | class PublicFieldAccessor where T : class, IPoint method PublicFieldAccessor (line 115) | public PublicFieldAccessor() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericReadonlyFieldPropertyAssignment.Latest.Remove.Fixed.cs type IPoint (line 1) | interface IPoint type PointManager (line 8) | partial record PointManager where T : IPoint type PointManager (line 13) | partial record PointManager where T : IPoint type PointManagerCompliant (line 62) | record PointManagerCompliant where T : class, IPoint FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericReadonlyFieldPropertyAssignment.Latest.cs type IPoint (line 1) | interface IPoint type PointManager (line 8) | partial record PointManager where T : IPoint type PointManager (line 13) | partial record PointManager where T : IPoint type PointManagerCompliant (line 66) | record PointManagerCompliant where T : class, IPoint FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericReadonlyFieldPropertyAssignment.Remove.Fixed.cs type IPoint (line 9) | interface IPoint class PointManager (line 16) | partial class PointManager where T : IPoint method PointManager (line 19) | public PointManager(T point) method MovePointVertically (line 26) | public void MovePointVertically(int newX) class PointManager (line 34) | partial class PointManager where T : IPoint method PointManager (line 19) | public PointManager(T point) method MovePointVertically (line 26) | public void MovePointVertically(int newX) class PointManager (line 39) | partial class PointManager method PointManager (line 19) | public PointManager(T point) method MovePointVertically (line 26) | public void MovePointVertically(int newX) class PointManager2 (line 44) | class PointManager2 where T : class, IPoint method PointManager2 (line 47) | public PointManager2(T point) method MovePointVertically (line 52) | public void MovePointVertically(int newX) class PointManager3 (line 59) | class PointManager3 where T : struct, IPoint method PointManager3 (line 62) | public PointManager3(T point) method MovePointVertically (line 68) | public void MovePointVertically(int newX) class P2 (line 76) | class P2 where A : class, IPoint where B : A method P2 (line 81) | public P2(A a, B b) method Add (line 87) | public void Add(int i) class SelfReferencing2 (line 94) | class SelfReferencing2 where T : SelfReferencing2, IPoint method Add (line 98) | public void Add(int i) class PublicField (line 104) | class PublicField where T : IPoint class PublicFieldAccessor (line 109) | class PublicFieldAccessor where T : IPoint method PublicFieldAccessor (line 111) | public PublicFieldAccessor() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericReadonlyFieldPropertyAssignment.cs type IPoint (line 9) | interface IPoint class PointManager (line 16) | partial class PointManager where T : IPoint method PointManager (line 19) | public PointManager(T point) method MovePointVertically (line 26) | public void MovePointVertically(int newX) class PointManager (line 39) | partial class PointManager where T : IPoint method PointManager (line 19) | public PointManager(T point) method MovePointVertically (line 26) | public void MovePointVertically(int newX) class PointManager (line 44) | partial class PointManager method PointManager (line 19) | public PointManager(T point) method MovePointVertically (line 26) | public void MovePointVertically(int newX) class PointManager2 (line 49) | class PointManager2 where T : class, IPoint method PointManager2 (line 52) | public PointManager2(T point) method MovePointVertically (line 57) | public void MovePointVertically(int newX) class PointManager3 (line 64) | class PointManager3 where T : struct, IPoint method PointManager3 (line 67) | public PointManager3(T point) method MovePointVertically (line 73) | public void MovePointVertically(int newX) class P2 (line 81) | class P2 where A : class, IPoint where B : A method P2 (line 86) | public P2(A a, B b) method Add (line 92) | public void Add(int i) class SelfReferencing2 (line 99) | class SelfReferencing2 where T : SelfReferencing2, IPoint method Add (line 103) | public void Add(int i) class PublicField (line 109) | class PublicField where T : IPoint class PublicFieldAccessor (line 114) | class PublicFieldAccessor where T : IPoint method PublicFieldAccessor (line 116) | public PublicFieldAccessor() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericTypeParameterEmptinessChecking.Fixed.cs class A (line 8) | public class A class B (line 12) | public abstract class B type Interface (line 16) | public interface Interface class GenericTypeParameterEmptinessChecking (line 20) | public class GenericTypeParameterEmptinessChecking method M (line 22) | public void M(List t) method My (line 28) | public void My(IEnumerable analyzers) method Mx (line 34) | public void Mx(List t) // Error [CS0246] - unknown type C method M2 (line 41) | public void M2(T t) where T : class method M3 (line 47) | public void M3(T t) where T : Interface method M4 (line 56) | public void M4(T t) where T : A method M5 (line 62) | public void M5(T t) where T : C // Error [CS0246] - unknown type FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericTypeParameterEmptinessChecking.Latest.cs type Record (line 22) | public record Record type R (line 30) | public record R where T : class class PrimaryConstructor (line 40) | public class PrimaryConstructor(T arg) method Method (line 44) | public bool Method() class Extensions (line 61) | public static class Extensions method Method (line 65) | public bool Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericTypeParameterEmptinessChecking.cs class A (line 8) | public class A class B (line 12) | public abstract class B type Interface (line 16) | public interface Interface class GenericTypeParameterEmptinessChecking (line 20) | public class GenericTypeParameterEmptinessChecking method M (line 22) | public void M(List t) method My (line 29) | public void My(IEnumerable analyzers) method Mx (line 35) | public void Mx(List t) // Error [CS0246] - unknown type C method M2 (line 42) | public void M2(T t) where T : class method M3 (line 48) | public void M3(T t) where T : Interface method M4 (line 57) | public void M4(T t) where T : A method M5 (line 63) | public void M5(T t) where T : C // Error [CS0246] - unknown type FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericTypeParameterInOut.Latest.cs type ISample1 (line 5) | public interface ISample1 // Compliant, T cannot be in or out when us... method Process (line 7) | (T, object) Process(T item); type ISample2 (line 9) | public interface ISample2 // Compliant, T cannot be in or out when us... method Process (line 11) | void Process((T, object) item); type ISample3 (line 13) | public interface ISample3 // Noncompliant {{Add the 'in' keyword to p... method Process (line 15) | void Process(T item); type ISample4 (line 17) | public interface ISample4 // Noncompliant {{Add the 'out' keyword to ... method Process (line 19) | T Process(object item); class Extensions (line 22) | public static class Extensions method Extension (line 26) | T Extension(T item) => item; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericTypeParameterInOut.cs type IConsumer (line 15) | interface IConsumer // Noncompliant {{Add the 'in' keyword to paramet... method Eat (line 17) | bool Eat(T fruit); method Eat2 (line 18) | void Eat2(T fruit, T fruit1, int fruit2); type IConsumerOk (line 22) | interface IConsumerOk method Eat (line 24) | bool Eat(T fruit); method Eat2 (line 25) | void Eat2(T fruit, T fruit1, int fruit2); type IConsumer2 (line 30) | interface IConsumer2 // Noncompliant method Eat (line 33) | T Eat(); type IConsumer3 (line 36) | interface IConsumer3 // Noncompliant method M (line 38) | T M(); type IConsumer4 (line 42) | interface IConsumer4 //Noncompliant method M (line 44) | IEnumerable M(); type IConsumer5 (line 46) | interface IConsumer5 //we don't report if it is not used method M (line 48) | void M(); type IException (line 50) | interface IException method M (line 52) | void M(ref T p); type IException2 (line 54) | interface IException2 method M (line 56) | void M(out T p); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericTypeParameterUnused.Latest.Partial.cs class PartialConstructor (line 1) | public partial class PartialConstructor method PartialConstructor (line 3) | public partial PartialConstructor(T param) { } class PartialEvent (line 6) | public partial class PartialEvent // Compliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericTypeParameterUnused.Latest.cs type Interface (line 5) | public interface Interface method Add (line 7) | int Add(int a, int b); type AnotherInterface (line 10) | public interface AnotherInterface method AddStatic (line 12) | static int AddStatic(int a, int b) // Noncompliant method AddAbstract (line 17) | static abstract int AddAbstract(int a, int b); method AddVirtual (line 19) | static virtual int AddVirtual(int a, int b) // Compliant: T mi... type Record1 (line 25) | public record Record1 : Interface type Record1 (line 42) | public record Record1 // Noncompliant {{'T' is not used in the record.}} type Record2 (line 46) | public record Record2(T X) // Compliant type Record3 (line 50) | public record Record3(int X) // Noncompliant type IUsedInBody (line 54) | public interface IUsedInBody method WithDefaultImplementation (line 56) | object WithDefaultImplementation() => type R (line 60) | public record struct R : Interface type RecordStruct1 (line 77) | public record struct RecordStruct1 // Noncompliant {{'T' is not used ... type RecordStruct2 (line 81) | public record struct RecordStruct2(T X) // Compliant type RecordStruct3 (line 85) | public record struct RecordStruct3(int X) // Noncompliant class InterfaceImplementation (line 89) | public class InterfaceImplementation : AnotherInterface method AddAbstract (line 91) | public static int AddAbstract(int a, int b) // Compliant: it i... method AddVirtual (line 96) | public static int AddVirtual(int a, int b) // Compliant: it i... class Example (line 102) | public class Example(T param) // Compliant method IsNull (line 104) | bool IsNull() => param is null; class PartialConstructor (line 107) | public partial class PartialConstructor // Compliant method PartialConstructor (line 109) | public partial PartialConstructor(T param); class PartialEvent (line 112) | public partial class PartialEvent // Compliant class NoncompliantWithExtensions (line 117) | public class NoncompliantWithExtensions { } class Extensions (line 119) | public static class Extensions method FirstExtension (line 121) | public static void FirstExtension(NoncompliantWithExtensions sen... method Extension (line 123) | extension(NoncompliantWithExtensions sender) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericTypeParameterUnused.Partial.cs class PartialClass (line 9) | public partial class PartialClass method Find (line 11) | public void Find(T x) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericTypeParameterUnused.cs class NonGeneric (line 9) | public class NonGeneric type Interface (line 14) | public interface Interface method Add (line 16) | int Add(int a, int b); class InterfaceImplementation (line 19) | public class InterfaceImplementation : Interface, IDummyInterface // Err... method Add (line 21) | public int Add(int a, int b) //Compliant, it is implementing the in... method MyMethod (line 26) | int IDummyInterface.MyMethod(int a, int b) // Error [CS0246,CS0538]... class MoreMath (line 33) | public class MoreMath // Noncompliant {{'T' is not used in the class.}} method Add (line 36) | public int Add(int a, int b) // Noncompliant; is ignored method Add (line 75) | public int Add(int a, int b) method Do (line 80) | public abstract int Do(int a); class MoreMath2 (line 42) | public class MoreMath2 : List method Add (line 45) | public int Add(int a, int b) // Noncompliant; is ignored method Substract (line 50) | public int Substract(int a, int b) => a - b; class MoreMath3 (line 52) | public class MoreMath3 : MoreMath2 class MoreMath4 (line 56) | public class MoreMath4 : MoreMath2 // Noncompliant class MoreMath5 (line 60) | public class MoreMath5 : MoreMath2>> method DoStuff (line 62) | public List DoStuff(List o) method DoStuff (line 67) | public T3 DoStuff(params T3[] o) // Noncompliant class MoreMath (line 73) | public abstract class MoreMath method Add (line 36) | public int Add(int a, int b) // Noncompliant; is ignored method Add (line 75) | public int Add(int a, int b) method Do (line 80) | public abstract int Do(int a); class ComplexMath (line 83) | public class ComplexMath : MoreMath method Do (line 85) | public override int Do(int a) class SomeClass (line 92) | public partial class SomeClass class Inner (line 94) | private class Inner : List class SomeClass (line 99) | public partial class SomeClass class Inner (line 94) | private class Inner : List class MyNotReallyGenericClass (line 103) | public class MyNotReallyGenericClass // Noncompliant class MyCompliantSpecialGenericClass (line 108) | public class MyCompliantSpecialGenericClass // Compliant method MyMethod (line 112) | public void MyMethod(T2 p) { } class MyNonCompliantSpecialGenericClass (line 115) | public class MyNonCompliantSpecialGenericClass< class WithLocalFunctions (line 123) | public class WithLocalFunctions method Method (line 125) | public void Method() class PartialClass (line 166) | public partial class PartialClass class T (line 170) | public class T method Method (line 172) | public void Method() {} class GenericClass (line 175) | public class GenericClass // Noncompliant method Method (line 177) | public void Method(Tests.Diagnostics.T x) type SomeStruct (line 183) | public struct SomeStruct // Noncompliant method Add (line 185) | public int Add(int a, int b) // Noncompliant; is ignored type StructUnused (line 191) | public struct StructUnused // Noncompliant {{'T' is not used in the... type IUsedAsReturnType (line 195) | public interface IUsedAsReturnType method Create (line 197) | T Create(); type IUsedAsProperty (line 200) | public interface IUsedAsProperty type IUsedAsArgument (line 205) | public interface IUsedAsArgument method Create (line 207) | object Create(T arg); type IUnusedEmpty (line 210) | public interface IUnusedEmpty // Noncompliant {{'T' is not used in... type IUnused (line 214) | public interface IUnused // Noncompliant method Create (line 216) | object Create(); method Create (line 217) | object Create(object arg); type IUnusedWithVariance (line 221) | public interface IUnusedWithVariance // Noncompliant type IUnusedWithContravariance (line 225) | public interface IUnusedWithContravariance // Noncompliant type IUsedInBaseType (line 229) | public interface IUsedInBaseType : IEnumerable type IUsedInTypeConstraint (line 233) | public interface IUsedInTypeConstraint where T : class // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GenericTypeParametersRequired.cs class GenericClass (line 6) | public class GenericClass method SomeMethod (line 8) | public V SomeMethod() { return default(V); } class MyClass (line 11) | public class MyClass class Foo (line 14) | public class Foo method MyMethod (line 16) | public void MyMethod() // Noncompliant {{Refactor this method to u... method MyMethod_02 (line 21) | public void MyMethod_02(MyClass foo) { } method MyMethod_03 (line 22) | public void MyMethod_03(T foo, T foo2) { } method MyMethod_04 (line 23) | public void MyMethod_04(TKey foo, TValue foo2) { } method MyMethod_05 (line 25) | public void MyMethod_05(TKey foo) { } method MyMethod_06 (line 26) | public void MyMethod_06(TValue foo) { } method MyMethod_09 (line 28) | public void MyMethod_09() { } method MyMethod_10 (line 29) | public void MyMethod_10(int i) { } method MyMethod_11 (line 30) | public void MyMethod_11(T i) { } method MyMethod_12 (line 32) | public void MyMethod_12(IEquatable foo) { } method MyMethod_13 (line 33) | public void MyMethod_13(Dictionary foo) { } method MyMethod_14 (line 35) | public void MyMethod_14(Tuple>, Tuple, T>> ... method MyMethod_15 (line 37) | public void MyMethod_15(params V[] p) { } method MyMethod_16 (line 39) | public void MyMethod_16(params T[] p) { } method MyMethod_17 (line 41) | public void MyMethod_17(V[] p) { } method MyMethod_18 (line 42) | public void MyMethod_18(MyClass[] p) { } method MyMethod_19 (line 44) | public void MyMethod_19(List p) { } method MyMethod_20 (line 45) | public void MyMethod_20(List p) { } method MyMethod_21 (line 46) | public void MyMethod_21(List[] p) { } method MyMethod_22 (line 48) | public void MyMethod_22(List[] p) { } method MyMethod_08 (line 51) | public TKey MyMethod_08() { return default(TKey); } method MyMethod_23 (line 53) | public static T MyMethod_23(string value) // Noncompliant FP FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GetHashCodeEqualsOverride.Latest.cs type Compliant (line 1) | public record Compliant type BaseGetHashCodeUsed (line 8) | public record BaseGetHashCodeUsed type WithParameters (line 15) | public record WithParameters(string X) class Extensions (line 20) | public static class Extensions method extension (line 22) | extension(object sender) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GetHashCodeEqualsOverride.cs class GetHashCodeEqualsOverride (line 8) | class GetHashCodeEqualsOverride method GetHashCodeEqualsOverride (line 11) | public GetHashCodeEqualsOverride(int x) method Somemethod (line 16) | public bool Somemethod() method GetHashCode (line 31) | public override int GetHashCode() method Equals (line 36) | public override bool Equals(object obj) method ToString (line 62) | public override string ToString() class GetHashCodeEqualsOverride1 (line 68) | class GetHashCodeEqualsOverride1 method GetHashCodeEqualsOverride1 (line 71) | public GetHashCodeEqualsOverride1(int x) method Equals (line 76) | public override bool Equals(object obj) class GetHashCodeEqualsOverride2 (line 87) | class GetHashCodeEqualsOverride2 method GetHashCodeEqualsOverride2 (line 90) | public GetHashCodeEqualsOverride2(int x) method GetHashCode (line 94) | public override int GetHashCode() class GetHashCodeEqualsOverride3 (line 100) | class GetHashCodeEqualsOverride3 : GetHashCodeEqualsOverride2 method GetHashCodeEqualsOverride3 (line 103) | public GetHashCodeEqualsOverride3(int x) : base(x) method GetHashCode (line 107) | public override int GetHashCode() method ToString (line 112) | public override string ToString() class Base (line 118) | class Base class Derived (line 121) | class Derived : Base method GetHashCode (line 123) | public override int GetHashCode() class DerivedWithExpressionBody (line 129) | class DerivedWithExpressionBody : Base method GetHashCode (line 131) | public override int GetHashCode() => base.GetHashCode(); method Equals (line 132) | public override bool Equals(Object obj) => base.Equals(obj); class WithBrowsableAttribute (line 141) | class WithBrowsableAttribute method GetHashCode (line 143) | [Browsable(false)] method Equals (line 149) | [Browsable(true)] class WithEditorBrowsableFalseAttribute (line 156) | class WithEditorBrowsableFalseAttribute method GetHashCode (line 158) | [EditorBrowsable(EditorBrowsableState.Always)] method Equals (line 164) | [EditorBrowsable(EditorBrowsableState.Never)] class WithBothAttributes (line 171) | class WithBothAttributes method GetHashCode (line 173) | [Browsable(false)] class WithCustomAttribute (line 178) | class WithCustomAttribute method GetHashCode (line 180) | [MyAttribute] method Equals (line 183) | [MyAttribute] class MyAttribute (line 190) | public class MyAttribute : Attribute { } class EqualsEmptyReturnBase (line 193) | class EqualsEmptyReturnBase method Equals (line 195) | protected bool Equals(object first, object second) { return true; } class EqualsEmptyReturn (line 198) | class EqualsEmptyReturn : EqualsEmptyReturnBase method Equals (line 200) | public override bool Equals(Object obj) method Method (line 222) | private void Method() { } class GetHashCodeInsideExpressions (line 225) | public class GetHashCodeInsideExpressions method GetHashCode (line 229) | public override int GetHashCode() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GetHashCodeMutable.Fixed.cs class AnyOther (line 5) | public class AnyOther class GetHashCodeMutable (line 10) | public class GetHashCodeMutable : AnyOther method GetHashCodeMutable (line 18) | public GetHashCodeMutable() method GetHashCode (line 22) | public override int GetHashCode() // Fixed method SomeMethod (line 33) | public int SomeMethod(int value) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GetHashCodeMutable.Latest.cs type AnyOther (line 3) | public record AnyOther type GetHashCodeMutable (line 8) | public record GetHashCodeMutable : AnyOther type Struct (line 37) | public struct Struct method GetHashCode (line 42) | public override int GetHashCode() => Field; type RecordStruct (line 45) | public record struct RecordStruct FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GetHashCodeMutable.cs class AnyOther (line 5) | public class AnyOther class GetHashCodeMutable (line 10) | public class GetHashCodeMutable : AnyOther method GetHashCodeMutable (line 18) | public GetHashCodeMutable() method GetHashCode (line 22) | public override int GetHashCode() // Noncompliant {{Refactor 'GetHashC... method SomeMethod (line 34) | public int SomeMethod(int value) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GetTypeWithIsAssignableFrom.Fixed.Batch.cs class GetTypeWithIsAssignableFrom (line 6) | class GetTypeWithIsAssignableFrom method Test (line 8) | void Test(bool b) class Fruit (line 46) | class Fruit { } class Apple (line 47) | sealed class Apple : Fruit { } class NonsealedBerry (line 48) | class NonsealedBerry : Fruit { } class Program (line 50) | class Program method Main (line 52) | static void Main() class Repro_3605 (line 82) | public class Repro_3605 method Go (line 91) | public void Go(Repro_3605 value) type AnEnum (line 99) | public enum AnEnum class Repro_6616 (line 105) | public class Repro_6616 method IsInstanceOfType (line 107) | public void IsInstanceOfType(object obj, Type t) method IsAssignableFrom (line 126) | public void IsAssignableFrom(object obj, Type t1, Type t2) class Coverage (line 147) | public class Coverage method Foo (line 149) | public void Foo() method IsInstanceOfType (line 159) | public bool IsInstanceOfType(string x) => true; method IsAssignableFrom (line 160) | public bool IsAssignableFrom(string x) => true; method GetType (line 161) | public bool GetType(object x) => true; method GetType (line 162) | public Type GetType() => null; class CoverageWithErrors (line 165) | public class CoverageWithErrors method Go (line 167) | public void Go(CoverageWithErrors arg) class Sample (line 182) | public class Sample method Method (line 184) | public void Method(ISomething instance) class Object (line 194) | public class Object { } type ISomething (line 196) | public interface ISomething { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GetTypeWithIsAssignableFrom.Fixed.cs class GetTypeWithIsAssignableFrom (line 6) | class GetTypeWithIsAssignableFrom method Test (line 8) | void Test(bool b) class Fruit (line 46) | class Fruit { } class Apple (line 47) | sealed class Apple : Fruit { } class NonsealedBerry (line 48) | class NonsealedBerry : Fruit { } class Program (line 50) | class Program method Main (line 52) | static void Main() class Repro_3605 (line 82) | public class Repro_3605 method Go (line 91) | public void Go(Repro_3605 value) type AnEnum (line 99) | public enum AnEnum class Repro_6616 (line 105) | public class Repro_6616 method IsInstanceOfType (line 107) | public void IsInstanceOfType(object obj, Type t) method IsAssignableFrom (line 126) | public void IsAssignableFrom(object obj, Type t1, Type t2) class Coverage (line 147) | public class Coverage method Foo (line 149) | public void Foo() method IsInstanceOfType (line 159) | public bool IsInstanceOfType(string x) => true; method IsAssignableFrom (line 160) | public bool IsAssignableFrom(string x) => true; method GetType (line 161) | public bool GetType(object x) => true; method GetType (line 162) | public Type GetType() => null; class CoverageWithErrors (line 165) | public class CoverageWithErrors method Go (line 167) | public void Go(CoverageWithErrors arg) class Sample (line 182) | public class Sample method Method (line 184) | public void Method(ISomething instance) class Object (line 194) | public class Object { } type ISomething (line 196) | public interface ISomething { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GetTypeWithIsAssignableFrom.Latest.Fixed.cs type Fruit (line 25) | record Fruit type Apple (line 31) | sealed record Apple : Fruit class SomeClass (line 38) | public class SomeClass : System.Collections.ArrayList method SomeMethod (line 40) | public bool SomeMethod(SomeClass a) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GetTypeWithIsAssignableFrom.Latest.cs type Fruit (line 25) | record Fruit type Apple (line 31) | sealed record Apple : Fruit class SomeClass (line 38) | public class SomeClass : System.Collections.ArrayList method SomeMethod (line 40) | public bool SomeMethod(SomeClass a) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GetTypeWithIsAssignableFrom.cs class GetTypeWithIsAssignableFrom (line 6) | class GetTypeWithIsAssignableFrom method Test (line 8) | void Test(bool b) class Fruit (line 48) | class Fruit { } class Apple (line 49) | sealed class Apple : Fruit { } class NonsealedBerry (line 50) | class NonsealedBerry : Fruit { } class Program (line 52) | class Program method Main (line 54) | static void Main() class Repro_3605 (line 84) | public class Repro_3605 method Go (line 93) | public void Go(Repro_3605 value) type AnEnum (line 101) | public enum AnEnum class Repro_6616 (line 107) | public class Repro_6616 method IsInstanceOfType (line 109) | public void IsInstanceOfType(object obj, Type t) method IsAssignableFrom (line 128) | public void IsAssignableFrom(object obj, Type t1, Type t2) class Coverage (line 149) | public class Coverage method Foo (line 151) | public void Foo() method IsInstanceOfType (line 161) | public bool IsInstanceOfType(string x) => true; method IsAssignableFrom (line 162) | public bool IsAssignableFrom(string x) => true; method GetType (line 163) | public bool GetType(object x) => true; method GetType (line 164) | public Type GetType() => null; class CoverageWithErrors (line 167) | public class CoverageWithErrors method Go (line 169) | public void Go(CoverageWithErrors arg) class Sample (line 184) | public class Sample method Method (line 186) | public void Method(ISomething instance) class Object (line 196) | public class Object { } type ISomething (line 198) | public interface ISomething { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GotoStatement.cs class GotoStatement (line 4) | public class GotoStatement method foo (line 6) | void foo(int a) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/GuardConditionOnEqualsOverride.cs class Base (line 3) | class Base method Equals (line 5) | public override bool Equals(object other) class Derived (line 17) | class Derived : Base method Equals (line 19) | public override bool Equals(object other) class CornerCases (line 32) | class CornerCases method Equals (line 42) | public override bool Equals(object obj) method Method (line 51) | private void Method() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ClearTextProtocolsAreSensitive.Latest.cs class Usings (line 5) | public class Usings method Method (line 7) | public void Method() type Record (line 35) | public record Record type TelnetRecord (line 49) | public record TelnetRecord { } class Telnet (line 51) | public class Telnet { } type RecordStruct (line 53) | public record struct RecordStruct type TelnetRecordStruct (line 74) | public record struct TelnetRecordStruct { } class CSharp11 (line 76) | public class CSharp11 method RawStringLiterals (line 78) | void RawStringLiterals() method Utf8StringLiterals (line 89) | void Utf8StringLiterals() method NewlinesInStringInterpolation (line 98) | void NewlinesInStringInterpolation() class PrimaryConstructor (line 110) | class PrimaryConstructor(string ctorParam = "http://foo.com") // Noncomp... method Method (line 112) | void Method(string methodParam = "http://foo.com") // Noncompliant class Telnet2 (line 118) | public class Telnet2 { } class Repro (line 120) | public sealed class Repro method GetTelnet (line 122) | public Telnet2[] GetTelnet() => CreateTelnets(); method CreateTelnets (line 124) | private static Telnet2[] CreateTelnets() => [new()]; class CSharp13 (line 127) | public class CSharp13 method EscapeSequence (line 130) | void EscapeSequence() class Extensions (line 141) | public static class Extensions method extension (line 143) | extension (string s) method CompliantMethod (line 148) | public string CompliantMethod() => "https://foo.com"; method NonCompliantMethod (line 149) | public string NonCompliantMethod() => "http://foo.com"; class FieldKeyword (line 153) | public class FieldKeyword class NullConditionalAssignment (line 162) | public class NullConditionalAssignment class Sample (line 164) | public class Sample FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ClearTextProtocolsAreSensitive.NetFramework.cs class MyWebService (line 5) | public class MyWebService : WebService method GetUserName (line 7) | [SoapDocumentMethod(Action = "http://www.contoso.com/GetUserName")] //... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ClearTextProtocolsAreSensitive.TopLevelStatements.cs class Telnet (line 40) | public class Telnet { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ClearTextProtocolsAreSensitive.cs class ClearTextProtocols (line 17) | class ClearTextProtocols method Method (line 40) | public void Method(string part, string user, string domain, string ftp) method Ftp (line 67) | public void Ftp() method UntrackedSource (line 83) | private string UntrackedSource() => string.Empty; method TelnetExample (line 85) | public void TelnetExample() // This line is compliant, even when it co... method Telnet (line 125) | private static Stream Telnet() => null; method TelnetClient (line 126) | private Stream TelnetClient() => null; method TcpTelnet40 (line 127) | private Stream TcpTelnet40() => null; method TcpTelnetClient (line 128) | private Stream TcpTelnetClient() => null; method Tcp_Telnet_Client (line 129) | private Stream Tcp_Telnet_Client() => null; method TelNet (line 130) | private static Stream TelNet() => null; method Telnetwork (line 131) | private Stream Telnetwork() => null; method HotelNetwork (line 132) | private Stream HotelNetwork() => null; class NamespaceLikeAssignment (line 214) | [XmlRoot(ElementName = "SonarProjectConfig", Namespace = "http://www.son... method Foo (line 223) | public void Foo(string namespaceLikeArgument) method Bar (line 233) | public void Bar(string NamespaceLikeArgument = "http://www.sonarsource... class NamespaceLikeAssignment2 (line 236) | [MyAttribute("http://www.sonarsource.com/msbuild/analyzer/2021/123")] /... method Foo (line 247) | public void Foo(string namefooLikeArgument, string namespaceLikeArgume... class MyAttribute (line 264) | public class MyAttribute : Attribute method MyAttribute (line 266) | public MyAttribute(string str) { class NamespaceInConstant (line 270) | [XmlRoot(Namespace=XML_NAMESPACE)] class Constants (line 276) | public static class Constants { class Serialize (line 281) | [XmlType(Namespace = "http://www.cpandl.com")] class XmlSerializerTests (line 291) | public class XmlSerializerTests method XmlSerializerTypes (line 293) | public void XmlSerializerTypes() class TestXmlSerializationWriter (line 300) | public class TestXmlSerializationWriter : XmlSerializationWriter method M (line 302) | public void M() method InitCallbacks (line 307) | protected override void InitCallbacks() { } class xmlTests (line 311) | public class xmlTests method XmlTypes (line 313) | public void XmlTypes() class XamlTests (line 333) | public class XamlTests method XmlnsDictionaryTest (line 335) | public void XmlnsDictionaryTest() class XmlLinqTests (line 343) | public class XmlLinqTests method XNamespaceTest (line 345) | public void XNamespaceTest() class ConstructorInitializerTest (line 352) | public class ConstructorInitializerTest class Base (line 354) | public class Base method Base (line 356) | public Base(): this("http://www.cpandl.com") // Noncompliant method Base (line 358) | public Base(string name) { } class Derived (line 361) | public class Derived: Base method Derived (line 363) | public Derived(): base("http://www.cpandl.com") // Noncompliant class Client (line 371) | public class Client { } class Stream (line 376) | public class Stream { } class Implementation (line 381) | public class Implementation method Connect (line 383) | public static Stream Connect() => null; method Connect (line 408) | public static Stream Connect() => null; class Telnet (line 389) | public class Telnet { } class TelnetClient (line 390) | public class TelnetClient { } class TcpTelnetClient (line 391) | public class TcpTelnetClient { } class Client (line 396) | public class Client { } class Stream (line 401) | public class Stream { } class Implementation (line 406) | public class Implementation method Connect (line 383) | public static Stream Connect() => null; method Connect (line 408) | public static Stream Connect() => null; class TelNet (line 414) | public class TelNet { } class Telnetwork (line 415) | public class Telnetwork { } class HotelNetwork (line 416) | public class HotelNetwork { } class XmlnsPrefixAttribute (line 422) | public sealed class XmlnsPrefixAttribute : Attribute method XmlnsPrefixAttribute (line 424) | public XmlnsPrefixAttribute(string ns1, string ns2) { } class XmlnsDefinitionAttribute (line 426) | public sealed class XmlnsDefinitionAttribute : Attribute method XmlnsDefinitionAttribute (line 428) | public XmlnsDefinitionAttribute(string ns1, string ns2) { } class XmlnsCompatibleWithAttribute (line 430) | public sealed class XmlnsCompatibleWithAttribute : Attribute method XmlnsCompatibleWithAttribute (line 432) | public XmlnsCompatibleWithAttribute(string ns1, string ns2) { } class XmlnsDictionary (line 434) | public class XmlnsDictionary method Add (line 436) | public void Add(string prefix, string xmlNamespace) => throw new NotIm... method LookupPrefix (line 437) | public string LookupPrefix(string xmlNamespace) => throw new NotImplem... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/CommandPath.Latest.cs class Program (line 3) | public class Program method SomeMethod (line 10) | public void SomeMethod() class Program2 (line 17) | public class Program2 method SomeMethod (line 25) | public void SomeMethod() class PrimaryConstructor (line 33) | class PrimaryConstructor(string ctorParam = "file.exe") method Method (line 35) | void Method(string methodParam = "file.exe") class NewEscapeSequence (line 43) | class NewEscapeSequence method EscapeSequence (line 47) | void EscapeSequence() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/CommandPath.cs class Program (line 5) | public class Program method Invocations (line 15) | public void Invocations(SecureString password) method Properties (line 53) | public void Properties(ProcessStartInfo arg) method Run (line 79) | private void Run(ProcessStartInfo psi) => Process.Start(psi); method PathFormat (line 81) | public void PathFormat() class ProcessStartInfo (line 147) | public class ProcessStartInfo method ProcessStartInfo (line 151) | public ProcessStartInfo(string fileName) { } method Usage (line 153) | public static void Usage() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ConfiguringLoggers_AspNetCore.cs class ProgramLogging (line 15) | public class ProgramLogging method CreateWebHostBuilder (line 17) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => class StartupLogging (line 27) | public class StartupLogging method ConfigureServices (line 29) | public void ConfigureServices(IServiceCollection services) method Configure (line 37) | public void Configure(IApplicationBuilder app, IHostingEnvironment env... method AdditionalTests (line 81) | public void AdditionalTests(IWebHostBuilder webHostBuilder, IServiceC... class MyLoggerFactory (line 99) | public class MyLoggerFactory : ILoggerFactory method MyLoggerFactory (line 101) | public MyLoggerFactory() { } method MyLoggerFactory (line 102) | public MyLoggerFactory(string data) { } method AddProvider (line 104) | public void AddProvider(ILoggerProvider provider) { /* no-op */ } method CreateLogger (line 105) | public ILogger CreateLogger(string categoryName) => null; method Dispose (line 106) | public void Dispose() { /* no-op */ } class EventSourceLoggerFactoryExtensions (line 115) | internal static class EventSourceLoggerFactoryExtensions method AddEventSourceLogger (line 117) | public static void AddEventSourceLogger(this ILoggerFactory factory) {... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ConfiguringLoggers_AspNetCore6.cs class ProgramLogging (line 25) | public class ProgramLogging method CreateWebHostBuilder (line 27) | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => class StartupLogging (line 37) | public class StartupLogging method ConfigureServices (line 39) | public IServiceCollection ConfigureServices(IServiceCollection services) method Configure (line 49) | public void Configure(IApplicationBuilder app) method AdditionalTests (line 79) | public void AdditionalTests(IWebHostBuilder webHostBuilder, IServiceCo... class MyLoggerFactory (line 91) | public class MyLoggerFactory : ILoggerFactory method MyLoggerFactory (line 93) | public MyLoggerFactory() { } method MyLoggerFactory (line 94) | public MyLoggerFactory(string data) { } method AddProvider (line 96) | public void AddProvider(ILoggerProvider provider) { /* no-op */ } method CreateLogger (line 97) | public ILogger CreateLogger(string categoryName) => null; method Dispose (line 98) | public void Dispose() { /* no-op */ } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ConfiguringLoggers_Log4Net.cs class Log4netLogging (line 9) | class Log4netLogging method Foo (line 11) | void Foo(ILoggerRepository repository, XmlElement element, FileInfo co... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ConfiguringLoggers_NLog.cs class NLogLogging (line 6) | class NLogLogging method Foo (line 9) | void Foo(NLog.Config.LoggingConfiguration config) method AdditionalTests (line 16) | void AdditionalTests(NLog.Config.LoggingConfiguration config) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ConfiguringLoggers_Serilog.cs class SerilogLogging (line 6) | class SerilogLogging method Foo (line 9) | void Foo() method AdditionalTests (line 15) | void AdditionalTests() class MyConfiguration (line 36) | class MyConfiguration : LoggerConfiguration { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/CookieShouldBeHttpOnly.Latest.cs class Tests (line 5) | class Tests method CtorSetsAllowedValue (line 13) | void CtorSetsAllowedValue() method CtorSetsNotAllowedValue (line 18) | void CtorSetsNotAllowedValue() method InitializerSetsAllowedValue (line 23) | void InitializerSetsAllowedValue() method InitializerSetsNotAllowedValue (line 28) | void InitializerSetsNotAllowedValue() method PropertySetsNotAllowedValue (line 36) | void PropertySetsNotAllowedValue() method PropertySetsAllowedValue (line 49) | void PropertySetsAllowedValue(bool foo) class CSharp9 (line 88) | class CSharp9 method CSharp9 (line 97) | CSharp9() method InitializerSetsNotAllowedValue (line 102) | void InitializerSetsNotAllowedValue(DateTime? expires, string domain, ... type RecordStruct (line 110) | public record struct RecordStruct class Partial (line 122) | partial class Partial class Partial (line 127) | partial class Partial method TestMethod (line 134) | public void TestMethod(CookieOptions cookie) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/CookieShouldBeHttpOnly.cs class Program (line 6) | class Program method CtorSetsAllowedValue (line 19) | void CtorSetsAllowedValue() method CtorSetsNotAllowedValue (line 24) | void CtorSetsNotAllowedValue() method InitializerSetsAllowedValue (line 29) | void InitializerSetsAllowedValue() method InitializerSetsNotAllowedValue (line 35) | void InitializerSetsNotAllowedValue() method PropertySetsNotAllowedValue (line 44) | void PropertySetsNotAllowedValue() method PropertySetsAllowedValue (line 58) | void PropertySetsAllowedValue(bool foo) method RaiseTwice (line 99) | void RaiseTwice() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/CookieShouldBeHttpOnly_Nancy.cs class Program (line 6) | class Program method CtorSetsAllowedValues (line 11) | void CtorSetsAllowedValues(bool arg) method CtorSetsDisallowedValues (line 22) | void CtorSetsDisallowedValues(string name, string value, DateTime? exp... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/CookieShouldBeHttpOnly_WithWebConfig.cs class Program (line 6) | class Program method CtorSetsAllowedValue (line 17) | void CtorSetsAllowedValue() method InitializerSetsAllowedValue (line 22) | void InitializerSetsAllowedValue() method InitializerSetsNotAllowedValue (line 28) | void InitializerSetsNotAllowedValue() method PropertySetsNotAllowedValue (line 37) | void PropertySetsNotAllowedValue() method PropertySetsAllowedValue (line 51) | void PropertySetsAllowedValue(bool foo) method RaiseTwice (line 92) | void RaiseTwice() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/CookieShouldBeSecure.Latest.cs class MyClass (line 5) | class MyClass method CtorSetsAllowedValue (line 13) | void CtorSetsAllowedValue() method CtorSetsNotAllowedValue (line 18) | void CtorSetsNotAllowedValue() method InitializerSetsAllowedValue (line 23) | void InitializerSetsAllowedValue() method InitializerSetsNotAllowedValue (line 28) | void InitializerSetsNotAllowedValue() method PropertySetsNotAllowedValue (line 36) | void PropertySetsNotAllowedValue() method PropertySetsAllowedValue (line 47) | void PropertySetsAllowedValue(bool foo) class CSharp9 (line 79) | class CSharp9 method CSharp9 (line 88) | CSharp9() method InitializerSetsNotAllowedValue (line 93) | void InitializerSetsNotAllowedValue(DateTime? expires, string domain, ... type RecordStruct (line 101) | public record struct RecordStruct class Partial (line 113) | partial class Partial class Partial (line 118) | partial class Partial method TestMethod (line 125) | public void TestMethod(CookieOptions cookie) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/CookieShouldBeSecure.cs class Program (line 6) | class Program method CtorSetsAllowedValue (line 19) | void CtorSetsAllowedValue() method CtorSetsNotAllowedValue (line 24) | void CtorSetsNotAllowedValue() method InitializerSetsAllowedValue (line 29) | void InitializerSetsAllowedValue() method InitializerSetsNotAllowedValue (line 35) | void InitializerSetsNotAllowedValue() method PropertySetsNotAllowedValue (line 44) | void PropertySetsNotAllowedValue() method PropertySetsAllowedValue (line 57) | void PropertySetsAllowedValue(bool foo) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/CookieShouldBeSecure_Nancy.cs class Program (line 6) | class Program method CtorSetsAllowedValues (line 11) | void CtorSetsAllowedValues() method CtorSetsDisallowedValues (line 20) | void CtorSetsDisallowedValues(string name, string value, DateTime? exp... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/CookieShouldBeSecure_WithWebConfig.cs class Program (line 6) | class Program method CtorSetsAllowedValue (line 17) | void CtorSetsAllowedValue() method InitializerSetsAllowedValue (line 22) | void InitializerSetsAllowedValue() method InitializerSetsNotAllowedValue (line 28) | void InitializerSetsNotAllowedValue() method PropertySetsNotAllowedValue (line 37) | void PropertySetsNotAllowedValue() method PropertySetsAllowedValue (line 50) | void PropertySetsAllowedValue(bool foo) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/CreatingHashAlgorithms.Latest.cs class InsecureHashAlgorithm (line 8) | public class InsecureHashAlgorithm method RawStringLiterals (line 13) | void RawStringLiterals(byte[] temp) method NewlinesInStringInterpolation (line 19) | void NewlinesInStringInterpolation() class Repro_FN_8758 (line 32) | public class Repro_FN_8758 method Method (line 34) | public void Method() method Method2 (line 49) | public async Task Method2() class MyDSA (line 56) | private sealed class MyDSA : DSA method CreateSignature (line 58) | public override byte[] CreateSignature(byte[] rgbHash) => []; method ExportParameters (line 60) | public override DSAParameters ExportParameters(bool includePrivatePa... method ImportParameters (line 62) | public override void ImportParameters(DSAParameters parameters) method VerifySignature (line 65) | public override bool VerifySignature(byte[] rgbHash, byte[] rgbSigna... method HashData (line 67) | protected override byte[] HashData(byte[] data, int offset, int coun... method HashData (line 69) | protected override byte[] HashData(Stream data, HashAlgorithmName ha... method TryHashData (line 71) | protected override bool TryHashData(ReadOnlySpan data, Span hashSpan, ReadOnlySpan class S4502Controller (line 37) | [IgnoreAntiforgeryToken] // Noncompliant method ChangeEmail_Noncompliant (line 42) | [IgnoreAntiforgeryToken] // Noncompliant method ChangeEmail_AttributesOnTheSameLine_Noncompliant (line 45) | [HttpPost, IgnoreAntiforgeryTokenAttribute] // Noncompliant method ChangeEmail_Compliant (line 48) | [HttpPost] method ChangeEmail_AttributesOnTheSameLine_Compliant (line 52) | [HttpPost, AutoValidateAntiforgeryToken] class Inheritance (line 56) | internal class Inheritance method B (line 58) | [DerivedAttribute] // FN - for performance reasons inheritance is not ... class DerivedAttribute (line 62) | public class DerivedAttribute : IgnoreAntiforgeryTokenAttribute { } class TestCases (line 64) | internal class TestCases method Bar (line 66) | public void Bar(IEnumerable collection) method Call (line 83) | private void Call(Action action) => action(1); class SomeTest2 (line 86) | internal class SomeTest2 method A (line 88) | [GenericIgnoreAntiforgeryToken] // FN: for performance reasons... method B (line 91) | [IgnoreAntiforgeryTokenAttribute] // Noncompliant class GenericIgnoreAntiforgeryToken (line 95) | public class GenericIgnoreAntiforgeryToken : IgnoreAntiforgeryTokenAt... class DisablingCSRFProtection2 (line 97) | public class DisablingCSRFProtection2 method ConfigureServices (line 99) | public static void ConfigureServices(IServiceCollection services) class Partial (line 105) | partial class Partial class Partial (line 121) | partial class Partial FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/DisablingRequestValidation.cs class NonCompliantClass (line 6) | [ValidateInput(false)] // Noncompliant {{Make sure disabling ASP.NET Req... class NonCompliantMethods (line 11) | public class NonCompliantMethods // we don't care if it derives from con... method Foo (line 13) | [ValidateInput(false)] // Noncompliant {{Make sure disabling ASP.NET R... method WithTwoFalse (line 20) | [CLSCompliant(false)] method FooWithMoreAttributes (line 27) | [HttpPost] method FooNoParam (line 35) | [ValidateInput(false)] // Noncompliant method VoidFoo (line 41) | [ValidateInput(false)] // Noncompliant method ArrowFoo (line 44) | [ValidateInput(false)] // Noncompliant class CompliantController (line 48) | public class CompliantController : Controller method Foo (line 50) | [ValidateInput(true)] method Bar (line 56) | public ActionResult Bar() method Boo (line 61) | [HttpPost] method Qix (line 64) | [System.Web.Mvc.HttpPost] method Quix (line 71) | private ActionResult Quix(string i) => null; class CompliantController2 (line 74) | [ValidateInput(true)] class AllowedHtml (line 79) | public class AllowedHtml class MyObsoleteClass (line 85) | [Obsolete] class MyObsoleteClass2 (line 90) | [Obsolete("", false)] class ClassWithFalse (line 95) | [CLSCompliant(false)] // for coverage class Errors (line 100) | public class Errors method Foo (line 102) | [ValidateInput("foo")] // Error [CS1503] - cannot convert to bool method Bar (line 108) | [ValidateInput()] // Error [CS7036] - no arg given method Baz (line 114) | [ValidateInput(false, "foo")] // Error [CS1729] - ctor doesn't exist FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/DoNotUseRandom.cs class Program (line 6) | class Program method Main (line 8) | public void Main() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ExecutingSqlQueries.AzureCosmos.cs class AzureCosmosTest (line 5) | class AzureCosmosTest method GetItemQueryIterator_Compliant (line 9) | public void GetItemQueryIterator_Compliant(string continuationToken) method GetItemQueryIterator_Noncompliant (line 17) | public void GetItemQueryIterator_Noncompliant(string userInput, string... method GetItemQueryIterator_VariableAssignment (line 32) | public void GetItemQueryIterator_VariableAssignment(string userInput, ... method GetItemQueryStreamIterator_Compliant (line 42) | public void GetItemQueryStreamIterator_Compliant(string continuationTo... method GetItemQueryStreamIterator_Noncompliant (line 50) | public void GetItemQueryStreamIterator_Noncompliant(string userInput, ... method GetItemQueryStreamIterator_VariableAssignment (line 65) | public void GetItemQueryStreamIterator_VariableAssignment(string userI... method QueryDefinition_Compliant (line 75) | public void QueryDefinition_Compliant() method QueryDefinition_Noncompliant (line 81) | public void QueryDefinition_Noncompliant(string userInput) method QueryDefinition_VariableAssignment (line 89) | public void QueryDefinition_VariableAssignment(string userInput) class MyType (line 100) | class MyType FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ExecutingSqlQueries.Dapper.cs class DapperTest (line 8) | class DapperTest method SqlMapper_Query (line 12) | public void SqlMapper_Query(string query, string param) method SqlMapper_QueryAsync (line 24) | public async Task SqlMapper_QueryAsync(string query, string param) method SqlMapper_QueryFirst (line 36) | public void SqlMapper_QueryFirst(string query, string param) method SqlMapper_QueryFirstAsync (line 48) | public async Task SqlMapper_QueryFirstAsync(string query, string param) method SqlMapper_QueryFirstOrDefault (line 60) | public void SqlMapper_QueryFirstOrDefault(string query, string param) method SqlMapper_QueryFirstOrDefaultAsync (line 72) | public async Task SqlMapper_QueryFirstOrDefaultAsync(string query, str... method SqlMapper_QuerySingle (line 84) | public void SqlMapper_QuerySingle(string query, string param) method SqlMapper_QuerySingleAsync (line 96) | public async Task SqlMapper_QuerySingleAsync(string query, string param) method SqlMapper_QuerySingleOrDefault (line 108) | public void SqlMapper_QuerySingleOrDefault(string query, string param) method SqlMapper_QuerySingleOrDefaultAsync (line 120) | public async Task SqlMapper_QuerySingleOrDefaultAsync(string query, st... method SqlMapper_QueryMultiple (line 132) | public void SqlMapper_QueryMultiple(string query, string param) method SqlMapper_QueryMultipleAsync (line 141) | public async Task SqlMapper_QueryMultipleAsync(string query, string pa... method SqlMapper_Execute (line 150) | public void SqlMapper_Execute(string query, string param) method SqlMapper_ExecuteAsync (line 159) | public async Task SqlMapper_ExecuteAsync(string query, string param) method SqlMapper_ExecuteReader (line 168) | public void SqlMapper_ExecuteReader(string query, string param) method SqlMapper_ExecuteReaderAsync (line 177) | public async Task SqlMapper_ExecuteReaderAsync(string query, string pa... method SqlMapper_ExecuteScalar (line 186) | public void SqlMapper_ExecuteScalar(string query, string param) method SqlMapper_ExecuteScalarAsync (line 196) | public async Task SqlMapper_ExecuteScalarAsync(string query, string pa... method CommandDefinition_Constructor (line 206) | public void CommandDefinition_Constructor(string query, string param) class Repro_9602 (line 215) | class Repro_9602 method ConstantQuery (line 217) | public void ConstantQuery(IDbConnection dbConnection, bool onlyEnabled) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ExecutingSqlQueries.EF6.cs class Program (line 6) | class Program method DatabaseMethods (line 8) | public async Task DatabaseMethods(Database database, string query, int x) method DbSetMethods (line 24) | public void DbSetMethods(DbSet set, string query, int x, int param) method DbSetMethods (line 32) | public void DbSetMethods(DbSet set, string query, int x, int ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ExecutingSqlQueries.EntityFrameworkCore2.cs class Program (line 7) | class Program method Foo (line 11) | public void Foo(DbContext context, string query, int x, Guid guid, par... method ConcatAndFormat (line 56) | public void ConcatAndFormat(DbContext context, string query, params ob... method Foo (line 89) | public void Foo(BloggingContext context, string query) class User (line 95) | class User class BloggingContext (line 101) | public class BloggingContext : DbContext class Blog (line 106) | public class Blog class Repro_9602 (line 112) | class Repro_9602 method ConstantQuery (line 114) | public void ConstantQuery(DbContext context, bool onlyEnabled) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ExecutingSqlQueries.EntityFrameworkCoreLatest.cs class Program (line 6) | class Program method Foo (line 10) | public void Foo(DbContext context, string query, int x, Guid guid, par... method ConcatAndFormat (line 56) | public void ConcatAndFormat(DbContext context, string query, params ob... method Foo (line 89) | public void Foo(BloggingContext context, string query) class User (line 96) | class User class BloggingContext (line 102) | public class BloggingContext : DbContext class Blog (line 107) | public class Blog class Repro_9602 (line 113) | class Repro_9602 method ConstantQuery (line 115) | public void ConstantQuery(DbContext context, bool onlyEnabled) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ExecutingSqlQueries.Latest.cs class ClassWithPrimaryConstructor (line 51) | class ClassWithPrimaryConstructor(DbContext context, SqliteConnection co... method Foo (line 53) | void Foo() class Partial (line 60) | partial class Partial method EscapeSequence (line 69) | void EscapeSequence(DbContext context, SqliteConnection connection, st... class Partial (line 65) | partial class Partial method EscapeSequence (line 69) | void EscapeSequence(DbContext context, SqliteConnection connection, st... type User (line 79) | record User class Extensions (line 85) | public static class Extensions method extension (line 87) | extension(DbContext db) class NullConditionalAssignment (line 96) | public class NullConditionalAssignment class Sample (line 98) | public class Sample FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ExecutingSqlQueries.MicrosoftDataSqlClient.cs class MicrosoftDataSqlClientTest (line 5) | class MicrosoftDataSqlClientTest method MicrosoftDataSqlClient_Compliant (line 7) | public void MicrosoftDataSqlClient_Compliant(SqlConnection connection,... method MicrosoftDataSqlClient_Noncompliant (line 21) | public void MicrosoftDataSqlClient_Noncompliant(SqlConnection connecti... method MicrosoftDataSqlClient_VariableAssignment (line 43) | public void MicrosoftDataSqlClient_VariableAssignment(SqlConnection co... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ExecutingSqlQueries.MySqlData.cs class Repro_9602 (line 5) | class Repro_9602 method ConstantQuery (line 7) | public void ConstantQuery(MySqlConnection db, bool onlyEnabled) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ExecutingSqlQueries.NHibernate.cs class Program (line 11) | class Program method ISessionMethods (line 13) | public async Task ISessionMethods(ISession session, string query, stri... method SessionImplMethods (line 37) | public async Task SessionImplMethods(SessionImpl session, string query... method AbstractSessionImplMethods (line 64) | public async Task AbstractSessionImplMethods(AbstractSessionImpl sessi... method NamedQueryDefinitionBuilder_Query (line 79) | public void NamedQueryDefinitionBuilder_Query(NamedQueryDefinitionBuil... method NamedQueryDefinition_Constructor (line 87) | public void NamedQueryDefinition_Constructor(string query, string param) method NamedSQLQueryDefinition_Constructor (line 94) | public void NamedSQLQueryDefinition_Constructor(string query, string p... method QueryImpl_Constructor (line 101) | public void QueryImpl_Constructor(ISessionImplementor sessionImplement... class Repro_9602 (line 111) | class Repro_9602 method ConstantQuery (line 113) | public async Task ConstantQuery(ISession session, bool onlyEnabled) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ExecutingSqlQueries.Net46.MonoSqlLite.cs class Sample (line 5) | public class Sample method Compliant (line 9) | void Compliant(SqliteConnection connection) method Foo (line 16) | void Foo(SqliteConnection connection, string query, SqliteTransaction ... method Reproduce_7261 (line 26) | void Reproduce_7261(string connectionString, string query) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ExecutingSqlQueries.Net46.cs class Program (line 14) | class Program method CompliantSqlCommands (line 18) | public void CompliantSqlCommands(SqlConnection connection, SqlTransact... method NonCompliant_Concat_SqlCommands (line 45) | public void NonCompliant_Concat_SqlCommands(SqlConnection connection, ... method NonCompliant_Format_SqlCommands (line 62) | public void NonCompliant_Format_SqlCommands(SqlConnection connection, ... method NonCompliant_Interpolation_SqlCommands (line 83) | public void NonCompliant_Interpolation_SqlCommands(SqlConnection conne... method OdbcCommands (line 95) | public void OdbcCommands(OdbcConnection connection, OdbcTransaction tr... method NonCompliant_OdbcCommands (line 122) | public void NonCompliant_OdbcCommands(SqlConnection connection, SqlTra... method OracleCommands (line 130) | public void OracleCommands(OracleConnection connection, OracleTransact... method NonCompliant_OracleCommands (line 153) | public void NonCompliant_OracleCommands(OracleConnection connection, O... method SqlServerCeCommands (line 160) | public void SqlServerCeCommands(SqlCeConnection connection, SqlCeTrans... method NonCompliant_SqlCeCommands (line 183) | public void NonCompliant_SqlCeCommands(SqlCeConnection connection, Sql... method MySqlDataCompliant (line 190) | public void MySqlDataCompliant(MySqlConnection connection, MySqlTransa... method NonCompliant_MySqlData (line 209) | public void NonCompliant_MySqlData(MySqlConnection connection, MySqlTr... method MicrosoftDataSqliteCompliant (line 236) | public void MicrosoftDataSqliteCompliant(SqliteConnection connection, ... method NonCompliant_MicrosoftDataSqlite (line 246) | public void NonCompliant_MicrosoftDataSqlite(SqliteConnection connecti... method SystemDataSqliteCompliant (line 252) | public void SystemDataSqliteCompliant(SQLiteConnection connection, SQL... method NonCompliant_SystemDataSqlite (line 268) | public void NonCompliant_SystemDataSqlite(SQLiteConnection connection,... method ConcatAndStringFormat (line 279) | public void ConcatAndStringFormat(SqlConnection connection, string param) method DbCommand_CommandText (line 315) | public void DbCommand_CommandText(DbCommand command, string param) method IDbCommand_CommandText (line 320) | public void IDbCommand_CommandText(IDbCommand command, string param) class Repro_9602 (line 327) | class Repro_9602 method ConstantQuery (line 329) | public void ConstantQuery(SqliteConnection connection, bool onlyEnabled) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ExecutingSqlQueries.OracleManagedDataAccess.cs class OracleManagedDataAccessTest (line 5) | class OracleManagedDataAccessTest method OracleCommand_Compliant (line 7) | public void OracleCommand_Compliant(OracleConnection connection, strin... method OracleCommand_Noncompliant (line 16) | public void OracleCommand_Noncompliant(OracleConnection connection, st... method OracleCommand_VariableAssignment (line 31) | public void OracleCommand_VariableAssignment(OracleConnection connecti... method OracleDataAdapter_Compliant (line 45) | public void OracleDataAdapter_Compliant(OracleConnection connection, s... method OracleDataAdapter_Noncompliant (line 50) | public void OracleDataAdapter_Noncompliant(OracleConnection connection... method OracleDataAdapter_VariableAssignment (line 57) | public void OracleDataAdapter_VariableAssignment(OracleConnection conn... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ExecutingSqlQueries.OrmLite.cs class Program (line 7) | class Program method OrmLiteReadApiMethods (line 9) | public void OrmLiteReadApiMethods(IDbConnection dbConn, string query, ... method OrmLiteReadApiAsyncMethods (line 73) | public async Task OrmLiteReadApiAsyncMethods(IDbConnection dbConn, str... class Entity (line 130) | class Entity FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ExpandingArchives.Latest.cs class Class1 (line 9) | public class Class1 method ExtractArchive (line 11) | public void ExtractArchive(ZipArchive archive) method ExtractEntry (line 27) | public void ExtractEntry(ZipArchiveEntry entry) method ExtractToFileAsync (line 42) | public void ExtractToFileAsync(ZipArchiveEntry entry) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/ExpandingArchives.cs class Class1 (line 9) | public class Class1 method ExtractArchive (line 11) | public void ExtractArchive(ZipArchive archive) method ExtractEntry (line 32) | public void ExtractEntry(ZipArchiveEntry entry) method ExtractToFile (line 58) | public void ExtractToFile(ZipArchiveEntry entry) { } method Invoke (line 60) | public void Invoke(Action action) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/HardcodedIpAddress.Latest.cs class HardcodedIpAddress (line 6) | public class HardcodedIpAddress method HardcodedIpAddress (line 8) | public HardcodedIpAddress(string unknownPart, string knownPart) method RawStringLiterals (line 33) | public void RawStringLiterals(string unknownPart, string knownPart) method NewlinesInStringInterpolation (line 44) | public void NewlinesInStringInterpolation() class HardcodedIpAddress (line 31) | public class HardcodedIpAddress method HardcodedIpAddress (line 8) | public HardcodedIpAddress(string unknownPart, string knownPart) method RawStringLiterals (line 33) | public void RawStringLiterals(string unknownPart, string knownPart) method NewlinesInStringInterpolation (line 44) | public void NewlinesInStringInterpolation() class PrimaryConstructor (line 58) | class PrimaryConstructor(string ctorParam = "192.168.0.1", string ctorPa... method Method (line 61) | void Method(string methodParam = "192.168.0.1", string methodParam2 = ... class Partial (line 72) | partial class Partial method MyMethod (line 77) | public void MyMethod(string unknownPart, string knownPart) class Partial (line 89) | partial class Partial method MyMethod (line 77) | public void MyMethod(string unknownPart, string knownPart) class Extensions (line 96) | public static class Extensions method NoncompliantMethod (line 102) | public static string NoncompliantMethod() => "192.168.0.1"; method CompliantMethod (line 103) | public static string CompliantMethod() => "192."; class NullConditionalAssignmnet (line 107) | public class NullConditionalAssignmnet class Sample (line 109) | public class Sample FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/HardcodedIpAddress.cs class AnyAssemblyClass (line 6) | public class AnyAssemblyClass method AnyAssemblyClass (line 8) | public AnyAssemblyClass(string s) class SomeAttribute (line 13) | public class SomeAttribute : Attribute method SomeAttribute (line 15) | public SomeAttribute(string s) class HardcodedIpAddress (line 21) | public class HardcodedIpAddress method WriteAssemblyInfo (line 23) | private static void WriteAssemblyInfo(string assemblyName, string vers... method HardcodedIpAddress (line 27) | [SomeAttribute("127.0.0.1")] // this is mainly for assembly versions FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/InsecureDeserialization.Latest.Partial.cs class PartialConstructor (line 4) | public partial class PartialConstructor method PartialConstructor (line 6) | public partial PartialConstructor(string name) // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/InsecureDeserialization.Latest.cs type ClassWithoutConstructorIsSafe (line 6) | [Serializable] type CtorParameterInIfStatement (line 12) | [Serializable] type WithParameters (line 24) | [Serializable] type CtorParameterInCoalesceAssignmentExpression (line 36) | [Serializable] method CtorParameterInCoalesceAssignmentExpression (line 171) | public CtorParameterInCoalesceAssignmentExpression(string name) // Non... class InNestedClass (line 176) | [Serializable] method InNestedClass (line 179) | public InNestedClass(string name) // Noncompliant {{Make sure not pe... type RecordStructWithoutConstructorIsSafe (line 57) | [Serializable] type CtorParameterInIfStatement (line 65) | [Serializable] type CtorParameterInIfStatementPositionalRecordStruct (line 78) | [Serializable] type WithParameters (line 90) | [Serializable] type CtorParameterInCoalesceAssignmentExpression (line 102) | [Serializable] method CtorParameterInCoalesceAssignmentExpression (line 171) | public CtorParameterInCoalesceAssignmentExpression(string name) // Non... class InNestedClass (line 176) | [Serializable] method InNestedClass (line 179) | public InNestedClass(string name) // Noncompliant {{Make sure not pe... type SomeStruct (line 120) | [Serializable] method SomeStruct (line 125) | public SomeStruct(string name) // Noncompliant class Partial (line 135) | [Serializable] method Partial (line 140) | public Partial(string name) // Noncompliant class Partial (line 147) | partial class Partial method Partial (line 140) | public Partial(string name) // Noncompliant class ClassWithDefaultConstructorWithConditionalsIsSafe (line 157) | [Serializable] method ClassWithDefaultConstructorWithConditionalsIsSafe (line 162) | public ClassWithDefaultConstructorWithConditionalsIsSafe() class CtorParameterInCoalesceAssignmentExpression (line 168) | [Serializable] method CtorParameterInCoalesceAssignmentExpression (line 171) | public CtorParameterInCoalesceAssignmentExpression(string name) // Non... class InNestedClass (line 176) | [Serializable] method InNestedClass (line 179) | public InNestedClass(string name) // Noncompliant {{Make sure not pe... class CtorParameterInSwitchExpression (line 186) | [Serializable] method CtorParameterInSwitchExpression (line 191) | public CtorParameterInSwitchExpression(string name) // Noncompliant {{... method CtorParameterInSwitchExpression (line 200) | public CtorParameterInSwitchExpression(int tmp) // Compliant - no che... class CtorParameterInSwitchExpressionArm (line 210) | [Serializable] method CtorParameterInSwitchExpressionArm (line 215) | public CtorParameterInSwitchExpressionArm(string name) // Noncompliant... class DifferentConditionsInCtor (line 226) | [Serializable] method DifferentConditionsInCtor (line 231) | public DifferentConditionsInCtor(string name) // Noncompliant method UnrelatedMethod (line 236) | public void UnrelatedMethod(object sender) { Name ??= string.Empty; } method OnDeserialization (line 238) | public void OnDeserialization() => Name ??= string.Empty; method OnDeserialization (line 240) | public void OnDeserialization(string a, string b) => Name ??= string.E... method OnDeserialization (line 242) | public void OnDeserialization(object sender) { } class PartialConstructor (line 245) | [Serializable] method PartialConstructor (line 249) | public partial PartialConstructor(string name); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/InsecureDeserialization.cs class ClassWithoutConstructorIsSafe (line 6) | [Serializable] class ClassWithDefaultConstructorIsSafe (line 12) | [Serializable] method ClassWithDefaultConstructorIsSafe (line 17) | public ClassWithDefaultConstructorIsSafe() class CtorParameterIsNotInConditional (line 23) | [Serializable] method CtorParameterIsNotInConditional (line 28) | public CtorParameterIsNotInConditional(string name) class CtorParameterInIfStatement (line 34) | [Serializable] method CtorParameterInIfStatement (line 39) | public CtorParameterInIfStatement(string name) // Noncompliant {{Make ... class CtorParameterInTernaryOperator (line 47) | [Serializable] method CtorParameterInTernaryOperator (line 52) | public CtorParameterInTernaryOperator(string name) // Noncompliant {{M... class CtorParameterInCoalesceExpression (line 58) | [Serializable] method CtorParameterInCoalesceExpression (line 63) | public CtorParameterInCoalesceExpression(string name) // Noncompliant ... class CtorParameterInSwitchStatement (line 69) | [Serializable] method CtorParameterInSwitchStatement (line 74) | public CtorParameterInSwitchStatement(string name) // Noncompliant {{M... method CtorParameterInSwitchStatement (line 85) | public CtorParameterInSwitchStatement(int tmp) // Compliant - no check... class MultipleConstructorsOneUnsafe (line 100) | [Serializable] method MultipleConstructorsOneUnsafe (line 105) | public MultipleConstructorsOneUnsafe() method MultipleConstructorsOneUnsafe (line 109) | public MultipleConstructorsOneUnsafe(string name) // Noncompliant {{Ma... method MultipleConstructorsOneUnsafe (line 114) | public MultipleConstructorsOneUnsafe(string firstName, string lastName) class MultipleConstructorsMoreUnsafe (line 120) | [Serializable] method MultipleConstructorsMoreUnsafe (line 125) | public MultipleConstructorsMoreUnsafe() method MultipleConstructorsMoreUnsafe (line 129) | public MultipleConstructorsMoreUnsafe(string name) // Noncompliant {{M... method MultipleConstructorsMoreUnsafe (line 134) | public MultipleConstructorsMoreUnsafe(string firstName, string lastNam... class ParameterPartOfNestedConditional (line 140) | [Serializable] method ParameterPartOfNestedConditional (line 145) | public ParameterPartOfNestedConditional(string name) // Noncompliant {... class NoConditionals (line 154) | [Serializable] method NoConditionals (line 157) | protected NoConditionals(SerializationInfo info, StreamingContext cont... method GetObjectData (line 161) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class MissingDeserializationCtor (line 164) | [Serializable] method GetObjectData (line 167) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class CtorWithConditionsAndMissingDeserializationCtor (line 170) | [Serializable] method CtorWithConditionsAndMissingDeserializationCtor (line 175) | public CtorWithConditionsAndMissingDeserializationCtor(string name) //... method GetObjectData (line 180) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class MultipleConstructorsNoConditionals (line 183) | [Serializable] method MultipleConstructorsNoConditionals (line 186) | public MultipleConstructorsNoConditionals() method MultipleConstructorsNoConditionals (line 190) | public MultipleConstructorsNoConditionals(bool condition, string name) method MultipleConstructorsNoConditionals (line 194) | protected MultipleConstructorsNoConditionals(SerializationInfo info, S... method GetObjectData (line 198) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class WithConditionsISerializable (line 201) | [Serializable] method WithConditionsISerializable (line 206) | public WithConditionsISerializable(string url) method WithConditionsISerializable (line 214) | protected WithConditionsISerializable(SerializationInfo info, Streamin... method GetObjectData (line 225) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class WithDifferentConditionsISerializable (line 228) | [Serializable] method WithDifferentConditionsISerializable (line 235) | public WithDifferentConditionsISerializable(string firstName, string l... method WithDifferentConditionsISerializable (line 241) | protected WithDifferentConditionsISerializable(SerializationInfo info,... method GetObjectData (line 247) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class WithoutConditionsInDeserializationCtor (line 250) | [Serializable] method WithoutConditionsInDeserializationCtor (line 255) | public WithoutConditionsInDeserializationCtor(string url) // Noncompliant method WithoutConditionsInDeserializationCtor (line 263) | protected WithoutConditionsInDeserializationCtor(SerializationInfo inf... method GetObjectData (line 268) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class NoConstructor (line 271) | [Serializable] method OnDeserialization (line 274) | public void OnDeserialization(object sender) class WithoutConditionsInCtor (line 279) | [Serializable] method WithoutConditionsInCtor (line 284) | public WithoutConditionsInCtor(string name) method OnDeserialization (line 289) | public void OnDeserialization(object sender) class WithConditionsInBothCtorAndOnDeserialization (line 294) | [Serializable] method WithConditionsInBothCtorAndOnDeserialization (line 299) | public WithConditionsInBothCtorAndOnDeserialization(string name) method OnDeserialization (line 304) | public void OnDeserialization(object sender) class WithDifferentConditionsInBothCtorAndOnDeserialization (line 313) | [Serializable] method WithDifferentConditionsInBothCtorAndOnDeserialization (line 320) | public WithDifferentConditionsInBothCtorAndOnDeserialization(string fi... method OnDeserialization (line 326) | public void OnDeserialization(object sender) class AbstractSerializable (line 333) | [Serializable] method AbstractSerializable (line 338) | public AbstractSerializable(string name) // Noncompliant method GetObjectData (line 343) | public abstract void GetObjectData(SerializationInfo info, StreamingCo... class AbstractDeserializationCallback (line 346) | [Serializable] method AbstractDeserializationCallback (line 351) | public AbstractDeserializationCallback(string name) // Noncompliant method OnDeserialization (line 356) | public abstract void OnDeserialization(object sender); class ClassWithoutSerializableAttributeIsSafe (line 359) | public class ClassWithoutSerializableAttributeIsSafe method ClassWithoutSerializableAttributeIsSafe (line 363) | public ClassWithoutSerializableAttributeIsSafe(string name) class DeserializationCallback (line 369) | public class DeserializationCallback : IDeserializationCallback method OnDeserialization (line 371) | public void OnDeserialization(object sender) class IndirectImplementationIDeserializationCallback (line 376) | [Serializable] method IndirectImplementationIDeserializationCallback (line 381) | public IndirectImplementationIDeserializationCallback(string name) // ... type StructNonCompliant (line 387) | [Serializable] method StructNonCompliant (line 392) | public StructNonCompliant(string name) // Noncompliant class Partial (line 398) | partial class Partial method Partial (line 400) | public Partial(string name) // Noncompliant class Partial (line 407) | [Serializable] method Partial (line 400) | public Partial(string name) // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/PermissiveCors.Latest.cs class TestCases (line 15) | internal class TestCases method Bar (line 17) | public void Bar(IEnumerable collection) method Call (line 32) | private void Call(Action action) => action(1); class ConstantInterpolatedStringController (line 34) | [ApiController] method Index (line 38) | [HttpGet] class CorsEnabledManualAddedHeadersController (line 54) | [ApiController] method Index (line 58) | [HttpGet] method Index (line 186) | [HttpGet] class TestCases2 (line 81) | internal class TestCases2 method A (line 83) | [GenericAttribute("*")] // Compliant - "*" is the policy name in ... method B (line 86) | [GenericAttribute] method C (line 89) | [EnableCors()] method D (line 92) | [EnableCors("*")] class GenericAttribute (line 96) | public class GenericAttribute : EnableCorsAttribute method GenericAttribute (line 98) | public GenericAttribute() : base() { } method GenericAttribute (line 100) | public GenericAttribute(string policyName) : base(policyName) { } class Partial (line 103) | partial class Partial class Partial (line 110) | partial class Partial class Setup (line 123) | public class Setup method ConfigureServices (line 127) | public void ConfigureServices(IServiceCollection services) class CorsEnabledManualAddedHeadersController (line 179) | [ApiController] method Index (line 58) | [HttpGet] method Index (line 186) | [HttpGet] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/PermissiveCors.NetFramework.cs class PermissiveCors (line 9) | [EnableCors(origins: "*", headers: "*", methods: "*", exposedHeaders: "X... method Get (line 12) | [EnableCors("https:\\trustedwebsite.com", "*", "*", "X-Custom-Header")] class AllowCrossSiteAttribute (line 44) | public class AllowCrossSiteAttribute : ActionFilterAttribute method OnActionExecuting (line 46) | public override void OnActionExecuting(ActionExecutingContext context) class AllowCrossSiteJsonAttribute (line 66) | public class AllowCrossSiteJsonAttribute : ActionFilterAttribute method OnActionExecuted (line 68) | public override void OnActionExecuted(HttpActionExecutedContext context) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/PubliclyWritableDirectories.Latest.cs class Program (line 6) | public class Program method Examples (line 8) | public void Examples() method RawStringLiterals (line 28) | void RawStringLiterals() method NewlinesInStringInterpolation (line 33) | void NewlinesInStringInterpolation(string firstPartOfPath, string seco... method Utf8StringLiterals (line 41) | void Utf8StringLiterals() class Program (line 26) | public class Program method Examples (line 8) | public void Examples() method RawStringLiterals (line 28) | void RawStringLiterals() method NewlinesInStringInterpolation (line 33) | void NewlinesInStringInterpolation(string firstPartOfPath, string seco... method Utf8StringLiterals (line 41) | void Utf8StringLiterals() class PrimaryConstructor (line 75) | class PrimaryConstructor(string ctorParam = "C:\\TMP\\f", // Nonc... method Method (line 78) | void Method(string methodParam = "C:\\TMP\\f", // Noncompliant class MyClass (line 91) | class MyClass method EscapeSequence (line 93) | void EscapeSequence() class NullConditionalAssignment (line 109) | public class NullConditionalAssignment class Sample (line 111) | public class Sample method Method (line 116) | public void Method(Sample sample) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/PubliclyWritableDirectories.cs class Program (line 6) | public class Program method Compliant (line 8) | public void Compliant() method CompliantWithArg (line 18) | private string CompliantWithArg(string dir = "/other/tmp") // Compliant class InnerClass (line 23) | private class InnerClass method NonCompliant (line 28) | public void NonCompliant(string partOfPath) method NonCompliantWithArg (line 95) | private string NonCompliantWithArg(string dir = "/tmp") // Noncompliant method GetTempPath (line 102) | public string GetTempPath() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/RequestsWithExcessiveLength.Latest.cs class MyController (line 11) | public class MyController : Controller method PostRequestWithNoLimit (line 13) | [HttpPost] method RequestSizeLimitAboveLimit (line 20) | [HttpPost] method PostRequest (line 32) | public ActionResult PostRequest() method RequestFormLimitsAboveLimit (line 42) | [HttpPost] method RequestFormLimitsBelowLimit (line 55) | [HttpPost] class TestCases (line 67) | internal class TestCases method Foo (line 69) | [RequestSizeLimit(8_388_609)] // Noncompliant method Bar (line 72) | [GenericAttribute(8_388_609)] // FN for performance reasons we de... method Bar (line 75) | public void Bar(IEnumerable collection) method Call (line 91) | private void Call(Action action) => action(1); class GenericAttribute (line 94) | public class GenericAttribute : RequestSizeLimitAttribute method GenericAttribute (line 96) | public GenericAttribute(long bytes) : base(bytes) { } class StreamsBase (line 99) | public class StreamsBase class StreamsDerived (line 105) | public class StreamsDerived : StreamsBase method OpenReadStream (line 110) | public static void OpenReadStream(IBrowserFile file, long unknownSize) method GetMultipleFiles (line 145) | public static void GetMultipleFiles(InputFileChangeEventArgs inputFile... method GetMultipleFiles_ArrayAccess (line 186) | public static void GetMultipleFiles_ArrayAccess(InputFileChangeEventAr... method GetMultipleFiles_InLambda (line 211) | public static void GetMultipleFiles_InLambda(InputFileChangeEventArgs ... method MethodDeclarationWithoutABody (line 219) | [DllImport("User32.dll", CharSet = CharSet.Unicode)] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/RequestsWithExcessiveLength.cs class MyController (line 6) | public class MyController : Controller method PostRequestWithNoLimit (line 8) | [HttpPost] method DisableRequestSizeLimitWithFullName (line 16) | [DisableRequestSizeLimitAttribute] // Noncompliant method PostRequestAboveLimit (line 22) | [HttpPost] method RequestSizeLimitWithFullname (line 30) | [HttpPost] method PostRequestBelowLimit (line 37) | [HttpPost] method SizeWith1024Base (line 44) | [HttpPost] method MultipartFormRequestAboveLimit (line 51) | [HttpPost] method RequestFormLimitsWithFullname (line 59) | [HttpPost] method MultipartFormRequestHeadersLimitSet (line 66) | [HttpPost] method MultiPartFromRequestWithDefaultLimit (line 73) | [HttpPost] method RequestFormLimitsWithVariousParamsV1 (line 79) | [HttpPost] method RequestFormLimitsWithVariousParamsV2 (line 86) | [HttpPost] method RequestFormLimitsWithVariousParamsV3 (line 93) | [HttpPost] method RequestFormLimitsWithVariousParamsV4 (line 100) | [HttpPost] method MultipartFormRequestBelowLimit (line 107) | [HttpPost] method MultipartFormRequestNonNumerical (line 114) | [HttpPost] method MultipartFormRequestWithoutParams (line 121) | [HttpPost] method MultipartFormRequestNonNameEquals (line 128) | [HttpPost] method PostRequestNonNumerical (line 135) | [HttpPost] method PostRequestWithoutParams (line 142) | [HttpPost] method RequestSizeLimitWithoutNumericLiteral (line 149) | [HttpPost] method RequestSizeLimitAndFormLimits (line 156) | [HttpPost] method SizeBelowLimitFormsAboveLimit (line 166) | [HttpPost] method SizeAboveLimitFormsBelowLimit (line 174) | [HttpPost] method BothBelowLimit (line 182) | [HttpPost] method MethodWithoutAttributes (line 190) | public ActionResult MethodWithoutAttributes() class DisableRequestSizeLimitController (line 196) | [DisableRequestSizeLimit] // Noncompliant class RequestSizeLimitAboveController (line 203) | [RequestSizeLimit(8_388_609)] // Noncompliant class RequestFormLimitsAboveController (line 209) | [RequestFormLimits(MultipartBodyLengthLimit = 8_388_609)] // Noncompliant class RequestSizeLimitBelowController (line 215) | [RequestSizeLimit(8_388_608)] class RequestFormLimitsBelowController (line 221) | [RequestFormLimits(MultipartHeadersLengthLimit = 8_388_608)] class TestCases (line 227) | internal class TestCases method Bar (line 229) | [DerivedAttribute(8_388_609)] // FN for performance reasons we decided... class DerivedAttribute (line 233) | public class DerivedAttribute : RequestSizeLimitAttribute method DerivedAttribute (line 235) | public DerivedAttribute(long bytes) : base(bytes) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/RequestsWithExcessiveLength_CustomValues.cs class MyController (line 6) | public class MyController : Controller method PostRequestAboveLimit (line 8) | [HttpPost] method MultipartFormRequestAboveLimit (line 16) | [HttpPost] method PostRequestBelowLimit (line 24) | [HttpPost] method MultipartFormRequestBelowLimit (line 31) | [HttpPost] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/SpecifyTimeoutOnRegex.Latest.cs class MyClass (line 4) | class MyClass method ImplicitObject (line 6) | void ImplicitObject() method EnumerateSplitsAndMatchesMethod (line 15) | void EnumerateSplitsAndMatchesMethod(ReadOnlySpan input, RegexOp... class Extensions (line 27) | public static class Extensions method extension (line 29) | extension(string s) class NulLConditionalAssignment (line 39) | public class NulLConditionalAssignment class Sample (line 41) | public class Sample method Method (line 46) | public void Method(Sample sample) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/SpecifyTimeoutOnRegex.cs class Compliant (line 5) | class Compliant method Ctor (line 7) | void Ctor() method Instance (line 17) | void Instance() method Static (line 28) | void Static() method NonBacktrackingSpecified (line 37) | void NonBacktrackingSpecified() method NoRegex (line 44) | void NoRegex() class Noncompliant (line 56) | class Noncompliant method Ctor (line 58) | void Ctor() method Static (line 65) | void Static(RegexOptions options) class DoesNotCrash (line 76) | class DoesNotCrash method MethodWithoutIdentifier (line 78) | void MethodWithoutIdentifier(__arglist) class Regex (line 86) | public class Regex method IsMatch (line 88) | public static bool IsMatch(string input, string pattern) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/UnsafeCodeBlocks.cs method MethodScope (line 5) | unsafe void MethodScope(byte* pointer) { } method BlockScope (line 8) | void BlockScope() method SafeMethod (line 16) | void SafeMethod() { } method LocalFunction (line 18) | void LocalFunction() class UnsafeClass (line 24) | unsafe class UnsafeClass { } type UnsafeStruct (line 26) | unsafe struct UnsafeStruct // Nonco... type IUnsafeInterface (line 31) | unsafe interface IUnsafeInterface { } method Sample (line 33) | unsafe Sample(byte* pointer) { } method Sample (line 35) | static unsafe Sample() { } method Sample (line 37) | unsafe ~Sample() { } method SubarraySum (line 52) | public unsafe int SubarraySum(int[] array, int start, int end) // Nonco... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/UsingNonstandardCryptography.CSharp10.cs type CustomCryptoTransform (line 6) | public record struct CustomCryptoTransform : ICryptoTransform // Noncom... type ICustomCryptoTransform (line 23) | public interface ICustomCryptoTransform : ICryptoTransform // Noncompli... type CustomCryptoTransformWithInterface (line 27) | public record struct CustomCryptoTransformWithInterface : ICustomCryptoT... type CustomCryptoTransformWithInterfacePositionalRecordStruct (line 44) | public record struct CustomCryptoTransformWithInterfacePositionalRecordS... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/UsingNonstandardCryptography.CSharp12.cs class CustomHashAlgorithmUsingPrimaryConstructor (line 4) | class CustomHashAlgorithmUsingPrimaryConstructor(byte[] array) : HashAlg... method Initialize (line 6) | public override void Initialize() => throw new NotImplementedException(); method HashCore (line 8) | protected override void HashCore(byte[] array, int ibStart, int cbSize... method HashFinal (line 10) | protected override byte[] HashFinal() => throw new NotImplementedExcep... class CustomAsymmetricAlgorithm (line 13) | class CustomAsymmetricAlgorithm(byte[] array) : AsymmetricAlgorithm { } class DerivedFromCustomAsymmetricAlgorithm (line 15) | class DerivedFromCustomAsymmetricAlgorithm(byte[] array) : CustomAsymmet... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/UsingNonstandardCryptography.CSharp9.cs type CustomCryptoTransform (line 6) | public record CustomCryptoTransform : ICryptoTransform // Noncompliant type ICustomCryptoTransform (line 23) | public interface ICustomCryptoTransform : ICryptoTransform // Noncompli... type CustomCryptoTransformWithInterface (line 27) | public record CustomCryptoTransformWithInterface : ICustomCryptoTransfor... type CustomCryptoTransformWithInterfacePositionalRecord (line 44) | public record CustomCryptoTransformWithInterfacePositionalRecord(string ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Hotspots/UsingNonstandardCryptography.cs class CustomHashAlgorithm (line 6) | public class CustomHashAlgorithm : HashAlgorithm // Noncompliant {{Make... method Initialize (line 9) | public override void Initialize() => throw new NotImplementedException(); method HashCore (line 11) | protected override void HashCore(byte[] array, int ibStart, int cbSize... method HashFinal (line 13) | protected override byte[] HashFinal() => throw new NotImplementedExcep... class CustomCryptoTransform (line 16) | public class CustomCryptoTransform : ICryptoTransform // Noncompliant {... method Dispose (line 27) | public void Dispose() => throw new NotImplementedException(); method TransformBlock (line 29) | public int TransformBlock(byte[] inputBuffer, int inputOffset, int inp... method TransformFinalBlock (line 31) | public byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset,... type ICustomCryptoTransform (line 34) | public interface ICustomCryptoTransform : ICryptoTransform // Noncompli... class CustomCryptoTransformWithInterface (line 39) | public class CustomCryptoTransformWithInterface : ICustomCryptoTransform... method Dispose (line 50) | public void Dispose() => throw new NotImplementedException(); method TransformBlock (line 52) | public int TransformBlock(byte[] inputBuffer, int inputOffset, int inp... method TransformFinalBlock (line 54) | public byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset,... class CustomDerivebytes (line 57) | internal class CustomDerivebytes : DeriveBytes // Noncompliant {{Make s... method GetBytes (line 60) | public override byte[] GetBytes(int cb) => throw new NotImplementedExc... method Reset (line 62) | public override void Reset() => throw new NotImplementedException(); class CustomSymmetricAlgorithm (line 64) | private class CustomSymmetricAlgorithm : SymmetricAlgorithm // Noncom... method CreateDecryptor (line 67) | public override ICryptoTransform CreateDecryptor(byte[] rgbKey, byte... method CreateEncryptor (line 69) | public override ICryptoTransform CreateEncryptor(byte[] rgbKey, byte... method GenerateIV (line 71) | public override void GenerateIV() => throw new NotImplementedExcepti... method GenerateKey (line 73) | public override void GenerateKey() => throw new NotImplementedExcept... class CustomAsymmetricAlgorithm (line 77) | public class CustomAsymmetricAlgorithm : AsymmetricAlgorithm // Noncomp... class DerivedClassFromCustomAsymmetricAlgorithm (line 82) | public class DerivedClassFromCustomAsymmetricAlgorithm : CustomAsymmetri... class CustomAsymmetricKeyExchangeDeformatter (line 87) | public class CustomAsymmetricKeyExchangeDeformatter : AsymmetricKeyExcha... method DecryptKeyExchange (line 92) | public override byte[] DecryptKeyExchange(byte[] rgb) => throw new Not... method SetKey (line 94) | public override void SetKey(AsymmetricAlgorithm key) => throw new NotI... class CustomAsymmetricKeyExchangeFormatter (line 97) | public class CustomAsymmetricKeyExchangeFormatter : AsymmetricKeyExchang... method CreateKeyExchange (line 102) | public override byte[] CreateKeyExchange(byte[] data) => throw new Not... method CreateKeyExchange (line 104) | public override byte[] CreateKeyExchange(byte[] data, Type symAlgType)... method SetKey (line 106) | public override void SetKey(AsymmetricAlgorithm key) => throw new NotI... class CustomAsymmetricSignatureDeformatter (line 109) | public class CustomAsymmetricSignatureDeformatter : AsymmetricSignatureD... method SetHashAlgorithm (line 112) | public override void SetHashAlgorithm(string strName) => throw new Not... method SetKey (line 114) | public override void SetKey(AsymmetricAlgorithm key) => throw new NotI... method VerifySignature (line 116) | public override bool VerifySignature(byte[] rgbHash, byte[] rgbSignatu... class CustomAsymmetricSignatureFormatter (line 119) | public class CustomAsymmetricSignatureFormatter : AsymmetricSignatureFor... method CreateSignature (line 122) | public override byte[] CreateSignature(byte[] rgbHash) => throw new No... method SetHashAlgorithm (line 124) | public override void SetHashAlgorithm(string strName) => throw new Not... method SetKey (line 126) | public override void SetKey(AsymmetricAlgorithm key) => throw new NotI... class CustomKeyedHashAlgorithm (line 129) | public class CustomKeyedHashAlgorithm : KeyedHashAlgorithm // Noncompli... method Initialize (line 132) | public override void Initialize() => throw new NotImplementedException(); method HashCore (line 134) | protected override void HashCore(byte[] array, int ibStart, int cbSize... method HashFinal (line 136) | protected override byte[] HashFinal() => throw new NotImplementedExcep... type CustomCryptoTransformStruct (line 139) | public struct CustomCryptoTransformStruct : ICryptoTransform // Noncomp... method Dispose (line 149) | public void Dispose() => throw new NotImplementedException(); method TransformBlock (line 151) | public int TransformBlock(byte[] inputBuffer, int inputOffset, int inp... method TransformFinalBlock (line 153) | public byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset,... class ClassThatDoesNotInheritOrImplementAnything (line 157) | public class ClassThatDoesNotInheritOrImplementAnything // Compliant type InterfaceThatDoesNotInheritOrImplementAnything (line 161) | public interface InterfaceThatDoesNotInheritOrImplementAnything // Compl... type InterfaceThatDoesNotInheritCryptographic (line 165) | public interface InterfaceThatDoesNotInheritCryptographic : IDisposable ... class ClassThatDoesNotInheritCryptographic (line 169) | public sealed class ClassThatDoesNotInheritCryptographic : IDisposable /... method Dispose (line 171) | public void Dispose() => throw new NotImplementedException(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/IdentifiersNamedExtensionShouldBeEscaped.BeforeCSharp14.cs class extension (line 7) | class extension { } class @extension (line 11) | class @extension method extension (line 13) | extension() { } method @extension (line 57) | @extension() { } class MyClass (line 16) | unsafe class MyClass method M (line 18) | extension M() { return null; } method ArrayReturn (line 22) | extension[] ArrayReturn() { return null; } method JaggedArrayReturn (line 25) | extension[][] JaggedArrayReturn() { return null; } method MultiDimArrayReturn (line 27) | extension[,] MultiDimArrayReturn() { return null; } method PointerReturn (line 30) | extension* PointerReturn() { return null; } method M (line 44) | extension M() { return new @extension(); } method N (line 45) | extension? N() { return null; } method extension (line 61) | void extension() { } method N (line 62) | @extension N() { return null; } method EscapedArrayReturn (line 66) | @extension[] EscapedArrayReturn() { return null; } method ListReturn (line 68) | System.Collections.Generic.List ListReturn() { return null; } method EscapedListReturn (line 70) | System.Collections.Generic.List<@extension> EscapedListReturn() { retu... method EscapedPointerReturn (line 73) | @extension* EscapedPointerReturn() { return null; } method ParameterMethod (line 80) | void ParameterMethod(extension x) { } method LocalVarMethod (line 81) | void LocalVarMethod() { extension x = null; } type @extension (line 40) | struct @extension { } method extension (line 13) | extension() { } method @extension (line 57) | @extension() { } class MyClass (line 42) | class MyClass method M (line 18) | extension M() { return null; } method ArrayReturn (line 22) | extension[] ArrayReturn() { return null; } method JaggedArrayReturn (line 25) | extension[][] JaggedArrayReturn() { return null; } method MultiDimArrayReturn (line 27) | extension[,] MultiDimArrayReturn() { return null; } method PointerReturn (line 30) | extension* PointerReturn() { return null; } method M (line 44) | extension M() { return new @extension(); } method N (line 45) | extension? N() { return null; } method extension (line 61) | void extension() { } method N (line 62) | @extension N() { return null; } method EscapedArrayReturn (line 66) | @extension[] EscapedArrayReturn() { return null; } method ListReturn (line 68) | System.Collections.Generic.List ListReturn() { return null; } method EscapedListReturn (line 70) | System.Collections.Generic.List<@extension> EscapedListReturn() { retu... method EscapedPointerReturn (line 73) | @extension* EscapedPointerReturn() { return null; } method ParameterMethod (line 80) | void ParameterMethod(extension x) { } method LocalVarMethod (line 81) | void LocalVarMethod() { extension x = null; } class @extension (line 53) | class @extension { }; method extension (line 13) | extension() { } method @extension (line 57) | @extension() { } class MyExtension (line 53) | class MyExtension { } class @extension (line 57) | class @extension { @extension() { } ~extension() { } } method extension (line 13) | extension() { } method @extension (line 57) | @extension() { } class MyClass (line 59) | unsafe class MyClass method M (line 18) | extension M() { return null; } method ArrayReturn (line 22) | extension[] ArrayReturn() { return null; } method JaggedArrayReturn (line 25) | extension[][] JaggedArrayReturn() { return null; } method MultiDimArrayReturn (line 27) | extension[,] MultiDimArrayReturn() { return null; } method PointerReturn (line 30) | extension* PointerReturn() { return null; } method M (line 44) | extension M() { return new @extension(); } method N (line 45) | extension? N() { return null; } method extension (line 61) | void extension() { } method N (line 62) | @extension N() { return null; } method EscapedArrayReturn (line 66) | @extension[] EscapedArrayReturn() { return null; } method ListReturn (line 68) | System.Collections.Generic.List ListReturn() { return null; } method EscapedListReturn (line 70) | System.Collections.Generic.List<@extension> EscapedListReturn() { retu... method EscapedPointerReturn (line 73) | @extension* EscapedPointerReturn() { return null; } method ParameterMethod (line 80) | void ParameterMethod(extension x) { } method LocalVarMethod (line 81) | void LocalVarMethod() { extension x = null; } class MyClass (line 89) | class MyClass method M (line 18) | extension M() { return null; } method ArrayReturn (line 22) | extension[] ArrayReturn() { return null; } method JaggedArrayReturn (line 25) | extension[][] JaggedArrayReturn() { return null; } method MultiDimArrayReturn (line 27) | extension[,] MultiDimArrayReturn() { return null; } method PointerReturn (line 30) | extension* PointerReturn() { return null; } method M (line 44) | extension M() { return new @extension(); } method N (line 45) | extension? N() { return null; } method extension (line 61) | void extension() { } method N (line 62) | @extension N() { return null; } method EscapedArrayReturn (line 66) | @extension[] EscapedArrayReturn() { return null; } method ListReturn (line 68) | System.Collections.Generic.List ListReturn() { return null; } method EscapedListReturn (line 70) | System.Collections.Generic.List<@extension> EscapedListReturn() { retu... method EscapedPointerReturn (line 73) | @extension* EscapedPointerReturn() { return null; } method ParameterMethod (line 80) | void ParameterMethod(extension x) { } method LocalVarMethod (line 81) | void LocalVarMethod() { extension x = null; } class MyClass (line 98) | class MyClass method M (line 18) | extension M() { return null; } method ArrayReturn (line 22) | extension[] ArrayReturn() { return null; } method JaggedArrayReturn (line 25) | extension[][] JaggedArrayReturn() { return null; } method MultiDimArrayReturn (line 27) | extension[,] MultiDimArrayReturn() { return null; } method PointerReturn (line 30) | extension* PointerReturn() { return null; } method M (line 44) | extension M() { return new @extension(); } method N (line 45) | extension? N() { return null; } method extension (line 61) | void extension() { } method N (line 62) | @extension N() { return null; } method EscapedArrayReturn (line 66) | @extension[] EscapedArrayReturn() { return null; } method ListReturn (line 68) | System.Collections.Generic.List ListReturn() { return null; } method EscapedListReturn (line 70) | System.Collections.Generic.List<@extension> EscapedListReturn() { retu... method EscapedPointerReturn (line 73) | @extension* EscapedPointerReturn() { return null; } method ParameterMethod (line 80) | void ParameterMethod(extension x) { } method LocalVarMethod (line 81) | void LocalVarMethod() { extension x = null; } class @extension (line 107) | class @extension { } method extension (line 13) | extension() { } method @extension (line 57) | @extension() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/IdentifiersNamedExtensionShouldBeEscaped.Latest.cs class extension (line 7) | class extension { } class @extension (line 11) | class @extension method extension (line 13) | extension() { } method @extension (line 57) | @extension() { } class MyClass (line 16) | unsafe class MyClass method M (line 18) | extension M() => default; method ArrayReturn (line 22) | extension[] ArrayReturn() => default; method JaggedArrayReturn (line 25) | extension[][] JaggedArrayReturn() => default; method MultiDimArrayReturn (line 27) | extension[,] MultiDimArrayReturn() => default; method PointerReturn (line 30) | extension* PointerReturn() { return null; } method M (line 44) | extension M() { return new @extension(); } method N (line 45) | extension? N() { return null; } method extension (line 61) | void extension() { } method N (line 62) | @extension N() { return null; } method EscapedArrayReturn (line 66) | @extension[] EscapedArrayReturn() { return null; } method ListReturn (line 68) | System.Collections.Generic.List ListReturn() { return null; } method EscapedListReturn (line 70) | System.Collections.Generic.List<@extension> EscapedListReturn() { retu... method EscapedPointerReturn (line 73) | @extension* EscapedPointerReturn() { return null; } method ParameterMethod (line 80) | void ParameterMethod(extension x) { } method LocalVarMethod (line 81) | void LocalVarMethod() { extension x = null; } type @extension (line 40) | struct @extension { } method extension (line 13) | extension() { } method @extension (line 57) | @extension() { } class MyClass (line 42) | class MyClass method M (line 18) | extension M() => default; method ArrayReturn (line 22) | extension[] ArrayReturn() => default; method JaggedArrayReturn (line 25) | extension[][] JaggedArrayReturn() => default; method MultiDimArrayReturn (line 27) | extension[,] MultiDimArrayReturn() => default; method PointerReturn (line 30) | extension* PointerReturn() { return null; } method M (line 44) | extension M() { return new @extension(); } method N (line 45) | extension? N() { return null; } method extension (line 61) | void extension() { } method N (line 62) | @extension N() { return null; } method EscapedArrayReturn (line 66) | @extension[] EscapedArrayReturn() { return null; } method ListReturn (line 68) | System.Collections.Generic.List ListReturn() { return null; } method EscapedListReturn (line 70) | System.Collections.Generic.List<@extension> EscapedListReturn() { retu... method EscapedPointerReturn (line 73) | @extension* EscapedPointerReturn() { return null; } method ParameterMethod (line 80) | void ParameterMethod(extension x) { } method LocalVarMethod (line 81) | void LocalVarMethod() { extension x = null; } class @extension (line 53) | class @extension { }; method extension (line 13) | extension() { } method @extension (line 57) | @extension() { } class MyExtension (line 53) | class MyExtension { } class @extension (line 57) | class @extension { @extension() { } ~extension() { } } method extension (line 13) | extension() { } method @extension (line 57) | @extension() { } class MyClass (line 59) | unsafe class MyClass method M (line 18) | extension M() => default; method ArrayReturn (line 22) | extension[] ArrayReturn() => default; method JaggedArrayReturn (line 25) | extension[][] JaggedArrayReturn() => default; method MultiDimArrayReturn (line 27) | extension[,] MultiDimArrayReturn() => default; method PointerReturn (line 30) | extension* PointerReturn() { return null; } method M (line 44) | extension M() { return new @extension(); } method N (line 45) | extension? N() { return null; } method extension (line 61) | void extension() { } method N (line 62) | @extension N() { return null; } method EscapedArrayReturn (line 66) | @extension[] EscapedArrayReturn() { return null; } method ListReturn (line 68) | System.Collections.Generic.List ListReturn() { return null; } method EscapedListReturn (line 70) | System.Collections.Generic.List<@extension> EscapedListReturn() { retu... method EscapedPointerReturn (line 73) | @extension* EscapedPointerReturn() { return null; } method ParameterMethod (line 80) | void ParameterMethod(extension x) { } method LocalVarMethod (line 81) | void LocalVarMethod() { extension x = null; } class MyClass (line 89) | class MyClass method M (line 18) | extension M() => default; method ArrayReturn (line 22) | extension[] ArrayReturn() => default; method JaggedArrayReturn (line 25) | extension[][] JaggedArrayReturn() => default; method MultiDimArrayReturn (line 27) | extension[,] MultiDimArrayReturn() => default; method PointerReturn (line 30) | extension* PointerReturn() { return null; } method M (line 44) | extension M() { return new @extension(); } method N (line 45) | extension? N() { return null; } method extension (line 61) | void extension() { } method N (line 62) | @extension N() { return null; } method EscapedArrayReturn (line 66) | @extension[] EscapedArrayReturn() { return null; } method ListReturn (line 68) | System.Collections.Generic.List ListReturn() { return null; } method EscapedListReturn (line 70) | System.Collections.Generic.List<@extension> EscapedListReturn() { retu... method EscapedPointerReturn (line 73) | @extension* EscapedPointerReturn() { return null; } method ParameterMethod (line 80) | void ParameterMethod(extension x) { } method LocalVarMethod (line 81) | void LocalVarMethod() { extension x = null; } class MyClass (line 98) | class MyClass method M (line 18) | extension M() => default; method ArrayReturn (line 22) | extension[] ArrayReturn() => default; method JaggedArrayReturn (line 25) | extension[][] JaggedArrayReturn() => default; method MultiDimArrayReturn (line 27) | extension[,] MultiDimArrayReturn() => default; method PointerReturn (line 30) | extension* PointerReturn() { return null; } method M (line 44) | extension M() { return new @extension(); } method N (line 45) | extension? N() { return null; } method extension (line 61) | void extension() { } method N (line 62) | @extension N() { return null; } method EscapedArrayReturn (line 66) | @extension[] EscapedArrayReturn() { return null; } method ListReturn (line 68) | System.Collections.Generic.List ListReturn() { return null; } method EscapedListReturn (line 70) | System.Collections.Generic.List<@extension> EscapedListReturn() { retu... method EscapedPointerReturn (line 73) | @extension* EscapedPointerReturn() { return null; } method ParameterMethod (line 80) | void ParameterMethod(extension x) { } method LocalVarMethod (line 81) | void LocalVarMethod() { extension x = null; } class @extension (line 107) | class @extension { } method extension (line 13) | extension() { } method @extension (line 57) | @extension() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/IdentifiersNamedFieldShouldBeEscaped.BeforeCSharp14.cs class Sample (line 1) | public partial class Sample FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/IdentifiersNamedFieldShouldBeEscaped.BeforeCSharp14.partial.cs class Sample (line 1) | public partial class Sample FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/IdentifiersNamedFieldShouldBeEscaped.CSharp9-13.cs class Node (line 8) | public class Node { public Node field; public Node a; } class S (line 9) | public class S { public static Node field; } class LocalVariableInAccessors (line 13) | public class LocalVariableInAccessors class LocalVariableInInit (line 29) | public class LocalVariableInInit class ClassFieldReferencedInAccessor (line 41) | public class ClassFieldReferencedInAccessor class BaseClassFieldReferencedInDerivedAccessor (line 54) | public class BaseClassFieldReferencedInDerivedAccessor class DerivedClassFieldReferencedInAccessor (line 59) | public class DerivedClassFieldReferencedInAccessor : BaseClassFieldRefer... class ParameterNamedFieldInAccessor (line 70) | public class ParameterNamedFieldInAccessor class MemberReferenceInAccessor (line 117) | public class MemberReferenceInAccessor class IndexerAccessInAccessor (line 133) | public class IndexerAccessInAccessor class ExpressionBodiedLambdaParameter (line 148) | public class ExpressionBodiedLambdaParameter class field (line 155) | public static class field { public static int i; } class AccessViaTypeName (line 157) | public class AccessViaTypeName class ClassMethodReferencedInAccessor (line 171) | public class ClassMethodReferencedInAccessor method field (line 173) | private int field() => 42; method field (line 388) | private int field() => 42; class ClassEventReferencedInAccessor (line 181) | public class ClassEventReferencedInAccessor class C (line 199) | public class C { public static int i; } class AccessViaNamespaceName (line 202) | public class AccessViaNamespaceName class TypeParameterReferencedInAccessor (line 216) | public class TypeParameterReferencedInAccessor class LocalVariableInAccessors (line 227) | public class LocalVariableInAccessors class LocalVariableInInit (line 243) | public class LocalVariableInInit class ClassFieldReferencedInAccessor (line 255) | public class ClassFieldReferencedInAccessor class BaseClassFieldReferencedInDerivedAccessor (line 268) | public class BaseClassFieldReferencedInDerivedAccessor class DerivedClassFieldReferencedInAccessor (line 273) | public class DerivedClassFieldReferencedInAccessor : BaseClassFieldRefer... class NonPropertyAccessors (line 284) | public class NonPropertyAccessors class ParameterNamedFieldInAccessor (line 301) | public class ParameterNamedFieldInAccessor class MemberReferenceInAccessor (line 348) | public class MemberReferenceInAccessor class IndexerAccessInAccessor (line 371) | public class IndexerAccessInAccessor class ClassMethodReferencedInAccessor (line 386) | public class ClassMethodReferencedInAccessor method field (line 173) | private int field() => 42; method field (line 388) | private int field() => 42; class ClassEventReferencedInAccessor (line 396) | public class ClassEventReferencedInAccessor class C (line 414) | public class C { public static int i; } class AccessViaNamespaceName (line 417) | public class AccessViaNamespaceName class TypeParameterReferencedInAccessor (line 430) | public class TypeParameterReferencedInAccessor FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/IdentifiersNamedFieldShouldBeEscaped.Latest.cs class Node (line 8) | public class Node { public Node field; public Node a; } class S (line 9) | public class S { public static Node field; } class LocalVariableInAccessors (line 13) | public class LocalVariableInAccessors class LocalVariableInInit (line 29) | public class LocalVariableInInit class ClassFieldReferencedInAccessor (line 41) | public class ClassFieldReferencedInAccessor class BaseClassFieldReferencedInDerivedAccessor (line 54) | public class BaseClassFieldReferencedInDerivedAccessor class DerivedClassFieldReferencedInAccessor (line 59) | public class DerivedClassFieldReferencedInAccessor : BaseClassFieldRefer... class ParameterNamedFieldInAccessor (line 70) | public class ParameterNamedFieldInAccessor class MemberReferenceInAccessor (line 117) | public class MemberReferenceInAccessor class IndexerAccessInAccessor (line 133) | public class IndexerAccessInAccessor class ExpressionBodiedLambdaParameter (line 148) | public class ExpressionBodiedLambdaParameter class field (line 155) | public static class field { public static int i; } class AccessViaTypeName (line 157) | public class AccessViaTypeName class ClassMethodReferencedInAccessor (line 171) | public class ClassMethodReferencedInAccessor method field (line 173) | private int field() => 42; method field (line 388) | private int field() => 42; class ClassEventReferencedInAccessor (line 181) | public class ClassEventReferencedInAccessor class C (line 199) | public class C { public static int i; } class AccessViaNamespaceName (line 202) | public class AccessViaNamespaceName class TypeParameterReferencedInAccessor (line 216) | public class TypeParameterReferencedInAccessor class LocalVariableInAccessors (line 227) | public class LocalVariableInAccessors class LocalVariableInInit (line 243) | public class LocalVariableInInit class ClassFieldReferencedInAccessor (line 255) | public class ClassFieldReferencedInAccessor class BaseClassFieldReferencedInDerivedAccessor (line 268) | public class BaseClassFieldReferencedInDerivedAccessor class DerivedClassFieldReferencedInAccessor (line 273) | public class DerivedClassFieldReferencedInAccessor : BaseClassFieldRefer... class NonPropertyAccessors (line 284) | public class NonPropertyAccessors class ParameterNamedFieldInAccessor (line 301) | public class ParameterNamedFieldInAccessor class MemberReferenceInAccessor (line 348) | public class MemberReferenceInAccessor class IndexerAccessInAccessor (line 371) | public class IndexerAccessInAccessor class ClassMethodReferencedInAccessor (line 386) | public class ClassMethodReferencedInAccessor method field (line 173) | private int field() => 42; method field (line 388) | private int field() => 42; class ClassEventReferencedInAccessor (line 396) | public class ClassEventReferencedInAccessor class C (line 414) | public class C { public static int i; } class AccessViaNamespaceName (line 417) | public class AccessViaNamespaceName class TypeParameterReferencedInAccessor (line 430) | public class TypeParameterReferencedInAccessor FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/IfChainWithoutElse.cs class IfChainWithoutElse (line 7) | public class IfChainWithoutElse method IfChainWithoutElse (line 9) | public IfChainWithoutElse(bool a) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/IfCollapsible.cs class IfCollapsible (line 11) | class IfCollapsible method Test (line 13) | public void Test(bool cond1, bool cond2, bool cond3) class Repro_9221 (line 71) | public class Repro_9221 method ThisWorks (line 73) | public DateTime? ThisWorks() method ThisWontWork (line 105) | public DateTime? ThisWontWork() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ImplementIDisposableCorrectly.AbstractClass.cs class AbstractNotDisposable (line 5) | public abstract class AbstractNotDisposable method Dispose (line 7) | public void Dispose() { } class AbstractWithAbstractDispose (line 10) | public abstract class AbstractWithAbstractDispose : IDisposable // Nonco... method Dispose (line 12) | public abstract void Dispose(); method Dispose (line 14) | protected abstract void Dispose(bool disposing); class AbstractWithoutProtectedDispose (line 17) | public abstract class AbstractWithoutProtectedDispose : IDisposable method Dispose (line 21) | public void Dispose() // Secondary {{'AbstractWithoutProtectedDispose.... class AbstractWithVirtual (line 27) | public abstract class AbstractWithVirtual : IDisposable method Dispose (line 29) | public void Dispose() method Dispose (line 35) | protected virtual void Dispose(bool disposing) class DerivedFromAbstractWithVirtual (line 40) | public class DerivedFromAbstractWithVirtual : AbstractWithVirtual method Dispose (line 42) | protected override void Dispose(bool disposing) class DerivedFromAbstractWithVirtualWithExpression (line 48) | public class DerivedFromAbstractWithVirtualWithExpression : AbstractWith... method Dispose (line 50) | protected override void Dispose(bool disposing) => base.Dispose(dispos... class DerivedFromAbstractWithVirtualNoBaseCall (line 53) | public class DerivedFromAbstractWithVirtualNoBaseCall : AbstractWithVirt... method Dispose (line 55) | protected override void Dispose(bool disposing) { } class AbstractWithAbstract (line 59) | public abstract class AbstractWithAbstract : IDisposable // compliant method Dispose (line 61) | public void Dispose() method Dispose (line 67) | protected abstract void Dispose(bool disposing); class DerivedFromAbstractWithAbstract (line 70) | public class DerivedFromAbstractWithAbstract : AbstractWithAbstract method Dispose (line 72) | protected override void Dispose(bool disposing) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ImplementIDisposableCorrectly.Latest.cs type SealedDisposable (line 5) | public sealed record SealedDisposable : IDisposable type SimpleDisposable (line 10) | public record SimpleDisposable : IDisposable // Noncompliant {{Fix this ... type SimpleDisposablePositional (line 17) | public record SimpleDisposablePositional(string Value) : IDisposable // ... type SimpleDisposableWithSuppressFinalize (line 24) | public record SimpleDisposableWithSuppressFinalize : IDisposable type DisposableWithMoreThanTwoStatements (line 35) | public record DisposableWithMoreThanTwoStatements : IDisposable // Nonco... type DerivedDisposable (line 47) | public record DerivedDisposable : SimpleDisposable type FinalizedDisposable (line 55) | public record FinalizedDisposable : IDisposable type FinalizedDisposableExpression (line 71) | public record FinalizedDisposableExpression : IDisposable type NoVirtualDispose (line 85) | public record NoVirtualDispose : IDisposable type ExplicitImplementation (line 95) | public record ExplicitImplementation : IDisposable // Noncompliant type VirtualImplementation (line 107) | public record VirtualImplementation : IDisposable // Noncompliant type WithFinalizer (line 119) | public record WithFinalizer : IDisposable // Noncompliant type WithFinalizer2 (line 133) | public record WithFinalizer2 : IDisposable // Noncompliant type DerivedDisposable1 (line 151) | public record DerivedDisposable1 : NoVirtualDispose // Compliant, we are... type DerivedDisposable2 (line 155) | public record DerivedDisposable2 : SimpleDisposable // Compliant, we do ... type DisposeNotCallingBase1 (line 159) | public record DisposeNotCallingBase1 : SimpleDisposable // Noncompliant type DisposeNotCallingBase2 (line 165) | public record DisposeNotCallingBase2 : DerivedDisposable2 // Noncomplian... type IMyDisposable (line 173) | public interface IMyDisposable : IDisposable // Compliant, interface type DerivedWithInterface1 (line 177) | public record DerivedWithInterface1 : NoVirtualDispose, IDisposable type DerivedWithInterface2 (line 183) | public record DerivedWithInterface2 : NoVirtualDispose, IMyDisposable //... type PartialCompliant (line 188) | public partial record PartialCompliant : IDisposable type PartialCompliant (line 194) | public partial record PartialCompliant type PartialDerived (line 205) | public partial record PartialDerived : PartialCompliant, IDisposable // ... type PartialDerived (line 211) | public partial record PartialDerived : PartialCompliant // Noncompliant ... type PartialSimpleDisposable (line 216) | public partial record PartialSimpleDisposable : IDisposable type PartialSimpleDisposable (line 222) | public partial record PartialSimpleDisposable // Noncompliant {{Fix this... type PartialWithoutDisposeBool (line 229) | public partial record PartialWithoutDisposeBool : IDisposable // Noncomp... type PartialWithoutDisposeBool (line 234) | public partial record PartialWithoutDisposeBool : IDisposable // Noncomp... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ImplementIDisposableCorrectly.cs class SealedDisposable (line 5) | public sealed class SealedDisposable : IDisposable method Dispose (line 7) | public void Dispose() { } class SimpleDisposable (line 10) | public class SimpleDisposable : IDisposable // Noncompliant {{Fix this i... method Dispose (line 12) | public void Dispose() => Dispose(true); method Dispose (line 14) | protected virtual void Dispose(bool disposing) { } class SimpleDisposableWithSuppressFinalize (line 17) | public class SimpleDisposableWithSuppressFinalize : IDisposable method Dispose (line 19) | public void Dispose() method Dispose (line 25) | protected virtual void Dispose(bool disposing) { } class DisposableWithMoreThanTwoStatements (line 28) | public class DisposableWithMoreThanTwoStatements : IDisposable // Noncom... method Dispose (line 30) | public void Dispose() // Secondary {{'DisposableWithMoreThanTwoStateme... method Dispose (line 37) | protected virtual void Dispose(bool disposing) { } class DerivedDisposable (line 40) | public class DerivedDisposable : SimpleDisposable method Dispose (line 42) | protected override void Dispose(bool disposing) class FinalizedDisposable (line 48) | public class FinalizedDisposable : IDisposable method Dispose (line 50) | public void Dispose() method Dispose (line 56) | protected virtual void Dispose(bool disposing) { } class FinalizedDisposableExpression (line 64) | public class FinalizedDisposableExpression : IDisposable method Dispose (line 66) | public void Dispose() method Dispose (line 72) | protected virtual void Dispose(bool disposing) { } class NoVirtualDispose (line 78) | public class NoVirtualDispose : IDisposable method Dispose (line 82) | public void Dispose() { } method Dispose (line 85) | public virtual void Dispose(bool a, bool b) { } class ExplicitImplementation (line 88) | public class ExplicitImplementation : IDisposable // Noncompliant method Dispose (line 90) | void IDisposable.Dispose() method Dispose (line 97) | protected virtual void Dispose(bool disposing) { } class VirtualImplementation (line 100) | public class VirtualImplementation : IDisposable // Noncompliant method Dispose (line 102) | public virtual void Dispose() method Dispose (line 109) | protected virtual void Dispose(bool disposing) { } class WithFinalizer (line 112) | public class WithFinalizer : IDisposable // Noncompliant method Dispose (line 114) | public void Dispose() method Dispose (line 120) | protected virtual void Dispose(bool disposing) { } class WithFinalizer2 (line 126) | public class WithFinalizer2 : IDisposable // Noncompliant method Dispose (line 128) | public void Dispose() method Dispose (line 134) | protected virtual void Dispose(bool disposing) { } class DerivedDisposable1 (line 144) | public class DerivedDisposable1 : NoVirtualDispose // Compliant, we are ... class DerivedDisposable2 (line 148) | public class DerivedDisposable2 : SimpleDisposable // Compliant, we do n... class DisposeNotCallingBase1 (line 152) | public class DisposeNotCallingBase1 : SimpleDisposable // Noncompliant method Dispose (line 154) | protected override void Dispose(bool disposing) { } class DisposeNotCallingBase2 (line 158) | public class DisposeNotCallingBase2 : DerivedDisposable2 // Noncompliant... method Dispose (line 160) | protected override void Dispose(bool disposing) type IMyDisposable (line 166) | public interface IMyDisposable : IDisposable // Compliant, interface class DerivedWithInterface1 (line 170) | public class DerivedWithInterface1 : NoVirtualDispose, IDisposable class DerivedWithInterface2 (line 176) | public class DerivedWithInterface2 : NoVirtualDispose, IMyDisposable // ... class SimpleDisposableCompilationError (line 180) | public class SimpleDisposableCompilationError : IDisposable // Noncompl... method Dispose (line 182) | public void Dispose() => Dispose(true, false); method Dispose (line 185) | protected virtual void Dispose(bool disposing) { } class Foo1 (line 192) | public sealed class Foo1 : IDisposable method Dispose (line 194) | public void Dispose() class Foo2 (line 201) | public class Foo2 : IDisposable method Dispose (line 203) | public void Dispose() method Dispose (line 209) | protected virtual void Dispose(bool disposing) class Foo3 (line 216) | public class Foo3 : IDisposable method Dispose (line 218) | public void Dispose() method Dispose (line 224) | protected virtual void Dispose(bool disposing) method Dispose (line 279) | protected virtual void Dispose(bool disposing) method Dispose (line 302) | public void Dispose() // Secondary class Foo4 (line 236) | public class Foo4 : Foo2 method Dispose (line 238) | protected override void Dispose(bool disposing) class Foo5 (line 247) | public class Foo5 : Foo2 method Dispose (line 249) | protected override void Dispose(bool disposing) => type Struct (line 255) | public ref struct Struct method Dispose (line 257) | public void Dispose() type Struct2 (line 262) | public ref struct Struct2 method Dispose (line 264) | public void Dispose(bool disposing) // Compliant - FN: for ref structs... class Foo3 (line 273) | public class Foo3 : IDisposable // Noncompliant method Dispose (line 218) | public void Dispose() method Dispose (line 224) | protected virtual void Dispose(bool disposing) method Dispose (line 279) | protected virtual void Dispose(bool disposing) method Dispose (line 302) | public void Dispose() // Secondary FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ImplementIDisposableCorrectlyPartial1.cs class ImplementIDisposableCorrectlyPartial (line 5) | public partial class ImplementIDisposableCorrectlyPartial : IDisposable method Dispose (line 7) | protected virtual void Dispose(bool disposing) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ImplementIDisposableCorrectlyPartial2.cs class ImplementIDisposableCorrectlyPartial (line 20) | public partial class ImplementIDisposableCorrectlyPartial method Dispose (line 22) | public void Dispose() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ImplementISerializableCorrectly.Latest.Partial.cs class Partial_SerializableDerived_Not_CallingBase_GetObjectData_SeparateFiles_Class (line 6) | public partial class Partial_SerializableDerived_Not_CallingBase_GetObje... method GetObjectData (line 9) | public override partial void GetObjectData(SerializationInfo info, Str... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ImplementISerializableCorrectly.Latest.cs type SerializableRecord (line 6) | [Serializable] type SerializableRecord_Positional (line 14) | [Serializable] type SerializableRecord_PositionalNonserializable (line 22) | [Serializable] type SerializableRecord_PositionalNonserializable_AttributeOnField (line 30) | [Serializable] type SerializableAbstract (line 38) | public abstract record SerializableAbstract : ISerializable type SerializableSealed (line 45) | [Serializable] type SerializableInternal (line 53) | internal record SerializableInternal : ISerializable // Nonpublic types ... type SerializableDerived (line 59) | [Serializable] type SerializableDerived_1 (line 66) | [Serializable] type NonSerializedType (line 80) | public record NonSerializedType type Serializable_NoAttribute (line 84) | public record Serializable_NoAttribute : ISerializable type Serializable_NoAttribute_1 (line 97) | public record Serializable_NoAttribute_1 : SerializableRecord, ISerializ... type Serializable_ExplicitImplementation (line 107) | [Serializable] type Serializable_ExplicitImplementation2 (line 115) | [Serializable] type Serializable_Sealed (line 129) | [Serializable] type Serializable_Sealed_NoConstructor (line 140) | [Serializable] type Serializable_NoConstructor (line 149) | [Serializable] type SerializableDerived_Not_CallingBase (line 158) | [Serializable] type SerializableDerived_Not_CallingBase_GetObjectData (line 168) | [Serializable] type SerializableDerived_New_GetObjectData (line 180) | [Serializable] type SerializableDerived_Not_Overriding_GetObjectData (line 194) | [Serializable] type Serializable_NoConstructor_Positional (line 205) | [Serializable] type Partial_SerializableDerived_CallingBase_GetObjectData_Record (line 218) | [Serializable] type Partial_SerializableDerived_CallingBase_GetObjectData_Record (line 226) | public partial record Partial_SerializableDerived_CallingBase_GetObjectD... type Partial_SerializableDerived_Not_CallingBase_GetObjectData_Record (line 232) | [Serializable] type Partial_SerializableDerived_Not_CallingBase_GetObjectData_Record (line 241) | public partial record Partial_SerializableDerived_Not_CallingBase_GetObj... class SerializableClass (line 247) | [Serializable] method SerializableClass (line 250) | public SerializableClass() { } method SerializableClass (line 251) | protected SerializableClass(SerializationInfo info, StreamingContext c... method GetObjectData (line 252) | public virtual void GetObjectData(SerializationInfo info, StreamingCon... class Partial_SerializableDerived_CallingBase_GetObjectData_Class (line 255) | [Serializable] method Partial_SerializableDerived_CallingBase_GetObjectData_Class (line 258) | public Partial_SerializableDerived_CallingBase_GetObjectData_Class() { } method Partial_SerializableDerived_CallingBase_GetObjectData_Class (line 259) | protected Partial_SerializableDerived_CallingBase_GetObjectData_Class(... method GetObjectData (line 260) | public override partial void GetObjectData(SerializationInfo info, Str... method GetObjectData (line 265) | public override partial void GetObjectData(SerializationInfo info, Str... class Partial_SerializableDerived_CallingBase_GetObjectData_Class (line 263) | public partial class Partial_SerializableDerived_CallingBase_GetObjectDa... method Partial_SerializableDerived_CallingBase_GetObjectData_Class (line 258) | public Partial_SerializableDerived_CallingBase_GetObjectData_Class() { } method Partial_SerializableDerived_CallingBase_GetObjectData_Class (line 259) | protected Partial_SerializableDerived_CallingBase_GetObjectData_Class(... method GetObjectData (line 260) | public override partial void GetObjectData(SerializationInfo info, Str... method GetObjectData (line 265) | public override partial void GetObjectData(SerializationInfo info, Str... class Partial_SerializableDerived_Not_CallingBase_GetObjectData_Class (line 269) | [Serializable] method Partial_SerializableDerived_Not_CallingBase_GetObjectData_Class (line 273) | public Partial_SerializableDerived_Not_CallingBase_GetObjectData_Class... method Partial_SerializableDerived_Not_CallingBase_GetObjectData_Class (line 274) | protected Partial_SerializableDerived_Not_CallingBase_GetObjectData_Cl... method GetObjectData (line 275) | public override partial void GetObjectData(SerializationInfo info, Str... method GetObjectData (line 281) | public override partial void GetObjectData(SerializationInfo info, Str... class Partial_SerializableDerived_Not_CallingBase_GetObjectData_Class (line 278) | public partial class Partial_SerializableDerived_Not_CallingBase_GetObje... method Partial_SerializableDerived_Not_CallingBase_GetObjectData_Class (line 273) | public Partial_SerializableDerived_Not_CallingBase_GetObjectData_Class... method Partial_SerializableDerived_Not_CallingBase_GetObjectData_Class (line 274) | protected Partial_SerializableDerived_Not_CallingBase_GetObjectData_Cl... method GetObjectData (line 275) | public override partial void GetObjectData(SerializationInfo info, Str... method GetObjectData (line 281) | public override partial void GetObjectData(SerializationInfo info, Str... type Partial_SerializableDerived_Not_SerializableAttributeOnNonInheriting_Record (line 284) | public partial record Partial_SerializableDerived_Not_SerializableAttrib... type Partial_SerializableDerived_Not_SerializableAttributeOnNonInheriting_Record (line 291) | [Serializable] class Partial_SerializableDerived_Not_CallingBase_GetObjectData_SeparateFiles_Class (line 298) | [Serializable] method Partial_SerializableDerived_Not_CallingBase_GetObjectData_SeparateFiles_Class (line 302) | public Partial_SerializableDerived_Not_CallingBase_GetObjectData_Separ... method Partial_SerializableDerived_Not_CallingBase_GetObjectData_SeparateFiles_Class (line 303) | protected Partial_SerializableDerived_Not_CallingBase_GetObjectData_Se... method GetObjectData (line 304) | public override partial void GetObjectData(SerializationInfo info, Str... class NonSerializedType (line 308) | public class NonSerializedType type SerializableStruct_NoAttribute (line 312) | public struct SerializableStruct_NoAttribute : ISerializable // Nonco... method SerializableStruct_NoAttribute (line 318) | public SerializableStruct_NoAttribute() { } method GetObjectData (line 320) | public void GetObjectData(SerializationInfo info, StreamingContext con... type SerializableRecordStruct_NoAttribute (line 323) | public record struct SerializableRecordStruct_NoAttribute : ISerializabl... type SerializablePositionalRecordStruct_NoAttribute (line 334) | public record struct SerializablePositionalRecordStruct_NoAttribute(stri... class Serializable (line 345) | [Serializable] method Serializable (line 348) | public Serializable() { } method Serializable (line 349) | protected Serializable(SerializationInfo info, StreamingContext contex... method GetObjectData (line 350) | public virtual void GetObjectData(SerializationInfo info, StreamingCon... class SomeClass (line 353) | [Serializable] method SomeClass (line 358) | public SomeClass() : this(new Serializable()) { } method SomeClass (line 360) | protected SomeClass(SerializationInfo info, StreamingContext context) ... method SomeMethod (line 362) | private void SomeMethod() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ImplementISerializableCorrectly.cs class Serializable (line 8) | [Serializable] method Serializable (line 11) | public Serializable() { } method Serializable (line 12) | protected Serializable(SerializationInfo info, StreamingContext contex... method GetObjectData (line 13) | public virtual void GetObjectData(SerializationInfo info, StreamingCon... class SerializableAbstract (line 16) | public abstract class SerializableAbstract : ISerializable method SerializableAbstract (line 18) | public SerializableAbstract() { } method SerializableAbstract (line 19) | protected SerializableAbstract(SerializationInfo info, StreamingContex... method GetObjectData (line 20) | public virtual void GetObjectData(SerializationInfo info, StreamingCon... class SerializableSealed (line 23) | [Serializable] method SerializableSealed (line 26) | public SerializableSealed() { } method SerializableSealed (line 27) | private SerializableSealed(SerializationInfo info, StreamingContext co... method GetObjectData (line 28) | public void GetObjectData(SerializationInfo info, StreamingContext con... class SerializableInternal (line 31) | internal class SerializableInternal : ISerializable // Nonpublic classes... method SerializableInternal (line 33) | public SerializableInternal() { } method GetObjectData (line 34) | public void GetObjectData(SerializationInfo info, StreamingContext con... class SerializableDerived (line 37) | [Serializable] method SerializableDerived (line 40) | public SerializableDerived() { } method SerializableDerived (line 41) | protected SerializableDerived(SerializationInfo info, StreamingContext... class SerializableDerived_1 (line 44) | [Serializable] method SerializableDerived_1 (line 48) | public SerializableDerived_1() { } method SerializableDerived_1 (line 49) | protected SerializableDerived_1(SerializationInfo info, StreamingConte... method GetObjectData (line 50) | public override void GetObjectData(SerializationInfo info, StreamingCo... class NonSerializedType (line 56) | public class NonSerializedType class Serializable_NoAttribute (line 60) | public class Serializable_NoAttribute : ISerializable method Serializable_NoAttribute (line 66) | public Serializable_NoAttribute() { } method Serializable_NoAttribute (line 67) | protected Serializable_NoAttribute(SerializationInfo info, StreamingCo... method GetObjectData (line 68) | public void GetObjectData(SerializationInfo info, StreamingContext con... class Serializable_NoAttribute_1 (line 72) | public class Serializable_NoAttribute_1 : Serializable, ISerializable method Serializable_NoAttribute_1 (line 76) | public Serializable_NoAttribute_1() { } method Serializable_NoAttribute_1 (line 77) | protected Serializable_NoAttribute_1(SerializationInfo info, Streaming... class Serializable_ExplicitImplementation (line 81) | [Serializable] method Serializable_ExplicitImplementation (line 84) | public Serializable_ExplicitImplementation() { } method Serializable_ExplicitImplementation (line 85) | protected Serializable_ExplicitImplementation(SerializationInfo info, ... method GetObjectData (line 86) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class Serializable_ExplicitImplementation2 (line 89) | [Serializable] method Serializable_ExplicitImplementation2 (line 92) | public Serializable_ExplicitImplementation2() { } method Serializable_ExplicitImplementation2 (line 93) | protected Serializable_ExplicitImplementation2(SerializationInfo info,... method GetObjectData (line 94) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... method GetObjectData (line 98) | protected void GetObjectData(SerializationInfo info, StreamingContext ... class Serializable_Sealed (line 101) | [Serializable] method Serializable_Sealed (line 105) | public Serializable_Sealed() { } method Serializable_Sealed (line 106) | protected Serializable_Sealed(SerializationInfo info, StreamingContext... method GetObjectData (line 108) | public void GetObjectData(SerializationInfo info, StreamingContext con... class Serializable_Sealed_NoConstructor (line 111) | [Serializable] method Serializable_Sealed_NoConstructor (line 116) | public Serializable_Sealed_NoConstructor() { } method GetObjectData (line 117) | public void GetObjectData(SerializationInfo info, StreamingContext con... class Serializable_NoConstructor (line 120) | [Serializable] method Serializable_NoConstructor (line 125) | public Serializable_NoConstructor() { } method GetObjectData (line 126) | public virtual void GetObjectData(SerializationInfo info, StreamingCon... class SerializableDerived_Not_CallingBase (line 129) | [Serializable] method SerializableDerived_Not_CallingBase (line 133) | public SerializableDerived_Not_CallingBase() { } method SerializableDerived_Not_CallingBase (line 134) | protected SerializableDerived_Not_CallingBase(SerializationInfo info, ... class SerializableDerived_Not_CallingBase_GetObjectData (line 138) | [Serializable] method SerializableDerived_Not_CallingBase_GetObjectData (line 144) | public SerializableDerived_Not_CallingBase_GetObjectData() { } method SerializableDerived_Not_CallingBase_GetObjectData (line 145) | protected SerializableDerived_Not_CallingBase_GetObjectData(Serializat... method GetObjectData (line 146) | public override void GetObjectData(SerializationInfo info, StreamingCo... class SerializableDerived_Not_CallingBase_GetObjectData_Coverage (line 150) | [Serializable] method SerializableDerived_Not_CallingBase_GetObjectData_Coverage (line 155) | public SerializableDerived_Not_CallingBase_GetObjectData_Coverage() { } method SerializableDerived_Not_CallingBase_GetObjectData_Coverage (line 156) | protected SerializableDerived_Not_CallingBase_GetObjectData_Coverage(S... method GetObjectData (line 157) | public override void GetObjectData(SerializationInfo info, StreamingCo... class SerializableDerived_New_GetObjectData (line 164) | [Serializable] method SerializableDerived_New_GetObjectData (line 168) | public SerializableDerived_New_GetObjectData() { } method SerializableDerived_New_GetObjectData (line 169) | protected SerializableDerived_New_GetObjectData(SerializationInfo info... method GetObjectData (line 171) | public new void GetObjectData(SerializationInfo info, StreamingContext... class SerializableDerived_Not_Overriding_GetObjectData (line 178) | [Serializable] method SerializableDerived_Not_Overriding_GetObjectData (line 185) | public SerializableDerived_Not_Overriding_GetObjectData() { } method SerializableDerived_Not_Overriding_GetObjectData (line 186) | protected SerializableDerived_Not_Overriding_GetObjectData(Serializati... class SerializableDerived_Not_Overriding_GetObjectData_NonserializableFields (line 189) | [Serializable] method SerializableDerived_Not_Overriding_GetObjectData_NonserializableFields (line 194) | public SerializableDerived_Not_Overriding_GetObjectData_Nonserializabl... method SerializableDerived_Not_Overriding_GetObjectData_NonserializableFields (line 195) | protected SerializableDerived_Not_Overriding_GetObjectData_Nonserializ... class SerializableDerived_Not_Overriding_GetObjectData_StaticFields (line 198) | [Serializable] method SerializableDerived_Not_Overriding_GetObjectData_StaticFields (line 203) | public SerializableDerived_Not_Overriding_GetObjectData_StaticFields()... method SerializableDerived_Not_Overriding_GetObjectData_StaticFields (line 204) | protected SerializableDerived_Not_Overriding_GetObjectData_StaticField... class OptionException (line 207) | [Serializable] method OptionException (line 210) | public OptionException() { } method OptionException (line 211) | public OptionException(string message) : base(message) { } method OptionException (line 212) | public OptionException(string message, Exception innerException) : bas... method OptionException (line 213) | protected OptionException(SerializationInfo info, StreamingContext con... class OptionUnknownException (line 216) | [Serializable] method OptionUnknownException (line 221) | public OptionUnknownException() { } method OptionUnknownException (line 223) | public OptionUnknownException(string option) method OptionUnknownException (line 228) | public OptionUnknownException(string option, Exception innerException) method OptionUnknownException (line 234) | public OptionUnknownException(string option, string message) : base(me... method OptionUnknownException (line 239) | protected OptionUnknownException(SerializationInfo info, StreamingCont... method GetObjectData (line 244) | public override void GetObjectData(SerializationInfo info, StreamingCo... class MyException (line 256) | public class MyException : Exception // Compliant: no opt-in for custom ... class SerializableDerived_NoExtraFields (line 259) | [Serializable] method SerializableDerived_NoExtraFields (line 262) | public SerializableDerived_NoExtraFields() { } method SerializableDerived_NoExtraFields (line 263) | protected SerializableDerived_NoExtraFields(SerializationInfo info, St... class CustomLookup (line 266) | public class CustomLookup : Dictionary // Compliant: no ... class CustomLookup_OptInPerInterface (line 270) | public class CustomLookup_OptInPerInterface : Dictionary... class CustomLookup_OptInPerAttribute (line 277) | [Serializable] class CustomLookup_OptInPerConstructor1 (line 284) | public class CustomLookup_OptInPerConstructor1 : Dictionary method CustomLookup_OptInPerConstructor1 (line 288) | protected CustomLookup_OptInPerConstructor1(SerializationInfo info, St... class CustomLookup_OptInPerConstructor2 (line 292) | public class CustomLookup_OptInPerConstructor2 : Dictionary method CustomLookup_OptInPerConstructor2 (line 296) | protected CustomLookup_OptInPerConstructor2(SerializationInfo info, St... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ImplementSerializationMethodsCorrectly.Latest.cs type IWithValidSerializationMethods (line 9) | public interface IWithValidSerializationMethods method OnSerializingMethod (line 11) | [OnSerializing] method OnSerializedMethod (line 14) | [OnSerialized] method OnDeserializingMethod (line 17) | [OnDeserializing] method OnDeserializedMethod (line 20) | [OnDeserialized] type IWithInvalidSerializationMethodsModifiers (line 24) | public interface IWithInvalidSerializationMethodsModifiers method OnSerializingMethod (line 26) | [OnSerializing] method OnSerializedMethod (line 29) | [OnSerialized] method OnDeserializingMethod (line 32) | [OnDeserializing] method OnDeserializedMethod (line 35) | [OnDeserialized] type IWithInvalidSerializationMethodsParams (line 39) | public interface IWithInvalidSerializationMethodsParams method OnSerializingMethod (line 41) | [OnSerializing] method OnSerializedMethod (line 44) | [OnSerialized] method OnDeserializingMethod (line 47) | [OnDeserializing] method OnDeserializedMethod (line 50) | [OnDeserialized] type Foo (line 55) | [Serializable] class Partial (line 130) | [Serializable] method OnSerialized (line 133) | [OnSerialized] method OnDeserializedMethod (line 136) | [OnDeserialized()] method OnSerialized (line 142) | private partial int OnSerialized(StreamingContext context) => 42; method OnDeserializedMethod (line 144) | private partial void OnDeserializedMethod(StreamingContext context) { } class Partial (line 140) | public partial class Partial method OnSerialized (line 133) | [OnSerialized] method OnDeserializedMethod (line 136) | [OnDeserialized()] method OnSerialized (line 142) | private partial int OnSerialized(StreamingContext context) => 42; method OnDeserializedMethod (line 144) | private partial void OnDeserializedMethod(StreamingContext context) { } class TestCases (line 147) | internal class TestCases method Method (line 149) | public void Method(IEnumerable collection) method Call (line 164) | private void Call(Action action) => action(1); class SerializableWithGenericAttribute (line 167) | [Serializable] method OnSerializing (line 170) | [OnSerializing, Generic] class GenericAttribute (line 174) | public class GenericAttribute : Attribute { } type IMyInterface (line 176) | interface IMyInterface method OnSerializingStaticVirtual (line 178) | [OnSerializing] method OnSerializingStaticAbstract (line 181) | [OnSerializing] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ImplementSerializationMethodsCorrectly.cs class Foo (line 5) | [Serializable] method OnSerializing (line 8) | [OnSerializing] method OnSerialized (line 12) | [OnSerialized] method OnDeserializing (line 15) | [OnDeserializing] method OnDeserialized (line 18) | [OnDeserialized] method OnDeserialized2 (line 21) | void OnDeserialized2(StreamingContext context, string str) { } method OnDeserialized (line 23) | [OnDeserialized] method OnDeserializing2 (line 26) | [OnDeserializing] method OnDeserializing3 (line 29) | [OnDeserializing] method OnDeserializing4 (line 32) | [OnDeserializing] method OnDeserializing5 (line 35) | [OnDeserializing] method OnSerializingStatic (line 38) | [OnSerializing] method OnSerializingPublicStatic (line 41) | [OnSerializing] method OnDeserialized (line 44) | [OnDeserialized] method OnDeserializing (line 48) | [OnDeserializing] method OnDeserialized1 (line 52) | [OnDeserialized] method OnDeserializing1 (line 56) | [OnDeserializing] method OnSerializingMethod (line 60) | [OnSerializing()] method OnSerializedMethod (line 63) | [OnSerialized()] method OnProtectedInternal (line 66) | [OnSerializing] method OnDeserializingMethod (line 69) | [OnDeserializing()] method OnDeserializedMethod (line 72) | [OnDeserialized()] method OnDeserialized3 (line 75) | [OnDeserialized] method OnDeserializing3 (line 79) | [OnDeserializing] method OnSerializing3 (line 83) | [OnSerializing] method OnSerialized3 (line 87) | [OnSerialized] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/IndentSingleLineFollowingConditional.Latest.cs type IStaticInterfaceMethod (line 48) | public interface IStaticInterfaceMethod method MyStaticVirtualMethod (line 50) | static virtual string MyStaticVirtualMethod(bool condition) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/IndentSingleLineFollowingConditional.cs class RspecExample (line 5) | class RspecExample method DoTheThing (line 7) | private void DoTheThing() { /* no-op */ } method DoTheOtherThing (line 8) | private void DoTheOtherThing() { /* no-op */ } method SomethingElseEntirely (line 9) | private void SomethingElseEntirely() { /* no-op */ } method Foo (line 10) | private void Foo() { /* no-op */ } method RSpec (line 12) | public void RSpec(bool condition) class Non_CompliantProgram (line 36) | class Non_CompliantProgram method Non_compliant_OneOfEach_Messages (line 38) | public void Non_compliant_OneOfEach_Messages() method SpecialElseIfCase (line 74) | public int SpecialElseIfCase(int i) method OtherElseIfCombinations (line 98) | public int OtherElseIfCombinations(int i) method Non_compliant_NestedMixedConditionals (line 113) | public int Non_compliant_NestedMixedConditionals() class CompliantProgram (line 144) | class CompliantProgram method Compliant_MixedConditionals (line 146) | public int Compliant_MixedConditionals() method Compliant_MixedConditionals_WithBraces (line 164) | public int Compliant_MixedConditionals_WithBraces() method Compliant_NestedIf (line 203) | public int Compliant_NestedIf(int value) method Compliant_NestedIfElse (line 214) | public int Compliant_NestedIfElse(int value) method Compliant_NestedFor (line 231) | public int Compliant_NestedFor() method Compliant_NestedForEach (line 243) | public int Compliant_NestedForEach() method Compliant_NestedDo (line 254) | public int Compliant_NestedDo() method Compliant_NestedWhile (line 269) | public int Compliant_NestedWhile() method Compliant_StatementOnSameLine (line 281) | public int Compliant_StatementOnSameLine() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/IndexOfCheckAgainstZero.Latest.cs class Sample (line 3) | public class Sample method Spans (line 5) | public void Spans() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/IndexOfCheckAgainstZero.cs class IndexOfCheckAgainstZero (line 7) | class IndexOfCheckAgainstZero method IndexOfCheckAgainstZero (line 9) | public IndexOfCheckAgainstZero() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InfiniteRecursion.RoslynCfg.Latest.cs class Repro (line 7) | public class Repro class PartialProperty (line 27) | public partial class PartialProperty method Method (line 31) | public partial int Method(); method Method (line 54) | public partial int Method() class PartialProperty (line 34) | public partial class PartialProperty method Method (line 31) | public partial int Method(); method Method (line 54) | public partial int Method() class CSharp8 (line 64) | public class CSharp8 method CSharp8_SwitchExpressions_OK (line 66) | int CSharp8_SwitchExpressions_OK(int a) method CSharp8_SwitchExpressions_Bad (line 76) | int CSharp8_SwitchExpressions_Bad(int a) // Noncompliant method CSharp8_StaticLocalFunctions_OK (line 86) | int CSharp8_StaticLocalFunctions_OK(int a) method CSharp8_StaticLocalFunctions_Bad (line 93) | int CSharp8_StaticLocalFunctions_Bad(int a, int b) method CSharp8_StaticLocalFunctions_FN (line 100) | int CSharp8_StaticLocalFunctions_FN(int a, int b) type IWithDefaultImplementation (line 109) | public interface IWithDefaultImplementation method Total (line 114) | decimal Total() //Noncompliant type InfiniteRecursion (line 120) | interface InfiniteRecursion method Pow (line 122) | static virtual int Pow(int num, int exponent) where T : InfiniteRec... class Addition (line 129) | public class Addition : IAdditionOperators class Comparison (line 135) | public class Comparison : IComparisonOperators class Decrement (line 163) | public class Decrement : IDecrementOperators class DecrementAfter (line 169) | public class DecrementAfter : IDecrementOperators class Increment (line 174) | public class Increment : IIncrementOperators class IncrementAfter (line 179) | public class IncrementAfter : IIncrementOperators class BitWise (line 184) | public class BitWise : IBitwiseOperators class Extensions (line 197) | public static class Extensions method extension (line 199) | extension(Exception ex) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InfiniteRecursion.RoslynCfg.cs class InfiniteRecursion (line 8) | class InfiniteRecursion method Pow (line 10) | int Pow(int num, int exponent) // Noncompliant; no condition under w... method Test1 (line 17) | void Test1() // Noncompliant {{Add a way to break out of this method's... method Test2 (line 38) | void Test2() // Noncompliant method Test3 (line 50) | void Test3() method Test4 (line 74) | int Test4() => Test4(); method Test5 (line 76) | int Test5() => 42; method InternalRecursion (line 165) | void InternalRecursion(int i) // Noncompliant method Pow2 (line 183) | int Pow2(int num, int exponent) method Generic (line 192) | void Generic() // Noncompliant method Generic2 (line 197) | void Generic2() // Compliant method Power (line 203) | int Power(int num, int exponent) // Noncompliant method FixIt (line 216) | int FixIt(int a) // FN - Two methods calling each other are not rec... method UpdateIt (line 221) | int UpdateIt(int a) method MethodWithNestedLocalFunctions (line 226) | void MethodWithNestedLocalFunctions() method MethodWithNestedLocalFunctions2 (line 237) | void MethodWithNestedLocalFunctions2() // FN method MethodWithNestedLocalFunctions3 (line 250) | void MethodWithNestedLocalFunctions3() method SimpleLambdaExpression (line 263) | private Action SimpleLambdaExpression(Func asyncHandler) method ParenthesizedLambdaExpression (line 272) | private Action ParenthesizedLambdaExpression(Func async... method MethodWithNestedLocalFunctionsAndDelegate (line 283) | private void MethodWithNestedLocalFunctionsAndDelegate() method LamdaInIf (line 304) | private void LamdaInIf(List input) class MoreCases (line 316) | class MoreCases method CallsOnThis (line 318) | void CallsOnThis() // Noncompliant method CallsOnObject (line 323) | void CallsOnObject() // Noncompliant method CallsOnObjectVirtual (line 329) | public virtual void CallsOnObjectVirtual(MoreCases arg) // Compliant method PassItself (line 334) | static int PassItself(int a) method Receiver (line 340) | static void Receiver(Func func) class Exceptions (line 346) | class Exceptions method ThrowsException (line 377) | void ThrowsException() => throw new AggregateException(); method ThrowsExceptionInIf (line 379) | void ThrowsExceptionInIf() method CallsItselfAndThrows (line 392) | void CallsItselfAndThrows() // Noncompliant method ThrowsExceptionInIfAfterGoto (line 398) | void ThrowsExceptionInIfAfterGoto() // Noncompliant method ThrowsInIf (line 409) | int ThrowsInIf(int a) method ThrowsInTry (line 421) | int ThrowsInTry(int a) method ThrowsInFinally (line 436) | int ThrowsInFinally(int a) class One (line 448) | abstract class One method Method (line 460) | public virtual int Method() method NullableMethod (line 465) | public virtual int? NullableMethod() class Two (line 471) | class Two : One method Two (line 473) | public Two(One parent) class Three (line 479) | class Three : One method Method (line 486) | public override int Method() method NullableMethod (line 491) | public override int? NullableMethod() class StaticPropertyCase (line 497) | class StaticPropertyCase class Repro (line 506) | public class Repro : Base class Base (line 533) | public class Base class Repro_5261 (line 540) | public class Repro_5261 method Repeat (line 542) | public IEnumerable Repeat(T element) // Noncompliant FP, it's n... class Repro_6642 (line 552) | public class Repro_6642 class Repro_6643 (line 581) | public class Repro_6643 class Repro_6644 (line 591) | public class Repro_6644 FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InfiniteRecursion.SonarCfg.cs class InfiniteRecursion (line 5) | class InfiniteRecursion method Pow (line 7) | int Pow(int num, int exponent) // Noncompliant; no condition under w... method Test1 (line 14) | void Test1() // Noncompliant {{Add a way to break out of this method's... method Test2 (line 35) | void Test2() method Test3 (line 47) | void Test3() method Test4 (line 71) | int Test4() => Test4(); method Test5 (line 73) | int Test5() => 42; method InternalRecursion (line 138) | void InternalRecursion(int i) method Pow2 (line 156) | int Pow2(int num, int exponent) method Generic (line 165) | void Generic() // Noncompliant method Generic2 (line 170) | void Generic2() // Compliant method Power (line 177) | int Power(int num, int exponent) method FixIt (line 190) | int FixIt(int a) // FN - Two methods calling each other are not rec... method UpdateIt (line 195) | int UpdateIt(int a) class Repro_6642 (line 203) | public class Repro_6642 class Repro_6643 (line 213) | public class Repro_6643 class Repro_6644 (line 221) | public class Repro_6644 FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InheritedCollidingInterfaceMembers.AnotherFile.cs type IAnotherFile (line 73) | public partial interface IAnotherFile method Method (line 75) | void Method(int i); type IAnotherFile2 (line 78) | public partial interface IAnotherFile2 method Method (line 80) | void Method(int i); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InheritedCollidingInterfaceMembers.DifferentFile.cs type IParentInAnotherFile (line 11) | public interface IParentInAnotherFile : IAnotherFile, IAnotherFile2 // N... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InheritedCollidingInterfaceMembers.Latest.cs type A (line 5) | interface A method m (line 7) | void m(); type B (line 10) | interface B : A method m (line 12) | void A.m() { Console.WriteLine("interface B"); } type C (line 15) | interface C : A method m (line 17) | void A.m() { Console.WriteLine("interface C"); } class D (line 20) | class D : B, C // Error [CS8705] Interface member 'A.m()' does not have... method Main (line 22) | static void Main() type IPublicMethodFirst (line 29) | public interface IPublicMethodFirst method Method (line 31) | public string Method(string value) type IPublicMethodSecond (line 37) | public interface IPublicMethodSecond method Method (line 39) | public string Method(string value); type ICommon (line 43) | public interface ICommon : IPublicMethodFirst, IPublicMethodSecond // No... type IAbstractMethodFirst (line 48) | public interface IAbstractMethodFirst method AbstractMethod (line 50) | public abstract string AbstractMethod(string value); type IAbstractMethodSecond (line 53) | public interface IAbstractMethodSecond method AbstractMethod (line 55) | public abstract string AbstractMethod(string value); type IAbstractMethodCommon (line 59) | public interface IAbstractMethodCommon : IAbstractMethodFirst, IAbstract... type IVirtualMethodFirst (line 64) | public interface IVirtualMethodFirst method Virtual (line 66) | public virtual string Virtual(string value) type IVirtualMethodSecond (line 72) | public interface IVirtualMethodSecond method Virtual (line 74) | public virtual string Virtual(string value) type IVirtualMethodCommon (line 81) | public interface IVirtualMethodCommon : IVirtualMethodFirst, IVirtualMet... type IInternalMethodFirst (line 86) | public interface IInternalMethodFirst method Internal (line 88) | internal string Internal(string value) type IInternalMethodSecond (line 94) | public interface IInternalMethodSecond method Internal (line 96) | internal string Internal(string value) type IInternalMethodCommon (line 103) | public interface IInternalMethodCommon : IInternalMethodFirst, IInternal... type IProtectedMethodFirst (line 108) | public interface IProtectedMethodFirst method Protected (line 110) | protected string Protected(string value) type IProtectedMethodSecond (line 116) | public interface IProtectedMethodSecond method Protected (line 118) | protected string Protected(string value) type IProtectedMethodCommon (line 125) | public interface IProtectedMethodCommon : IProtectedMethodFirst, IProtec... type IPrivateMethodFirst (line 130) | public interface IPrivateMethodFirst method Private (line 132) | private string Private(string value) type IPrivateMethodSecond (line 138) | public interface IPrivateMethodSecond method Private (line 140) | private string Private(string value) type IPrivateMethodCommon (line 146) | public interface IPrivateMethodCommon : IPrivateMethodFirst, IPrivateMet... type ISealedMethodFirst (line 150) | public interface ISealedMethodFirst method Sealed (line 152) | public sealed string Sealed(string value) type ISealedMethodSecond (line 158) | public interface ISealedMethodSecond method Sealed (line 160) | public sealed string Sealed(string value) type ISealedMethodCommon (line 167) | public interface ISealedMethodCommon : ISealedMethodFirst, ISealedMethod... type IStaticMethodFirst (line 172) | public interface IStaticMethodFirst method Static (line 174) | public static string Static(string value) type IStaticMethodSecond (line 180) | public interface IStaticMethodSecond method Static (line 182) | public static string Static(string value) type IStaticMethodDerived (line 189) | public interface IStaticMethodDerived : IStaticMethodFirst, IStaticMetho... type IBase1 (line 193) | public interface IBase1 type IBase2 (line 198) | public interface IBase2 type IDerived (line 203) | public interface IDerived : IBase1, IBase2 type IIndexer1 (line 207) | public interface IIndexer1 type IIndexer2 (line 216) | public interface IIndexer2 type IIndexerDerived (line 227) | public interface IIndexerDerived : IIndexer1, IIndexer2 // Noncompliant ... type IProperty1 (line 232) | public interface IProperty1 type IProperty2 (line 241) | public interface IProperty2 type IPropertyDerived (line 252) | public interface IPropertyDerived : IProperty1, IProperty2 // Noncomplia... type IEvents1 (line 257) | public interface IEvents1 type IEvents2 (line 274) | public interface IEvents2 type IEventsDerived (line 293) | public interface IEventsDerived : IEvents1, IEvents2 // Noncompliant {{R... type IAbstractFirst (line 298) | public interface IAbstractFirst method StaticAbstractMethod (line 300) | public static abstract string StaticAbstractMethod(string value); type IAbstractSecond (line 303) | public interface IAbstractSecond method StaticAbstractMethod (line 305) | public static abstract string StaticAbstractMethod(string value); type IAbstractCommon (line 309) | public interface IAbstractCommon : IAbstractFirst, IAbstractSecond { } type IVirtualFirst (line 311) | public interface IVirtualFirst method StaticVirtualMethod (line 313) | public static virtual string StaticVirtualMethod(string value) => value; type IVirtualSecond (line 316) | public interface IVirtualSecond method StaticVirtualMethod (line 318) | public static virtual string StaticVirtualMethod(string value) => value; type IVirtualCommon (line 322) | public interface IVirtualCommon : IVirtualFirst, IVirtualSecond { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InheritedCollidingInterfaceMembers.cs type IMyInterface1 (line 7) | public interface IMyInterface1 method Method (line 9) | unsafe string Method(int[,] parameter, int* pointer); type IMyInterface2 (line 11) | public interface IMyInterface2 method Method (line 13) | unsafe int Method(int[,] parameter, int* pointer); type IMyInterfaceCommon1 (line 16) | public interface IMyInterfaceCommon1 : IMyInterface1, IMyInterface2 // N... method Method (line 19) | int Method(int i, string s); type IMyInterfaceCommon2 (line 21) | public interface IMyInterfaceCommon2 : IMyInterface1, IMyInterface2 method Method (line 23) | unsafe new int Method(int[,] parameter, int* pointer); type IMyInterfaceGeneric1 (line 26) | public interface IMyInterfaceGeneric1 method Method (line 28) | unsafe string Method(T1[,] parameter, int* pointer); type IMyInterfaceGeneric2 (line 30) | public interface IMyInterfaceGeneric2 method Method (line 32) | unsafe int Method(T2[,] parameter, int* pointer); type IMyInterfaceGenericCommon1 (line 34) | public interface IMyInterfaceGenericCommon1 : IMyInterfaceGeneric1, IMyI... type IMyInterfaceGeneric3 (line 38) | public interface IMyInterfaceGeneric3 method Method (line 40) | unsafe int Method(T[,] parameter, int* pointer); type IMyInterfaceGeneric4 (line 45) | public interface IMyInterfaceGeneric4 method Method (line 47) | unsafe int Method(T[,] parameter, int* pointer); type IMyInterfaceGenericCommon2 (line 50) | public interface IMyInterfaceGenericCommon2 : IMyInterface1, IMyInterfac... type IMyInterfaceGenericCommon3 (line 54) | public interface IMyInterfaceGenericCommon3 : IMyInterfaceGeneric4... type IMyInterfaceGenericCommon4 (line 58) | public interface IMyInterfaceGenericCommon4 : IMyInterfaceGeneric4... method Method (line 60) | unsafe int Method(T[,] parameter, int* pointer); type IMyInterfaceEvent1 (line 63) | public interface IMyInterfaceEvent1 type IMyInterfaceEvent2 (line 67) | public interface IMyInterfaceEvent2 type IMyInterfaceCommonEvent (line 72) | public interface IMyInterfaceCommonEvent : IMyInterfaceEvent1, IMyInterf... type IMultipleMember1 (line 76) | public interface IMultipleMember1 method Method (line 78) | int Method(int i); method Method2 (line 79) | void Method2(string s); type IMultipleMember2 (line 82) | public interface IMultipleMember2 method Method2 (line 84) | void Method2(string s); type IMultipleMember3 (line 88) | public interface IMultipleMember3 method Method (line 90) | int Method(int i); type IMultipleMemberCommon (line 94) | public interface IMultipleMemberCommon : IMultipleMember1, IMultipleMemb... type IReadOnlyDictionary (line 98) | public interface IReadOnlyDictionary : IReadOnlyCollection... type IMultilayer (line 102) | public interface IMultilayer : IReadOnlyDictionary, IDum... type IDummy (line 105) | public interface IDummy type IRepro3225 (line 110) | public interface IRepro3225 : IList, IReadOnlyList // Noncompli... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InitializeStaticFieldsInline.cs class RuntimeInformation (line 8) | static class RuntimeInformation method IsWindows (line 10) | public static bool IsWindows() { return true; } class Program (line 13) | class Program method Program (line 18) | static Program() // Noncompliant class Foo (line 28) | class Foo method Foo (line 30) | static Foo() class Bar (line 36) | class Bar method Bar (line 38) | static Bar() class Class1 (line 44) | static class Class1 method Class1 (line 51) | static Class1() // Noncompliant class ExpressionBodyCtor (line 60) | static class ExpressionBodyCtor method ExpressionBodyCtor (line 64) | static ExpressionBodyCtor() => IsAvailable = Initialize(); method Initialize (line 66) | static bool Initialize() => true; class ReproIfSingle (line 70) | public class ReproIfSingle method ReproIfSingle (line 74) | static ReproIfSingle() // Noncompliant class ReproIfMulti (line 87) | public class ReproIfMulti method ReproIfMulti (line 92) | static ReproIfMulti() // Compliant, because there are multiple variab... class ReproIfMultiReducable (line 107) | public class ReproIfMultiReducable method ReproIfMultiReducable (line 112) | static ReproIfMultiReducable() // FN class ReproSwitchSingle (line 126) | public class ReproSwitchSingle method ReproSwitchSingle (line 130) | static ReproSwitchSingle() // Noncompliant class ReproSwitchMulti (line 144) | public class ReproSwitchMulti method ReproSwitchMulti (line 149) | static ReproSwitchMulti() // Compliant, because there are multiple ... class TestUtil (line 165) | public static class TestUtil method TestUtil (line 168) | static TestUtil() // Compliant class Repro_184 (line 178) | static class Repro_184 method Repro_184 (line 182) | static Repro_184() // Noncompliant FP class StaticConstructorWithTuple (line 193) | public class StaticConstructorWithTuple method StaticConstructorWithTuple (line 199) | static StaticConstructorWithTuple() // Compliant: the static const... class StaticConstructorWithTupleAndLocalVariables (line 206) | public class StaticConstructorWithTupleAndLocalVariables method StaticConstructorWithTupleAndLocalVariables (line 212) | static StaticConstructorWithTupleAndLocalVariables() // Noncomplia... class StaticConstructorWithTupleAndDiscard (line 221) | public class StaticConstructorWithTupleAndDiscard method StaticConstructorWithTupleAndDiscard (line 227) | static StaticConstructorWithTupleAndDiscard() // Noncompliant: the... class StaticConstructorWithNestedTuple (line 235) | public class StaticConstructorWithNestedTuple method StaticConstructorWithNestedTuple (line 242) | static StaticConstructorWithNestedTuple() class Helper (line 249) | internal class Helper method GetBaz (line 251) | internal static string GetBaz() => "Baz"; method GetFooBar (line 252) | internal static (string, string) GetFooBar() => ("Foo", "Bar"); method GetFooBarBaz (line 253) | internal static ((string, string), string) GetFooBarBaz() => (("Foo", ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InsecureContentSecurityPolicy.Latest.cs method CustomDictionary (line 11) | public void CustomDictionary(MyHeaderDictionary myheaderDictionary) class MyHeaderDictionary (line 35) | public class MyHeaderDictionary : IHeaderDictionary method Add (line 48) | public void Add(string key, StringValues value) { } method Append (line 49) | public void Append(string key, StringValues value) { } method ContainsKey (line 50) | public bool ContainsKey(string key) => throw new NotImplementedExcepti... method Remove (line 51) | public bool Remove(string key) => throw new NotImplementedException(); method TryGetValue (line 52) | public bool TryGetValue(string key, [MaybeNullWhen(false)] out StringV... method Clear (line 53) | public void Clear() => throw new NotImplementedException(); method Contains (line 54) | public bool Contains(KeyValuePair item) => throw... method CopyTo (line 55) | public void CopyTo(KeyValuePair[] array, int arr... method Remove (line 56) | public bool Remove(KeyValuePair item) => throw n... method GetEnumerator (line 57) | public IEnumerator> GetEnumerator()... method GetEnumerator (line 58) | IEnumerator IEnumerable.GetEnumerator() => throw new NotImplementedExc... method Add (line 59) | public void Add(KeyValuePair item) => throw new ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InsecureContentSecurityPolicy.cs class InsecureContentSecurityPolicy (line 11) | public class InsecureContentSecurityPolicy method InvokeAsync (line 13) | public async Task InvokeAsync(HttpContext context, IHeaderDictionary d... class A (line 82) | public class A class B (line 85) | public class B class C (line 88) | public class C method Add (line 91) | public void Add(string key, string value) { } method Append (line 92) | public void Append(string key, string value) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InsecureEncryptionAlgorithm.Latest.cs class MyTripleDESCryptoServiceProvider (line 23) | public class MyTripleDESCryptoServiceProvider : TripleDES method CreateDecryptor (line 25) | public override ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[]... method CreateEncryptor (line 28) | public override ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[]... method GenerateIV (line 31) | public override void GenerateIV() => method GenerateKey (line 34) | public override void GenerateKey() => class InsecureEncryptionAlgorithm (line 38) | public class InsecureEncryptionAlgorithm method InsecureEncryptionAlgorithm (line 41) | public InsecureEncryptionAlgorithm() type S (line 61) | public struct S method Assignment (line 63) | public void Assignment() class PartialProperty (line 70) | public partial class PartialProperty class PartialProperty (line 75) | public partial class PartialProperty FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InsecureEncryptionAlgorithm.cs class MyTripleDESCryptoServiceProvider (line 9) | public class MyTripleDESCryptoServiceProvider : TripleDES method CreateDecryptor (line 11) | public override ICryptoTransform CreateDecryptor(byte[] rgbKey, byte[]... method CreateEncryptor (line 16) | public override ICryptoTransform CreateEncryptor(byte[] rgbKey, byte[]... method GenerateIV (line 21) | public override void GenerateIV() method GenerateKey (line 26) | public override void GenerateKey() class InsecureEncryptionAlgorithm (line 32) | public class InsecureEncryptionAlgorithm method InsecureEncryptionAlgorithm (line 34) | public InsecureEncryptionAlgorithm() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InsecureTemporaryFilesCreation.Latest.cs type Record (line 11) | public record Record class Class (line 26) | public class Class method GetTempFileNameGenerator (line 28) | public Func GetTempFileNameGenerator() => Path.GetTempFileName; method Test (line 31) | public void Test() method Consume (line 38) | private static void Consume(Func generator) => generator(); class Path (line 43) | public static class Path method GetTempFileName (line 45) | public static string GetTempFileName() => string.Empty; class Sample (line 49) | public class Sample method NullConditionalAssignment (line 53) | public void NullConditionalAssignment(Sample arg) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InsecureTemporaryFilesCreation.cs class Sample (line 4) | public class Sample method Method (line 14) | public void Method() => Path.GetTempFileName(); method Safe (line 16) | public void Safe() => Path.Combine(Path.GetTempPath(), Path.GetRandomF... class Class (line 19) | public class Class method GetTempFileNameGenerator (line 21) | public Func GetTempFileNameGenerator() => Path.GetTempFileName; method Test (line 24) | public void Test() method Consume (line 31) | private static void Consume(Func generator) => generator(); class Path (line 36) | public static class Path method GetTempFileName (line 38) | public static string GetTempFileName() => string.Empty; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InsteadOfAny.EntityFramework.Core.cs class EntityFrameworkReproGH7286 (line 7) | public class EntityFrameworkReproGH7286 class MyEntity (line 9) | public class MyEntity class FirstContext (line 14) | public class FirstContext: DbContext class SecondContext (line 19) | public class SecondContext: DbContext method GetEntities (line 25) | public void GetEntities(FirstContext dbContext, List ids) method GetEntitiesAsync (line 38) | public async Task GetEntitiesAsync(SecondContext secondContext, List ids) method GetEntitiesAsync (line 36) | public async Task GetEntitiesAsync(SecondContext secondContext, List list, int[] array) method List (line 61) | void List(List list) method HashSet (line 68) | void HashSet(HashSet hashSet) method SortedSet (line 75) | void SortedSet(SortedSet sortedSet) method Array (line 82) | void Array(int[] array) method ConditionalsMatrix (line 89) | void ConditionalsMatrix(GoodList goodList) method CheckDelegate (line 109) | void CheckDelegate( method CustomEqualsCheckOneParam (line 200) | void CustomEqualsCheckOneParam(List intList, int someInt) method CustomEqualsCheckTwoParam (line 207) | void CustomEqualsCheckTwoParam(List intList, int someInt) method CustomEqualsCheckThreeParam (line 214) | void CustomEqualsCheckThreeParam(List intList, int someInt) method ContainsEvenExpression (line 221) | bool ContainsEvenExpression(List data) => method Any (line 224) | bool Any(Func predicate) => true; method AcceptMethod (line 226) | void AcceptMethod(Func, bool> methodThatLooksLikeAny)... class GoodList (line 228) | class GoodList : List method GetList (line 230) | public GoodList GetList() => this; method CallAny (line 231) | void CallAny() => this.Any(x => true); class EnumList (line 234) | class EnumList : IEnumerable method GetEnumerator (line 236) | public IEnumerator GetEnumerator() => null; method GetEnumerator (line 237) | IEnumerator IEnumerable.GetEnumerator() => null; class ClassA (line 240) | class ClassA class ClassB (line 260) | public class ClassB method Any (line 264) | public bool Any(Func predicate) => false; class ExpressionTree (line 267) | public class ExpressionTree method Repro_7508 (line 270) | public void Repro_7508() class Customer (line 275) | class Customer class Order (line 279) | class Order method NestedQuery (line 284) | private void NestedQuery(IQueryable customers) // typically ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InterfaceMethodsShouldBeCallableByChildTypes.CSharp9.cs type IFoo (line 4) | public interface IFoo method Method (line 6) | void Method(); type Foo (line 12) | public record Foo : IFoo type Bar (line 32) | public record Bar(string Name) : IFoo type IBaseInterface (line 42) | public interface IBaseInterface method Method1 (line 44) | void Method1(string parameter); type IDerivedInterface (line 47) | public interface IDerivedInterface : IBaseInterface method Method2 (line 49) | void Method2(int parameter); method Method1 (line 51) | void IBaseInterface.Method1(string parameter) => this.Method2(Convert.... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InterfaceMethodsShouldBeCallableByChildTypes.cs type IFoo (line 5) | public interface IFoo method Method (line 7) | void Method(); class Foo (line 13) | public class Foo : IFoo method Method (line 15) | void IFoo.Method() // Noncompliant {{Make 'Foo' sealed, change to a no... method Method (line 20) | void Method() { } class Foo2 (line 35) | public sealed class Foo2 : IFoo method Method (line 37) | void IFoo.Method() // Compliant - Foo2 is sealed class Foo3 (line 46) | public class Foo3 : IFoo method Method (line 48) | public void Method() // Compliant - IFoo is not explicitly implemented class Foo4 (line 56) | public class Foo4 : IFoo method Method (line 58) | void IFoo.Method() // Compliant - public method with same name, params... method Method (line 62) | public void Method() { } class Foo5 (line 75) | public class Foo5 : IFoo method Method (line 77) | void IFoo.Method() // Compliant - public method with same name, params... method Method (line 81) | public int Method() => 42; class Foo6 (line 95) | public class Foo6 : IFoo method Method (line 97) | void IFoo.Method() // Compliant - public method with same name, return... method Method (line 101) | public void Method(int i) { } class Foo7 (line 114) | public class Foo7 : IFoo method Method (line 116) | void IFoo.Method() // Noncompliant method Method (line 120) | private void Method() { } class Foo8 (line 133) | public class Foo8 : IFoo method Method (line 135) | void IFoo.Method() // Compliant method Method (line 139) | protected void Method() { } class MyClass3 (line 152) | public class MyClass3 : IDisposable method Dispose (line 154) | void IDisposable.Dispose() // Compliant - Close is an allowed special ... method Close (line 158) | public void Close() { } class MyClass4 (line 161) | public class MyClass4 : IDisposable method Dispose (line 163) | void IDisposable.Dispose() // Noncompliant method Bar (line 167) | protected void Bar() { } class MyClass5 (line 170) | public class MyClass5 : MyDisposable method NotDispose (line 172) | void MyDisposable.NotDispose() // Noncompliant method Bar (line 176) | protected void Bar() { } type MyDisposable (line 179) | public interface MyDisposable method NotDispose (line 181) | void NotDispose(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InterfacesShouldNotBeEmpty.cs type ISomeMethodsInterface (line 7) | public interface ISomeMethodsInterface method Method (line 9) | void Method(); type MyInterface (line 12) | public interface MyInterface { } type MyInterface2 (line 15) | public interface MyInterface2 : ISomeMethodsInterface { } type MyInterface3 (line 17) | public interface MyInterface3 method Foo (line 19) | void Foo(); type MyInterface4 (line 22) | public interface MyInterface4 type MyInterfaceInternal (line 27) | internal interface MyInterfaceInternal { } type MyInterfaceDefault (line 29) | interface MyInterfaceDefault { } class Container (line 31) | public class Container type IPublic (line 33) | public interface IPublic { } type IPrivate (line 34) | private interface IPrivate { } type IInternal (line 35) | internal interface IInternal { } type MyInterface5 (line 39) | interface MyInterface5 : ISomeMethodsInterface, MyInterface3 // Compliant type ISortedCollection (line 43) | public interface ISortedCollection : ICollection { } type ISortedList (line 44) | public interface ISortedList : IList { } type IGeneric (line 50) | public interface IGeneric { } type IBoundGeneric (line 51) | public interface IBoundGeneric : IGeneric { } type IUnboundGeneric (line 52) | public interface IUnboundGeneric : IGeneric { } type IUnboundConstraintGeneric1 (line 53) | public interface IUnboundConstraintGeneric1 : IGeneric where T : s... type IUnboundConstraintGeneric2 (line 54) | public interface IUnboundConstraintGeneric2 : IGeneric where T : c... type IUnboundConstraintGeneric3 (line 55) | public interface IUnboundConstraintGeneric3 : IGeneric where T : n... type IUnboundConstraintGeneric4 (line 56) | public interface IUnboundConstraintGeneric4 : IGeneric where T : I... type IGeneric2_Constraint1 (line 57) | public interface IGeneric2_Constraint1 : IGeneric where T1 :... type IGeneric2_Constraint2 (line 58) | public interface IGeneric2_Constraint2 : IGeneric where T2 :... type IGeneric3 (line 59) | public interface IGeneric3 where T : new() { } type Attributed1 (line 61) | [Obsolete("Interface with attribute")] type Attributed2 (line 65) | [Obsolete("Interface with attribute")] type Attributed3 (line 68) | [Obsolete("Interface with attribute")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InvalidCastToInterface.Latest.cs type ISomething (line 31) | public interface ISomething { } class StandaloneClass (line 32) | public class StandaloneClass { } class ImplementingClass (line 33) | public class ImplementingClass : ISomething { } class Sample (line 35) | public class Sample method TargetTypedNew (line 40) | public void TargetTypedNew() method StaticLambda (line 55) | public void StaticLambda() method TupleAssignment (line 93) | public void TupleAssignment() method NullConditionalAssignment (line 100) | public void NullConditionalAssignment(Sample arg) type StandaloneRecord (line 113) | public record StandaloneRecord { } type ImplementingRecord (line 114) | public record ImplementingRecord : ISomething { } type Record (line 116) | public record Record class Partial (line 143) | public partial class Partial : ISomething method Method (line 145) | public partial void Method(); method Method (line 150) | public partial void Method() class Partial (line 148) | public partial class Partial method Method (line 145) | public partial void Method(); method Method (line 150) | public partial void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InvalidCastToInterface.cs type IMyInterface (line 7) | public interface IMyInterface class Implementer (line 10) | public class Implementer : IMyInterface { } type IMyInterface2 (line 12) | public interface IMyInterface2 type IMyInterface4 (line 15) | public interface IMyInterface4 : IMyInterface type IMyInterface3 (line 18) | public interface IMyInterface3 : IMyInterface class MyClass1 (line 21) | public class MyClass1 class MyClass2 (line 23) | public class MyClass2 class MyClass3 (line 26) | public class MyClass3 : MyClass2, IMyInterface class MyClass4 (line 29) | public class MyClass4 class InvalidCastToInterface (line 32) | public class InvalidCastToInterface class Nested (line 34) | public class Nested : MyClass4, IDisposable method Dispose (line 36) | public void Dispose() { } method Main (line 39) | static void Main() class DerivedNode (line 70) | public class DerivedNode : MiddleNode, IDisposable method Dispose (line 72) | public void Dispose() { } class MiddleNode (line 74) | public class MiddleNode : Node class Node (line 78) | public class Node class MyClass (line 81) | public class MyClass type IFoo (line 86) | interface IFoo { } type IBar (line 87) | interface IBar { } class Foo (line 89) | class Foo : IFoo { } class Bar (line 90) | class Bar : IBar { public Bar(string foo) { } } method Bar (line 90) | public Bar(string foo) { } class FooBar (line 91) | class FooBar : IFoo, IBar { } class FinalBar (line 92) | sealed class FinalBar : IBar { } class Other (line 94) | class Other method Method (line 96) | public void Method(T generic) where T : new() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InvocationResolvesToOverrideWithParams.Latest.cs type IMyInterface (line 4) | interface IMyInterface method Test (line 6) | static virtual void Test(int foo, params object[] p) => Console.WriteL... method Test (line 8) | static virtual void Test(double foo, object p1) => Console.WriteLine("... method InterfaceStaticAbstractMethod (line 10) | static virtual void InterfaceStaticAbstractMethod() where T : IMyIn... class SomeClass (line 16) | public class SomeClass method ClassMethod (line 18) | void ClassMethod() where T : IMyInterface method PrivateProtectedOverload (line 23) | private protected int PrivateProtectedOverload(object a, string b) => 42; method PrivateProtectedOverload (line 24) | public int PrivateProtectedOverload(string a, params string[] bs) => 42; method Method (line 26) | public void Method() class OtherClass (line 36) | public class OtherClass method CheckAccessibilityInMethod (line 38) | public void CheckAccessibilityInMethod(SomeClass arg) class ParamsCollections (line 48) | class ParamsCollections method Format (line 50) | private void Format(string a, params List b) => Console.WriteL... method Format (line 52) | private void Format(object a, object b, object c) => Console.WriteLine... method Method (line 54) | public void Method() class StaticLocalFunctions (line 64) | public class StaticLocalFunctions method Test (line 66) | public static void Test(int foo, params object[] p) method Test (line 71) | public static void Test(double foo, object p1) method Method (line 76) | public void Method() class Repro_8522 (line 86) | class Repro_8522 method Get (line 88) | T Get(params string[] key) => default; method Get (line 89) | string Get(string key) => default; method GetBothHaveGenerics (line 91) | T GetBothHaveGenerics(params int[] ints) => default; method GetBothHaveGenerics (line 92) | T GetBothHaveGenerics(int anInt) => default; method GenericsWhereOneHasObjectParam (line 94) | T GenericsWhereOneHasObjectParam(params int[] ints) => default; method GenericsWhereOneHasObjectParam (line 95) | T GenericsWhereOneHasObjectParam(object anInt) => default; method Test (line 97) | void Test() class Extensions (line 105) | public static class Extensions method Method (line 107) | public static void Method(Exception ex) method extension (line 115) | extension(Exception ex) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InvocationResolvesToOverrideWithParams.TopLevelStatements.cs class SomeClass (line 38) | public class SomeClass method SomeClass (line 40) | private SomeClass(object a, string b) { } method SomeClass (line 41) | private SomeClass(string a, string b) { } method SomeClass (line 42) | public SomeClass(string a, params string[] bs) { } method PrivateOverload (line 44) | private int PrivateOverload(object a, string b) => 42; method PrivateOverload (line 45) | public int PrivateOverload(string a, params string[] bs) => 42; method ProtectedOverload (line 47) | protected int ProtectedOverload(object a, string b) => 42; method ProtectedOverload (line 48) | public int ProtectedOverload(string a, params string[] bs) => 42; method PrivateProtectedOverload (line 50) | private protected int PrivateProtectedOverload(object a, string b) => 42; method PrivateProtectedOverload (line 51) | public int PrivateProtectedOverload(string a, params string[] bs) => 42; method ProtectedInternalOverload (line 53) | protected internal int ProtectedInternalOverload(object a, string b) =... method ProtectedInternalOverload (line 54) | public int ProtectedInternalOverload(string a, params string[] bs) => 42; method InternalOverload (line 56) | internal int InternalOverload(object a, string b) => 42; method InternalOverload (line 57) | public int InternalOverload(string a, params string[] bs) => 42; method OverriddenAsProtected (line 59) | protected virtual int OverriddenAsProtected(object a, string b) => 42; method OverriddenAsProtected (line 60) | public int OverriddenAsProtected(string a, params string[] bs) => 42; method ShadowedAsPublic (line 62) | protected int ShadowedAsPublic(object a, string b) => 42; method ShadowedAsPublic (line 63) | public int ShadowedAsPublic(string a, params string[] bs) => 42; method ShadowedAsProtectedInternal (line 65) | protected int ShadowedAsProtectedInternal(object a, string b) => 42; method ShadowedAsProtectedInternal (line 66) | public int ShadowedAsProtectedInternal(string a, params string[] bs) =... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/InvocationResolvesToOverrideWithParams.cs class InvocationResolvesToOverrideWithParams (line 5) | class InvocationResolvesToOverrideWithParams method Test (line 7) | public static void Test(int foo, params object[] p) method Test (line 12) | public static void Test(double foo, object p1) method Main (line 17) | static void Main(string[] args) method InvocationResolvesToOverrideWithParams (line 23) | public InvocationResolvesToOverrideWithParams(string a, params object[... method InvocationResolvesToOverrideWithParams (line 27) | public InvocationResolvesToOverrideWithParams(object a, object b, obje... method Format (line 32) | private void Format(string a, params object[] b) { } method Format (line 34) | private void Format(object a, object b, object c, object d = null) { } method Format2 (line 36) | private void Format2(string a, params object[] b) { } method Format2 (line 38) | private void Format2(int a, object b, object c) { } method Format3 (line 40) | private void Format3(params int[] a) { } method Format3 (line 42) | private void Format3(IEnumerable a) { } method Format4 (line 44) | private void Format4(params object[] a) { } method Format4 (line 46) | private void Format4(object o, IEnumerable a) { } method m (line 48) | private void m() class MyClass (line 70) | public class MyClass method Format (line 72) | public void Format(string a, params object[] b) { } method Format (line 73) | public void Format() { } method Test (line 75) | public void Test() class Test (line 81) | public class Test method MyMethod (line 83) | public void MyMethod(params string[] s) { } method MyMethod (line 84) | public void MyMethod(Test s) { } method Test (line 86) | public Test() class Test2 (line 92) | public class Test2 method MyMethod (line 96) | public void MyMethod(params string[] s) { } method MyMethod (line 97) | public void MyMethod(Test2 s) { } method Test2 (line 99) | public Test2() class FuncAndActionCases (line 106) | public class FuncAndActionCases method Main (line 108) | static void Main(string[] args) method M1 (line 113) | public static void M1(params Action[] a) { } method M1 (line 114) | public static void M1(Func f) { } method M1 (line 115) | public static void M1(Func f) { } class SomeClass (line 121) | public class SomeClass method SomeClass (line 135) | public SomeClass() { } method SomeClass (line 136) | private SomeClass(object a, string b) { } method SomeClass (line 137) | private SomeClass(string a, string b) { } method SomeClass (line 138) | public SomeClass(string a, params string[] bs) { } method PrivateOverload (line 140) | private int PrivateOverload(object a, string b) => 42; method PrivateOverload (line 141) | public int PrivateOverload(string a, params string[] bs) => 42; method ProtectedOverload (line 143) | protected int ProtectedOverload(object a, string b) => 42; method ProtectedOverload (line 144) | public int ProtectedOverload(string a, params string[] bs) => 42; method ProtectedInternalOverload (line 146) | protected internal int ProtectedInternalOverload(object a, string b) =... method ProtectedInternalOverload (line 147) | public int ProtectedInternalOverload(string a, params string[] bs) => 42; method InternalOverload (line 149) | internal int InternalOverload(object a, string b) => 42; method InternalOverload (line 150) | public int InternalOverload(string a, params string[] bs) => 42; method OverriddenAsProtected (line 152) | protected virtual int OverriddenAsProtected(object a, string b) => 42; method OverriddenAsProtected (line 153) | public int OverriddenAsProtected(string a, params string[] bs) => 42; method ShadowedAsPublic (line 155) | protected int ShadowedAsPublic(object a, string b) => 42; method ShadowedAsPublic (line 156) | public int ShadowedAsPublic(string a, params string[] bs) => 42; method ShadowedAsProtectedInternal (line 158) | protected int ShadowedAsProtectedInternal(object a, string b) => 42; method ShadowedAsProtectedInternal (line 159) | public int ShadowedAsProtectedInternal(string a, params string[] bs) =... method AllOverloadsVisibleFromSameClass (line 161) | public void AllOverloadsVisibleFromSameClass() class NestedClass (line 195) | public class NestedClass method AllOverloadsVisibleFromWithinNestedClass (line 197) | public void AllOverloadsVisibleFromWithinNestedClass() type Nested2ndLevel (line 207) | public struct Nested2ndLevel method AllOverloadsVisibleFromWithinNested2ndLevel (line 209) | public void AllOverloadsVisibleFromWithinNested2ndLevel() class OtherClass (line 222) | public class OtherClass method CheckAccessibilityInMethod (line 264) | public void CheckAccessibilityInMethod() class SubClass (line 299) | public class SubClass : SomeClass method SubClass (line 301) | public SubClass(): base() { } method SubClass (line 302) | public SubClass(string a, params string[] bs) : base(a, bs) { } method OverriddenAsProtected (line 304) | protected override int OverriddenAsProtected(object a, string b) => 42; method ShadowedAsPublic (line 306) | public new int ShadowedAsPublic(object a, string b) => 42; method ShadowedAsProtectedInternal (line 308) | protected internal new int ShadowedAsProtectedInternal(object a, strin... method OverridenAndShadowedAccessibility (line 310) | public void OverridenAndShadowedAccessibility() class NestedClass (line 332) | public class NestedClass method AllOverloadsVisibleFromWithinNestedClass (line 334) | public void AllOverloadsVisibleFromWithinNestedClass() class SubClassOfClassFromAnotherAssembly (line 346) | public class SubClassOfClassFromAnotherAssembly : FromAnotherAssembly method AccessibilityAcrossAssemblies (line 348) | public void AccessibilityAcrossAssemblies() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/IssueSuppression.CSharp10.cs class TestCases (line 8) | internal class TestCases method Bar (line 10) | public void Bar(IEnumerable collection) method Call (line 25) | private void Call(Action action) => action(1); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/IssueSuppression.cs class IssueSuppression (line 8) | [System.Diagnostics.CodeAnalysis.SuppressMessage("", "")] // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/IssueSuppression2.cs class IssueSuppression (line 8) | [System.Diagnostics.CodeAnalysis.SuppressMessage("", "")] // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/JSInvokableMethodsShouldBePublic.Latest.cs class Visibilities (line 5) | class Visibilities method PrivateProtectedMethod (line 7) | [JSInvokable] private protected void PrivateProtectedMethod() { } method PrivateProtectedStaticMethod1 (line 9) | [JSInvokable] private protected static void PrivateProtectedStaticMeth... method PrivateProtectedStaticMethod2 (line 11) | [JSInvokable] private static protected void PrivateProtectedStaticMeth... class LocalFunctions (line 15) | class LocalFunctions method Test (line 17) | void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/JSInvokableMethodsShouldBePublic.cs class SomeAttribute (line 6) | [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] class ValidCases (line 9) | class ValidCases method PrivateMethod1 (line 11) | private void PrivateMethod1() { } method PrivateMethod2 (line 12) | [SomeAttribute] private void PrivateMethod2() { } class WithExplicitVisibilityModifiers (line 15) | class WithExplicitVisibilityModifiers method PrivateMethod (line 17) | [JSInvokable] private void PrivateMethod() { } method InternalMethod (line 19) | [JSInvokable] internal void InternalMethod() { } method ProtectedMethod (line 21) | [JSInvokable] protected void ProtectedMethod() { } method ProtectedInternalMethod (line 23) | [JSInvokable] protected internal void ProtectedInternalMethod() { } method PublicMethod (line 25) | [JSInvokable] public void PublicMethod() { } method PrivateStaticMethod (line 27) | [JSInvokable] private static void PrivateStaticMethod() { } method InternalStaticMethod (line 29) | [JSInvokable] internal static void InternalStaticMethod() { } method ProtectedStaticMethod (line 31) | [JSInvokable] protected static void ProtectedStaticMethod() { } method ProtectedInternalStaticMethod (line 33) | [JSInvokable] protected internal static void ProtectedInternalStaticMe... method PublicStaticMethod (line 35) | [JSInvokable] public static void PublicStaticMethod() { } class WithImplicitVisibility (line 38) | partial class WithImplicitVisibility method PrivateMethod (line 40) | [JSInvokable] void PrivateMethod() { } method PartialMethod2 (line 41) | [JSInvokable] partial void PartialMethod2(); class WithOtherModifiers (line 44) | unsafe class WithOtherModifiers method PrivateAsyncMethod (line 46) | [JSInvokable] private async Task PrivateAsyncMethod() { } method PrivateUnsafeMethod (line 47) | [JSInvokable] private unsafe void PrivateUnsafeMethod() { } class WithMethodNamedAfterKeyword (line 50) | class WithMethodNamedAfterKeyword method @for (line 52) | [JSInvokable] private void @for() { } class WithMethodSignatureOnMultipleLines (line 56) | class WithMethodSignatureOnMultipleLines method PrivateMethod1 (line 58) | [JSInvokable method PrivateMethod2 (line 66) | [ class WithMultipleAttributes (line 78) | class WithMultipleAttributes method PrivateMethod1 (line 80) | [JSInvokable, SomeAttribute] private void PrivateMethod1() { } method PrivateMethod2 (line 81) | [SomeAttribute, JSInvokable] private void PrivateMethod2() { } method PrivateMethod3 (line 82) | [JSInvokable, JSInvokable] private void PrivateMethod3() { } method PrivateMethod4 (line 83) | [SomeAttribute, SomeAttribute] private void PrivateMethod4() { } class SomeAttribute (line 85) | [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] class WithMultipleAttributeLists (line 89) | class WithMultipleAttributeLists method PrivateMethod1 (line 91) | [JSInvokable][SomeAttribute] private void PrivateMethod1() { } method PrivateMethod2 (line 92) | [SomeAttribute][JSInvokable] private void PrivateMethod2() { } method PrivateMethod3 (line 93) | [JSInvokable][JSInvokable] private void PrivateMethod3() { } method PrivateMethod4 (line 94) | [SomeAttribute][SomeAttribute] private void PrivateMethod4() { } class SomeAttribute (line 96) | [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] class Test (line 105) | class Test method WithoutAttributeSuffix (line 107) | [JSInvokable] private void WithoutAttributeSuffix() { } method WithAttributeSuffix (line 108) | [JSInvokableAttribute] private void WithAttributeSuffix() { } method WithFullyQualifiedName (line 109) | [Microsoft.JSInterop.JSInvokable] private void WithFullyQualifiedName(... method WithNamespaceAlias (line 110) | [AliasForJSInterop.JSInvokable] private void WithNamespaceAlias() { } method WithAttributeAlias (line 111) | [AliasForJSInvokable] private void WithAttributeAlias() { } class WithUserDefinedJSInvokable (line 115) | class WithUserDefinedJSInvokable method PrivateMethod1 (line 117) | [@JSInvokable] private void PrivateMethod1() { } method PrivateMethod2 (line 118) | [JSInvokableWithSuffix] private void PrivateMethod2() { } class JSInvokable (line 120) | [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] class JSInvokableWithSuffix (line 123) | [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/JSInvokableMethodsShouldBePublic.razor.cs class JSInvokableMethodsShouldBePublic (line 3) | public partial class JSInvokableMethodsShouldBePublic method JSInvokablePrivateMethodInPartialRazorComponent (line 5) | [JSInvokable] private void JSInvokablePrivateMethodInPartialRazorCompo... method JSInvokableImplicitelyPrivateMethodInPartialRazorComponent (line 6) | [JSInvokable] void JSInvokableImplicitelyPrivateMethodInPartialRazorCo... method JSInvokablePublicMethodInPartialRazorComponent (line 7) | [JSInvokable] public void JSInvokablePublicMethodInPartialRazorCompone... method SomeMethod (line 9) | void SomeMethod() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/JwtSigned.Extensions.cs class Program (line 9) | class Program method ExtensionCalledOnInstance (line 16) | void ExtensionCalledOnInstance(JwtDecoder decoder) method ExtensionCalledThroughStaticClass (line 37) | void ExtensionCalledThroughStaticClass(JwtDecoder decoder) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/JwtSigned.cs class Program (line 9) | class Program method DecodingWithDecoder (line 20) | void DecodingWithDecoder(JwtDecoder decoder) method DecodingWithCustomDecoder (line 58) | void DecodingWithCustomDecoder(CustomDecoder decoder) method DecodingWithBuilder (line 85) | void DecodingWithBuilder() method DecodingWithBuilder_FPs (line 151) | void DecodingWithBuilder_FPs(bool condition) method DecodingWithBuilder_FNs (line 163) | void DecodingWithBuilder_FNs(bool condition) method CreateBuilder (line 178) | JwtBuilder CreateBuilder() class UserInfo (line 184) | class UserInfo class CustomDecoder (line 189) | class CustomDecoder : IJwtDecoder method Decode (line 191) | public string Decode(JwtParts jwt) method Decode (line 196) | public string Decode(string token) method Decode (line 201) | public string Decode(string token, string key, bool verify) method Decode (line 206) | public string Decode(string token, string[] keys, bool verify) method Decode (line 211) | public string Decode(string token, byte[] key, bool verify) method Decode (line 216) | public string Decode(string token, byte[][] keys, bool verify) method DecodeToObject (line 221) | public IDictionary DecodeToObject(string token) method DecodeToObject (line 226) | public IDictionary DecodeToObject(string token, string... method DecodeToObject (line 231) | public IDictionary DecodeToObject(string token, string... method DecodeToObject (line 236) | public IDictionary DecodeToObject(string token, byte[]... method DecodeToObject (line 241) | public IDictionary DecodeToObject(string token, byte[]... method DecodeToObject (line 246) | public T DecodeToObject(string token) method DecodeToObject (line 251) | public T DecodeToObject(string token, string key, bool verify) method DecodeToObject (line 256) | public T DecodeToObject(string token, string[] keys, bool verify) method DecodeToObject (line 261) | public T DecodeToObject(string token, byte[] key, bool verify) method DecodeToObject (line 266) | public T DecodeToObject(string token, byte[][] keys, bool verify) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LdapConnectionShouldBeSecure.Latest.cs type FieldsAndProperties (line 24) | record FieldsAndProperties type RecordStruct (line 84) | public record struct RecordStruct class PartialProperty (line 99) | public partial class PartialProperty class PartialProperty (line 106) | public partial class PartialProperty type IWithDefaultMethod (line 122) | public interface IWithDefaultMethod method Method (line 124) | void Method() class AssignmentsAndDeclarators (line 137) | public class AssignmentsAndDeclarators method WithDefaultLiteralExpression (line 139) | public void WithDefaultLiteralExpression() method WithDefaultExpression (line 145) | public void WithDefaultExpression() method AssignmentWithDefaultLiteralExpression (line 151) | public void AssignmentWithDefaultLiteralExpression() method AssignmentWithDefaultExpression (line 158) | public void AssignmentWithDefaultExpression() class Sample (line 166) | public class Sample FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LdapConnectionShouldBeSecure.cs class Program (line 6) | class Program method Program (line 16) | public Program() method CtorSetsAllowedValue (line 34) | void CtorSetsAllowedValue() method CtorSetsNotAllowedValue (line 40) | void CtorSetsNotAllowedValue() method InitializerSetsAllowedValue (line 45) | void InitializerSetsAllowedValue(AuthenticationTypes arg) method InitializerSetsNotAllowedValue (line 51) | void InitializerSetsNotAllowedValue() method PropertySetsNotAllowedValue (line 58) | void PropertySetsNotAllowedValue() method PropertySetsAllowedValue (line 71) | void PropertySetsAllowedValue(bool foo) class FieldsAndProperties (line 110) | class FieldsAndProperties method Cases (line 134) | void Cases() type Struct (line 161) | public struct Struct method Method (line 163) | public void Method() class AllTypes (line 176) | public class AllTypes method AllTypeInitialization (line 178) | public void AllTypeInitialization() class AssignmentsAndDeclarators (line 194) | public class AssignmentsAndDeclarators method WithTernaryOperatorSecure (line 196) | public void WithTernaryOperatorSecure(bool condition) method WithTernaryOperatorUnsecure (line 202) | public void WithTernaryOperatorUnsecure(bool condition) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LineLength.cs class LineLength (line 6) | public class LineLength method LineLength (line 8) | public LineLength() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LinkedListPropertiesInsteadOfMethods.Fixed.cs class MyClass (line 6) | class MyClass method Basic (line 8) | void Basic(LinkedList data) method CustomClass (line 24) | void CustomClass(LinkedList data) method ConditionalsCombinations (line 41) | void ConditionalsCombinations(GoodLinkedList goodLinkedList) method GetFirst (line 62) | int GetFirst(LinkedList data) => data.First.Value; class GoodLinkedList (line 64) | class GoodLinkedList : LinkedList method GetLinkedList (line 66) | public GoodLinkedList GetLinkedList() => this; method CallFirst (line 67) | T CallFirst() => this.First.Value; class EnumData (line 70) | class EnumData : IEnumerable method GetEnumerator (line 72) | public IEnumerator GetEnumerator() => null; method GetEnumerator (line 73) | IEnumerator IEnumerable.GetEnumerator() => null; class ClassContainingLinkedList (line 76) | class ClassContainingLinkedList class NotALinkedList (line 90) | public class NotALinkedList method First (line 92) | public int First() => 0; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LinkedListPropertiesInsteadOfMethods.cs class MyClass (line 6) | class MyClass method Basic (line 8) | void Basic(LinkedList data) method CustomClass (line 26) | void CustomClass(LinkedList data) method ConditionalsCombinations (line 43) | void ConditionalsCombinations(GoodLinkedList goodLinkedList) method GetFirst (line 65) | int GetFirst(LinkedList data) => data.First(); class GoodLinkedList (line 67) | class GoodLinkedList : LinkedList method GetLinkedList (line 69) | public GoodLinkedList GetLinkedList() => this; method CallFirst (line 70) | T CallFirst() => this.First(); class EnumData (line 73) | class EnumData : IEnumerable method GetEnumerator (line 75) | public IEnumerator GetEnumerator() => null; method GetEnumerator (line 76) | IEnumerator IEnumerable.GetEnumerator() => null; class ClassContainingLinkedList (line 79) | class ClassContainingLinkedList class NotALinkedList (line 93) | public class NotALinkedList method First (line 95) | public int First() => 0; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LiteralSuffixUpperCase.Fixed.cs class LiteralSuffixUpperCase (line 9) | class LiteralSuffixUpperCase method Test (line 11) | public void Test(long ui) method TestOk (line 29) | public void TestOk() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LiteralSuffixUpperCase.Latest.cs type S (line 1) | public struct S method M (line 5) | public void M() method Utf8StringLiterals (line 13) | void Utf8StringLiterals() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LiteralSuffixUpperCase.cs class LiteralSuffixUpperCase (line 9) | class LiteralSuffixUpperCase method Test (line 11) | public void Test(long ui) method TestOk (line 30) | public void TestOk() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LiteralsShouldNotBePassedAsLocalizedParameters.CSharp10.cs type S (line 3) | public struct S method M (line 8) | public void M() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LiteralsShouldNotBePassedAsLocalizedParameters.CSharp11.cs class FooBar (line 3) | class FooBar method Method (line 8) | public void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LiteralsShouldNotBePassedAsLocalizedParameters.CSharp9.cs type Record (line 10) | record Record FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LiteralsShouldNotBePassedAsLocalizedParameters.cs class Program (line 7) | class Program method Foo (line 27) | public void Foo() method Bar (line 69) | public void Bar([Localizable(true)]string param1, string message, stri... method Baz (line 73) | public void Baz([Localizable(false)]string param1, [Localizable(false)... method InvalidAttribute1 (line 77) | public void InvalidAttribute1([Localizable] string param1) // Error [C... method InvalidAttribute2 (line 81) | public void InvalidAttribute2([Localizable(42)] string param1) // Erro... class InvalidProgram (line 86) | class InvalidProgram method Foo (line 88) | public void Foo() method Bar (line 97) | public void Bar(string text, string message) class DebugCode (line 102) | class DebugCode method LogStuff (line 106) | public void LogStuff() method DebugOnlyMethod (line 115) | [Conditional("DEBUG")] method NonDebugOnlyMethod (line 122) | [Conditional("NONDEBUG")] method Caller (line 129) | public void Caller() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LockedFieldShouldBeReadonly.Latest.cs class Test (line 4) | class Test method Test (line 11) | Test() method ReadonlyReferences (line 20) | void ReadonlyReferences() method OnANewInstanceOnStack (line 33) | void OnANewInstanceOnStack() method CoalescingAssignment (line 39) | void CoalescingAssignment(object oPar) method SwitchExpression (line 44) | void SwitchExpression(object oPar) method StringLiterals (line 49) | void StringLiterals() method TargetTypedObjectCreation (line 57) | void TargetTypedObjectCreation() class Records (line 64) | class Records method OnAFieldOfTypeRecord (line 72) | void OnAFieldOfTypeRecord() method OnANewRecordInstance (line 84) | void OnANewRecordInstance() type ARecord (line 90) | record ARecord(); class LockObjectType (line 93) | class LockObjectType method LockOnReadonlyLock (line 98) | public void LockOnReadonlyLock() method LockOnWritableLock (line 104) | public void LockOnWritableLock() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LockedFieldShouldBeReadonly.cs class Test (line 5) | class Test method OnAStaticField (line 20) | void OnAStaticField() method OnAFieldOfSameInstance (line 33) | void OnAFieldOfSameInstance() method OnParenthesizedExpressions (line 42) | void OnParenthesizedExpressions() method OnAFieldOfDifferentInstance (line 49) | void OnAFieldOfDifferentInstance() method OnALocalVariable (line 58) | void OnALocalVariable() method OnALocalOutVar (line 68) | void OnALocalOutVar(Dictionary lockObjs) method OnANewInstance (line 76) | void OnANewInstance() method OnAStringInstance (line 96) | void OnAStringInstance() method OnAssignment (line 106) | void OnAssignment() method OtherCases (line 113) | void OtherCases(object oPar, bool bPar, object[] arrayPar) method ReadWriteReferences (line 141) | void ReadWriteReferences() method NoIdentifier (line 150) | void NoIdentifier() class TestExplicitCast (line 159) | class TestExplicitCast method Test (line 163) | void Test() class AnotherClass (line 169) | class AnotherClass class FieldAccessibily (line 180) | class FieldAccessibily method FieldAccessibilityDoesntMatter (line 194) | void FieldAccessibilityDoesntMatter() method RuleDoesntRaiseOnProperties (line 203) | void RuleDoesntRaiseOnProperties() class AClass (line 215) | class AClass { } class Repro_7058 (line 219) | class Repro_7058 method LockInsideCapture (line 221) | void LockInsideCapture() method LockOutsideCapture (line 230) | void LockOutsideCapture() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LoggerFieldsShouldBePrivateStaticReadonly.cs class Compliant (line 3) | public class Compliant class Noncompliant (line 12) | public class Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LoggersShouldBeNamedForEnclosingType.NLog.cs class EnclosingType (line 4) | class EnclosingType method Method (line 6) | void Method(LogFactory factory) class AnotherType (line 29) | class AnotherType : EnclosingType { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LoggersShouldBeNamedForEnclosingType.cs class AnotherType (line 6) | class AnotherType : EnclosingType { } class EnclosingType (line 8) | class EnclosingType method Strings (line 10) | void Strings(ILoggerFactory factory, string loggerName) method Types (line 30) | void Types(ILoggerFactory factory) method Aliasing (line 51) | void Aliasing(AliasedFactory factory) method GetLoggerName (line 58) | static string GetLoggerName() => "Whatever"; method GetLoggerType (line 59) | static Type GetLoggerType() => null; class Inner (line 61) | class Inner method InnerMethod (line 63) | void InnerMethod(ILoggerFactory factory) class Generic (line 89) | class Generic method Method (line 94) | void Method() method Chain (line 123) | Generic Chain() => null; method Factory (line 124) | ImplFactory Factory() => null; class ImplFactory (line 127) | class ImplFactory : ILoggerFactory method AddProvider (line 129) | public void AddProvider(ILoggerProvider provider) { } method Dispose (line 130) | public void Dispose() { } method CreateLogger (line 132) | public ILogger CreateLogger(string categoryName) => null; class FakeMethods (line 135) | class FakeMethods method GetLogger (line 137) | public ILogger GetLogger(string name) => null; method GetLogger (line 138) | public ILogger GetLogger(Type type) => null; method CreateLogger (line 140) | public ILogger CreateLogger(string name) => null; method CreateLogger (line 141) | public ILogger CreateLogger(Type type) => null; method CreateLogger (line 142) | public ILogger CreateLogger() => null; method CreateLogger (line 143) | public ILogger CreateLogger() => null; method nameof (line 145) | string nameof(object a) => null; method nameof (line 146) | string nameof(object a, object b) => null; method Method (line 148) | public void Method(ILoggerFactory factory) class LoggerHelper (line 164) | class LoggerHelper method CreateLogger (line 168) | ILogger CreateLogger() => factory.CreateLogger(); class Service (line 171) | public class Service method Service (line 173) | public Service(ILogger logger) { } method Service (line 174) | public Service(ILogger logger, string otherParameter) { } method Service (line 175) | public Service(ILogger logger) { } method Service (line 176) | public Service(ILogger logger, string otherParameter) { } method Service (line 177) | public Service(Service service) { } method Service (line 178) | public Service(AnotherService service) { } class AnotherService (line 181) | public class AnotherService method AnotherService (line 183) | public AnotherService(Service service) { } method AnotherService (line 184) | public AnotherService(ILogger logger) { } class Factory (line 188) | public class Factory method CreateType (line 192) | public void CreateType(ILoggerFactory loggerFactory, string otherParam... method CreateType_LocalVariable (line 215) | public Service CreateType_LocalVariable(ILoggerFactory loggerFactory) method CreateType_LocalVariableField (line 221) | public Service CreateType_LocalVariableField() method CreateType_Decorator (line 226) | public Service CreateType_Decorator(ILoggerFactory loggerFactory) class Decorator (line 232) | class Decorator : ILogger method Decorator (line 234) | public Decorator(ILogger logger) { } method Log (line 235) | public void Log(LogLevel logLevel, EventId eventId, TState s... method IsEnabled (line 236) | public bool IsEnabled(LogLevel logLevel) => true; method BeginScope (line 237) | public IDisposable BeginScope(TState state) => null; method Decorator (line 242) | public Decorator(ILogger logger) { } method Log (line 243) | public void Log(LogLevel logLevel, EventId eventId, TState s... method IsEnabled (line 244) | public bool IsEnabled(LogLevel logLevel) => true; method BeginScope (line 245) | public IDisposable BeginScope(TState state) => null; class Decorator (line 240) | private class Decorator : ILogger method Decorator (line 234) | public Decorator(ILogger logger) { } method Log (line 235) | public void Log(LogLevel logLevel, EventId eventId, TState s... method IsEnabled (line 236) | public bool IsEnabled(LogLevel logLevel) => true; method BeginScope (line 237) | public IDisposable BeginScope(TState state) => null; method Decorator (line 242) | public Decorator(ILogger logger) { } method Log (line 243) | public void Log(LogLevel logLevel, EventId eventId, TState s... method IsEnabled (line 244) | public bool IsEnabled(LogLevel logLevel) => true; method BeginScope (line 245) | public IDisposable BeginScope(TState state) => null; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LoggingArgumentsShouldBePassedCorrectly.cs class Program (line 4) | public class Program method Log (line 6) | private void Log(ILogger logger, Exception e) method Log (line 26) | private void Log(CustomLogger logger, Exception e) class CustomLogger (line 34) | private class CustomLogger : ILogger method Log (line 36) | public void Log(LogLevel logLevel, EventId eventId, TState s... method IsEnabled (line 37) | public bool IsEnabled(LogLevel logLevel) => false; method BeginScope (line 38) | public IDisposable BeginScope(TState state) => null; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LoggingTemplatePlaceHoldersShouldBeInOrder.cs class Program (line 6) | public class Program method Basics (line 15) | public void Basics(ILogger logger, int first, int second, int third) method NamedArguments (line 87) | public void NamedArguments(ILogger logger, int first, int second) method PropertyAccess (line 93) | public void PropertyAccess(ILogger logger, Person person, List... method Overloads (line 137) | public void Overloads(ILogger logger, int first, int second) method Casing (line 147) | public void Casing(ILogger logger, int first, int second) method IncorrectPlaceholderFormat (line 157) | public void IncorrectPlaceholderFormat(ILogger logger, int first, int ... method ClassImplementsILogger (line 167) | public void ClassImplementsILogger(CustomLogger logger, int first, int... method ClassDoesNotImplementILogger (line 174) | public void ClassDoesNotImplementILogger(NotILogger notILogger, int fi... class Person (line 181) | public class Person class CustomLogger (line 190) | public class CustomLogger : ILogger method BeginScope (line 192) | public IDisposable BeginScope(TState state) => null; method IsEnabled (line 193) | public bool IsEnabled(LogLevel logLevel) => false; method Log (line 194) | public void Log(LogLevel logLevel, EventId eventId, TState sta... class NotILogger (line 199) | public class NotILogger method LogInformation (line 201) | public void LogInformation(string message, params object[] args) { } class NotILoggerExtensions (line 204) | public static class NotILoggerExtensions method LogCritical (line 206) | public static void LogCritical(this NotILogger logger, string message,... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LoopsAndLinq.Latest.cs class S3267 (line 9) | public class S3267 method ForEach_PropertySet_Compliant (line 11) | public void ForEach_PropertySet_Compliant(ICollection collection) method ForEach_UsingDynamic_Compliant (line 20) | public void ForEach_UsingDynamic_Compliant(ICollection collection) class Point (line 29) | public class Point method IsPatterns (line 35) | void IsPatterns(List strings, List> tuples) class IsPatternTests (line 93) | class IsPatternTests method ListPattern (line 95) | void ListPattern(List list) class Repro_7730 (line 126) | class Repro_7730 method SpansAndLogicalPatterns (line 128) | void SpansAndLogicalPatterns(Span s, ReadOnlySpan ros) method SpansAndLogicalOperators (line 145) | void SpansAndLogicalOperators(Span s, ReadOnlySpan ros) method IterableNotEnumerableAndLogicalPatterns (line 162) | void IterableNotEnumerableAndLogicalPatterns(IterableNotEnumerable s) method EnumerableNotCollectionAndLogicalPatterns (line 172) | void EnumerableNotCollectionAndLogicalPatterns() class IterableNotEnumerable (line 188) | class IterableNotEnumerable method GetEnumerator (line 190) | public IEnumerator GetEnumerator() class Repro_7776 (line 199) | class Repro_7776 class ForEach_WithCustomList (line 201) | class ForEach_WithCustomList method Test (line 203) | void Test(CustomList s) class CustomList (line 215) | class CustomList : List class Repro_8430 (line 222) | class Repro_8430 method Visit (line 224) | void Visit(ReadOnlySpan x) { } method Visit (line 225) | void Visit(MyRefStruct x) { } method Test (line 227) | void Test(IEnumerable> tokens) class Data (line 236) | public class Data type MyRefStruct (line 241) | public ref struct MyRefStruct method TestRefStruct (line 246) | void TestRefStruct(IEnumerable datas) class Repro_NET3454 (line 257) | class Repro_NET3454 method IsMatchArgument (line 260) | bool IsMatchArgument(IReadOnlyList segments, ReadOnlySpan chars, ReadOnlySpan span) method IsMatchBinary (line 280) | bool IsMatchBinary(IReadOnlyList segments, ReadOnlySpan ... method FindFirst (line 290) | ReadOnlySpan FindFirst(IReadOnlyList segments, Predicate... method IsMatchTransient (line 305) | bool IsMatchTransient(IReadOnlyList segments, string value) type SegmentWrapper (line 316) | ref struct SegmentWrapper method IsMatchViaRefStructField (line 321) | bool IsMatchViaRefStructField(IReadOnlyList chars, SegmentWrappe... class NewMethods (line 334) | public class NewMethods method WhenEach (line 336) | async void WhenEach(List> tasks) method IndexTest (line 347) | void IndexTest(List strings) class ReturnNull (line 359) | class ReturnNull type IInterface (line 361) | interface IInterface { } method ReturnNullInterface (line 363) | private IInterface? ReturnNullInterface(IEnumerable enumerable, P... method ReturnDefault (line 376) | private int? ReturnDefault(IEnumerable enumerable, Predicate... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LoopsAndLinq.cs class PerformanceSensitiveAttribute (line 7) | [AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method |... class S3267 (line 15) | public class S3267 method WithOutArg (line 17) | public bool WithOutArg(string p1, out string p2) method WithRefArg (line 23) | public bool WithRefArg(string p1, ref string p2) => true; method ForEachWithBlockWithIfSuggestWhere (line 25) | public void ForEachWithBlockWithIfSuggestWhere(ICollection col... method ForEach_ConditionWithOutParameter_Compliant (line 73) | public void ForEach_ConditionWithOutParameter_Compliant(ICollection collection) method ForEach_PropertySet_Compliant (line 109) | public void ForEach_PropertySet_Compliant(ICollection collection) method ForEach_PropertyGet_Compliant (line 127) | public void ForEach_PropertyGet_Compliant(ICollection collection) method ForEach_IfWithElseBranch_Compliant (line 136) | public void ForEach_IfWithElseBranch_Compliant(ICollection col... method ForEachWithIfSuggestWhere (line 153) | public void ForEachWithIfSuggestWhere(ICollection collection, ... method ForEachWithPropertyGet_SuggestsSelect (line 166) | public void ForEachWithPropertyGet_SuggestsSelect(ICollection ... method ForEachWithEarlyExitIsNotCompliant (line 275) | public void ForEachWithEarlyExitIsNotCompliant(ICollection col... method ForEach_Compliant (line 290) | public void ForEach_Compliant(ICollection collection, ICollect... method ForEach_WithLambda (line 307) | public void ForEach_WithLambda(Func> lambda) method ForEach_WithMethod (line 313) | public void ForEach_WithMethod(Func> lambda) method ForEach_WithLocalFunction (line 319) | public void ForEach_WithLocalFunction(Func> lambda) method ForEach_IterableNonEnumerable (line 327) | public void ForEach_IterableNonEnumerable(DataTable rawSheetData) method Print (line 338) | public void Print(IEnumerable points) method IsPattern (line 346) | void IsPattern(List list) method MethodReturningList (line 357) | private List MethodReturningList() => new List(); method Foo (line 359) | private void Foo(int s) { } class Point (line 361) | public class Point method GetX (line 367) | public int GetX() => X; class Repro_7776 (line 371) | class Repro_7776 method ForEach_WithListAndLogicalOperators (line 374) | public void ForEach_WithListAndLogicalOperators(List s) class Repro_1222 (line 386) | class Repro_1222 method FirstOrNone (line 388) | public static T? FirstOrNone(IEnumerable enumerable, Predicate(IEnumerable enumerable, Predicate GetEnumerable() { return null; } method Filter (line 415) | private static bool Filter(T v) { return true; } method LocalFunction (line 417) | public static int? LocalFunction() class PerformanceSensitive (line 489) | class PerformanceSensitive method GetEnumerable (line 491) | private static IEnumerable GetEnumerable() { return null; } method Filter (line 492) | private static bool Filter(T v) { return true; } method PerformanceSensitive (line 494) | [PerformanceSensitive] method Method (line 537) | [PerformanceSensitive] method AllowGenericEnumerationTrue (line 550) | [PerformanceSensitive(AllowGenericEnumeration = true)] method AllowGenericEnumerationFalse (line 563) | [PerformanceSensitive(AllowGenericEnumeration = false)] method AnotherAttribute (line 576) | [Obsolete("Not PerformanceSensitive")] class NotNullable (line 590) | class NotNullable method FirstOrNone (line 592) | public static T FirstOrNone(IEnumerable enumerable, Predicate... method GetEnumerable (line 604) | private static IEnumerable GetEnumerable() { return null; } method Filter (line 605) | private static bool Filter(T v) { return true; } method LocalFunction (line 607) | public static int LocalFunction() class EmptyReturn (line 679) | class EmptyReturn method MyMethod (line 681) | public static void MyMethod(IEnumerable enumerable, Predicate... class Lambda (line 693) | class Lambda method LambdaMethod (line 695) | private Predicate LambdaMethod(IEnumerable enumerable, Pr... class ReproAD0001 (line 712) | class ReproAD0001 method Method (line 714) | void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LooseFilePermissions.Unix.cs class Program (line 5) | class Program method UpdatePermissionsOnUnixUsingMonoPosix (line 7) | public void UpdatePermissionsOnUnixUsingMonoPosix() class Base (line 58) | class Base method Base (line 60) | public Base(FileAccessPermissions permissions) { } method Base (line 62) | public Base() : this(FileAccessPermissions.DefaultPermissions) { } class Subclass (line 66) | class Subclass : Base method Subclass (line 68) | public Subclass() : base(FileAccessPermissions.DefaultPermissions) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LooseFilePermissions.Windows.CSharp12.cs class Program (line 3) | class Program(FileSecurity fileSecurity) method UpdatePermissionsUsingAccessControl (line 7) | void UpdatePermissionsUsingAccessControl() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LooseFilePermissions.Windows.cs class Program (line 7) | class Program method UpdatePermissionsUsingAccessControl (line 11) | public void UpdatePermissionsUsingAccessControl(FileSecurity fileSecur... method InVariable (line 50) | public void InVariable(FileSecurity fileSecurity) method InsideTryCatch (line 70) | public void InsideTryCatch(FileSecurity fileSecurity) method InsideLocalFunction (line 82) | private void InsideLocalFunction(FileSecurity fileSecurity) method InsideLambda (line 93) | private void InsideLambda(FileSecurity fileSecurity) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LossOfFractionInDivision.Latest.cs class Sample (line 32) | public class Sample method M (line 36) | public void M() method M (line 87) | public decimal M(int x) => x; method M (line 88) | public decimal M((int, int) x) => x.Item1; method FNs (line 90) | public void FNs() method FNAsync (line 99) | public async Task FNAsync() class NativeIntChecks (line 106) | public class NativeIntChecks method AssignmentChecks (line 123) | void AssignmentChecks() method MethodArgumentChecks (line 144) | void MethodArgumentChecks() method FuncReturnChecks (line 155) | void FuncReturnChecks() method MethodReturnChecks (line 164) | decimal MethodReturnChecks() type IMyInterface (line 174) | interface IMyInterface method StaticVirtualMethod (line 176) | static virtual void StaticVirtualMethod() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/LossOfFractionInDivision.cs class LossOfFractionInDivision (line 9) | class LossOfFractionInDivision method Main (line 11) | static void Main() method Method (line 26) | static void Method(float f) { } method Calc (line 28) | static double Calc() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MagicNumberShouldNotBeUsed.cs class FooAttribute (line 7) | [AttributeUsage(AttributeTargets.Method, Inherited = false)] method FooAttribute (line 11) | public FooAttribute(int Bar = 0, int Bar2 = 0) class FooBar (line 16) | public class FooBar method GetFooBar (line 23) | public FooBar GetFooBar() => null; method Count (line 24) | public int Count() => 0; method Length (line 25) | public FooBar Length() => null; class Baz (line 28) | public class Baz method Size (line 30) | public int Size() => 1; class ValidUseCases (line 33) | public class ValidUseCases method ValidUseCases (line 57) | public ValidUseCases(int x, int y) { } method ValidUseCases (line 59) | public ValidUseCases(string s, FooBar foo, Baz baz) method GetHashCode (line 98) | public override int GetHashCode() method Foo1 (line 103) | [Foo(Bar: 42)] // Compliant, explicit attribute argument names method Foo2 (line 106) | [Foo(Baz = 43)] // Compliant, explicit attribute argument names method Foo3 (line 109) | [Foo(Bar: 42, Baz = 43)] // Compliant, explicit attribute argument names method Foo (line 112) | public void Foo(int value = 42) // compliant, default value for argument method Foo (line 117) | public static void Foo(IntPtr x) { } method Bar (line 119) | [Foo(42)] // Compliant, attribute with only one argument method WithTimeSpan (line 122) | public static void WithTimeSpan(TimeSpan one, TimeSpan two) { } type MyEnum (line 125) | public enum MyEnum class WrongUseCases (line 132) | public class WrongUseCases method WrongUseCases (line 140) | public WrongUseCases(int x, int y) { } method WrongUseCases (line 142) | public WrongUseCases(List list, string s, FooBar foo) method GetValue (line 187) | [Foo(42, 43)] // Noncompliant method GetCount (line 194) | public int GetCount() => 1; method Foo (line 197) | public static void Foo(params int[] array) { } method Foo (line 198) | public static int Foo(int x, int y) => 1; method GetSomeFrom (line 199) | public static void GetSomeFrom(int value) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MarkAssemblyWithAssemblyVersionAttributeRazor.cs class Sample (line 8) | public class Sample { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MarkWindowsFormsMainWithStaThread.cs class Program_00 (line 7) | class Program_00 method Main (line 9) | [SomeNonsense] // Error [CS0246,CS0246] - unknown type class Program_01 (line 17) | class Program_01 method Main (line 20) | public static void Main() // Noncompliant {{Add the 'STAThread' attrib... class Program_02 (line 26) | class Program_02 method Main (line 29) | public static int Main(string[] args) // Noncompliant {{Add the 'STATh... class Program_03 (line 36) | class Program_03 method Main (line 38) | [MTAThread] class Program_04 (line 45) | class Program_04 method Main (line 47) | [MTAThread] class Program_05 (line 55) | class Program_05 method Main (line 57) | [System.MTAThreadAttribute] class Program_06 (line 65) | class Program_06 method Main (line 67) | [STAThread] class Program_07 (line 74) | class Program_07 method Main (line 76) | [STAThread] class Program_08 (line 84) | class Program_08 method Main (line 86) | [System.STAThread] class Program_09 (line 94) | class Program_09 method Main (line 96) | [STAThread("this is wrong", 1)] // Error [CS1729] - ctor doesn't exist class Program_10 (line 104) | class Program_10 method Main (line 106) | public static async Task Main() // Compliant, async Main is always MTA class Program_11 (line 112) | class Program_11 method Main (line 114) | [STAThread] class Program_12 (line 121) | class Program_12 method Main (line 123) | [MTAThread] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MarkWindowsFormsMainWithStaThread_NoWindowsForms.cs class Program_00 (line 7) | class Program_00 method Main (line 9) | [SomeNonsense] // Error [CS0246,CS0246] - unknown type class Program_01 (line 17) | class Program_01 method Main (line 20) | public static void Main() class Program_02 (line 26) | class Program_02 method Main (line 29) | public static int Main(string[] args) class Program_03 (line 35) | class Program_03 method Main (line 37) | [MTAThread] class Program_04 (line 44) | class Program_04 method Main (line 46) | [MTAThread] class Program_05 (line 54) | class Program_05 method Main (line 56) | [System.MTAThreadAttribute] class Program_06 (line 64) | class Program_06 method Main (line 66) | [STAThread] class Program_07 (line 73) | class Program_07 method Main (line 75) | [STAThread] class Program_08 (line 83) | class Program_08 method Main (line 85) | [System.STAThread] class Program_09 (line 93) | class Program_09 method Main (line 95) | [STAThread("this is wrong", 1)] // Error [CS1729] - ctor doesn't exist class Program_10 (line 103) | class Program_10 method Main (line 105) | public static async Task Main() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberInitializedToDefault.CSharp10.cs type BarStruct (line 5) | public struct BarStruct method BarStruct (line 9) | public BarStruct(bool someDummy) // Ctor with a parameter that does no... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberInitializedToDefault.CSharp11.Fixed.cs type IntPointers (line 4) | record IntPointers type FooStruct (line 35) | public readonly struct FooStruct method FooStruct (line 37) | public FooStruct() { } type BarStruct (line 46) | public struct BarStruct method BarStruct (line 50) | public BarStruct(int dummy) { } method BarStruct (line 52) | [SetsRequiredMembers] type FooBarStruct (line 56) | public struct FooBarStruct method FooBarStruct (line 61) | public FooBarStruct(int dummy) { } class TestRequiredProperties (line 64) | public class TestRequiredProperties method Method (line 66) | void Method() class ClassWithRequiredProperties (line 72) | public class ClassWithRequiredProperties method ClassWithRequiredProperties (line 77) | [SetsRequiredMembers] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberInitializedToDefault.CSharp11.cs type IntPointers (line 4) | record IntPointers type FooStruct (line 35) | public readonly struct FooStruct method FooStruct (line 37) | public FooStruct() { } type BarStruct (line 46) | public struct BarStruct method BarStruct (line 50) | public BarStruct(int dummy) { } method BarStruct (line 52) | [SetsRequiredMembers] type FooBarStruct (line 56) | public struct FooBarStruct method FooBarStruct (line 61) | public FooBarStruct(int dummy) { } class TestRequiredProperties (line 64) | public class TestRequiredProperties method Method (line 66) | void Method() class ClassWithRequiredProperties (line 72) | public class ClassWithRequiredProperties method ClassWithRequiredProperties (line 77) | [SetsRequiredMembers] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberInitializedToDefault.CSharp8.cs class C (line 8) | public class C FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberInitializedToDefault.CSharp9.cs type NativeInts (line 3) | record NativeInts FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberInitializedToDefault.Fixed.cs type Dummy (line 6) | struct Dummy class MemberInitializedToDefault (line 9) | class MemberInitializedToDefault FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberInitializedToDefault.cs type Dummy (line 6) | struct Dummy class MemberInitializedToDefault (line 9) | class MemberInitializedToDefault FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberInitializerRedundant.Fixed.cs class Person (line 6) | class Person method Person (line 13) | public Person(int age) class Person2 (line 38) | class Person2 method Person2 (line 41) | public Person2(int age) method Person2 (line 46) | public Person2(int age, int other) class Person2b (line 51) | class Person2b method Person2b (line 54) | public Person2b(int age) method Person2b (line 59) | public Person2b(int age, int other) class Person3 (line 65) | class Person3 method Person3 (line 69) | public Person3(int age) method Person3 (line 74) | public Person3(int age, int other) class Person4 (line 81) | class Person4 method Person4 (line 84) | public Person4() class Person4b (line 91) | class Person4b method Person4b (line 94) | public Person4b() class Person5 (line 101) | class Person5 method Person5 (line 104) | public Person5() class Person6 (line 110) | class Person6 method Person6 (line 114) | public Person6(bool c) class Person7 (line 129) | class Person7 method Person7 (line 133) | public Person7(bool c) class Person8 (line 144) | class Person8 method Person8 (line 147) | public Person8() class Person9 (line 155) | class Person9 method Person9 (line 158) | public Person9() class Person10 (line 172) | class Person10 method Person10 (line 175) | public Person10() method M (line 180) | void M(out int x) { x = 42; } class Person11 (line 183) | class Person11 method Person11 (line 187) | public Person11() => a = 42; class Person12 (line 190) | class Person12 method Person12 (line 193) | public Person12() class Person13 (line 199) | class Person13 method Person13 (line 205) | static Person13() class Person14 (line 214) | class Person14 method Person14 (line 217) | static Person14() class Person15 (line 224) | class Person15 method Person15 (line 227) | public Person15() class Person16 (line 236) | class Person16 method Person16 (line 244) | public Person16(Person16 other) class Person17 (line 252) | internal class Person17 method Person17 (line 256) | internal Person17(string foo) class CSharp8_PersonA (line 263) | class CSharp8_PersonA method CSharp8_PersonA (line 266) | public CSharp8_PersonA(bool b, int age) class CSharp8_PersonB (line 278) | class CSharp8_PersonB method CSharp8_PersonB (line 281) | public CSharp8_PersonB(int[] ids) class BaseClass (line 287) | class BaseClass method BaseClass (line 290) | public BaseClass(int i) class NewClass (line 295) | class NewClass : BaseClass method NewClass (line 298) | public NewClass() : base(1) type Struct1 (line 304) | struct Struct1 method Struct1 (line 311) | static Struct1() => b = 1; class EmptyClassForCoverage (line 313) | class EmptyClassForCoverage { } type EmptyStructForCoverage (line 314) | struct EmptyStructForCoverage { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberInitializerRedundant.Latest.Fixed.cs class Person (line 3) | class Person method Person (line 17) | public Person() { } method Initialize (line 19) | [ModuleInitializer] method SecondInitialize (line 25) | [Obsolete] method ThirdInitialize (line 36) | [ModuleInitializer] method Foo1 (line 42) | [Obsolete] method Foo2 (line 48) | [Obsolete("argument", false)] method Foo3 (line 54) | internal static void Foo3() type InstanceRecord (line 63) | record InstanceRecord type RecordWithParam (line 93) | public record RecordWithParam(string bar) type RecordWithParamAndConstructor (line 98) | public record RecordWithParamAndConstructor(string bar) type StaticRecord (line 108) | public record StaticRecord type EmptyRecordForCoverage (line 118) | record EmptyRecordForCoverage { } type Struct1 (line 120) | struct Struct1 method Initialize (line 125) | [ModuleInitializer] type SomeInterface (line 129) | interface SomeInterface method Initialize (line 135) | [ModuleInitializer] type InstanceStruct (line 144) | record struct InstanceStruct type RecordStructWithParam (line 174) | public record struct RecordStructWithParam(string bar) type RecordStructWithParamAndConstructor (line 179) | public record struct RecordStructWithParamAndConstructor(string bar) type RecordStruct (line 189) | public record struct RecordStruct type EmptyRecordStructForCoverage (line 199) | record struct EmptyRecordStructForCoverage { } type StaticStruct (line 201) | struct StaticStruct method Initialize (line 206) | [ModuleInitializer] class WithPrimaryConstructor (line 211) | class WithPrimaryConstructor(object options) class WithReferencedPrimaryConstructor (line 218) | class WithReferencedPrimaryConstructor(object options) method WithReferencedPrimaryConstructor (line 220) | public WithReferencedPrimaryConstructor() : this(null) class WithPrimaryConstructorAndAssignment (line 227) | class WithPrimaryConstructorAndAssignment(object options) method WithPrimaryConstructorAndAssignment (line 229) | public WithPrimaryConstructorAndAssignment() : this(null) class CollectionExpression1 (line 236) | class CollectionExpression1 method CollectionExpression1 (line 240) | CollectionExpression1() class FieldKeyword (line 246) | class FieldKeyword method FieldKeyword (line 250) | public FieldKeyword() class NullConditionalAssignmentTests (line 256) | class NullConditionalAssignmentTests method NullConditionalAssignmentTests (line 260) | public NullConditionalAssignmentTests() class PartialConstructor (line 270) | public partial class PartialConstructor method PartialConstructor (line 273) | public partial PartialConstructor(); method PartialConstructor (line 278) | public partial PartialConstructor() class PartialConstructor (line 276) | public partial class PartialConstructor method PartialConstructor (line 273) | public partial PartialConstructor(); method PartialConstructor (line 278) | public partial PartialConstructor() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberInitializerRedundant.Latest.cs class Person (line 3) | class Person method Person (line 17) | public Person() { } method Initialize (line 19) | [ModuleInitializer] method SecondInitialize (line 25) | [Obsolete] method ThirdInitialize (line 36) | [ModuleInitializer] method Foo1 (line 42) | [Obsolete] method Foo2 (line 48) | [Obsolete("argument", false)] method Foo3 (line 54) | internal static void Foo3() type InstanceRecord (line 63) | record InstanceRecord type RecordWithParam (line 93) | public record RecordWithParam(string bar) type RecordWithParamAndConstructor (line 98) | public record RecordWithParamAndConstructor(string bar) type StaticRecord (line 108) | public record StaticRecord type EmptyRecordForCoverage (line 118) | record EmptyRecordForCoverage { } type Struct1 (line 120) | struct Struct1 method Initialize (line 125) | [ModuleInitializer] type SomeInterface (line 129) | interface SomeInterface method Initialize (line 135) | [ModuleInitializer] type InstanceStruct (line 144) | record struct InstanceStruct type RecordStructWithParam (line 174) | public record struct RecordStructWithParam(string bar) type RecordStructWithParamAndConstructor (line 179) | public record struct RecordStructWithParamAndConstructor(string bar) type RecordStruct (line 189) | public record struct RecordStruct type EmptyRecordStructForCoverage (line 199) | record struct EmptyRecordStructForCoverage { } type StaticStruct (line 201) | struct StaticStruct method Initialize (line 206) | [ModuleInitializer] class WithPrimaryConstructor (line 211) | class WithPrimaryConstructor(object options) class WithReferencedPrimaryConstructor (line 218) | class WithReferencedPrimaryConstructor(object options) method WithReferencedPrimaryConstructor (line 220) | public WithReferencedPrimaryConstructor() : this(null) class WithPrimaryConstructorAndAssignment (line 227) | class WithPrimaryConstructorAndAssignment(object options) method WithPrimaryConstructorAndAssignment (line 229) | public WithPrimaryConstructorAndAssignment() : this(null) class CollectionExpression1 (line 236) | class CollectionExpression1 method CollectionExpression1 (line 241) | CollectionExpression1() class FieldKeyword (line 247) | class FieldKeyword method FieldKeyword (line 251) | public FieldKeyword() class NullConditionalAssignmentTests (line 257) | class NullConditionalAssignmentTests method NullConditionalAssignmentTests (line 261) | public NullConditionalAssignmentTests() class PartialConstructor (line 271) | public partial class PartialConstructor method PartialConstructor (line 274) | public partial PartialConstructor(); method PartialConstructor (line 279) | public partial PartialConstructor() class PartialConstructor (line 277) | public partial class PartialConstructor method PartialConstructor (line 274) | public partial PartialConstructor(); method PartialConstructor (line 279) | public partial PartialConstructor() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberInitializerRedundant.RoslynCfg.FlowCaptureBug.cs class FlowCaptureOperation (line 7) | internal class FlowCaptureOperation method FlowCaptureOperation (line 11) | internal FlowCaptureOperation(string foo) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberInitializerRedundant.cs class Person (line 6) | class Person method Person (line 15) | public Person(int age) class Person2 (line 40) | class Person2 method Person2 (line 43) | public Person2(int age) method Person2 (line 48) | public Person2(int age, int other) class Person2b (line 53) | class Person2b method Person2b (line 56) | public Person2b(int age) method Person2b (line 61) | public Person2b(int age, int other) class Person3 (line 67) | class Person3 method Person3 (line 71) | public Person3(int age) method Person3 (line 76) | public Person3(int age, int other) class Person4 (line 83) | class Person4 method Person4 (line 86) | public Person4() class Person4b (line 93) | class Person4b method Person4b (line 96) | public Person4b() class Person5 (line 103) | class Person5 method Person5 (line 106) | public Person5() class Person6 (line 112) | class Person6 method Person6 (line 116) | public Person6(bool c) class Person7 (line 131) | class Person7 method Person7 (line 135) | public Person7(bool c) class Person8 (line 146) | class Person8 method Person8 (line 149) | public Person8() class Person9 (line 157) | class Person9 method Person9 (line 160) | public Person9() class Person10 (line 174) | class Person10 method Person10 (line 177) | public Person10() method M (line 182) | void M(out int x) { x = 42; } class Person11 (line 185) | class Person11 method Person11 (line 189) | public Person11() => a = 42; class Person12 (line 192) | class Person12 method Person12 (line 195) | public Person12() class Person13 (line 201) | class Person13 method Person13 (line 207) | static Person13() class Person14 (line 216) | class Person14 method Person14 (line 219) | static Person14() class Person15 (line 226) | class Person15 method Person15 (line 229) | public Person15() class Person16 (line 238) | class Person16 method Person16 (line 246) | public Person16(Person16 other) class Person17 (line 254) | internal class Person17 method Person17 (line 258) | internal Person17(string foo) class CSharp8_PersonA (line 265) | class CSharp8_PersonA method CSharp8_PersonA (line 268) | public CSharp8_PersonA(bool b, int age) class CSharp8_PersonB (line 280) | class CSharp8_PersonB method CSharp8_PersonB (line 283) | public CSharp8_PersonB(int[] ids) class BaseClass (line 289) | class BaseClass method BaseClass (line 292) | public BaseClass(int i) class NewClass (line 297) | class NewClass : BaseClass method NewClass (line 300) | public NewClass() : base(1) type Struct1 (line 306) | struct Struct1 method Struct1 (line 313) | static Struct1() => b = 1; class EmptyClassForCoverage (line 315) | class EmptyClassForCoverage { } type EmptyStructForCoverage (line 316) | struct EmptyStructForCoverage { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberOverrideCallsBaseMember.Fixed.cs class Base (line 6) | class Base method Method (line 14) | public virtual void Method(int[] numbers) method Method2 (line 17) | public virtual int Method2(int[] numbers) method Method3 (line 21) | public virtual int Method3(int[] numbers) method Method4 (line 25) | public virtual int Method4(int[] numbers) method Method (line 29) | public virtual void Method(string s1, string s2) method Method2 (line 32) | public virtual void Method2(string s1, string s2) method Method (line 35) | public virtual void Method(int i, int[] numbers) method Method3 (line 38) | public virtual void Method3(string s1, string s2) method Method4 (line 41) | public virtual void Method4(string s1, params string[] s2) method Method5 (line 44) | public virtual void Method5(string s1, string s2) method Method6 (line 48) | public virtual int Method6(string s1, string s2) method Method8 (line 53) | public virtual void Method8(string s1, string s2 = null) method PrintMembers (line 57) | protected virtual bool PrintMembers(System.Text.StringBuilder builder)... method Equals (line 62) | public override bool Equals(object obj) method GetHashCode (line 67) | public override int GetHashCode() class Derived (line 73) | class Derived : Base method Method4 (line 78) | public override int Method4(int[] numbers2) => base.Method4(numbers2); method Method (line 79) | public override void Method(string s1, string s2) method Method2 (line 83) | public override void Method2(string s1, string s2) method Method (line 87) | public override sealed void Method(int i, int[] numbers) method Method3 (line 91) | public override void Method3(string s1, string s2) method Method4 (line 95) | public override void Method4(string s1, params string[] s2) method Method5 (line 99) | public override void Method5(string s1, string s2) method Method6 (line 103) | public override int Method6(string s1, string s2) method Method7 (line 107) | public override void Method7(string s1, string s2) // Error [CS0115] n... method Method8 (line 111) | public override void Method8(string s1, string s2) class A (line 117) | public class A method Foo1 (line 119) | public virtual void Foo1(int a) method Foo2 (line 123) | public virtual void Foo2(int a = 42) method Foo3 (line 127) | public virtual void Foo3(int a) method Foo4 (line 130) | public virtual void Foo4(int a = 42) class B (line 135) | public class B : A method Foo1 (line 137) | public override void Foo1(int a = 1) method Foo2 (line 142) | public override void Foo2(int a = 1) method Foo3 (line 151) | public override void Foo3(int a) method Foo4 (line 156) | public virtual void Foo4(int a) class MyBase (line 162) | public class MyBase class MyDerived (line 168) | public class MyDerived : MyBase class MyCustomAttribute (line 181) | public class MyCustomAttribute : Attribute class AnotherCustomAttribute (line 186) | public class AnotherCustomAttribute : Attribute class MyAttributesTestCase (line 191) | class MyAttributesTestCase method MethodWithSameInheritedAttributeOnAllLevels (line 206) | [MyCustomAttribute] method MethodWithInheritedAttributeOnFirstLevel (line 211) | [MyCustomAttribute] method MethodWithInheritedAttributeOnSecondLevel (line 216) | public virtual int MethodWithInheritedAttributeOnSecondLevel() method MethodWithInheritedAttributeOnThirdLevel (line 220) | public virtual int MethodWithInheritedAttributeOnThirdLevel() method MethodWithSameInheritedAttributeOnFirstAndSecondLevels (line 224) | [MyCustomAttribute] method MethodWithSameInheritedAttributeOnFirstAndThirdLevels (line 229) | [MyCustomAttribute] method MethodWithDifferentInheritedAttributeOnFirstAndSecondLevels (line 234) | [MyCustomAttribute] class MySubAttributesTestCase (line 241) | class MySubAttributesTestCase : MyAttributesTestCase method MethodWithSameInheritedAttributeOnAllLevels (line 254) | [MyCustomAttribute] method MethodWithInheritedAttributeOnFirstLevel (line 256) | public override int MethodWithInheritedAttributeOnFirstLevel() => base... method MethodWithInheritedAttributeOnSecondLevel (line 257) | [MyCustomAttribute] method MethodWithSameInheritedAttributeOnFirstAndSecondLevels (line 259) | [MyCustomAttribute] method MethodWithSameInheritedAttributeOnFirstAndThirdLevels (line 261) | public override int MethodWithSameInheritedAttributeOnFirstAndThirdLev... method MethodWithDifferentInheritedAttributeOnFirstAndSecondLevels (line 262) | [AnotherCustomAttribute] class MySubSubAttributesTestCase (line 266) | class MySubSubAttributesTestCase : MySubAttributesTestCase method MethodWithSameInheritedAttributeOnAllLevels (line 278) | [MyCustomAttribute] method MethodWithInheritedAttributeOnFirstLevel (line 280) | public override int MethodWithInheritedAttributeOnFirstLevel() => base... method MethodWithInheritedAttributeOnSecondLevel (line 281) | public override int MethodWithInheritedAttributeOnSecondLevel() => bas... method MethodWithInheritedAttributeOnThirdLevel (line 282) | [MyCustomAttribute] method MethodWithSameInheritedAttributeOnFirstAndSecondLevels (line 284) | public override int MethodWithSameInheritedAttributeOnFirstAndSecondLe... method MethodWithSameInheritedAttributeOnFirstAndThirdLevels (line 285) | [MyCustomAttribute] type StructTest (line 289) | struct StructTest method Equals (line 291) | public override bool Equals(object obj) => // Compliant method GetHashCode (line 294) | public override int GetHashCode() => // Compliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberOverrideCallsBaseMember.Latest.Fixed.cs type Base (line 1) | record Base type Derived (line 19) | record Derived : Base type Base (line 41) | record Base type Derived (line 46) | record Derived : Base type Underived (line 61) | record Underived type RecordStruct (line 67) | record struct RecordStruct class Partial (line 76) | public partial class Partial class Partial (line 82) | public partial class Partial class Derived (line 94) | public class Derived : Partial FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberOverrideCallsBaseMember.Latest.cs type Base (line 1) | record Base type Derived (line 19) | record Derived : Base type Base (line 46) | record Base type Derived (line 51) | record Derived : Base type Underived (line 66) | record Underived type RecordStruct (line 72) | record struct RecordStruct class Partial (line 81) | public partial class Partial class Partial (line 87) | public partial class Partial class Derived (line 99) | public class Derived : Partial FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberOverrideCallsBaseMember.cs class Base (line 6) | class Base method Method (line 14) | public virtual void Method(int[] numbers) method Method2 (line 17) | public virtual int Method2(int[] numbers) method Method3 (line 21) | public virtual int Method3(int[] numbers) method Method4 (line 25) | public virtual int Method4(int[] numbers) method Method (line 29) | public virtual void Method(string s1, string s2) method Method2 (line 32) | public virtual void Method2(string s1, string s2) method Method (line 35) | public virtual void Method(int i, int[] numbers) method Method3 (line 38) | public virtual void Method3(string s1, string s2) method Method4 (line 41) | public virtual void Method4(string s1, params string[] s2) method Method5 (line 44) | public virtual void Method5(string s1, string s2) method Method6 (line 48) | public virtual int Method6(string s1, string s2) method Method8 (line 53) | public virtual void Method8(string s1, string s2 = null) method PrintMembers (line 57) | protected virtual bool PrintMembers(System.Text.StringBuilder builder)... method Equals (line 62) | public override bool Equals(object obj) method GetHashCode (line 67) | public override int GetHashCode() class Derived (line 73) | class Derived : Base method Method (line 87) | public override void Method(int[] numbers) // Noncompliant {{Remove th... method Method2 (line 91) | public override int Method2(int[] numbers) // Noncompliant method Method3 (line 95) | public override int Method3(int[] numbers) => base.Method3(numbers); method Method4 (line 96) | public override int Method4(int[] numbers2) => base.Method4(numbers2); method Method (line 97) | public override void Method(string s1, string s2) method Method2 (line 101) | public override void Method2(string s1, string s2) method Method (line 105) | public override sealed void Method(int i, int[] numbers) method Method3 (line 109) | public override void Method3(string s1, string s2) method Method4 (line 113) | public override void Method4(string s1, params string[] s2) method Method5 (line 117) | public override void Method5(string s1, string s2) method Method6 (line 121) | public override int Method6(string s1, string s2) method Method7 (line 125) | public override void Method7(string s1, string s2) // Error [CS0115] n... method Method8 (line 129) | public override void Method8(string s1, string s2) method PrintMembers (line 133) | protected override bool PrintMembers(System.Text.StringBuilder builder... class A (line 136) | public class A method Foo1 (line 138) | public virtual void Foo1(int a) method Foo2 (line 142) | public virtual void Foo2(int a = 42) method Foo3 (line 146) | public virtual void Foo3(int a) method Foo4 (line 149) | public virtual void Foo4(int a = 42) class B (line 154) | public class B : A method Foo1 (line 156) | public override void Foo1(int a = 1) method Foo2 (line 161) | public override void Foo2(int a = 1) method Foo3 (line 170) | public override void Foo3(int a) method Foo4 (line 175) | public virtual void Foo4(int a) class MyBase (line 181) | public class MyBase class MyDerived (line 187) | public class MyDerived : MyBase class MyCustomAttribute (line 207) | public class MyCustomAttribute : Attribute class AnotherCustomAttribute (line 212) | public class AnotherCustomAttribute : Attribute class MyAttributesTestCase (line 217) | class MyAttributesTestCase method MethodWithSameInheritedAttributeOnAllLevels (line 232) | [MyCustomAttribute] method MethodWithInheritedAttributeOnFirstLevel (line 237) | [MyCustomAttribute] method MethodWithInheritedAttributeOnSecondLevel (line 242) | public virtual int MethodWithInheritedAttributeOnSecondLevel() method MethodWithInheritedAttributeOnThirdLevel (line 246) | public virtual int MethodWithInheritedAttributeOnThirdLevel() method MethodWithSameInheritedAttributeOnFirstAndSecondLevels (line 250) | [MyCustomAttribute] method MethodWithSameInheritedAttributeOnFirstAndThirdLevels (line 255) | [MyCustomAttribute] method MethodWithDifferentInheritedAttributeOnFirstAndSecondLevels (line 260) | [MyCustomAttribute] class MySubAttributesTestCase (line 267) | class MySubAttributesTestCase : MyAttributesTestCase method MethodWithSameInheritedAttributeOnAllLevels (line 281) | [MyCustomAttribute] method MethodWithInheritedAttributeOnFirstLevel (line 283) | public override int MethodWithInheritedAttributeOnFirstLevel() => base... method MethodWithInheritedAttributeOnSecondLevel (line 284) | [MyCustomAttribute] method MethodWithInheritedAttributeOnThirdLevel (line 286) | public override int MethodWithInheritedAttributeOnThirdLevel() => base... method MethodWithSameInheritedAttributeOnFirstAndSecondLevels (line 287) | [MyCustomAttribute] method MethodWithSameInheritedAttributeOnFirstAndThirdLevels (line 289) | public override int MethodWithSameInheritedAttributeOnFirstAndThirdLev... method MethodWithDifferentInheritedAttributeOnFirstAndSecondLevels (line 290) | [AnotherCustomAttribute] class MySubSubAttributesTestCase (line 294) | class MySubSubAttributesTestCase : MySubAttributesTestCase method MethodWithSameInheritedAttributeOnAllLevels (line 306) | [MyCustomAttribute] method MethodWithInheritedAttributeOnFirstLevel (line 308) | public override int MethodWithInheritedAttributeOnFirstLevel() => base... method MethodWithInheritedAttributeOnSecondLevel (line 309) | public override int MethodWithInheritedAttributeOnSecondLevel() => bas... method MethodWithInheritedAttributeOnThirdLevel (line 310) | [MyCustomAttribute] method MethodWithSameInheritedAttributeOnFirstAndSecondLevels (line 312) | public override int MethodWithSameInheritedAttributeOnFirstAndSecondLe... method MethodWithSameInheritedAttributeOnFirstAndThirdLevels (line 313) | [MyCustomAttribute] type StructTest (line 317) | struct StructTest method Equals (line 319) | public override bool Equals(object obj) => // Compliant method GetHashCode (line 322) | public override int GetHashCode() => // Compliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberShadowsOuterStaticMember.Latest.cs type OuterRecord (line 5) | record OuterRecord class OuterClass (line 36) | class OuterClass type InnerRecord (line 42) | record InnerRecord type InnerInterface (line 174) | public interface InnerInterface type OuterTypes (line 55) | public interface OuterTypes class SomeClass (line 57) | public class SomeClass { } type SomeInterface (line 58) | public interface SomeInterface { } type SomeStruct (line 59) | public struct SomeStruct { } type SomeEnum (line 60) | public enum SomeEnum { } type InnerTypes (line 64) | public interface InnerTypes type SomeClass (line 66) | public enum SomeClass { } type SomeInterface (line 67) | public struct SomeInterface { } class SomeStruct (line 68) | public class SomeStruct { } type SomeEnum (line 69) | public enum SomeEnum { } type OuterRecordStruct (line 78) | record struct OuterRecordStruct type OuterInterface (line 114) | public interface OuterInterface class InnerClass (line 129) | public abstract class InnerClass type InnerInterface (line 143) | public interface InnerInterface class OuterClass (line 161) | public class OuterClass type InnerRecord (line 42) | record InnerRecord type InnerInterface (line 174) | public interface InnerInterface class Outer (line 192) | class Outer class Inner (line 196) | partial class Inner class Inner (line 201) | partial class Inner class ExtensionShadowsSelf (line 208) | public static class ExtensionShadowsSelf method Method (line 211) | public static void Method(int i) { } method extension (line 213) | extension(string s) class Sample (line 220) | public class Sample method Method (line 223) | public static void Method(int i) { } class ExtensionShadowsExtendedType (line 226) | public static class ExtensionShadowsExtendedType method extension (line 228) | extension(Sample s) class ExtensionShadowsNestedExtendedType (line 235) | public static class ExtensionShadowsNestedExtendedType class InnerSample (line 237) | public class InnerSample method Method (line 240) | public static void Method(int i) { } method extension (line 243) | extension(InnerSample s) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberShadowsOuterStaticMember.cs class MemberShadowsOuterStaticMember (line 5) | class MemberShadowsOuterStaticMember method M (line 17) | public static void M(int i) { } class Inner (line 19) | class Inner class SomeName (line 21) | class SomeName // Noncompliant {{Rename this class to not shadow the... method M (line 41) | public void M(int j) { } method M1 (line 42) | public void M1() { } method MyMethod (line 43) | public void MyMethod() type OuterStruct (line 55) | struct OuterStruct type SomeEnum (line 60) | public enum SomeEnum { } class InnerClass (line 62) | class InnerClass class SomeName (line 64) | class SomeName // Noncompliant {{Rename this class to not shado... type InnerStruct1 (line 76) | struct InnerStruct1 // Don't rename. It is used as a collision target class SomeName (line 78) | class SomeName // Noncompliant type InnerStruct2 (line 88) | struct InnerStruct2 type SomeName (line 90) | struct SomeName // Noncompliant type InnerStruct3 (line 95) | struct InnerStruct3 type InnerStruct1 (line 97) | struct InnerStruct1 // Noncompliant type InnerStruct4 (line 102) | struct InnerStruct4 type InnerStruct1 (line 104) | enum InnerStruct1 { } type InnerStruct5 (line 107) | struct InnerStruct5 type SomeEnum (line 109) | struct SomeEnum { } class SomeEnumContainer (line 113) | public class SomeEnumContainer type SomeEnum (line 115) | public enum SomeEnum class ClassicExtensionShadowsNestedExtendedType (line 125) | public static class ClassicExtensionShadowsNestedExtendedType class InnerSample (line 127) | public class InnerSample method Method (line 130) | public static void Method(int i) { } method Method (line 134) | public static void Method(int j) { } class Sample (line 137) | public class Sample method Method (line 139) | public static void Method(int i) { } class ClassicExtensionShadowsExtendedType (line 142) | public static class ClassicExtensionShadowsExtendedType method Method (line 144) | public static void Method(this Sample sample, int j) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberShouldBeStatic.Latest.Partial.cs class Partial (line 3) | public partial class Partial FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberShouldBeStatic.Latest.cs class Foo (line 11) | [DynamicallyAccessedMembersAttribute(DynamicallyAccessedMemberTypes.All)] class Bar (line 17) | [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields ... method GetValue1 (line 23) | public int GetValue1() => 1; method GetValue2 (line 24) | [return: DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All... type IUtilities (line 31) | public interface IUtilities method Sum (line 43) | public int Sum(int a, int b) // Compliant, inside interface class Repro_3204 (line 50) | public class Repro_3204 method ProtectedInternal (line 52) | private protected int ProtectedInternal() => 42; type Methods (line 58) | public record Methods class Lambda (line 75) | public class Lambda method Method (line 80) | public void Method() method Execute (line 91) | private void Execute(Func f) { } class PrimaryClass (line 97) | public class PrimaryClass(SomeService s1, SomeService s2, SomeService s3) method Access_Parameter_OfPrimaryConstructor (line 102) | private void Access_Parameter_OfPrimaryConstructor(int a, int b) // Co... method NoAccessTo_Parameter_OfPrimaryConstructor (line 109) | private void NoAccessTo_Parameter_OfPrimaryConstructor(int a, int b) /... method MethodParameter_Hides_Parameter_OfPrimaryConstructor (line 114) | private void MethodParameter_Hides_Parameter_OfPrimaryConstructor(int ... type PrimaryRecord (line 120) | public record PrimaryRecord(SomeService s1, SomeService s2, SomeService s3) class SomeService (line 144) | public class SomeService method Sum (line 147) | public int Sum(int a, int b) => a + b + x; class Partial (line 153) | public partial class Partial class ReproNET2621 (line 161) | public static class ReproNET2621 // https://sonarsource.atlassian.net/br... method extension (line 163) | extension(int number) method IsOdd (line 166) | public bool IsOdd() => number % 2 != 0; class FieldKeyword (line 170) | public class FieldKeyword class NullConditionalAssignment (line 179) | public class NullConditionalAssignment method RightSideInstanced (line 183) | public int? RightSideInstanced(Sample a) => a?.Value = x; method LeftSideInstanced (line 184) | public int? LeftSideInstanced(int a) => sample?.Value = a; class Sample (line 186) | public class Sample FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberShouldBeStatic.WinForms.cs class MyForm (line 6) | public class MyForm : IContainerControl method ActivateControl (line 10) | public bool ActivateControl(Control active) { return true; } method MethodWith1Argument (line 12) | private void MethodWith1Argument(object sender) { Handle(); } method MethodWith3Argument (line 14) | private void MethodWith3Argument(object sender, MyEventArgs e, string ... method SenderArgumentNotObject (line 16) | private void SenderArgumentNotObject(string input, MyEventArgs e) { Ha... method EventArgs_Handler (line 18) | private void EventArgs_Handler(object sender, EventArgs e) { Handle(); } method MyEventArgs_Handler (line 20) | private void MyEventArgs_Handler(object sender, MyEventArgs e) { Handl... method Handle (line 22) | static void Handle() { } class NoForm (line 25) | public class NoForm method EventArgs_Handler (line 27) | private void EventArgs_Handler(object sender, EventArgs e) { Handle(); } method MyEventArgs_Handler (line 29) | private void MyEventArgs_Handler(object sender, MyEventArgs e) { Handl... method Handle (line 31) | static void Handle() { } class MyEventArgs (line 34) | public class MyEventArgs : EventArgs { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberShouldBeStatic.Xaml.cs class Rerpo_9695 (line 7) | public partial class Rerpo_9695 : FrameworkElement method MethodWith1Argument (line 9) | private void MethodWith1Argument(object sender) { Handle(); } method MethodWith3Argument (line 10) | private void MethodWith3Argument(object sender, MyEventArgs e, string ... method SenderArgumentNotObject (line 11) | private void SenderArgumentNotObject(string input, MyEventArgs e) { Ha... method EventArgs_Handler (line 12) | private void EventArgs_Handler(object sender, EventArgs e) { Handle(); } method MyEventArgs_Handler (line 13) | private void MyEventArgs_Handler(object sender, MyEventArgs e) { Handl... method Handle (line 14) | static void Handle() { } class NoFrameworkElement (line 17) | public class NoFrameworkElement method EventArgs_Handler (line 19) | private void EventArgs_Handler(object sender, EventArgs e) { Handle(); } method MyEventArgs_Handler (line 20) | private void MyEventArgs_Handler(object sender, MyEventArgs e) { Handl... method Handle (line 21) | static void Handle() { } class MyEventArgs (line 24) | public class MyEventArgs : EventArgs { } class App (line 26) | public class App : Application method MethodWith1Argument (line 28) | private void MethodWith1Argument(object sender) { Handle(); } method MethodWith3Argument (line 29) | private void MethodWith3Argument(object sender, MyEventArgs e, string ... method SenderArgumentNotObject (line 30) | private void SenderArgumentNotObject(string input, MyEventArgs e) { Ha... method EventArgs_Handler (line 31) | private void EventArgs_Handler(object sender, EventArgs e) { Handle(); } method MyEventArgs_Handler (line 32) | private void MyEventArgs_Handler(object sender, MyEventArgs e) { Handl... method App_OnStartup (line 33) | private void App_OnStartup(object sender, StartupEventArgs e) ... method Handle (line 37) | static void Handle() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberShouldBeStatic.cs type IInterface1 (line 6) | public interface IInterface1 method InterfaceMethod1 (line 8) | int InterfaceMethod1(); class Class1 (line 12) | public class Class1 method Method1 (line 65) | public int Method1() { return 0; } method Method2 (line 66) | public int Method2() { return instanceMember; } method Method3 (line 67) | public int Method3() { return this.instanceMember; } method Method4 (line 68) | public int Method4() { return staticMember; } method Method5 (line 69) | public int Method5() { return Class1.staticMember; } method Method6 (line 70) | public int Method6() { return new Class1().instanceMember; } method Method7 (line 71) | public int Method7(Class1 arg) { return arg.instanceMember; } method Method8 (line 72) | public int Method8(Class1 arg) { return arg.instanceInterface.Interfac... method Method8_0 (line 73) | public int Method8_0(Class1 arg) { return (arg).instanceInterface.Inte... method Method8_1 (line 74) | public int Method8_1(Class1 arg) { return (int)arg?.instanceInterface?... method Method8_2 (line 75) | public int Method8_2(Class1 arg) { return (int)((arg))?.instanceInterf... method Method8_3 (line 77) | public int Method8_3(Class1 arg) { return ((int)arg)?.instanceInterfac... method Method9 (line 78) | public void Method9() { (Property2 + 1).ToString(); } method Method10 (line 80) | public int Method10() => 0; method Method11 (line 81) | public int Method11() => instanceMember; method Method12 (line 82) | public int Method12() => this.instanceMember; method Method13 (line 83) | public int Method13() => staticMember; method Method13_1 (line 84) | public int Method13_1() => (staticMember); method Method14 (line 85) | public int Method14() => Class1.staticMember; method Method15 (line 86) | public int Method15() => new Class1().instanceMember; method Method15_1 (line 87) | public int Method15_1() => (new Class1()).instanceMember; method Method16 (line 88) | public int Method16() => 0; method Method17 (line 89) | public int Method17(Class1 arg) => arg.instanceMember; method Method18 (line 90) | public int Method18(Class1 arg) => arg.instanceInterface.InterfaceProp... method Method19 (line 91) | public int Method19() { return instanceInterface.InterfaceProperty1.Ge... method Method19_1 (line 92) | public int Method19_1() { return ((((((instanceInterface))).InterfaceP... method Method19_2 (line 93) | public int Method19_2() { return (((((((((this))).instanceInterface)))... method Method21 (line 94) | public Class1 Method21() => this; method Method22 (line 95) | public string Method22() => nameof(instanceMember); method StaticMethod1 (line 97) | public static int StaticMethod1() { return 0; } method StaticMethod2 (line 98) | public static int StaticMethod2() { return staticMember; } method StaticMethod3 (line 99) | public static int StaticMethod3() => 0; method StaticMethod4 (line 100) | public static int StaticMethod4() => staticMember; method Method30 (line 102) | public bool Method30() { return 0 > instanceMember; } method Method31 (line 103) | public bool Method31() { var a = instanceMember; return a > 0; } method Method32 (line 104) | public bool Method32() { if (instanceMember - 5 > 10) return true; els... method Method33 (line 105) | public int Method33() { return Math.Abs(instanceMember); } method VirtualMethod (line 107) | public virtual int VirtualMethod() { return 0; } method GenericMethod (line 109) | protected void GenericMethod(T arg) { /*do nothing*/ } method Method34 (line 110) | protected void Method34() { GenericMethod(5); } class Class2 (line 113) | public abstract class Class2 method AbstractMethod (line 116) | public abstract int AbstractMethod(); class Class3 (line 119) | public class Class3 : Class1 method VirtualMethod (line 122) | public override int VirtualMethod() { return 0; } method Method1 (line 123) | public new int Method1() { return 0; } method Method44 (line 125) | public bool Method44(Class1 test) { return test.Property1 == instanceI... class Class4 (line 128) | public class Class4 : IInterface1 method InterfaceMethod1 (line 131) | public int InterfaceMethod1() => 0; class Class5 (line 135) | public class Class5 method Method1 (line 143) | [System.Diagnostics.CodeAnalysis.SuppressMessage("Foo", "Bar", Justifi... method Method2 (line 145) | [System.Diagnostics.CodeAnalysis.SuppressMessage("Foo", "Bar", Justifi... class Class6 (line 149) | public class Class6 method Method1 (line 155) | [System.ObsoleteAttribute] method Method2 (line 157) | [System.ObsoleteAttribute] class WebClass1 (line 163) | public class WebClass1 : System.Web.Mvc.Controller method Foo (line 165) | public int Foo() => 0; method FooFoo (line 167) | protected int FooFoo() => 0; class DerivedWebClass1 (line 170) | public class DerivedWebClass1 : WebClass1 method Bar (line 172) | public int Bar() => 1; method BarBar (line 174) | protected int BarBar() => 1; class WebClass2 (line 177) | public class WebClass2 : System.Web.Http.ApiController method Foo (line 179) | public int Foo() => 0; method FooFoo (line 181) | protected int FooFoo() => 0; class DerivedWebClass2 (line 184) | public class DerivedWebClass2 : WebClass2 method Bar (line 186) | public int Bar() => 1; method BarBar (line 188) | protected int BarBar() => 1; class WebClass3 (line 191) | public class WebClass3 : Microsoft.AspNetCore.Mvc.Controller method Foo (line 193) | public int Foo() => 0; method FooFoo (line 195) | protected int FooFoo() => 0; class DerivedWebClass3 (line 198) | public class DerivedWebClass3 : WebClass3 method Bar (line 200) | public int Bar() => 1; method BarBar (line 202) | protected int BarBar() => 1; class Foo (line 205) | public class Foo method Application_AuthenticateRequest (line 207) | protected void Application_AuthenticateRequest(Object sender, EventArg... method Application_BeginRequest (line 208) | protected void Application_BeginRequest(object sender, EventArgs e) { } method Application_End (line 209) | protected void Application_End() { } method Application_EndRequest (line 210) | protected void Application_EndRequest(Object sender, EventArgs e) { } method Application_Error (line 211) | protected void Application_Error(object sender, EventArgs e) { } method Application_Init (line 212) | protected void Application_Init(object sender, EventArgs e) { } method Application_Start (line 213) | protected void Application_Start() { } method Session_End (line 214) | protected void Session_End(object sender, EventArgs e) { } method Session_Start (line 215) | protected void Session_Start(object sender, EventArgs e) { } class Repro_3204 (line 219) | public class Repro_3204 method BuildSomething (line 221) | public int BuildSomething() // Compliant, we don't raise inside generi... method WithGenericArguments (line 226) | public int WithGenericArguments() // Compliant method PrivateMethod (line 231) | private int PrivateMethod() => 42; method ProtectedMethod (line 232) | protected int ProtectedMethod() => 42; method InternalMethod (line 234) | internal int InternalMethod() => 42; method ProtectedInternal (line 235) | protected internal int ProtectedInternal() => 42; class PublicNestedInGenericType (line 237) | public class PublicNestedInGenericType method BuildSomething (line 239) | public int BuildSomething() => 42; class PrivateNestedInGenericType (line 242) | private class PrivateNestedInGenericType method BuildSomething (line 244) | public int BuildSomething() => 42; class PublicStaticNestedInGenericType (line 247) | public static class PublicStaticNestedInGenericType method BuildSomething (line 249) | public static int BuildSomething() => 42; class PrivateStaticNestedInGenericType (line 252) | private static class PrivateStaticNestedInGenericType method BuildSomething (line 254) | public static int BuildSomething() => 42; class Nongeneric (line 257) | public class Nongeneric class Generic (line 259) | private class Generic method BuildSomething (line 261) | public int BuildSomething() => 42; class NestedNongeneric (line 263) | private class NestedNongeneric method BuildSomething (line 265) | public int BuildSomething() => 42; class GenericOuter (line 270) | public class GenericOuter class NongenericInner (line 272) | private class NongenericInner method BuildSomething (line 274) | public int BuildSomething() => 42; class Repro_3204_OK (line 279) | public class Repro_3204_OK method BuildSomething (line 281) | public int BuildSomething() // Noncompliant, this gen... class NameColon (line 287) | public class NameColon method UsingParameter (line 291) | public decimal UsingParameter(string parameter) // Noncompliant method UsingLocal (line 296) | public decimal UsingLocal() // Compliant class PropertyInitialization (line 302) | public class PropertyInitialization method Create (line 306) | public PropertyInitialization Create() // FN - because of the property... class PartialClass (line 313) | partial class PartialClass method WriteEverything (line 315) | public void WriteEverything() method WriteMore (line 322) | partial void WriteMore(); method WriteMore (line 327) | partial void WriteMore() // Compliant class PartialClass (line 325) | partial class PartialClass method WriteEverything (line 315) | public void WriteEverything() method WriteMore (line 322) | partial void WriteMore(); method WriteMore (line 327) | partial void WriteMore() // Compliant class Awaitable (line 333) | public class Awaitable : INotifyCompletion // inorder for a type to be ... method GetAwaiter (line 335) | public Awaitable GetAwaiter() => this; method GetResult (line 337) | public void GetResult() { } method OnCompleted (line 339) | public void OnCompleted(Action continuation) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberShouldNotHaveConflictingTransparencyAttributes.AssemblyLevel.cs class Program1 (line 16) | public class Program1 class Program2 (line 23) | public class Program2 class Program3 (line 29) | public class Program3 method Program3 (line 31) | [SecuritySafeCritical] // Noncompliant class Program4 (line 37) | public class Program4 method DoSomething (line 39) | [SecuritySafeCritical] // Noncompliant class Program5 (line 45) | public class Program5 class SafeClass (line 47) | [SecuritySafeCritical] // Noncompliant class Program6 (line 53) | public class Program6 type SafeStruct (line 55) | [SecuritySafeCritical] // Noncompliant class Program7 (line 61) | public class Program7 type ISafe (line 63) | [SecuritySafeCritical] // Noncompliant class Program8 (line 69) | public class Program8 type SafeEnum (line 71) | [SecuritySafeCritical] // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberShouldNotHaveConflictingTransparencyAttributes.Latest.Partial.cs class PartialClass (line 8) | public partial class PartialClass method PartialClass (line 10) | [SecuritySafeCritical] // FN https://sonarsource.atlassian.net/browse... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberShouldNotHaveConflictingTransparencyAttributes.Latest.cs class TestCases (line 8) | [SecurityCritical] method TestCases (line 17) | [SecuritySafeCritical] // Noncompliant [flow6] method Bar (line 20) | public void Bar(IEnumerable collection) method Call (line 35) | private void Call(Action action) => action(1); type Foo (line 38) | [SecurityCritical] method Bar (line 43) | [SecuritySafeCritical] // Noncompliant method Bar2 (line 48) | [SecuritySafeCritical] // Noncompliant class PartialClass (line 52) | [SecurityCritical] // FN method PartialClass (line 55) | public partial PartialClass(); class Sample (line 58) | [SecurityCritical] class Extensions (line 61) | [SecurityCritical] // Secondary method extension (line 64) | extension(Sample sample) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberShouldNotHaveConflictingTransparencyAttributes.Partial.cs class PartialClass (line 8) | public partial class PartialClass method Method (line 10) | [SecuritySafeCritical] // FN https://sonarsource.atlassian.net/browse... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MemberShouldNotHaveConflictingTransparencyAttributes.cs class Program1 (line 6) | [SecurityCritical] // Secondary class Program2 (line 15) | [SecurityCritical] // Secondary class Program3 (line 22) | [SecurityCritical] // Secondary method Program3 (line 26) | [SecuritySafeCritical] // Noncompliant class Program4 (line 32) | [SecurityCritical] // Secondary method DoSomething (line 36) | [SecuritySafeCritical] // Noncompliant class Program5 (line 42) | [SecurityCritical] // Secondary class SafeClass (line 46) | [SecuritySafeCritical] // Noncompliant class Program6 (line 52) | [SecurityCritical] // Secondary type SafeStruct (line 56) | [SecuritySafeCritical] // Noncompliant class Program7 (line 62) | [SecurityCritical] // Secondary type ISafe (line 66) | [SecuritySafeCritical] // Noncompliant class Program8 (line 72) | [SecurityCritical] // Secondary type SafeEnum (line 76) | [SecuritySafeCritical] // Noncompliant class PartialClass (line 82) | [SecurityCritical] // FN class Sample (line 85) | [SecurityCritical] class ClassicExtensions (line 88) | [SecurityCritical] // Secondary method ExtensionMethod (line 91) | [SecuritySafeCritical] // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MessageTemplatesShouldBeCorrect.Latest.cs class Program (line 4) | public class Program method EscapeSequence (line 6) | public void EscapeSequence(ILogger logger, string user) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MessageTemplatesShouldBeCorrect.cs class Program (line 4) | public class Program method Compliant (line 6) | public void Compliant(ILogger logger, string user) method InvalidSyntax (line 35) | public void InvalidSyntax(ILogger logger, string user) method EmptyPlaceholder (line 47) | public void EmptyPlaceholder(ILogger logger, string user) method InvalidName (line 59) | public void InvalidName(ILogger logger, string user) method InvalidAlignmentAndFormat (line 77) | public void InvalidAlignmentAndFormat(ILogger logger, int cnt) method Complex (line 91) | public void Complex(ILogger logger, string user, int cnt, int total) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverloadOptionalParameter.Latest.Partial.cs class Partial (line 1) | public partial class Partial method Single (line 3) | public partial void Single(string[] messages, string delimiter = "; ")... method Together (line 5) | public partial void Together(string[] messages) { } method Together (line 6) | public partial void Together(string[] messages, string delimiter = "; ... method Mixed (line 8) | public partial void Mixed(string[] messages) { } method Mixed (line 9) | public partial void Mixed(string[] messages, string delimiter = "; "); class PartialConstructor (line 12) | public partial class PartialConstructor method PartialConstructor (line 14) | public partial PartialConstructor(string[] messages); method PartialConstructor (line 15) | public partial PartialConstructor(string[] messages, string delimiter ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverloadOptionalParameter.Latest.cs type Record (line 1) | public record Record class Partial (line 7) | public partial class Partial method Single (line 9) | public void Single(string[] messages) { } method Single (line 10) | public partial void Single(string[] messages, string delimiter = "; "); method Together (line 12) | public partial void Together(string[] messages); method Together (line 13) | public partial void Together(string[] messages, string delimiter = "; "); method Mixed (line 15) | public partial void Mixed(string[] messages); method Mixed (line 16) | public partial void Mixed(string[] messages, string delimiter = "; ") { } type RecordStruct (line 19) | public record struct RecordStruct type PositionalRecord (line 26) | public record struct PositionalRecord(string value) type IMyInterface (line 32) | public interface IMyInterface method Abstract (line 34) | static abstract void Abstract(string[] messages); method Abstract (line 35) | static abstract void Abstract(string[] messages, string delimiter = "\... method Virtual (line 37) | static virtual void Virtual(string[] messages) { } method Virtual (line 38) | static virtual void Virtual(string[] messages, string delimiter = "\n"... class MethodOverloadOptionalParameter (line 41) | public partial class MethodOverloadOptionalParameter : IMyInterface method Abstract (line 43) | public static void Abstract(string[] messages) { } method Abstract (line 44) | public static void Abstract(string[] messages, string delimiter = "\n"... method Virtual (line 45) | public static void Virtual(string[] messages) { } method Virtual (line 46) | public static void Virtual(string[] messages, string delimiter = "\n")... method Print (line 48) | partial void Print(string[] messages); method Print (line 50) | partial void Print(string[] messages) { } method Print (line 52) | void Print(string[] messages, string delimiter = "\n") { } method Print (line 53) | void Print(string[] messages, class MyClass1 (line 60) | public class MyClass1(string[] messages) method MyClass1 (line 62) | public MyClass1(string[] messages, string delimiter = "\n") : this(mes... class MyClass2 (line 67) | public class MyClass2(string[] messages, string delimiter = "\n") // Non... method MyClass2 (line 69) | public MyClass2(string[] messages) : this(messages, "\n") class PartialConstructor (line 74) | public partial class PartialConstructor method PartialConstructor (line 76) | public partial PartialConstructor(string[] messages) { } method PartialConstructor (line 77) | public partial PartialConstructor(string[] messages, string delimiter ... class Sample (line 80) | public class Sample { } class SampleWithMethod (line 82) | public class SampleWithMethod method Method (line 84) | public void Method(string[] messages) { } class NewExtensions (line 87) | public static class NewExtensions method extension (line 89) | extension(Sample sample) method extension (line 95) | extension(SampleWithMethod sample) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverloadOptionalParameter.cs type IMyInterface (line 6) | public interface IMyInterface method Print2 (line 8) | void Print2(string[] messages); method Print2 (line 9) | void Print2(string[] messages, string delimiter = "\n"); class MyBase (line 13) | public class MyBase method Print3 (line 15) | public virtual void Print3(string[] messages) { } method Print3 (line 16) | public virtual void Print3(string[] messages, string delimiter = "\n")... class MethodOverloadOptionalParameter (line 19) | public partial class MethodOverloadOptionalParameter : MyBase, IMyInterface method Print3 (line 21) | public override void Print3(string[] messages) { } method Print3 (line 22) | public override void Print3(string[] messages, string delimiter = "\n"... method Print2 (line 24) | public void Print2(string[] messages) { } method Print2 (line 25) | public void Print2(string[] messages, string delimiter = "\n") { } method Print (line 27) | partial void Print(string[] messages); method Print (line 29) | partial void Print(string[] messages) { } method Print (line 31) | void Print(string[] messages, string delimiter = "\n") {} method Print (line 32) | void Print(string[] messages, type MyType (line 38) | public interface MyType method Print (line 40) | void Print(string messages, int num, object something); method Print (line 42) | void Print(string messages, int num = 0, object something = null); type Generics (line 45) | public interface Generics method Foo (line 47) | void Foo(string[] messages); method Foo (line 48) | void Foo(string[] messages, string delimiter = "\n"); method Foo2 (line 50) | void Foo2(string[] messages); method Foo2 (line 51) | void Foo2(string[] messages, string delimiter = "\n"); method Foo3 (line 53) | void Foo3(T messages); method Foo3 (line 54) | void Foo3(V messages, string delimiter = "\n"); method Foo4 (line 56) | void Foo4(IEnumerable messages); method Foo4 (line 57) | void Foo4(IEnumerable messages, string delimiter = "\n"); method Foo5 (line 59) | void Foo5(IEnumerable messages); method Foo5 (line 60) | void Foo5(MyType messages); method Foo5 (line 61) | void Foo5(MyType messages, string delimiter = "\n"); method Foo6 (line 63) | void Foo6(KeyValuePair ids); method Foo6 (line 64) | void Foo6(KeyValuePair messages, string delimiter = "\n"); method Foo7 (line 66) | void Foo7(KeyValuePair, string> ids); method Foo7 (line 67) | void Foo7(KeyValuePair, string> messages, s... method Foo8 (line 69) | void Foo8(KeyValuePair, string> ids); method Foo8 (line 70) | void Foo8(KeyValuePair, string> messages, stri... type IInterfaceWithDefaultImpl (line 73) | public interface IInterfaceWithDefaultImpl method Print2 (line 75) | void Print2(string[] messages) method Print2 (line 79) | void Print2(string[] messages, string delimiter = "\n") // Noncompliant; class Sample (line 85) | public class Sample { } class SampleWithMethod (line 87) | public class SampleWithMethod method Method (line 89) | public void Method(string[] messages) { } class ClassicExtensions (line 92) | public static class ClassicExtensions method Method (line 94) | public static void Method(this Sample sample, string[] messages) { } method Method (line 95) | public static void Method(this Sample sample, string[] messages, strin... method Method (line 97) | public static void Method(this SampleWithMethod sample, string[] messa... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverloadsShouldBeGrouped.Latest.cs type R1 (line 1) | record R1 type R2 (line 12) | record R2 type R3 (line 23) | record R3 type PositionalR1 (line 36) | record PositionalR1(string Parameter) type PositionalR2 (line 47) | record PositionalR2(string Parameter) type PositionalR3 (line 58) | record PositionalR3(string Parameter) type RS1 (line 72) | record struct RS1 type RS2 (line 85) | record struct RS2 type RS3 (line 96) | record struct RS3 type PositionalRS1 (line 109) | record struct PositionalRS1(string Parameter) type PositionalRS2 (line 120) | record struct PositionalRS2(string Parameter) type PositionalRS3 (line 131) | record struct PositionalRS3(string Parameter) type A (line 144) | interface A method DoSomething (line 146) | static abstract void DoSomething(double b); method DoSomething (line 148) | static abstract void DoSomething(); method DoSomething (line 150) | static abstract void DoSomething(int a); type B (line 153) | interface B method DoSomething (line 155) | static abstract void DoSomething(double b); method DoSomething (line 158) | static abstract void DoSomething(); method DoSomethingElse (line 160) | static abstract void DoSomethingElse(); method DoSomething (line 162) | static abstract void DoSomething(int a); method DoSomething (line 165) | static virtual void DoSomething(double a, double b) { } class SomeClass (line 168) | class SomeClass : A, B method DoSomething (line 170) | public static void DoSomething(double a) { } method SeparateFromSameInterfaceA (line 172) | public void SeparateFromSameInterfaceA() { } method DoSomething (line 175) | static void A.DoSomething() { } method DoSomethingElse (line 177) | static public void DoSomethingElse() { } method DoSomething (line 179) | static void B.DoSomething() { } method SeparateFromSameInterfaceB (line 181) | public void SeparateFromSameInterfaceB() { } method DoSomething (line 183) | public static void DoSomething(int a) { } class PrimaryConstructor (line 186) | class PrimaryConstructor(int arg) method RandomMethod1 (line 188) | public void RandomMethod1() { } method PrimaryConstructor (line 190) | public PrimaryConstructor() : this(5) { } method RandomMethod1 (line 192) | public void RandomMethod1(int i) { } method RandomMethod2 (line 194) | public void RandomMethod2() { } class Extensions (line 197) | public static class Extensions class Sample (line 199) | public class Sample { } method extension (line 200) | extension (Sample sample) method extension (line 208) | extension(Sample sample) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverloadsShouldBeGrouped.cs class A (line 6) | class A method a (line 8) | void a() { } method a (line 11) | void a(int a, char b) { } class B (line 13) | class B { } method a (line 15) | void a(string a) { } type C (line 18) | interface C { } method a (line 20) | void a(int a) { } type D (line 23) | enum D { } method a (line 25) | void a(double a) { } method a (line 30) | void a(char a) { } method a (line 38) | void a(char a, int b) { } class B (line 42) | class B method B (line 44) | B() { } method B (line 46) | B(int a) { } method B (line 48) | B(char a) { } method B (line 52) | B(double a) { } class C (line 55) | class C method a (line 62) | void a() { } method B (line 66) | void B() { } type D (line 74) | interface D method DoSomething (line 76) | void DoSomething(double b); method DoSomething (line 78) | void DoSomething(); method DoSomething (line 80) | void DoSomething(int a); type E (line 83) | interface E method DoSomething (line 85) | void DoSomething(double b); method DoSomething (line 88) | void DoSomething(); method DoSomethingElse (line 90) | void DoSomethingElse(); method DoSomething (line 92) | void DoSomething(int a); type F (line 96) | struct F method F (line 98) | F(char a) { } method F (line 100) | F(int a) { } method MyStructMethod (line 102) | void MyStructMethod() { } method MyStructMethod (line 104) | void MyStructMethod(int a) { } method MyStructMethod2 (line 106) | void MyStructMethod2() { } method MyStructMethod (line 108) | void MyStructMethod(char a) { } class G (line 111) | class G : D, E method DoSomething (line 113) | public void DoSomething(double a) { } method SeparateFromSameInterfaceD (line 115) | public void SeparateFromSameInterfaceD() { } method DoSomething (line 118) | void D.DoSomething() { } method DoSomethingElse (line 120) | public void DoSomethingElse() { } method DoSomething (line 122) | void E.DoSomething() { } method SeparateFromSameInterfaceE (line 124) | public void SeparateFromSameInterfaceE() { } method DoSomething (line 126) | public void DoSomething(int a) { } class H (line 129) | class H method DoSomething (line 131) | private void DoSomething(int a) { } method DoSomethingElse (line 133) | void DoSomethingElse() { } method DoSomething (line 135) | public void DoSomething() { } class I (line 138) | class I method DoSomething (line 140) | private void DoSomething(int a) { } method DoSomethingElse (line 142) | void DoSomethingElse() { } method DoSomething (line 144) | private void DoSomething() { } class J (line 147) | class J method DoSomething (line 149) | void DoSomething(T t) { } method DoSomethingElse (line 151) | void DoSomethingElse() { } method DoSomething (line 153) | void DoSomething(int a) { } class K (line 156) | class K method Lorem (line 158) | public void Lorem() { } method DoSomething (line 160) | public void DoSomething() { } method DoSomething (line 162) | private void DoSomething(int i) { } method DoSomething (line 164) | protected void DoSomething(bool b) { } method DoSomething (line 166) | public void DoSomething(string s) { } method Lorem (line 168) | private void Lorem(int i) { } class L (line 172) | public class L method MethodA (line 174) | public void MethodA() { } method MethodB (line 176) | public void MethodB() { } method MethodA (line 178) | public static void MethodA(int i) { } class M (line 181) | public abstract class M method MethodA (line 183) | public abstract void MethodA(); method MethodB (line 185) | public void MethodB() { } method MethodA (line 187) | public void MethodA(int i) { } class StaticMethodsTogether (line 191) | public class StaticMethodsTogether method StaticMethodsTogether (line 194) | public StaticMethodsTogether() { } method StaticMethodsTogether (line 195) | public StaticMethodsTogether(int i) { } method MethodA (line 197) | public static void MethodA() // Compliant - static methods are grouped... method MethodB (line 201) | public static void MethodB() method StaticMethodsTogether (line 205) | static StaticMethodsTogether() { } method MethodA (line 207) | public void MethodA(int i) method MethodC (line 211) | public static void MethodC() // Noncompliant - When there're more s... method MethodD (line 215) | public static void MethodD() method MethodD (line 219) | public static int MethodD(int i) method MethodD (line 224) | public static void MethodD(bool b) method MethodC (line 228) | public static void MethodC(bool b) // Secondary method Separator (line 232) | public static void Separator() method MethodC (line 236) | public static int MethodC(int i) // Secondary class MustOverrideMethodsTogether (line 243) | public abstract class MustOverrideMethodsTogether method DoWork (line 246) | protected abstract void DoWork(bool b); method DoWork (line 247) | protected abstract void DoWork(int i); method MustOverrideMethodsTogether (line 249) | protected MustOverrideMethodsTogether() { } method DoWork (line 251) | protected void DoWork() //Compliant - abstract methods are grouped tog... method OnEvent (line 257) | protected abstract void OnEvent(bool b); method OnProgress (line 258) | protected abstract void OnProgress(); method OnEvent (line 259) | protected abstract void OnEvent(int i); method DoSomething (line 261) | public void DoSomething() { } method DoSomething (line 262) | protected abstract void DoSomething(bool b); method DoSomething (line 263) | public void DoSomething(int i) { } class Inheritor (line 267) | public class Inheritor : MustOverrideMethodsTogether method DoWork (line 270) | protected override void DoWork(bool b) method DoWork (line 274) | public static void DoWork(string s) //Compliant interleaving with static method DoWork (line 278) | protected override void DoWork(int i) method OnEvent (line 282) | protected override void OnEvent(bool b) //Noncompliant method OnProgress (line 286) | protected override void OnProgress() method OnEvent (line 290) | protected override void OnEvent(int i) //Secondary method DoSomething (line 294) | protected override void DoSomething(bool b) class InterfaceImplementationTogether (line 300) | public class InterfaceImplementationTogether : IEqualityComparer, I... method Equals (line 302) | public bool Equals(int x, int y) { return true; } method GetHashCode (line 304) | public int GetHashCode(int obj) { return 0; } method Equals (line 306) | public bool Equals(string x, string y) { return true; } method GetHashCode (line 308) | public int GetHashCode(string obj) { return 0; } type ITest (line 311) | public interface ITest method Aaa (line 313) | void Aaa(TItem x); method Zzz (line 317) | void Zzz(TItem x); class InterfaceImplementationTogetherWithPropertiesAndEvents (line 320) | public class InterfaceImplementationTogetherWithPropertiesAndEvents : IT... method Aaa (line 323) | public void Aaa(int x) { } method Zzz (line 326) | public void Zzz(int x) { } method Aaa (line 333) | public void Aaa(string x) { } method Zzz (line 336) | public void Zzz(string x) { } class ImplicitInterfaceWithEventHandler (line 339) | public class ImplicitInterfaceWithEventHandler : ITest method Zzz (line 341) | public void Zzz(string x) { } method Aaa (line 344) | public void Aaa(int x) { } method Zzz (line 348) | public void Zzz(int x) { } type ICancel (line 351) | public interface ICancel method Cancel (line 353) | void Cancel(); method Cancel (line 354) | void Cancel(bool b); method Renew (line 355) | void Renew(); class InterfaceImplementationMethodsTogether (line 358) | public class InterfaceImplementationMethodsTogether : ICancel method Cancel (line 360) | public void Cancel() { } method Renew (line 361) | public void Renew() { } method Cancel (line 362) | public void Cancel(bool b) { } type ISecond (line 365) | public interface ISecond method A (line 367) | void A(); method Cancel (line 368) | void Cancel(); method B (line 369) | void B(); class ImplementsBoth (line 372) | public class ImplementsBoth : ICancel, ISecond method Cancel (line 374) | public void Cancel(bool b) { } method Renew (line 375) | public void Renew() { } method A (line 377) | public void A() { } method Cancel (line 378) | public void Cancel() { } method B (line 379) | public void B() { } class ImplementsBothFalseNegative (line 382) | public class ImplementsBothFalseNegative : ICancel, ISecond method Cancel (line 384) | public void Cancel(bool b) { } method Renew (line 385) | public void Renew() { } method A (line 387) | public void A() { } method B (line 388) | public void B() { } method Something (line 390) | public void Something() { } method Cancel (line 392) | public void Cancel() { } type IInterfaceSample (line 395) | public interface IInterfaceSample method Grouping (line 397) | void Grouping(); method DoSomething (line 398) | void DoSomething(); class Interface_InterfaceMembersTogether (line 401) | public class Interface_InterfaceMembersTogether : IInterfaceSample method DoSomething (line 403) | private void DoSomething(int nonInterfaceOverload) { } method Grouping (line 404) | public void Grouping() { } method DoSomething (line 405) | public void DoSomething() { } class Interface_OverloadsTogether (line 408) | public class Interface_OverloadsTogether : IInterfaceSample method Grouping (line 410) | public void Grouping() { } method DoSomething (line 411) | private void DoSomething(int nonInterfaceOverload) { } method DoSomething (line 412) | public void DoSomething() { } class Interface_OverloadsAndInterfacesMixed (line 415) | public class Interface_OverloadsAndInterfacesMixed : IInterfaceSample method Grouping (line 417) | public void Grouping() { } method DoSomething (line 418) | private void DoSomething(int nonInterfaceOverload) { } method Grouping (line 419) | private void Grouping(int nonInterfaceOverload) { } method DoSomething (line 420) | public void DoSomething() { } class Interface_ExplicitImpl (line 423) | public class Interface_ExplicitImpl : IInterfaceSample method Grouping (line 425) | public void Grouping() { } method DoSomething (line 426) | private void DoSomething(int nonInterfaceOverload) { } method GroupEnd (line 427) | private void GroupEnd() { } method DoSomething (line 428) | void IInterfaceSample.DoSomething() { } type IOverloadInterfaceSample (line 431) | public interface IOverloadInterfaceSample method DoSomething (line 433) | void DoSomething(); method DoSomething (line 434) | void DoSomething(int overload); class InterfaceOverload_InterfacemembersTogether (line 437) | public class InterfaceOverload_InterfacemembersTogether : IOverloadInter... method DoSomething (line 439) | public void DoSomething(string nonInterfaceOverload) { } method EndGrouping (line 440) | public void EndGrouping() { } method DoSomething (line 441) | public void DoSomething() { } method DoSomething (line 442) | public void DoSomething(int overload) { } class InterfaceOverload_InterfacemembersSplit (line 445) | public class InterfaceOverload_InterfacemembersSplit : IOverloadInterfac... method DoSomething (line 447) | public void DoSomething() { } method EndGrouping (line 448) | public void EndGrouping() { } method DoSomething (line 449) | public void DoSomething(int overload) { } class InterfaceOverload_ExplicitAndImplicit (line 452) | public class InterfaceOverload_ExplicitAndImplicit : IOverloadInterfaceS... method DoSomething (line 454) | public void DoSomething() { } method EndGrouping (line 455) | public void EndGrouping() { } method DoSomething (line 456) | void IOverloadInterfaceSample.DoSomething(int overload) { } class InterfaceOverload_Explicit (line 459) | public class InterfaceOverload_Explicit : IOverloadInterfaceSample method DoSomething (line 461) | void IOverloadInterfaceSample.DoSomething() { } method EndGrouping (line 462) | public void EndGrouping() { } method DoSomething (line 463) | void IOverloadInterfaceSample.DoSomething(int overload) { } class ClassicExtensions (line 466) | public static class ClassicExtensions class Sample (line 468) | public class Sample { } method a (line 469) | public static void a(this Sample sample) { } method a (line 470) | public static void a(this Sample sample, int a) { } method b (line 471) | public static void b() { } method a (line 472) | public static void a(this Sample sample, string z) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverrideAddsParams.Fixed.cs class Base (line 6) | abstract class Base method Method (line 8) | public virtual void Method(int[] numbers) method Method (line 11) | public virtual void Method(string s, method Method (line 15) | public abstract void Method(string s, string s1, method Method (line 18) | public virtual void Method(string s, string s1, string s2, class Derived (line 23) | abstract class Derived : Base method Method (line 25) | public override void Method(int[] numbers) // Fixed method Method (line 28) | public override void Method(string s, method Method (line 32) | public override void Method(string s, string s1, method Method (line 36) | public override void Method(string s, string s1, string s2, type IFirst (line 42) | public interface IFirst method Method (line 44) | public virtual void Method(int[] numbers) class Second (line 49) | public class Second : IFirst method Method (line 51) | public void Method(params int[] numbers) // Compliant - The interface ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverrideAddsParams.Latest.cs type Base (line 3) | abstract record Base type Derived (line 16) | abstract record Derived : Base FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverrideAddsParams.cs class Base (line 6) | abstract class Base method Method (line 8) | public virtual void Method(int[] numbers) method Method (line 11) | public virtual void Method(string s, method Method (line 15) | public abstract void Method(string s, string s1, method Method (line 18) | public virtual void Method(string s, string s1, string s2, class Derived (line 23) | abstract class Derived : Base method Method (line 25) | public override void Method(params int[] numbers) // Noncompliant {{'p... method Method (line 29) | public override void Method(string s, method Method (line 33) | public override void Method(string s, string s1, method Method (line 37) | public override void Method(string s, string s1, string s2, type IFirst (line 43) | public interface IFirst method Method (line 45) | public virtual void Method(int[] numbers) class Second (line 50) | public class Second : IFirst method Method (line 52) | public void Method(params int[] numbers) // Compliant - The interface ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverrideChangedDefaultValue.Latest.Fixed.cs type IMyInterface (line 6) | public interface IMyInterface method Write (line 8) | static abstract void Write(int i, int j = 5); method Write (line 10) | static virtual void Write(int i, int j, int x = 5) { } method Read (line 26) | void Read(int i, int j = 5); method Write (line 27) | void Write(int i, int j = 5); class Class (line 13) | public class Class : IMyInterface method Write (line 15) | public static void Write(int i, int j = 5) // Fixed method Write (line 20) | public static void Write(int i, int j, int x = 5) { } type IMyInterface (line 24) | public interface IMyInterface method Write (line 8) | static abstract void Write(int i, int j = 5); method Write (line 10) | static virtual void Write(int i, int j, int x = 5) { } method Read (line 26) | void Read(int i, int j = 5); method Write (line 27) | void Write(int i, int j = 5); type Base (line 30) | public record Base : IMyInterface type Derived (line 37) | public partial record Derived : Base type Derived (line 42) | public partial record Derived FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverrideChangedDefaultValue.Latest.cs type IMyInterface (line 6) | public interface IMyInterface method Write (line 8) | static abstract void Write(int i, int j = 5); method Write (line 10) | static virtual void Write(int i, int j, int x = 5) { } method Read (line 27) | void Read(int i, int j = 5); method Write (line 28) | void Write(int i, int j = 5); class Class (line 13) | public class Class : IMyInterface method Write (line 15) | public static void Write(int i, int j = 0) // Noncompliant {{Use the d... method Write (line 21) | public static void Write(int i, int j, int x = 0) { } type IMyInterface (line 25) | public interface IMyInterface method Write (line 8) | static abstract void Write(int i, int j = 5); method Write (line 10) | static virtual void Write(int i, int j, int x = 5) { } method Read (line 27) | void Read(int i, int j = 5); method Write (line 28) | void Write(int i, int j = 5); type Base (line 31) | public record Base : IMyInterface type Derived (line 38) | public partial record Derived : Base type Derived (line 43) | public partial record Derived FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverrideChangedDefaultValue.Remove.Fixed.cs type IMyInterface (line 6) | public interface IMyInterface method Write (line 8) | void Write(int i, int j = 5); class Base (line 11) | public class Base : IMyInterface method Write (line 13) | public virtual void Write(int i, int j = 0) // Fixed class Derived1 (line 19) | public class Derived1 : Base method Write (line 21) | public override void Write(int i, class Derived2 (line 28) | public class Derived2 : Base method Write (line 30) | public override void Write(int i, class Derived3 (line 37) | public class Derived3 : Base method Write (line 39) | public override void Write(int i = 5, // Fixed class ExplicitImpl1 (line 46) | public class ExplicitImpl1 : IMyInterface method Write (line 48) | void IMyInterface.Write(int i, type IFirst (line 54) | public interface IFirst method Write (line 56) | void Write(int i, int j = 5); method Write (line 58) | void Write(int i = 42); type ISecond (line 61) | public interface ISecond : IFirst method Write (line 63) | void Write(int i, int j = 5) method Write (line 67) | void Write(int i = 0) // Compliant - This method can be called only af... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverrideChangedDefaultValue.Synchronize.Fixed.Batch.cs type IMyInterface (line 6) | public interface IMyInterface method Write (line 8) | void Write(int i, int j = 5); class Base (line 11) | public class Base : IMyInterface method Write (line 13) | public virtual void Write(int i, int j = 5) // Fixed class Derived1 (line 19) | public class Derived1 : Base method Write (line 21) | public override void Write(int i, class Derived2 (line 28) | public class Derived2 : Base method Write (line 30) | public override void Write(int i, class Derived3 (line 37) | public class Derived3 : Base method Write (line 39) | public override void Write(int i, // Fixed class ExplicitImpl1 (line 46) | public class ExplicitImpl1 : IMyInterface method Write (line 48) | void IMyInterface.Write(int i, type IFirst (line 54) | public interface IFirst method Write (line 56) | void Write(int i, int j = 5); method Write (line 58) | void Write(int i = 42); type ISecond (line 61) | public interface ISecond : IFirst method Write (line 63) | void Write(int i, int j = 5) method Write (line 67) | void Write(int i = 0) // Compliant - This method can be called only af... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverrideChangedDefaultValue.Synchronize.Fixed.cs type IMyInterface (line 6) | public interface IMyInterface method Write (line 8) | void Write(int i, int j = 5); class Base (line 11) | public class Base : IMyInterface method Write (line 13) | public virtual void Write(int i, int j = 5) // Fixed class Derived1 (line 19) | public class Derived1 : Base method Write (line 21) | public override void Write(int i, class Derived2 (line 28) | public class Derived2 : Base method Write (line 30) | public override void Write(int i, class Derived3 (line 37) | public class Derived3 : Base method Write (line 39) | public override void Write(int i, // Fixed class ExplicitImpl1 (line 46) | public class ExplicitImpl1 : IMyInterface method Write (line 48) | void IMyInterface.Write(int i, type IFirst (line 54) | public interface IFirst method Write (line 56) | void Write(int i, int j = 5); method Write (line 58) | void Write(int i = 42); type ISecond (line 61) | public interface ISecond : IFirst method Write (line 63) | void Write(int i, int j = 5) method Write (line 67) | void Write(int i = 0) // Compliant - This method can be called only af... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverrideChangedDefaultValue.cs type IMyInterface (line 6) | public interface IMyInterface method Write (line 8) | void Write(int i, int j = 5); class Base (line 11) | public class Base : IMyInterface method Write (line 13) | public virtual void Write(int i, int j = 0) // Noncompliant {{Use the ... class Derived1 (line 20) | public class Derived1 : Base method Write (line 22) | public override void Write(int i, class Derived2 (line 29) | public class Derived2 : Base method Write (line 31) | public override void Write(int i, class Derived3 (line 38) | public class Derived3 : Base method Write (line 40) | public override void Write(int i = 5, // Noncompliant {{Remove the de... class ExplicitImpl1 (line 47) | public class ExplicitImpl1 : IMyInterface method Write (line 49) | void IMyInterface.Write(int i, type IFirst (line 55) | public interface IFirst method Write (line 57) | void Write(int i, int j = 5); method Write (line 59) | void Write(int i = 42); type ISecond (line 62) | public interface ISecond : IFirst method Write (line 64) | void Write(int i, int j = 5) method Write (line 68) | void Write(int i = 0) // Compliant - This method can be called only af... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverrideNoParams.Fixed.cs class Base (line 6) | abstract class Base method Method (line 8) | public virtual void Method(params int[] numbers) method Method (line 11) | public virtual void Method(string s, method Method (line 15) | public abstract void Method(string s, string s1, class Derived (line 18) | abstract class Derived : Base method Method (line 20) | public override void Method(params int[] numbers) // Fixed method Method (line 23) | public override void Method(string s, method Method (line 27) | public override void Method(string s, string s1, class Derived2 (line 32) | abstract class Derived2 : Base method Method (line 34) | public override void Method(params int[] numbers) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverrideNoParams.Latest.cs class Base (line 3) | abstract class Base method Method (line 5) | public virtual void Method(params int[] numbers) { } method Method (line 6) | public virtual void Method(string s, params int[] numbers) { } method Method (line 7) | public abstract void Method(string s, string s1, params int[] numbers); class Derived (line 9) | abstract class Derived : Base method Method (line 11) | public override void Method(int[] numbers) { } method Method (line 12) | public override void Method(string s, int[] numbers) { } method Method (line 13) | public override void Method(string s, string s1, params int[] numbers)... type IMath (line 16) | public interface IMath method Method (line 18) | static virtual void Method(params int[] numbers) { } method Method (line 19) | static virtual void Method(string s, params int[] numbers) { } method Method (line 20) | static abstract void Method(string s, string s1, params int[] numbers); class Foo (line 23) | public class Foo : IMath method Method (line 25) | public static void Method(int[] numbers) { } method Method (line 26) | public static void Method(string s, int[] numbers) { } method Method (line 27) | public static void Method(string s, string s1, int[] numbers) { } class Base2 (line 30) | class Base2 method Method (line 32) | public virtual void Method(params List numbers) { } method Method (line 33) | public virtual void Method(string s, params List numbers) { } class Derived2 (line 36) | class Derived2 : Base2 method Method (line 38) | public override void Method(List numbers) { } method Method (line 39) | public override void Method(string s, List numbers) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodOverrideNoParams.cs class Base (line 6) | abstract class Base method Method (line 8) | public virtual void Method(params int[] numbers) method Method (line 11) | public virtual void Method(string s, method Method (line 15) | public abstract void Method(string s, string s1, class Derived (line 18) | abstract class Derived : Base method Method (line 20) | public override void Method(int[] numbers) // Noncompliant {{'params' ... method Method (line 24) | public override void Method(string s, method Method (line 28) | public override void Method(string s, string s1, class Derived2 (line 33) | abstract class Derived2 : Base method Method (line 35) | public override void Method(params int[] numbers) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodParameterMissingOptional.Fixed.cs class MethodParameterMissingOptional (line 10) | public class MethodParameterMissingOptional method MyMethod (line 12) | public void MyMethod([DefaultParameterValue(5), Optional] int j) //Fixed method MyMethod2 (line 16) | public void MyMethod2([DefaultParameterValue(5), Optional] int j) method MyMethod3 (line 20) | public void MyMethod3([DefaultParameterValue(5)][Optional] int j) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodParameterMissingOptional.Latest.cs type MethodParameterMissingOptional (line 3) | public record MethodParameterMissingOptional class Extensions (line 23) | public static class Extensions class Sample (line 25) | public class Sample { } method extension (line 26) | extension (Sample sample) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodParameterMissingOptional.cs class MethodParameterMissingOptional (line 10) | public class MethodParameterMissingOptional method MyMethod (line 12) | public void MyMethod([DefaultParameterValue(5)] int j) //Noncompliant method MyMethod2 (line 17) | public void MyMethod2([DefaultParameterValue(5), Optional] int j) method MyMethod3 (line 21) | public void MyMethod3([DefaultParameterValue(5)][Optional] int j) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodParameterUnused.Latest.cs class BasicTests (line 8) | public class BasicTests method Baz (line 10) | public void Baz() method Foo (line 15) | private void Foo((string key, string value)[] bars) method Foo2 (line 21) | private void Foo2((string key, string value)[] bars) type IWithDefaultImplementation (line 30) | public interface IWithDefaultImplementation method Reset (line 35) | void Reset(int a); method Total (line 38) | decimal Total() method Total (line 43) | decimal Total(decimal Discount) method Total (line 48) | decimal Total(string unused) // Compliant, because it's interface m... class StaticLocalFunctions (line 54) | public class StaticLocalFunctions method DoSomething (line 56) | public int DoSomething(int a) // Compliant method Foo (line 79) | private static bool Foo(IEnumerable a, int b) method Method (line 87) | public void Method() method AddValue (line 107) | private void AddValue(uint id1, uint id2, string value) method UsedInCatch (line 113) | public void UsedInCatch(int arg, int usedInLocalFunctionArg) class SwitchExpressions (line 141) | public class SwitchExpressions method DoSomething (line 143) | public int DoSomething(int a, bool b) class UsageInRange (line 153) | public class UsageInRange method DoSomething (line 155) | public void DoSomething(int a, int b) class Repro_3255 (line 165) | public class Repro_3255 method UsedInTuple (line 167) | private string UsedInTuple(string value) class Repro_4704 (line 175) | public static class Repro_4704 method ConfigureAndValidateSettings (line 177) | private static void ConfigureAndValidateSettings(this int someNumber, ... method NotInvoked (line 187) | private static void NotInvoked(string someString) // Noncompliant method UsedByReferenceWithStruct (line 198) | private static void UsedByReferenceWithStruct(this int someNumber, str... method UsedByReferenceAsArgument (line 210) | private static void UsedByReferenceAsArgument(int[] list, string arg) method InsideNameOf_Valid (line 221) | private static void InsideNameOf_Valid(string arg) // Noncompliant method InsideNameOf_Invalid (line 231) | private static void InsideNameOf_Invalid(string arg) // Noncompliant class RoslynIssue_56644 (line 243) | public class RoslynIssue_56644 method IsValidViewName (line 247) | private bool IsValidViewName(string viewName) // Compliant, this wo... class Repro5145 (line 254) | static class Repro5145 method Print (line 256) | public static void Print(string[] args) method GetSegmentSortKey (line 262) | private static int GetSegmentSortKey(IDictionary nodes) /... method Run (line 267) | private static int Run(Func tryGetValueOrNull) class DictionaryExtensions (line 273) | public static class DictionaryExtensions method TryGetValueOrNull (line 275) | public static TValue TryGetValueOrNull(this IDictionary<... class Base (line 281) | public class Base method Base (line 283) | public Base() { } method Base (line 285) | public Base(int x) { } method Base (line 287) | public Base(string x) { } class A (line 290) | public class A : Base method A (line 292) | public A(int x, int y) : base(x) { } method A (line 294) | private A(string x, string y) : base(x) { } method A (line 296) | public A(int i, int j, int z) method A (line 301) | private A(string i, string j, string z) // Noncompliant method A (line 306) | public A(int x, int y, string z) : this(x, y) { } method A (line 308) | private A(string x, string y, int z) : this(x, y) // Noncompliant type B (line 314) | public record class B type C (line 327) | public struct C method C (line 329) | public C(int i, int j) method C (line 334) | private C(string i, int j) // Noncompliant type D (line 340) | public record struct D class MethodParameterUnused (line 358) | public class MethodParameterUnused method Argument_Unused (line 360) | private void Argument_Unused(string argument) // Noncompliant method Argument_Reassigned (line 366) | private void Argument_Reassigned(string argument) // Noncompliant method Argument_UsedInAttributeByNameOf (line 372) | [Obsolete(nameof(argument))] method Argument_UsedInGenericAttributeByNameOf (line 378) | [Obsolete(nameof(TArgument))] class PartialMethod (line 389) | public partial class PartialMethod method ExtendedPartialMethod (line 391) | private partial string ExtendedPartialMethod(string one, string two); method ExtendedPartialMethod (line 396) | private partial string ExtendedPartialMethod(string one, string two) /... class PartialMethod (line 394) | public partial class PartialMethod method ExtendedPartialMethod (line 391) | private partial string ExtendedPartialMethod(string one, string two); method ExtendedPartialMethod (line 396) | private partial string ExtendedPartialMethod(string one, string two) /... class Class (line 406) | public class Class method TaskWhenEach (line 408) | private async void TaskWhenEach(List tasks) // Compliant method NewLinqMethods (line 416) | private void NewLinqMethods(List a, List b, List c) // ... method IteratorRef (line 423) | private IEnumerable IteratorRef(int[] a) // Compliant method AsyncRef (line 429) | private async Task AsyncRef(int[] a) // Compliant class Test (line 439) | internal static class Test method Test1 (line 441) | private static string Test1(string x) => string.Empty; method Test2 (line 443) | private static string Test2(string x) => string.Empty; method Main (line 445) | public static void Main() method CaptureInSwitchExression (line 458) | private static string CaptureInSwitchExression(string currentUnit) // ... method CaptureSimple (line 472) | private static string CaptureSimple(string text) // Compliant method Method (line 486) | void Method(string? a, string? b) // Noncompliant FP for string? b. Th... class Test (line 455) | internal static class Test method Test1 (line 441) | private static string Test1(string x) => string.Empty; method Test2 (line 443) | private static string Test2(string x) => string.Empty; method Main (line 445) | public static void Main() method CaptureInSwitchExression (line 458) | private static string CaptureInSwitchExression(string currentUnit) // ... method CaptureSimple (line 472) | private static string CaptureSimple(string text) // Compliant method Method (line 486) | void Method(string? a, string? b) // Noncompliant FP for string? b. Th... class Test (line 483) | class Test method Test1 (line 441) | private static string Test1(string x) => string.Empty; method Test2 (line 443) | private static string Test2(string x) => string.Empty; method Main (line 445) | public static void Main() method CaptureInSwitchExression (line 458) | private static string CaptureInSwitchExression(string currentUnit) // ... method CaptureSimple (line 472) | private static string CaptureSimple(string text) // Compliant method Method (line 486) | void Method(string? a, string? b) // Noncompliant FP for string? b. Th... class Extensions (line 504) | public static class Extensions method extension (line 506) | extension(string s) class AnyAttribute (line 514) | public class AnyAttribute : Attribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodParameterUnused.RoslynCfg.Fixed.cs type MyPrivateInterface (line 12) | internal interface MyPrivateInterface method MyPrivateMethod (line 14) | void MyPrivateMethod(int a); class BasicTests (line 17) | public class BasicTests : MyPrivateInterface method BasicTests (line 19) | private BasicTests(int a) : this(a, 42) // Compliant method BasicTests (line 22) | private BasicTests( method BasicTest1 (line 32) | private void BasicTest1(int a) { } method BasicTest2 (line 33) | void BasicTest2(int a) { } method BasicTest3 (line 34) | private void BasicTest3(int a) { } method Caller (line 35) | public void Caller() method MyPrivateMethod (line 40) | void MyPrivateInterface.MyPrivateMethod(int a) // Compliant method MyMethod (line 44) | public int MyMethod(int a) => a; method WriteLine (line 46) | private static void WriteLine(string format) { } method WriteLine (line 47) | private static void WriteLine(string format) { } method Foo (line 49) | void Foo(string a) // Compliant because only throws NotImplementedExce... method Foo (line 54) | public void Foo(int arg1) // Compliant method DoSomething (line 59) | void DoSomething(int a, int b) => throw new NotImplementedException(); method UsedInCatch (line 61) | private void UsedInCatch(int arg, int argLocalLifetime, int usedInLoca... class MainEntryPoints1 (line 113) | class MainEntryPoints1 method Main (line 115) | static void Main(string[] args) // Compliant because Main is ignored +... class MainEntryPoints2 (line 120) | class MainEntryPoints2 method Main (line 122) | static async Task Main(string[] args) // Compliant - new main syntax class MainEntryPoints3 (line 128) | class MainEntryPoints3 method Main (line 130) | static async Task Main(string[] args) // Compliant - new main syntax class MainEntryPoints4 (line 137) | class MainEntryPoints4 method Main (line 139) | static async Task Main() // Fixed class Program1 (line 146) | public class Program1 method Main (line 148) | static void Main(string[] args) // Compliant because Main is ignored +... class Program2 (line 154) | public class Program2 method Main (line 156) | static void Main(string[] args) // Compliant because Main is ignored class Reassigned (line 162) | public class Reassigned method DeadOnEntry (line 164) | private void DeadOnEntry(int arg) // Fixed method SelfAssigned (line 170) | private void SelfAssigned(int arg) method UpdatedFromSelf (line 176) | private void UpdatedFromSelf(int arg) method UpdatedFromSelf (line 182) | private void UpdatedFromSelf(string arg) class FooBar (line 189) | public class FooBar method FooBar (line 191) | public FooBar(string a) // Compliant class AnyAttribute (line 196) | public class AnyAttribute : Attribute { } class Extensions (line 198) | public static class Extensions method MyMethod (line 200) | private static void MyMethod(this string s, method MyMethod2 (line 206) | [Any] method Add (line 213) | private static int Add(this string s, int a, int b) //Unused extension... method AddedLength (line 218) | private static int AddedLength(this string s, int a) //Fixed class BaseAbstract (line 225) | abstract class BaseAbstract method M3 (line 227) | public abstract void M3(int a); class Base (line 229) | class Base method M3 (line 231) | public virtual void M3(int a) //okay type IMy (line 235) | interface IMy method M4 (line 237) | void M4(int a); class MethodParameterUnused (line 240) | class MethodParameterUnused : Base, IMy method M1 (line 242) | private void M1(int a) // Compliant method M1Bis (line 246) | void M1Bis( method M1okay (line 254) | private void M1okay(int a) method M2 (line 259) | public virtual void M2(int a) method M3 (line 263) | public override void M3(int a) //okay method M4 (line 267) | public void M4(int a) //okay method MyEventHandlerMethod (line 270) | private void MyEventHandlerMethod(object sender, EventArgs e) //okay, ... method MyEventHandlerMethod (line 272) | private void MyEventHandlerMethod(object sender, MyEventArgs e) //okay... class MyEventArgs (line 275) | class MyEventArgs : EventArgs { } class MethodAsEvent (line 278) | class MethodAsEvent method MethodAsEvent (line 284) | public MethodAsEvent() method MyMethodAdd (line 290) | private void MyMethodAdd(string arg1, int arg2) // Compliant method MyMethodSub (line 294) | private void MyMethodSub(string arg1, int arg2) // Compliant class MethodAssignedToActionFromInitializer (line 299) | class MethodAssignedToActionFromInitializer method MyMethod1 (line 301) | private static void MyMethod1(int arg) { } class MethodAssignedToActionFromInitializerQualified (line 306) | class MethodAssignedToActionFromInitializerQualified method MyMethod2 (line 308) | private static void MyMethod2(int arg) { } class MethodAssignedToFromVariable (line 313) | class MethodAssignedToFromVariable method MyMethod3 (line 315) | private static void MyMethod3(int arg) { } method Foo (line 317) | public void Foo() class MethodAssignedToFromVariableQualified (line 324) | class MethodAssignedToFromVariableQualified method MyMethod4 (line 326) | private static void MyMethod4(int arg) { } method Foo (line 328) | public void Foo() class MethodAssignedToActionFromPartialClass (line 335) | partial class MethodAssignedToActionFromPartialClass method MyMethod5 (line 337) | private static void MyMethod5(int arg) { } method MyNonCompliantMethod (line 339) | private static void MyNonCompliantMethod(int arg) { } class MethodAssignedToActionFromPartialClass (line 342) | partial class MethodAssignedToActionFromPartialClass method MyMethod5 (line 337) | private static void MyMethod5(int arg) { } method MyNonCompliantMethod (line 339) | private static void MyNonCompliantMethod(int arg) { } class PartialMethod_Issue_8988 (line 348) | public partial class PartialMethod_Issue_8988 method Partial (line 350) | partial void Partial(string one, string two); method Partial (line 355) | partial void Partial(string one, string two) // Compliant, we don't wa... class PartialMethod_Issue_8988 (line 353) | public partial class PartialMethod_Issue_8988 method Partial (line 350) | partial void Partial(string one, string two); method Partial (line 355) | partial void Partial(string one, string two) // Compliant, we don't wa... class Dead (line 361) | public class Dead method Method1 (line 363) | private int Method1(int p) => (new Func(() => { p = 10; return p;... method Method2 (line 365) | private void Method2(int p) method Method3_Public (line 377) | public void Method3_Public(int p) // Compliant method Method3 (line 387) | private void Method3(int p) // Fixed method Method4 (line 399) | private void Method4(int p) // Fixed method Method5_Out (line 413) | private void Method5_Out(out int p) method Method6_LocalFunctions (line 427) | private int Method6_LocalFunctions(int usedInLocalFunction) // Compl... class Intermediate (line 441) | public class Intermediate : ISerializable // Error [CS0535] class ProperImplementedSerializableClass (line 444) | [Serializable] method ProperImplementedSerializableClass (line 449) | private ProperImplementedSerializableClass(SerializationInfo info, Str... class NotProperImplementedSerializableClass (line 455) | [Serializable] method NotProperImplementedSerializableClass (line 460) | private NotProperImplementedSerializableClass(StreamingContext context... class NotProperImplementedSerializableClass2 (line 466) | [Serializable] method NotProperImplementedSerializableClass2 (line 471) | private NotProperImplementedSerializableClass2(SerializationInfo info)... class EffectiveAccessibility (line 477) | public class EffectiveAccessibility class Inner (line 479) | private class Inner method Method (line 481) | public void Method(int a class SwitchInTry (line 489) | public class SwitchInTry method Method (line 491) | private int Method(int i) // Compliant class NullConditionalOperatorInTry (line 512) | class NullConditionalOperatorInTry method Method (line 514) | private void Method(string s) // Compliant class ReproGithubIssue2010 (line 526) | public class ReproGithubIssue2010 method PatternMatch (line 528) | static int PatternMatch(StringSplitOptions splitOptions, int i) class Repro_3132 (line 542) | public class Repro_3132 method TupleArgument (line 544) | object TupleArgument((string adress, bool state)? e) method PublicTupleArgument (line 549) | public object PublicTupleArgument((string adress, bool state)? e) // C... class Repro_3134 (line 556) | public class Repro_3134 method LocalFunctionReturned (line 558) | private static Predicate LocalFunctionReturned(DateTime date... method LocalFunctionReferencedArrow (line 564) | private void LocalFunctionReferencedArrow(bool condition) method LocalFunctionReferencedBody (line 571) | private void LocalFunctionReferencedBody(bool condition) method LocalFunctionCrossReferenced (line 581) | private void LocalFunctionCrossReferenced(bool condition) method LocalFunctionRecursive (line 590) | private void LocalFunctionRecursive(int arg) method LocalFunctionUnused (line 601) | private void LocalFunctionUnused(bool condition) // Fixed method LocalFunctionUnusedWithNameOf (line 606) | private void LocalFunctionUnusedWithNameOf(bool condition) // Fixed class Repro_4096 (line 615) | public class Repro_4096 method TryCatchWithUsing (line 617) | private int TryCatchWithUsing(int errorCode) class Repro_4199 (line 636) | public class Repro_4199 method DoSomethingAsync (line 638) | private Task DoSomethingAsync(string text) class Repro_5338 (line 651) | public class Repro_5338 method HasAny (line 657) | private bool HasAny(string[] smallerOrEqualArray) // Compliant method GetDegreeOfOverlap (line 662) | private static double GetDegreeOfOverlap(string[] largerArray, string[... class RoslynIssue_56644 (line 669) | public class RoslynIssue_56644 method IsValidViewName (line 673) | private bool IsValidViewName(string viewName) // Compliant, this was... class Repro_8371 (line 680) | public class Repro_8371 method Repro_8371 (line 682) | static Repro_8371() class AssemblyResolver (line 687) | private static class AssemblyResolver method LoadAnyVersion (line 689) | public static Assembly LoadAnyVersion(object sender, ResolveEventArg... class Repro_1090 (line 698) | public static class Repro_1090 method InstanceMethod (line 700) | private static bool InstanceMethod(IDictionary dict) method ExtensionMethod (line 705) | private static bool ExtensionMethod(IDictionary dict) method ExtensionMethodWithMemberAccess (line 710) | private static bool ExtensionMethodWithMemberAccess(IDictionary ints, int value)... method ContainsExt (line 716) | private static bool ContainsExt(this IDictionary dict, int ... class Repro_1168 (line 720) | public class Repro_1168 method Repro (line 722) | private void Repro(string s1, string s2, int val) // Compliant method Nested (line 734) | private void Nested(string s) // Compliant method NotInvoked (line 749) | private void NotInvoked(string s) // Fixed method WithMethodReference (line 757) | private void WithMethodReference(string s) // Compliant - s is used i... method WithAnonymousFunction (line 768) | private void WithAnonymousFunction(string s) // Compliant - s is used... method WithRecursiveLocalFunction (line 774) | private void WithRecursiveLocalFunction(string s) // Compliant method WithLambdaCallingLocalFunction (line 785) | private void WithLambdaCallingLocalFunction(string s) // Compliant - ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodParameterUnused.RoslynCfg.cs type MyPrivateInterface (line 12) | internal interface MyPrivateInterface method MyPrivateMethod (line 14) | void MyPrivateMethod(int a); class BasicTests (line 17) | public class BasicTests : MyPrivateInterface method BasicTests (line 19) | private BasicTests(int a) : this(a, 42) // Compliant method BasicTests (line 22) | private BasicTests( method BasicTest1 (line 33) | private void BasicTest1(int a) { } method BasicTest2 (line 34) | void BasicTest2(int a) { } method BasicTest3 (line 35) | private void BasicTest3(int a) { } method Caller (line 36) | public void Caller() method MyPrivateMethod (line 41) | void MyPrivateInterface.MyPrivateMethod(int a) // Compliant method MyMethod (line 45) | public int MyMethod(int a) => a; method WriteLine (line 47) | private static void WriteLine(string format) { } method WriteLine (line 48) | private static void WriteLine(string format) { } method Foo (line 50) | void Foo(string a) // Compliant because only throws NotImplementedExce... method Foo (line 55) | public void Foo(int arg1) // Compliant method DoSomething (line 60) | void DoSomething(int a, int b) => throw new NotImplementedException(); method UsedInCatch (line 62) | private void UsedInCatch(int arg, int argLocalLifetime, int usedInLoca... class MainEntryPoints1 (line 114) | class MainEntryPoints1 method Main (line 116) | static void Main(string[] args) // Compliant because Main is ignored +... class MainEntryPoints2 (line 121) | class MainEntryPoints2 method Main (line 123) | static async Task Main(string[] args) // Compliant - new main syntax class MainEntryPoints3 (line 129) | class MainEntryPoints3 method Main (line 131) | static async Task Main(string[] args) // Compliant - new main syntax class MainEntryPoints4 (line 138) | class MainEntryPoints4 method Main (line 140) | static async Task Main(string[] args) // Noncompliant class Program1 (line 147) | public class Program1 method Main (line 149) | static void Main(string[] args) // Compliant because Main is ignored +... class Program2 (line 155) | public class Program2 method Main (line 157) | static void Main(string[] args) // Compliant because Main is ignored class Reassigned (line 163) | public class Reassigned method DeadOnEntry (line 165) | private void DeadOnEntry(int arg) // Noncompliant method SelfAssigned (line 171) | private void SelfAssigned(int arg) method UpdatedFromSelf (line 177) | private void UpdatedFromSelf(int arg) method UpdatedFromSelf (line 183) | private void UpdatedFromSelf(string arg) class FooBar (line 190) | public class FooBar method FooBar (line 192) | public FooBar(string a) // Compliant class AnyAttribute (line 197) | public class AnyAttribute : Attribute { } class Extensions (line 199) | public static class Extensions method MyMethod (line 201) | private static void MyMethod(this string s, method MyMethod2 (line 207) | [Any] method Add (line 214) | private static int Add(this string s, int a, int b) //Unused extension... method AddedLength (line 219) | private static int AddedLength(this string s, int a, int b) //Noncompl... class BaseAbstract (line 226) | abstract class BaseAbstract method M3 (line 228) | public abstract void M3(int a); class Base (line 230) | class Base method M3 (line 232) | public virtual void M3(int a) //okay type IMy (line 236) | interface IMy method M4 (line 238) | void M4(int a); class MethodParameterUnused (line 241) | class MethodParameterUnused : Base, IMy method M1 (line 243) | private void M1(int a) // Compliant method M1Bis (line 247) | void M1Bis( method M1okay (line 256) | private void M1okay(int a) method M2 (line 261) | public virtual void M2(int a) method M3 (line 265) | public override void M3(int a) //okay method M4 (line 269) | public void M4(int a) //okay method MyEventHandlerMethod (line 272) | private void MyEventHandlerMethod(object sender, EventArgs e) //okay, ... method MyEventHandlerMethod (line 274) | private void MyEventHandlerMethod(object sender, MyEventArgs e) //okay... class MyEventArgs (line 277) | class MyEventArgs : EventArgs { } class MethodAsEvent (line 280) | class MethodAsEvent method MethodAsEvent (line 286) | public MethodAsEvent() method MyMethodAdd (line 292) | private void MyMethodAdd(string arg1, int arg2) // Compliant method MyMethodSub (line 296) | private void MyMethodSub(string arg1, int arg2) // Compliant class MethodAssignedToActionFromInitializer (line 301) | class MethodAssignedToActionFromInitializer method MyMethod1 (line 303) | private static void MyMethod1(int arg) { } class MethodAssignedToActionFromInitializerQualified (line 308) | class MethodAssignedToActionFromInitializerQualified method MyMethod2 (line 310) | private static void MyMethod2(int arg) { } class MethodAssignedToFromVariable (line 315) | class MethodAssignedToFromVariable method MyMethod3 (line 317) | private static void MyMethod3(int arg) { } method Foo (line 319) | public void Foo() class MethodAssignedToFromVariableQualified (line 326) | class MethodAssignedToFromVariableQualified method MyMethod4 (line 328) | private static void MyMethod4(int arg) { } method Foo (line 330) | public void Foo() class MethodAssignedToActionFromPartialClass (line 337) | partial class MethodAssignedToActionFromPartialClass method MyMethod5 (line 339) | private static void MyMethod5(int arg) { } method MyNonCompliantMethod (line 341) | private static void MyNonCompliantMethod(int arg) { } class MethodAssignedToActionFromPartialClass (line 344) | partial class MethodAssignedToActionFromPartialClass method MyMethod5 (line 339) | private static void MyMethod5(int arg) { } method MyNonCompliantMethod (line 341) | private static void MyNonCompliantMethod(int arg) { } class PartialMethod_Issue_8988 (line 350) | public partial class PartialMethod_Issue_8988 method Partial (line 352) | partial void Partial(string one, string two); method Partial (line 357) | partial void Partial(string one, string two) // Compliant, we don't wa... class PartialMethod_Issue_8988 (line 355) | public partial class PartialMethod_Issue_8988 method Partial (line 352) | partial void Partial(string one, string two); method Partial (line 357) | partial void Partial(string one, string two) // Compliant, we don't wa... class Dead (line 363) | public class Dead method Method1 (line 365) | private int Method1(int p) => (new Func(() => { p = 10; return p;... method Method2 (line 367) | private void Method2(int p) method Method3_Public (line 379) | public void Method3_Public(int p) // Compliant method Method3 (line 389) | private void Method3(int p) // Noncompliant {{Remove this parameter 'p... method Method4 (line 401) | private void Method4(int p) // Noncompliant, although it is used above... method Method5_Out (line 415) | private void Method5_Out(out int p) method Method6_LocalFunctions (line 429) | private int Method6_LocalFunctions(int usedInLocalFunction) // Compl... class Intermediate (line 443) | public class Intermediate : ISerializable // Error [CS0535] class ProperImplementedSerializableClass (line 446) | [Serializable] method ProperImplementedSerializableClass (line 451) | private ProperImplementedSerializableClass(SerializationInfo info, Str... class NotProperImplementedSerializableClass (line 457) | [Serializable] method NotProperImplementedSerializableClass (line 462) | private NotProperImplementedSerializableClass(SerializationInfo info, ... class NotProperImplementedSerializableClass2 (line 468) | [Serializable] method NotProperImplementedSerializableClass2 (line 473) | private NotProperImplementedSerializableClass2(SerializationInfo info,... class EffectiveAccessibility (line 479) | public class EffectiveAccessibility class Inner (line 481) | private class Inner method Method (line 483) | public void Method(int a, class SwitchInTry (line 491) | public class SwitchInTry method Method (line 493) | private int Method(int i) // Compliant class NullConditionalOperatorInTry (line 514) | class NullConditionalOperatorInTry method Method (line 516) | private void Method(string s) // Compliant class ReproGithubIssue2010 (line 528) | public class ReproGithubIssue2010 method PatternMatch (line 530) | static int PatternMatch(StringSplitOptions splitOptions, int i) class Repro_3132 (line 544) | public class Repro_3132 method TupleArgument (line 546) | object TupleArgument((string adress, bool state)? e) method PublicTupleArgument (line 551) | public object PublicTupleArgument((string adress, bool state)? e) // C... class Repro_3134 (line 558) | public class Repro_3134 method LocalFunctionReturned (line 560) | private static Predicate LocalFunctionReturned(DateTime date... method LocalFunctionReferencedArrow (line 566) | private void LocalFunctionReferencedArrow(bool condition) method LocalFunctionReferencedBody (line 573) | private void LocalFunctionReferencedBody(bool condition) method LocalFunctionCrossReferenced (line 583) | private void LocalFunctionCrossReferenced(bool condition) method LocalFunctionRecursive (line 592) | private void LocalFunctionRecursive(int arg) method LocalFunctionUnused (line 603) | private void LocalFunctionUnused(bool condition) // Noncompliant method LocalFunctionUnusedWithNameOf (line 608) | private void LocalFunctionUnusedWithNameOf(bool condition) // Nonco... class Repro_4096 (line 617) | public class Repro_4096 method TryCatchWithUsing (line 619) | private int TryCatchWithUsing(int errorCode) class Repro_4199 (line 638) | public class Repro_4199 method DoSomethingAsync (line 640) | private Task DoSomethingAsync(string text) class Repro_5338 (line 653) | public class Repro_5338 method HasAny (line 659) | private bool HasAny(string[] smallerOrEqualArray) // Compliant method GetDegreeOfOverlap (line 664) | private static double GetDegreeOfOverlap(string[] largerArray, string[... class RoslynIssue_56644 (line 671) | public class RoslynIssue_56644 method IsValidViewName (line 675) | private bool IsValidViewName(string viewName) // Compliant, this was... class Repro_8371 (line 682) | public class Repro_8371 method Repro_8371 (line 684) | static Repro_8371() class AssemblyResolver (line 689) | private static class AssemblyResolver method LoadAnyVersion (line 691) | public static Assembly LoadAnyVersion(object sender, ResolveEventArg... class Repro_1090 (line 700) | public static class Repro_1090 method InstanceMethod (line 702) | private static bool InstanceMethod(IDictionary dict) method ExtensionMethod (line 707) | private static bool ExtensionMethod(IDictionary dict) method ExtensionMethodWithMemberAccess (line 712) | private static bool ExtensionMethodWithMemberAccess(IDictionary ints, int value)... method ContainsExt (line 718) | private static bool ContainsExt(this IDictionary dict, int ... class Repro_1168 (line 722) | public class Repro_1168 method Repro (line 724) | private void Repro(string s1, string s2, int val) // Compliant method Nested (line 736) | private void Nested(string s) // Compliant method NotInvoked (line 751) | private void NotInvoked(string s) // Noncompliant - local function ca... method WithMethodReference (line 760) | private void WithMethodReference(string s) // Compliant - s is used i... method WithAnonymousFunction (line 771) | private void WithAnonymousFunction(string s) // Compliant - s is used... method WithRecursiveLocalFunction (line 777) | private void WithRecursiveLocalFunction(string s) // Compliant method WithLambdaCallingLocalFunction (line 788) | private void WithLambdaCallingLocalFunction(string s) // Compliant - ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodParameterUnused.SonarCfg.cs type MyPrivateInterface (line 11) | internal interface MyPrivateInterface method MyPrivateMethod (line 13) | void MyPrivateMethod(int a); class BasicTests (line 16) | public class BasicTests : MyPrivateInterface method BasicTests (line 18) | private BasicTests(int a) : this(a, 42) // Compliant method BasicTests (line 21) | private BasicTests( method BasicTest1 (line 32) | private void BasicTest1(int a) { } method BasicTest2 (line 33) | void BasicTest2(int a) { } method BasicTest3 (line 34) | private void BasicTest3(int a) { } method Caller (line 35) | public void Caller() method MyPrivateMethod (line 40) | void MyPrivateInterface.MyPrivateMethod(int a) // Compliant method MyMethod (line 44) | public int MyMethod(int a) => a; method WriteLine (line 46) | private static void WriteLine(string format) { } method WriteLine (line 47) | private static void WriteLine(string format) { } method Foo (line 49) | void Foo(string a) // Compliant because only throws NotImplementedExce... method Foo (line 54) | public void Foo(int arg1) // Compliant method DoSomething (line 59) | void DoSomething(int a, int b) => throw new NotImplementedException(); class MainEntryPoints1 (line 62) | class MainEntryPoints1 method Main (line 64) | static void Main(string[] args) // Compliant because Main is ignored +... class MainEntryPoints2 (line 69) | class MainEntryPoints2 method Main (line 71) | static async Task Main(string[] args) // Compliant - new main syntax class MainEntryPoints3 (line 77) | class MainEntryPoints3 method Main (line 79) | static async Task Main(string[] args) // Compliant - new main syntax class MainEntryPoints4 (line 86) | class MainEntryPoints4 method Main (line 88) | static async Task Main(string[] args) // Noncompliant class Program1 (line 95) | public class Program1 method Main (line 97) | static void Main(string[] args) // Compliant because Main is ignored +... class Program2 (line 103) | public class Program2 method Main (line 105) | static void Main(string[] args) // Compliant because Main is ignored class Reassigned (line 111) | public class Reassigned method DeadOnEntry (line 113) | private void DeadOnEntry(int arg) // Noncompliant method SelfAssigned (line 119) | private void SelfAssigned(int arg) method UpdatedFromSelf (line 125) | private void UpdatedFromSelf(int arg) method UpdatedFromSelf (line 131) | private void UpdatedFromSelf(string arg) class FooBar (line 138) | public class FooBar method FooBar (line 140) | public FooBar(string a) // Compliant class AnyAttribute (line 145) | public class AnyAttribute : Attribute { } class Extensions (line 147) | public static class Extensions method MyMethod (line 149) | private static void MyMethod(this string s, method MyMethod2 (line 155) | [Any] method Add (line 162) | private static int Add(this string s, int a, int b) //Unused extension... method AddedLength (line 167) | private static int AddedLength(this string s, int a, int b) //Noncompl... class BaseAbstract (line 174) | abstract class BaseAbstract method M3 (line 176) | public abstract void M3(int a); class Base (line 178) | class Base method M3 (line 180) | public virtual void M3(int a) //okay type IMy (line 184) | interface IMy method M4 (line 186) | void M4(int a); class MethodParameterUnused (line 189) | class MethodParameterUnused : Base, IMy method M1 (line 191) | private void M1(int a) // Compliant method M1Bis (line 195) | void M1Bis( method M1okay (line 204) | private void M1okay(int a) method M2 (line 209) | public virtual void M2(int a) method M3 (line 213) | public override void M3(int a) //okay method M4 (line 217) | public void M4(int a) //okay method MyEventHandlerMethod (line 220) | private void MyEventHandlerMethod(object sender, EventArgs e) //okay, ... method MyEventHandlerMethod (line 222) | private void MyEventHandlerMethod(object sender, MyEventArgs e) //okay... class MyEventArgs (line 225) | class MyEventArgs : EventArgs { } class MethodAsEvent (line 228) | class MethodAsEvent method MethodAsEvent (line 234) | public MethodAsEvent() method MyMethodAdd (line 240) | private void MyMethodAdd(string arg1, int arg2) // Compliant method MyMethodSub (line 244) | private void MyMethodSub(string arg1, int arg2) // Compliant class MethodAssignedToActionFromInitializer (line 249) | class MethodAssignedToActionFromInitializer method MyMethod1 (line 251) | private static void MyMethod1(int arg) { } class MethodAssignedToActionFromInitializerQualified (line 256) | class MethodAssignedToActionFromInitializerQualified method MyMethod2 (line 258) | private static void MyMethod2(int arg) { } class MethodAssignedToFromVariable (line 263) | class MethodAssignedToFromVariable method MyMethod3 (line 265) | private static void MyMethod3(int arg) { } method Foo (line 267) | public void Foo() class MethodAssignedToFromVariableQualified (line 274) | class MethodAssignedToFromVariableQualified method MyMethod4 (line 276) | private static void MyMethod4(int arg) { } method Foo (line 278) | public void Foo() class MethodAssignedToActionFromPartialClass (line 285) | partial class MethodAssignedToActionFromPartialClass method MyMethod5 (line 287) | private static void MyMethod5(int arg) { } method MyNonCompliantMethod (line 289) | private static void MyNonCompliantMethod(int arg) { } class MethodAssignedToActionFromPartialClass (line 292) | partial class MethodAssignedToActionFromPartialClass method MyMethod5 (line 287) | private static void MyMethod5(int arg) { } method MyNonCompliantMethod (line 289) | private static void MyNonCompliantMethod(int arg) { } class Dead (line 297) | public class Dead method Method1 (line 299) | private int Method1(int p) => (new Func(() => { p = 10; return p;... method Method2 (line 301) | private void Method2(int p) method Method3_Public (line 313) | public void Method3_Public(int p) // Compliant method Method3 (line 323) | private void Method3(int p) // Noncompliant {{Remove this parameter 'p... method Method4 (line 335) | private void Method4(int p) // Noncompliant, although it is used above... method Method5_Out (line 349) | private void Method5_Out(out int p) method Method6_LocalFunctions (line 363) | private int Method6_LocalFunctions(int usedInLocalFunction) // Compl... class Intermediate (line 377) | public class Intermediate : ISerializable // Error [CS0535] class ProperImplementedSerializableClass (line 380) | [Serializable] method ProperImplementedSerializableClass (line 385) | private ProperImplementedSerializableClass(SerializationInfo info, Str... class NotProperImplementedSerializableClass (line 391) | [Serializable] method NotProperImplementedSerializableClass (line 396) | private NotProperImplementedSerializableClass(SerializationInfo info, ... class NotProperImplementedSerializableClass2 (line 402) | [Serializable] method NotProperImplementedSerializableClass2 (line 407) | private NotProperImplementedSerializableClass2(SerializationInfo info,... class EffectiveAccessibility (line 413) | public class EffectiveAccessibility class Inner (line 415) | private class Inner method Method (line 417) | public void Method(int a, class ReproGithubIssue2010 (line 425) | public class ReproGithubIssue2010 method PatternMatch (line 427) | static int PatternMatch(StringSplitOptions splitOptions, int i) class Repro_3132 (line 441) | public class Repro_3132 method TupleArgument (line 443) | object TupleArgument((string adress, bool state)? e) method PublicTupleArgument (line 448) | public object PublicTupleArgument((string adress, bool state)? e) // C... class Repro_3134 (line 455) | public class Repro_3134 method LocalFunctionReturned (line 457) | private static Predicate LocalFunctionReturned(DateTime date... method LocalFunctionReferencedArrow (line 463) | private void LocalFunctionReferencedArrow(bool condition) method LocalFunctionReferencedBody (line 470) | private void LocalFunctionReferencedBody(bool condition) method LocalFunctionCrossReferenced (line 480) | private void LocalFunctionCrossReferenced(bool condition) method LocalFunctionRecursive (line 489) | private void LocalFunctionRecursive(int arg) method LocalFunctionUnused (line 500) | private void LocalFunctionUnused(bool condition) // Noncompliant method LocalFunctionUnusedWithNameOf (line 505) | private void LocalFunctionUnusedWithNameOf(bool condition) // Nonco... class Repro_4096 (line 514) | public class Repro_4096 method TryCatchWithUsing (line 516) | private int TryCatchWithUsing(int errorCode) // Noncompliant FP class Repro_4199 (line 534) | public class Repro_4199 method DoSomethingAsync (line 536) | private Task DoSomethingAsync(string text) // Noncompliant FP, see htt... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodShouldBeNamedAccordingToSynchronicity.CSharp11.cs type IFoo (line 7) | public interface IFoo method Do (line 9) | static abstract Task Do(); class BaseClass (line 12) | public class BaseClass : IFoo method MyMethod (line 14) | public virtual Task MyMethod() // Noncompliant method Do (line 19) | public static Task Do() // Compliant - comes from interface so not pos... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodShouldBeNamedAccordingToSynchronicity.CSharp8.cs class IEnumerableReproducer (line 8) | public abstract class IEnumerableReproducer method GetFilesAsync (line 10) | protected abstract IAsyncEnumerable GetFilesAsync(string folderNa... method GetFiles (line 12) | protected abstract IAsyncEnumerable GetFiles(string folderName); method GetFilesCustomAsyncEnumerableAsync (line 14) | protected abstract CustomAsyncEnumerable GetFilesCustomAsyncEnume... method GetFilesCustomAsyncEnumerable (line 16) | protected abstract CustomAsyncEnumerable GetFilesCustomAsyncEnume... method GetFilesCustomTaskAsync (line 18) | protected abstract CustomTask GetFilesCustomTaskAsync(string fold... method GetFilesCustomTask (line 20) | protected abstract CustomTask GetFilesCustomTask(string folderName); method NoReturnType (line 22) | protected abstract void NoReturnType(string folderName); class CustomAsyncEnumerable (line 25) | public class CustomAsyncEnumerable : IAsyncEnumerable method GetAsyncEnumerator (line 27) | public IAsyncEnumerator GetAsyncEnumerator(CancellationToken cancel... class CustomTask (line 31) | public class CustomTask : Task method CustomTask (line 33) | public CustomTask(Func function) : base(function) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodShouldBeNamedAccordingToSynchronicity.MVC.Core.cs class MyController (line 9) | public class MyController : Controller method Users (line 11) | public async Task Users() { return null; } method Orders (line 13) | public async Task Orders() { return null; } method GetNumber (line 15) | public async Task GetNumber() { return 5; } class OtherController (line 18) | public class OtherController : MyController method Emails (line 20) | public async Task Emails() { return null; } method Purchases (line 22) | public async Task Purchases() { return null; } method GetAnotherNumber (line 24) | public async Task GetAnotherNumber() { return 5; } class CustomController (line 27) | [Microsoft.AspNetCore.Mvc.Controller] method Users (line 30) | public async Task Users() { return null; } method Orders (line 32) | public async Task Orders() { return null; } method GetNumber (line 34) | public async Task GetNumber() { return 5; } class CustomNonController (line 37) | [Microsoft.AspNetCore.Mvc.NonController] method Emails (line 40) | public async Task Emails() { return null; } method Purchases (line 42) | public async Task Purchases() { return null; } method GetAnotherNumber (line 44) | public async Task GetAnotherNumber() { return 5; } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodShouldBeNamedAccordingToSynchronicity.MVC.cs class MyController (line 10) | public class MyController : Controller method Users (line 12) | public async Task Users() { return null; } method Orders (line 14) | public async Task Orders() { return null; } method GetNumber (line 16) | public async Task GetNumber() { return 5; } class OtherController (line 19) | public class OtherController : MyController method Emails (line 21) | public async Task Emails() { return null; } method Purchases (line 23) | public async Task Purchases() { return null; } method GetAnotherNumber (line 25) | public async Task GetAnotherNumber() { return 5; } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodShouldBeNamedAccordingToSynchronicity.MsTest.cs class TestAttributes (line 6) | public class TestAttributes method MSTest_TestMethod (line 8) | [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod] method MSTest_DataTestMethod (line 11) | [Microsoft.VisualStudio.TestTools.UnitTesting.DataTestMethod] method MSTest_DerivedTestMethod (line 14) | [DerivedTestMethodAttribute] class DerivedTestMethodAttribute (line 18) | public class DerivedTestMethodAttribute : Microsoft.VisualStudio.TestToo... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodShouldBeNamedAccordingToSynchronicity.NUnit.cs class TestAttributes (line 6) | public class TestAttributes method NUnit_Test (line 8) | [NUnit.Framework.Test] method NUnit_TestCase (line 11) | [NUnit.Framework.TestCase(1)] method NUnit_TestCaseSource (line 14) | [NUnit.Framework.TestCaseSource("foo")] method NUnit_Theory (line 17) | [NUnit.Framework.Theory] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodShouldBeNamedAccordingToSynchronicity.Xunit.cs class TestAttributes (line 6) | public class TestAttributes method Xunit_Fact (line 8) | [Xunit.Fact] method Xunit_Theory (line 11) | [Xunit.Theory] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodShouldBeNamedAccordingToSynchronicity.cs class NonCompliantCases (line 7) | public class NonCompliantCases method FooValueTaskT (line 9) | public ValueTask FooValueTaskT() // Noncompliant method FooTask (line 14) | public Task FooTask() // Noncompliant {{Add the 'Async' suffix to the ... method FooTaskInt (line 20) | public Task FooTaskInt() // Noncompliant method FooTaskT (line 25) | public Task FooTaskT() // Noncompliant method BarVoidAsync (line 31) | public void BarVoidAsync() // Noncompliant {{Remove the 'Async' suffix... method BarIntAsync (line 36) | public int BarIntAsync() // Noncompliant method BarObjectAsync (line 41) | public object BarObjectAsync() // Noncompliant method MyMethodAsync (line 46) | public Task MyMethodAsync() type IFoo (line 64) | public interface IFoo method Do (line 66) | Task Do(); class BaseClass (line 69) | public class BaseClass : IFoo method MyMethod (line 71) | public virtual Task MyMethod()// Noncompliant method Do (line 76) | public Task Do() // Compliant - comes from interface so not possible t... class CompliantCases (line 82) | public class CompliantCases : BaseClass method FooTaskAsync (line 84) | public Task FooTaskAsync() method FooTaskIntAsync (line 89) | public Task FooTaskIntAsync() method FooTaskTAsync (line 94) | public Task FooTaskTAsync() method BarVoid (line 99) | public void BarVoid() method BarInt (line 103) | public int BarInt() method BarObject (line 108) | public object BarObject() method MyMethod (line 113) | public override Task MyMethod() class Program1 (line 119) | public class Program1 method Main (line 121) | public static async Task Main() { } class Program2 (line 124) | public class Program2 method Main (line 126) | public static async Task Main() { return 0; } class Program3 (line 129) | public class Program3 method Main (line 131) | public static async Task Main(string[] args) { } class Program4 (line 134) | public class Program4 method Main (line 136) | public static async Task Main(string[] args) { return 0; } class TestAttributes (line 139) | public class TestAttributes method OtherAttributes (line 141) | [System.ComponentModel.Browsable(true)] class MyHub (line 145) | public class MyHub : Hub method MyHub (line 147) | public MyHub() method MyMethod (line 151) | public Task MyMethod() // Compliant - Public methods from type... method PrivateMethod (line 156) | private Task PrivateMethod() // Noncompliant type IChatClient (line 162) | public interface IChatClient method ReceiveMessage (line 164) | Task ReceiveMessage(string user, string message); method ReceiveMessage (line 166) | Task ReceiveMessage(string message); class StronglyTypedChatHub (line 169) | public class StronglyTypedChatHub : Hub method SendMessage (line 171) | public async Task SendMessage(string user, string message) method SendMessageToCaller (line 176) | public Task SendMessageToCaller(string message) method ThrowException (line 181) | public Task ThrowException() class PointerReturnType (line 187) | public unsafe class PointerReturnType method MethodWithPointerReturnTypeAsync (line 189) | public int* MethodWithPointerReturnTypeAsync(int* input) // Noncompliant class AsyncCouldStay (line 196) | public class AsyncCouldStay method GenericTaskTAsync (line 198) | public T GenericTaskTAsync(T input) where T : Task method GenericTaskT2Async (line 203) | public T GenericTaskT2Async(V input) where V : Task // Noncompliant class GenericWithoutConstraint (line 209) | public class GenericWithoutConstraint method GenericTaskTAsync (line 211) | public T GenericTaskTAsync(T input) // Noncompliant class GenericWithDifferentConstraint (line 217) | public class GenericWithDifferentConstraint method GenericTaskTAsync (line 219) | public T GenericTaskTAsync(T input) where T : new() // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodShouldNotOnlyReturnConstant.Latest.cs type ISomeInterface (line 5) | interface ISomeInterface { method IsCondition (line 6) | public bool IsCondition() => true; type IFoo (line 8) | public interface IFoo method GetValue (line 10) | static abstract int GetValue(); method GetAnotherValue (line 12) | static virtual int GetAnotherValue() { return 42; } class Foo (line 15) | public class Foo : IFoo method GetValue (line 17) | public static int GetValue() // Compliant - implements interface so ca... method Get (line 22) | public string Get() => "hello"; method Get_Raw (line 24) | public string Get_Raw() => """ method Get_Utf_8 (line 30) | public ReadOnlySpan Get_Utf_8() => "hello"u8; class Extensions (line 34) | public static class Extensions method extension (line 36) | extension (string s) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodShouldNotOnlyReturnConstant.cs class Program (line 1) | public class Program method GetInt (line 3) | public int GetInt() // Noncompliant {{Remove this method and declare a... method GetMultiplication (line 9) | public int GetMultiplication() method GetAge (line 14) | public int GetAge(string name) // Compliant - method takes parameters method GetDouble (line 19) | private double GetDouble() // Noncompliant method GetArrow (line 24) | private int GetArrow() => 42; method GetString (line 26) | public string GetString() // Noncompliant method GetIsEnabled (line 31) | public bool GetIsEnabled() // Noncompliant method GetNull (line 36) | public string GetNull() method GetChar (line 41) | public char GetChar() // Noncompliant method GetWithNoModifier (line 46) | string GetWithNoModifier() // Noncompliant method GetWithInner (line 51) | public int GetWithInner() method ReturnsConstant (line 63) | public int ReturnsConstant() type IFoo (line 69) | public interface IFoo method GetValue (line 71) | int GetValue(); class Foo (line 74) | public class Foo : IFoo method GetValue (line 76) | public int GetValue() // Compliant - implements interface so cannot ge... class Base (line 82) | public abstract class Base method GetName (line 84) | protected virtual string GetName() // Compliant - can be overriden method GetPrecision (line 89) | public abstract float GetPrecision(); class NotBase (line 92) | public class NotBase : Base method GetName (line 94) | protected override string GetName() // Compliant - override method GetPrecision (line 99) | public override float GetPrecision() // Compliant - override class Extensions (line 105) | public static class Extensions method ClassicCompliant (line 107) | public static string ClassicCompliant(this string s) => s + "!"; method ClassicNonCompliant (line 108) | public static string ClassicNonCompliant(this string s) => "!"; class Repro_3640 (line 112) | public class Repro_3640 method InConditionalCompilation (line 114) | public int InConditionalCompilation() method OutsideConditionalCompilation (line 123) | public int OutsideConditionalCompilation() method Arrow (line 131) | public int Arrow() => method TruePositive (line 138) | public int TruePositive() => // Noncompliant method ThisIsUnrelatedLeadingTrivia_BeforeArrow (line 142) | public void ThisIsUnrelatedLeadingTrivia_BeforeArrow() { } method ConditionalLeadingTrivia_Arrow (line 145) | public int ConditionalLeadingTrivia_Arrow() => // Noncompliant method ThisIsUnrelatedLeadingTrivia_BeforeBody (line 149) | public void ThisIsUnrelatedLeadingTrivia_BeforeBody() { } method ConditionalLeadingTrivia_Body (line 152) | public int ConditionalLeadingTrivia_Body() // Noncompliant method ThisIsUnrelatedTrailingTrivia_AfterBody (line 158) | public void ThisIsUnrelatedTrailingTrivia_AfterBody() { } class InvalidCode (line 163) | public class InvalidCode method MethodWithoutBody (line 165) | public int MethodWithoutBody(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodsShouldNotHaveIdenticalImplementations.Latest.cs class StaticLocalFunctions (line 5) | public class StaticLocalFunctions method Method (line 8) | public void Method() method MethodWhichCopiesLocalFunction (line 25) | public string MethodWhichCopiesLocalFunction(int x) // Noncompliant class Repro_348 (line 33) | class Repro_348 method Method1 (line 35) | T Method1() // Secondary method Method2 (line 41) | T Method2() // Noncompliant type Sample (line 48) | public record struct Sample type SamplePositional (line 84) | public record struct SamplePositional(string Value) type SomeInterface (line 99) | interface SomeInterface method Foo1 (line 101) | void Foo1() // Secondary method Foo2 (line 107) | void Foo2() // Noncompliant class TypeConstraints (line 114) | public static class TypeConstraints method Use (line 116) | public static int Use(T? value) where T : struct => 1; method Use (line 118) | public static int Use(T? value) where T : class => 2; method First (line 120) | public static void First(T? value) where T : struct method Second (line 126) | public static void Second(T? value) where T : class // Compliant, ... method Compare1 (line 132) | public static bool Compare1(T? value1, T value2) // Secondary [Comp... method Compare2 (line 139) | public static bool Compare2(T? value1, T value2) // Noncompliant [... method Compare3 (line 146) | public static bool Compare3(T? value1, T value2) where T : System.I... method Equal1 (line 153) | public static bool Equal1(T t1, T t2) where T : System.IEquatable(T t1, T t2) where T : System.IEquatable(T t1, T t2) where T : System.IEquatable(T t1, T t2) where T : System.IComparable<... class TypeConstraintsOnGenericClass (line 182) | public class TypeConstraintsOnGenericClass method ConstraintByTClass1 (line 184) | public void ConstraintByTClass1() where TMethod : TClass // S... method ConstraintByTClass2 (line 191) | public void ConstraintByTClass2() where TMethod : TClass // N... method ConstraintByTClass3 (line 198) | public void ConstraintByTClass3() // Compliant method ConstraintByTClass4 (line 205) | public void ConstraintByTClass4() where TMethod : IEquatable<... method ConstraintByTClass5 (line 212) | public void ConstraintByTClass5() where TMethod : struct, TCl... class Repro_9654 (line 221) | public class Repro_9654 type Foo (line 223) | public record Foo(string A); type Bar (line 224) | public record Bar(string A); method SameBodyDifferentReturnTypeImplicit1 (line 226) | private static Foo SameBodyDifferentReturnTypeImplicit1() method SameBodyDifferentReturnTypeImplicit2 (line 232) | private static Bar SameBodyDifferentReturnTypeImplicit2() // Com... method SameBodyDifferentReturnTypeExplicit1 (line 238) | private static Foo SameBodyDifferentReturnTypeExplicit1() method SameBodyDifferentReturnTypeExplicit2 (line 244) | private static Bar SameBodyDifferentReturnTypeExplicit2() method SameBodyDifferentReturnTypeLiteral1 (line 250) | private static int SameBodyDifferentReturnTypeLiteral1() method SameBodyDifferentReturnTypeLiteral2 (line 256) | private static double SameBodyDifferentReturnTypeLiteral2() // Com... method SameReturnTypeWithDifferentName1 (line 262) | private static string SameReturnTypeWithDifferentName1() // Sec... method SameReturnTypeWithDifferentName2 (line 268) | private static System.String SameReturnTypeWithDifferentName2() // Non... method SameImplementationWithUnknownReturnType1 (line 274) | private static UnkownType1 SameImplementationWithUnknownReturnType1() ... method SameImplementationWithUnknownReturnType2 (line 280) | private static UnkownType2 SameImplementationWithUnknownReturnType2() ... type IInterface (line 289) | interface IInterface method First (line 291) | static virtual void First() method Second (line 298) | static virtual void Second() // Noncompliant {{Update this method so t... method Different (line 305) | static virtual void Different() class ExtensionTest (line 313) | public class ExtensionTest method MethodInBase (line 315) | public void MethodInBase() class NewExtensions (line 322) | public static class NewExtensions method extension (line 324) | extension(ExtensionTest sample) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodsShouldNotHaveIdenticalImplementations.TopLevelStatements.cs type Sample (line 27) | public record Sample type SamplePositional (line 62) | public record SamplePositional(string Value) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodsShouldNotHaveIdenticalImplementations.cs class Program (line 7) | class Program method Foo1 (line 9) | void Foo1() method Foo2 (line 18) | void Foo2() // Noncompliant {{Update this method so that its implement... method Foo3 (line 25) | void Foo3() // Noncompliant {{Update this method so that its implement... method Foo4 (line 31) | void Foo4() // Noncompliant {{Update this method so that its implement... method Foo5 (line 37) | void Foo5() method Foo1 (line 44) | void Foo1(string arg1) method DiffBySignature1 (line 51) | int DiffBySignature1(int arg1) method DiffBySignature2 (line 57) | string DiffBySignature2(string arg1) method Bar1 (line 64) | void Bar1() method Bar2 (line 69) | void Bar2() method FooBar1 (line 76) | void FooBar1() method FooBar2 (line 81) | void FooBar2() method Baz1 (line 88) | int Baz1(int a) => a; method Baz2 (line 90) | int Baz2(int a) => a; method Qux1 (line 94) | string Qux1(int val) method Qux2 (line 99) | string Qux2(int val) method Qux3 (line 104) | string Qux3(int val) => val.ToString(); class Foo (line 106) | public class Foo method Test (line 108) | public void Test(string str) class Bar (line 114) | public class Bar method Test (line 116) | public void Test(string str) method TestFoo1 (line 122) | public static void TestFoo1(Foo x) method TestFoo2 (line 128) | public static void TestFoo2(Foo x, string s) method TestFoo3 (line 134) | public static void TestFoo3(string s, Foo x) method TestBar1 (line 140) | public static void TestBar1(Bar x) method M (line 146) | static string M(int x) method Qualified1 (line 152) | static System.String Qualified1() // Secondary method Qualified2 (line 158) | static string Qualified2() // Noncompliant type SomeStruct (line 165) | struct SomeStruct method Foo1 (line 167) | void Foo1() // Secondary method Foo2 (line 173) | void Foo2() // Noncompliant class InheritedConstraints (line 180) | public abstract class InheritedConstraints class Item (line 182) | public class Item { public void Action() { } } method Action (line 182) | public void Action() { } class Mobile (line 183) | public class Mobile { public void Action() { } } method Action (line 183) | public void Action() { } method WriteItem (line 185) | public abstract void WriteItem(T item) where T : Item; method WriteItem2 (line 186) | public abstract void WriteItem2(T item) where T : Item; method WriteMobile (line 187) | public abstract void WriteMobile(T item) where T : Mobile; class Derived (line 189) | public class Derived : InheritedConstraints method WriteItem (line 191) | public override void WriteItem(T item) // Secondary method WriteItem2 (line 198) | public override void WriteItem2(T item) // Noncompliant. The Writ... method WriteMobile (line 205) | public override void WriteMobile(T item) // Compliant. The WriteM... class Sample (line 215) | public class Sample method MethodInBase (line 217) | public void MethodInBase() class ClassicExtensions (line 224) | public static class ClassicExtensions method IdenticalToBaseMethod (line 226) | public static void IdenticalToBaseMethod(this Sample sample) // FN htt... method MethodInExtension (line 232) | public static void MethodInExtension(this Sample sample) // Secondary method MethodInExtension2 (line 239) | public static void MethodInExtension2(this Sample sample) // Noncompliant class GenericReturnType (line 247) | public class GenericReturnType method Generic (line 249) | T Generic() where T : class // Secondary method Generic2 (line 255) | T Generic2() where T : class // Noncompliant method Generic4 (line 261) | T Generic4() where T : GenericReturnType // Compliant, Parameter ty... method Generic5 (line 267) | T Generic5() where T : struct // Compliant, Parameter type constrai... method List (line 273) | List List() where T : class // Secondary method List2 (line 279) | List List2() where T : class // Noncompliant method Task (line 285) | Task Task() // Secondary method Task2 (line 291) | Task Task2() // Noncompliant method Task2 (line 297) | Task Task2() // Secondary method Task3 (line 303) | Task Task3() // Noncompliant method Tuple1 (line 309) | (T, V) Tuple1() // Secondary method Tuple2 (line 315) | (T, V) Tuple2() // Noncompliant method Array (line 321) | T[] Array() // Secondary method Array2 (line 327) | T[] Array2() // Noncompliant method Nested (line 333) | IList> Nested() // Secondary method Nested2 (line 339) | IList> Nested2() // Noncompliant method Nested3 (line 345) | IList> Nested3() // Secondary method Nested4 (line 351) | IList> Nested4() // Noncompliant method Nested5 (line 357) | IList Nested5() // Secondary method Nested6 (line 363) | IList Nested6() // Noncompliant method Dict1 (line 369) | Dictionary Dict1() // Secondary method Dict2 (line 375) | Dictionary Dict2() // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodsShouldNotHaveTooManyLines.LocalFunctions.CSharp9.cs class WithExternLocalFunctions (line 4) | class WithExternLocalFunctions method ShortWithSingleExtern (line 6) | void ShortWithSingleExtern() // Compliant, we do not count extern loca... method ShortWithMultipleExtern (line 18) | void ShortWithMultipleExtern() // Compliant, we do not count extern lo... method Long (line 29) | void Long() // Noncompliant {{This method 'Long' has 6 lines, which is... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodsShouldNotHaveTooManyLines.LocalFunctions.cs class Foo (line 5) | public class Foo method Bar (line 7) | public void Bar(int i) // Compliant, because we do not count the local... method FooBar (line 37) | public void FooBar(int i) // Noncompliant {{This method 'FooBar' has 1... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodsShouldNotHaveTooManyLines_CustomValues.CSharp10.cs class A (line 3) | public class A method A (line 5) | public A(int i, int j) // Noncompliant type B (line 13) | public record class B type C (line 23) | public struct C method C (line 25) | public C(int i, int j) // Noncompliant type D (line 33) | public record struct D FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodsShouldNotHaveTooManyLines_CustomValues.CSharp9.cs type Sample (line 40) | record Sample FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodsShouldNotHaveTooManyLines_CustomValues.cs class Program (line 5) | abstract class Program method Program (line 7) | public Program() // Noncompliant {{This constructor 'Program' has 4 li... method Method_01 (line 25) | public void Method_01() // Noncompliant {{This method 'Method_01' has ... method Method_02 (line 34) | public int Method_02() // Noncompliant {{This method 'Method_02' has 1... method Method_04 (line 52) | public abstract int Method_04(); method Method_05 (line 54) | extern int Method_05(); method Method_06 (line 56) | public int Method_06() // Noncompliant {{This method 'Method_06' has 7... method Method_07 (line 70) | public string Method_07() // Noncompliant {{This method 'Method_07' ha... method Method_08 (line 77) | public string Method_08() method Method_09 (line 82) | public string Method_09() method Method_10 (line 96) | public string Method_10() // Noncompliant {{This method 'Method_10' ha... method Method_11 (line 101) | public string Method_11() // Noncompliant {{This method 'Method_11' ha... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodsShouldNotHaveTooManyLines_DefaultValues.cs class Program (line 5) | class Program method Foo (line 7) | public void Foo() method Bar (line 11) | public void Bar() // Noncompliant {{This method 'Bar' has 81 lines, wh... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodsShouldUseBaseTypes.AspControllers.cs class ValuesController (line 6) | [ApiController] method Get (line 10) | [HttpGet] method AMethod (line 17) | private void AMethod(Query query) // Noncompliant class QueryBase (line 23) | public class QueryBase method Foo (line 25) | public void Foo() { } class Query (line 28) | public class Query : QueryBase { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodsShouldUseBaseTypes.CSharp8.cs type IFoo (line 8) | internal interface IFoo class Foo (line 13) | public class Foo : IFoo class Bar (line 18) | public class Bar : Foo method ProtectedInternal_InternalBaseType (line 28) | protected internal void ProtectedInternal_InternalBaseType(Something.F... method ProtectedInternal_PublicBaseType (line 33) | protected internal void ProtectedInternal_PublicBaseType(Something.Bar... method PrivateProtected_InternalBaseType (line 38) | private protected void PrivateProtected_InternalBaseType(Something.Foo... class Bar (line 26) | public class Bar method ProtectedInternal_InternalBaseType (line 28) | protected internal void ProtectedInternal_InternalBaseType(Something.F... method ProtectedInternal_PublicBaseType (line 33) | protected internal void ProtectedInternal_PublicBaseType(Something.Bar... method PrivateProtected_InternalBaseType (line 38) | private protected void PrivateProtected_InternalBaseType(Something.Foo... class Parent (line 44) | public class Parent type IPrivateFoo (line 46) | private interface IPrivateFoo class ImplementsIPrivateFoo (line 51) | public class ImplementsIPrivateFoo : IPrivateFoo method Private (line 56) | private void Private(ImplementsIPrivateFoo foo) // Noncompliant method PrivateProtected (line 61) | private protected void PrivateProtected(ImplementsIPrivateFoo foo) // ... method ProtectedInternal (line 66) | protected internal void ProtectedInternal(ImplementsIPrivateFoo foo) /... type IPrivateProtectedFoo (line 71) | private protected interface IPrivateProtectedFoo class ImplementsIPrivateProtectedFoo (line 76) | public class ImplementsIPrivateProtectedFoo : IPrivateProtectedFoo method Private (line 81) | private void Private(ImplementsIPrivateProtectedFoo foo) // Noncompliant method PrivateProtected (line 86) | private protected void PrivateProtected(ImplementsIPrivateProtectedFoo... method ProtectedInternal (line 91) | protected internal void ProtectedInternal(ImplementsIPrivateProtectedF... type IProtectedInternalFoo (line 96) | protected internal interface IProtectedInternalFoo class ImplementsIProtectedInternalFoo (line 101) | public class ImplementsIProtectedInternalFoo : IProtectedInternalFoo method Private (line 106) | private void Private(ImplementsIProtectedInternalFoo foo) // Noncompliant method PrivateProtected (line 111) | private protected void PrivateProtected(ImplementsIProtectedInternalFo... method ProtectedInternal (line 116) | protected internal void ProtectedInternal(ImplementsIProtectedInternal... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodsShouldUseBaseTypes.CSharp9.cs type A (line 6) | public record A type B (line 15) | public record B : A FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodsShouldUseBaseTypes.Concurrent.cs type A (line 9) | public interface A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 14) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type A (line 29) | public interface A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } type B (line 34) | public interface B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class C (line 38) | public class C : B method Method (line 40) | public void Method() { } method Test_02 (line 42) | public void Test_02(C foo) // Noncompliant {{Consider using more gener... method Method (line 72) | public void Method() { } method OtherMethod (line 73) | public void OtherMethod() { } method Test_03 (line 75) | public void Test_03(C foo) // Noncompliant {{Consider using more gener... type A_Base (line 52) | public interface A_Base method Method (line 54) | void Method(); type A_Derived (line 57) | public interface A_Derived : A_Base type B_Base (line 61) | public interface B_Base method OtherMethod (line 63) | void OtherMethod(); type B_Derived (line 66) | public interface B_Derived : B_Base class C (line 70) | public class C : B_Derived, A_Derived method Method (line 40) | public void Method() { } method Test_02 (line 42) | public void Test_02(C foo) // Noncompliant {{Consider using more gener... method Method (line 72) | public void Method() { } method OtherMethod (line 73) | public void OtherMethod() { } method Test_03 (line 75) | public void Test_03(C foo) // Noncompliant {{Consider using more gener... class A (line 85) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 90) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 104) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 109) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 123) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 128) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 142) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 147) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type A (line 159) | public interface A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 164) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type A (line 178) | public interface A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 183) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type A (line 206) | public interface A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 211) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 237) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 246) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 277) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 292) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 321) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 330) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 345) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 349) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class Ext (line 367) | public static class Ext method ExtMethodA (line 369) | public static void ExtMethodA(this A foo) method ExtMethodB (line 373) | public static void ExtMethodB(this B foo) type A (line 382) | public interface A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 387) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type A (line 412) | public interface A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 419) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type IA (line 441) | public interface IA method Method (line 443) | void Method(); class A (line 448) | public class A : IA method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 461) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 482) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 530) | public class B : A { } method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 536) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 543) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 567) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 572) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type I (line 584) | public interface I method Foo (line 586) | void Foo(); method Foo2 (line 588) | void Foo2(); class A (line 591) | public class A : I method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 597) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type IOther (line 603) | public interface IOther method MethodA (line 605) | void MethodA(A a); method MethodB (line 606) | void MethodB(B b); class Other (line 609) | public class Other : IOther method MethodA (line 611) | public void MethodA(A a) method MethodB (line 616) | public void MethodB(B b) class Foo (line 629) | public class Foo method MethodOne (line 631) | public void MethodOne(IList list) method MethodTwo (line 639) | public void MethodTwo(IList list) method MethodThree (line 647) | public void MethodThree(IReadOnlyList list) method MethodThree (line 655) | public void MethodThree(IList list) method Foo (line 678) | public Foo() method Foo_FooEvent (line 683) | private void Foo_FooEvent(object sender, FooEventArgs e) method Bar (line 759) | public void Bar(Dictionary dictionary) method Bar (line 764) | public void Bar(ICollection> b) type IFooEventArgs (line 665) | public interface IFooEventArgs class FooEventArgs (line 669) | public class FooEventArgs : EventArgs, IFooEventArgs class Foo (line 674) | public class Foo method MethodOne (line 631) | public void MethodOne(IList list) method MethodTwo (line 639) | public void MethodTwo(IList list) method MethodThree (line 647) | public void MethodThree(IReadOnlyList list) method MethodThree (line 655) | public void MethodThree(IList list) method Foo (line 678) | public Foo() method Foo_FooEvent (line 683) | private void Foo_FooEvent(object sender, FooEventArgs e) method Bar (line 759) | public void Bar(Dictionary dictionary) method Bar (line 764) | public void Bar(ICollection> b) type IFoo (line 692) | internal interface IFoo class Foo (line 697) | public class Foo : IFoo method MethodOne (line 631) | public void MethodOne(IList list) method MethodTwo (line 639) | public void MethodTwo(IList list) method MethodThree (line 647) | public void MethodThree(IReadOnlyList list) method MethodThree (line 655) | public void MethodThree(IList list) method Foo (line 678) | public Foo() method Foo_FooEvent (line 683) | private void Foo_FooEvent(object sender, FooEventArgs e) method Bar (line 759) | public void Bar(Dictionary dictionary) method Bar (line 764) | public void Bar(ICollection> b) class Bar (line 702) | public class Bar : Foo method MethodOne (line 712) | public void MethodOne(Something.Foo f) method MethodTwo (line 717) | protected void MethodTwo(Something.Foo f) method MethodThree (line 722) | private void MethodThree(Something.Foo f) // Noncompliant method MethodFour (line 727) | internal void MethodFour(Something.Foo f) // Noncompliant method MethodFive (line 732) | public void MethodFive(Something.Bar f) // Noncompliant {{Consider usi... method MethodSix (line 737) | protected void MethodSix(Something.Bar f) // Noncompliant {{Consider u... method MethodSeven (line 742) | private void MethodSeven(Something.Bar f) // Noncompliant {{Consider u... method MethodEight (line 747) | internal void MethodEight(Something.Bar f) // Noncompliant {{Consider ... class Bar (line 710) | public class Bar method MethodOne (line 712) | public void MethodOne(Something.Foo f) method MethodTwo (line 717) | protected void MethodTwo(Something.Foo f) method MethodThree (line 722) | private void MethodThree(Something.Foo f) // Noncompliant method MethodFour (line 727) | internal void MethodFour(Something.Foo f) // Noncompliant method MethodFive (line 732) | public void MethodFive(Something.Bar f) // Noncompliant {{Consider usi... method MethodSix (line 737) | protected void MethodSix(Something.Bar f) // Noncompliant {{Consider u... method MethodSeven (line 742) | private void MethodSeven(Something.Bar f) // Noncompliant {{Consider u... method MethodEight (line 747) | internal void MethodEight(Something.Bar f) // Noncompliant {{Consider ... class Foo (line 757) | public class Foo method MethodOne (line 631) | public void MethodOne(IList list) method MethodTwo (line 639) | public void MethodTwo(IList list) method MethodThree (line 647) | public void MethodThree(IReadOnlyList list) method MethodThree (line 655) | public void MethodThree(IList list) method Foo (line 678) | public Foo() method Foo_FooEvent (line 683) | private void Foo_FooEvent(object sender, FooEventArgs e) method Bar (line 759) | public void Bar(Dictionary dictionary) method Bar (line 764) | public void Bar(ICollection> b) class IEnumerable_T_Tests (line 774) | public class IEnumerable_T_Tests method IEnumerable_Once (line 776) | protected void IEnumerable_Once(IEnumerable foo) method IEnumerable_Twice (line 781) | protected void IEnumerable_Twice(List foo) method IEnumerable_T_Once_With_List (line 787) | protected void IEnumerable_T_Once_With_List(List foo) // Nonco... class IEnumerable_Tests (line 793) | public class IEnumerable_Tests method IEnumerable_Once (line 795) | protected void IEnumerable_Once(IEnumerable foo) method IEnumerable_Twice (line 800) | protected void IEnumerable_Twice(IList foo) method IEnumerable_T_Once_With_List (line 806) | protected void IEnumerable_T_Once_With_List(IList foo) // Noncompliant class ReproIssue2479 (line 815) | public sealed class ReproIssue2479 method SomeMethod (line 817) | public void SomeMethod(IReadOnlyList list) /... class S3242DeconstructibleType (line 827) | public class S3242DeconstructibleType method Deconstruct (line 829) | public void Deconstruct(out object key, out object value) class BaseItem (line 838) | public class BaseItem method BaseMethod (line 842) | public string BaseMethod() => null; class MainItem (line 845) | public class MainItem : BaseItem class Usage (line 850) | public class Usage method Basic (line 852) | public void Basic(MainItem item) // Noncompliant method ConditionalAccess (line 858) | public void ConditionalAccess(MainItem item) // False negative, bindin... method DoubleConditionalAccess (line 864) | public void DoubleConditionalAccess(MainItem item) // False negative, ... method CompliantDouble (line 869) | public void CompliantDouble(System.ArgumentException ex) method CompliantTriple (line 875) | public void CompliantTriple(System.ArgumentException ex) method NoncompliantDouble (line 881) | public void NoncompliantDouble(System.ArgumentException ex) // Noncomp... method NoncompliantTriple (line 886) | public void NoncompliantTriple(System.ArgumentException ex) // Noncomp... method NoncompliantTripleMethod (line 891) | public void NoncompliantTripleMethod(MainItem ex) // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MethodsShouldUseBaseTypes.cs type A (line 9) | public interface A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 14) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type A (line 29) | public interface A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } type B (line 34) | public interface B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class C (line 38) | public class C : B method Method (line 40) | public void Method() { } method Test_02 (line 42) | public void Test_02(C foo) // Noncompliant {{Consider using more gener... method Method (line 72) | public void Method() { } method OtherMethod (line 73) | public void OtherMethod() { } method Test_03 (line 75) | public void Test_03(C foo) // Noncompliant {{Consider using more gener... type A_Base (line 52) | public interface A_Base method Method (line 54) | void Method(); type A_Derived (line 57) | public interface A_Derived : A_Base type B_Base (line 61) | public interface B_Base method OtherMethod (line 63) | void OtherMethod(); type B_Derived (line 66) | public interface B_Derived : B_Base class C (line 70) | public class C : B_Derived, A_Derived method Method (line 40) | public void Method() { } method Test_02 (line 42) | public void Test_02(C foo) // Noncompliant {{Consider using more gener... method Method (line 72) | public void Method() { } method OtherMethod (line 73) | public void OtherMethod() { } method Test_03 (line 75) | public void Test_03(C foo) // Noncompliant {{Consider using more gener... class A (line 85) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 90) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 104) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 109) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 123) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 128) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 142) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 147) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type A (line 159) | public interface A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 164) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type A (line 178) | public interface A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 183) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type A (line 206) | public interface A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 211) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 237) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 246) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 277) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 292) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 321) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 330) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 345) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 349) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class Ext (line 367) | public static class Ext method ExtMethodA (line 369) | public static void ExtMethodA(this A foo) method ExtMethodB (line 373) | public static void ExtMethodB(this B foo) type A (line 382) | public interface A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 387) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type A (line 412) | public interface A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 419) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type IA (line 441) | public interface IA method Method (line 443) | void Method(); class A (line 448) | public class A : IA method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 461) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 482) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 530) | public class B : A { } method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 536) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 543) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } class A (line 567) | public class A method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 572) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type I (line 584) | public interface I method Foo (line 586) | void Foo(); method Foo2 (line 588) | void Foo2(); class A (line 591) | public class A : I method Method (line 11) | void Method(); method Method (line 31) | void Method(); method Method (line 87) | public void Method() { } method Method (line 106) | public void Method() { } method Method (line 125) | public virtual void Method() { } method Method (line 281) | public void Method() { } method Method (line 325) | public void Method() { } method Method (line 414) | void Method(); method Method (line 452) | public void Method() { } method Test_17 (line 455) | public virtual void Test_17(B foo) type AreWeGood (line 484) | public enum AreWeGood { Yes, OfCourse } method Test_18_Object (line 495) | public void Test_18_Object(B foo) method Test_18_Enum (line 500) | public void Test_18_Enum(AreWeGood foo) method Test_18_Interop (line 505) | public void Test_18_Interop(System.Type foo) method Test_18_Unused (line 510) | public void Test_18_Unused(B foo) method Test_18_Array (line 514) | public void Test_18_Array(B[] foo) method Test_18_ValueType (line 519) | public void Test_18_ValueType(Guid foo) method Test_18_String (line 524) | public void Test_18_String(string foo) method Method (line 538) | public void Method() { } method Method (line 569) | public void Method() { } method Foo (line 593) | public virtual void Foo() { } method Foo2 (line 594) | public void Foo2() { } class B (line 597) | public class B : A method Method (line 16) | public void Method() { } method Test_01 (line 18) | public void Test_01(B foo) // Noncompliant {{Consider using more gener... method Method (line 92) | public void Method() { } method Test_04 (line 94) | public void Test_04(B foo) method Method (line 111) | public new void Method() { } method Test_05 (line 113) | public void Test_05(B foo) method Method (line 130) | public override void Method() { } method Test_06 (line 132) | public void Test_06(B foo) // Noncompliant {{Consider using more gener... method Test_07 (line 149) | public void Test_07(B foo) // Noncompliant {{Consider using more gener... method Test_08 (line 168) | public void Test_08(B foo) method Test_09 (line 187) | public void Test_09(B foo) // Noncompliant method Test_09_01 (line 192) | public void Test_09_01(B foo) method MethodA (line 197) | public void MethodA(A something) { } method MethodB (line 199) | public void MethodB(B something) { } method Test_10 (line 215) | public void Test_10(B foo) method Test_10_01 (line 221) | public void Test_10_01(B foo) method Test_10_02 (line 227) | public void Test_10_02(B foo) // Noncompliant method Test_11 (line 252) | public void Test_11(B foo) method Test_11_01 (line 257) | public void Test_11_01(B foo) // Noncompliant method Test_11_02 (line 262) | public void Test_11_02(B foo) method Test_11_03 (line 267) | public void Test_11_03(B foo) // Noncompliant method Test_12 (line 294) | public void Test_12(B foo) // Noncompliant method Test_12_01 (line 299) | public void Test_12_01(B foo) // Noncompliant method Test_12_02 (line 304) | public void Test_12_02(B foo) // Noncompliant method Test_12_03 (line 309) | public void Test_12_03(B foo) // Noncompliant method Foo_SomeEvent (line 314) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Test_13 (line 332) | public void Test_13(Test_13.B foo) // Noncompliant method MethodA (line 336) | public void MethodA(int unused, int param2, Test_13.A something, bool ... method MethodB (line 338) | public void MethodB(Test_13.B something) { } method Test_14 (line 351) | public void Test_14(B foo) // Noncompliant method Test_14_01 (line 356) | public void Test_14_01(B foo) method Test_14_02 (line 361) | public void Test_14_02(B foo) method Test_15 (line 395) | public void Test_15(B foo) // Noncompliant method Test_15_01 (line 400) | public void Test_15_01(A foo) method Foo_SomeEvent (line 405) | private void Foo_SomeEvent(object sender, EventArgs e) { } method Method (line 423) | public void Method() { } method OtherMethod (line 425) | public void OtherMethod() { } method Test_16 (line 427) | public void Test_16(B foo1, B foo2, B foo3) method Method (line 465) | public void Method() { } method OtherMethod (line 467) | public void OtherMethod() { } method Test_17 (line 470) | public override void Test_17(B foo) method Test_19_Method (line 545) | public void Test_19_Method(B foo) // Noncompliant method Test_19_Method2 (line 550) | public void Test_19_Method2(B foo) // Noncompliant method Test_19_Property (line 555) | public void Test_19_Property(B foo) // Noncompliant method Foo (line 560) | private void Foo(A thing) { } method Test_19_Method (line 574) | public void Test_19_Method(B foo) // False negative method Foo (line 599) | public override void Foo() { } method Foo2 (line 600) | public void Foo2() { } type IOther (line 603) | public interface IOther method MethodA (line 605) | void MethodA(A a); method MethodB (line 606) | void MethodB(B b); class Other (line 609) | public class Other : IOther method MethodA (line 611) | public void MethodA(A a) method MethodB (line 616) | public void MethodB(B b) class Foo (line 629) | public class Foo method MethodOne (line 631) | public void MethodOne(IList list) method MethodTwo (line 639) | public void MethodTwo(IList list) method MethodThree (line 647) | public void MethodThree(IReadOnlyList list) method MethodThree (line 655) | public void MethodThree(IList list) method Foo (line 678) | public Foo() method Foo_FooEvent (line 683) | private void Foo_FooEvent(object sender, FooEventArgs e) method Bar (line 759) | public void Bar(Dictionary dictionary) method Bar (line 764) | public void Bar(ICollection> b) type IFooEventArgs (line 665) | public interface IFooEventArgs class FooEventArgs (line 669) | public class FooEventArgs : EventArgs, IFooEventArgs class Foo (line 674) | public class Foo method MethodOne (line 631) | public void MethodOne(IList list) method MethodTwo (line 639) | public void MethodTwo(IList list) method MethodThree (line 647) | public void MethodThree(IReadOnlyList list) method MethodThree (line 655) | public void MethodThree(IList list) method Foo (line 678) | public Foo() method Foo_FooEvent (line 683) | private void Foo_FooEvent(object sender, FooEventArgs e) method Bar (line 759) | public void Bar(Dictionary dictionary) method Bar (line 764) | public void Bar(ICollection> b) type IFoo (line 692) | internal interface IFoo class Foo (line 697) | public class Foo : IFoo method MethodOne (line 631) | public void MethodOne(IList list) method MethodTwo (line 639) | public void MethodTwo(IList list) method MethodThree (line 647) | public void MethodThree(IReadOnlyList list) method MethodThree (line 655) | public void MethodThree(IList list) method Foo (line 678) | public Foo() method Foo_FooEvent (line 683) | private void Foo_FooEvent(object sender, FooEventArgs e) method Bar (line 759) | public void Bar(Dictionary dictionary) method Bar (line 764) | public void Bar(ICollection> b) class Bar (line 702) | public class Bar : Foo method MethodOne (line 712) | public void MethodOne(Something.Foo f) method MethodTwo (line 717) | protected void MethodTwo(Something.Foo f) method MethodThree (line 722) | private void MethodThree(Something.Foo f) // Noncompliant method MethodFour (line 727) | internal void MethodFour(Something.Foo f) // Noncompliant method MethodFive (line 732) | public void MethodFive(Something.Bar f) // Noncompliant {{Consider usi... method MethodSix (line 737) | protected void MethodSix(Something.Bar f) // Noncompliant {{Consider u... method MethodSeven (line 742) | private void MethodSeven(Something.Bar f) // Noncompliant {{Consider u... method MethodEight (line 747) | internal void MethodEight(Something.Bar f) // Noncompliant {{Consider ... class Bar (line 710) | public class Bar method MethodOne (line 712) | public void MethodOne(Something.Foo f) method MethodTwo (line 717) | protected void MethodTwo(Something.Foo f) method MethodThree (line 722) | private void MethodThree(Something.Foo f) // Noncompliant method MethodFour (line 727) | internal void MethodFour(Something.Foo f) // Noncompliant method MethodFive (line 732) | public void MethodFive(Something.Bar f) // Noncompliant {{Consider usi... method MethodSix (line 737) | protected void MethodSix(Something.Bar f) // Noncompliant {{Consider u... method MethodSeven (line 742) | private void MethodSeven(Something.Bar f) // Noncompliant {{Consider u... method MethodEight (line 747) | internal void MethodEight(Something.Bar f) // Noncompliant {{Consider ... class Foo (line 757) | public class Foo method MethodOne (line 631) | public void MethodOne(IList list) method MethodTwo (line 639) | public void MethodTwo(IList list) method MethodThree (line 647) | public void MethodThree(IReadOnlyList list) method MethodThree (line 655) | public void MethodThree(IList list) method Foo (line 678) | public Foo() method Foo_FooEvent (line 683) | private void Foo_FooEvent(object sender, FooEventArgs e) method Bar (line 759) | public void Bar(Dictionary dictionary) method Bar (line 764) | public void Bar(ICollection> b) class IEnumerable_T_Tests (line 774) | public class IEnumerable_T_Tests method IEnumerable_Once (line 776) | protected void IEnumerable_Once(IEnumerable foo) method IEnumerable_Twice (line 781) | protected void IEnumerable_Twice(List foo) method IEnumerable_T_Once_With_List (line 787) | protected void IEnumerable_T_Once_With_List(List foo) // Nonco... class IEnumerable_Tests (line 793) | public class IEnumerable_Tests method IEnumerable_Once (line 795) | protected void IEnumerable_Once(IEnumerable foo) method IEnumerable_Twice (line 800) | protected void IEnumerable_Twice(IList foo) method IEnumerable_T_Once_With_List (line 806) | protected void IEnumerable_T_Once_With_List(IList foo) // Noncompliant class ReproIssue2479 (line 815) | public sealed class ReproIssue2479 method SomeMethod (line 817) | public void SomeMethod(IReadOnlyList list) /... class S3242DeconstructibleType (line 827) | public class S3242DeconstructibleType method Deconstruct (line 829) | public void Deconstruct(out object key, out object value) class BaseItem (line 838) | public class BaseItem method BaseMethod (line 842) | public string BaseMethod() => null; class MainItem (line 845) | public class MainItem : BaseItem class Usage (line 850) | public class Usage method Basic (line 852) | public void Basic(MainItem item) // Noncompliant method ConditionalAccess (line 858) | public void ConditionalAccess(MainItem item) // False negative, bindin... method DoubleConditionalAccess (line 864) | public void DoubleConditionalAccess(MainItem item) // False negative, ... method CompliantDouble (line 869) | public void CompliantDouble(System.ArgumentException ex) method CompliantTriple (line 875) | public void CompliantTriple(System.ArgumentException ex) method NoncompliantDouble (line 881) | public void NoncompliantDouble(System.ArgumentException ex) // Noncomp... method NoncompliantTriple (line 886) | public void NoncompliantTriple(System.ArgumentException ex) // Noncomp... method NoncompliantTripleMethod (line 891) | public void NoncompliantTripleMethod(MainItem ex) // Noncompliant method Handler (line 896) | public void Handler(IReadOnlyDictionary data) // See: ... method Handler (line 901) | public void Handler(List data) // Noncompliant class Sample (line 910) | public class Sample method CanUseInterface (line 912) | public void CanUseInterface(CustomDictionary arg) // Noncompliant {{... class CustomDictionary (line 920) | public class CustomDictionary : Dictionary { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MultilineBlocksWithoutBrace.Latest.cs class WhenEach (line 4) | class WhenEach method ForEach (line 6) | async Task ForEach() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MultilineBlocksWithoutBrace.cs class SecondWithIdentationRoot (line 1) | class SecondWithIdentationRoot method While (line 3) | void While(bool condition) method For (line 11) | void For(string[] args) method ForEach (line 19) | void ForEach(string[] args) method If (line 27) | void If(bool condition) method Else (line 35) | void Else(bool condition) method ElseIf (line 46) | void ElseIf(bool condition) class SecondWithIdentationFirst (line 58) | class SecondWithIdentationFirst method While (line 60) | void While(bool condition) method For (line 69) | void For(string[] args) method ForEach (line 76) | void ForEach(string[] args) method If (line 83) | void If(bool condition) method Else (line 90) | void Else(bool condition) method ElseIf (line 100) | void ElseIf(bool condition) class FirstAndSecondOneSameLine (line 111) | class FirstAndSecondOneSameLine method While (line 113) | void While(bool condition) method For (line 120) | void For(string[] args) method ForEach (line 127) | void ForEach(string[] args) method If (line 134) | void If(bool condition) method Else (line 141) | void Else(bool condition) method ElseIf (line 149) | void ElseIf(bool condition) class FirstOneSameLineAndSecondWithIndentation (line 158) | class FirstOneSameLineAndSecondWithIndentation method While (line 160) | void While(bool condition) method For (line 166) | void For(string[] args) method ForEach (line 172) | void ForEach(string[] args) method If (line 178) | void If(bool condition) method Else (line 184) | void Else(bool condition) method ElseIf (line 191) | void ElseIf(bool condition) class Nested (line 199) | class Nested method While (line 201) | void While(bool condition) method For (line 208) | void For(string[] args) method ForEach (line 215) | void ForEach(string[] args) method If (line 222) | void If(bool condition) class SecondPartIsPartOfIfStructure (line 230) | class SecondPartIsPartOfIfStructure method Else (line 232) | void Else(bool condition) method ElseIf (line 238) | void ElseIf(bool condition) class SecondPartOfOtherScope (line 246) | class SecondPartOfOtherScope method LowerElseIf (line 248) | void LowerElseIf(bool condition) method LowerElse (line 258) | void LowerElse(bool condition) method If (line 267) | void If(bool condition) class Comments (line 276) | class Comments method BlockComment (line 278) | int BlockComment(int n) method BlockComment (line 286) | void BlockComment(bool condition) method LineComment (line 294) | void LineComment(bool condition) class EmptyLines (line 303) | class EmptyLines method HaveNoEffect (line 305) | void HaveNoEffect(bool condition) class EmptyStatements (line 314) | class EmptyStatements // Compliant, we ignore cases where at least one o... method First (line 316) | public void First(bool condition) method Second (line 320) | public void Second(bool condition) method Both (line 324) | public void Both(bool condition) method BlockComment (line 328) | public void BlockComment(bool condition) class Other (line 334) | class Other method FirstSameLineSecondTooFar (line 336) | void FirstSameLineSecondTooFar(bool condition) method WithReturnStatement (line 342) | int WithReturnStatement(bool condition) method ZeroIdentation (line 351) | void ZeroIdentation(bool condition) method DesendingIndentation (line 358) | void DesendingIndentation(bool condition) method ShiftedIndentation (line 365) | void ShiftedIndentation(bool condition) method AlternativeIndentation (line 372) | void AlternativeIndentation(bool condition) method LimitedIndentation (line 381) | void LimitedIndentation(bool condition) method LimitedIndentationSameLine (line 389) | void LimitedIndentationSameLine(bool condition) method IfElseWithAlternativeSpacing (line 395) | void IfElseWithAlternativeSpacing(bool condition) method Equals (line 412) | public override bool Equals(object obj) method Equals (line 418) | public bool Equals(Other other) { return other != null; } class DoesNotCrash (line 420) | class DoesNotCrash method OnMissingStatement (line 422) | void OnMissingStatement(bool condition) class Act (line 430) | class Act method First (line 432) | public static void First(params string[] args) { } method Second (line 433) | public static int Second() { return 42; } method Other (line 434) | public static void Other() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MultipleVariableDeclaration.Fixed.cs class MultipleVariableDeclaration (line 3) | public class MultipleVariableDeclaration method MultipleVariableDeclaration (line 10) | public MultipleVariableDeclaration(int n) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MultipleVariableDeclaration.WrongIndentation.Fixed.cs class TestCases (line 1) | class TestCases method WrongIndendation (line 5) | public void WrongIndendation() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MultipleVariableDeclaration.WrongIndentation.cs class TestCases (line 1) | class TestCases method WrongIndendation (line 5) | public void WrongIndendation() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MultipleVariableDeclaration.cs class MultipleVariableDeclaration (line 3) | public class MultipleVariableDeclaration method MultipleVariableDeclaration (line 9) | public MultipleVariableDeclaration(int n) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MutableFieldsShouldNotBePublicReadonly.Latest.cs type MutableInitializedWithImmutable (line 11) | public record MutableInitializedWithImmutable type MutableInitializedWithMutable (line 20) | public record MutableInitializedWithMutable type MutableInitializedWithMutablePositional (line 28) | public record MutableInitializedWithMutablePositional(string Property) class FrozenCollections (line 39) | public class FrozenCollections type MutableInitializedWithImmutable (line 48) | public record struct MutableInitializedWithImmutable type MutableInitializedWithMutable (line 59) | public record struct MutableInitializedWithMutable type MutableInitializedWithMutablePositional (line 69) | public record struct MutableInitializedWithMutablePositional(string Prop... type MutableInitializedWithMutableStruct (line 76) | public struct MutableInitializedWithMutableStruct method MutableInitializedWithMutableStruct (line 78) | public MutableInitializedWithMutableStruct() { } class NewCollectionTypesUninitialized (line 88) | public class NewCollectionTypesUninitialized class NewCollectionTypesInitializedWithMutable (line 95) | public class NewCollectionTypesInitializedWithMutable(HashSet set) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MutableFieldsShouldNotBePublicReadonly.cs class Foo (line 9) | public class Foo : ICollection method Add (line 14) | public void Add(string item) method Clear (line 19) | public void Clear() method Contains (line 24) | public bool Contains(string item) method CopyTo (line 29) | public void CopyTo(string[] array, int arrayIndex) method GetEnumerator (line 34) | public IEnumerator GetEnumerator() method Remove (line 39) | public bool Remove(string item) method GetEnumerator (line 44) | IEnumerator IEnumerable.GetEnumerator() class Bar (line 49) | public class Bar : ReadOnlyCollection method Bar (line 51) | public Bar(IList list) class NotPublicAndReadonly (line 57) | public class NotPublicAndReadonly class NotEffectivelyPublic (line 64) | private class NotEffectivelyPublic class ImmutableUninitialized (line 70) | public class ImmutableUninitialized class MutableInitializedWithImmutable (line 89) | public class MutableInitializedWithImmutable class MutableInitializedWithMutable (line 98) | public class MutableInitializedWithMutable class HandleFieldWithMultipleVariables (line 106) | public class HandleFieldWithMultipleVariables class MutableUninitialized (line 113) | public class MutableUninitialized class MutableInitializedWithImmutableInConstructor (line 129) | public class MutableInitializedWithImmutableInConstructor method MutableInitializedWithImmutableInConstructor (line 134) | MutableInitializedWithImmutableInConstructor() class MutableInitializedInConstructors (line 141) | public class MutableInitializedInConstructors method MutableInitializedInConstructors (line 145) | MutableInitializedInConstructors() method MutableInitializedInConstructors (line 150) | MutableInitializedInConstructors(string s) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MutableFieldsShouldNotBePublicStatic.Latest.cs type WhenNonReadonlyAlwaysReport (line 11) | public record WhenNonReadonlyAlwaysReport type WhenReadonlyAndInitializedToImmutable (line 32) | public record WhenReadonlyAndInitializedToImmutable type WhenNonReadonlyAlwaysReportPositional (line 41) | public record WhenNonReadonlyAlwaysReportPositional(string Property, int... class FrozenCollections (line 52) | public class FrozenCollections type WhenNonReadonlyAlwaysReport (line 61) | public record struct WhenNonReadonlyAlwaysReport type WhenReadonlyAndInitializedToImmutable (line 82) | public record struct WhenReadonlyAndInitializedToImmutable type WhenNonReadonlyAlwaysReportPositional (line 91) | public record struct WhenNonReadonlyAlwaysReportPositional(string Property) type WhenNonReadonlyAlwaysReportStruct (line 98) | public struct WhenNonReadonlyAlwaysReportStruct class OrderedDictionary (line 108) | public class OrderedDictionary class ReadOnlySet (line 117) | public class ReadOnlySet FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/MutableFieldsShouldNotBePublicStatic.cs class Foo (line 9) | public class Foo : ICollection method Add (line 14) | public void Add(string item) method Clear (line 19) | public void Clear() method Contains (line 24) | public bool Contains(string item) method CopyTo (line 29) | public void CopyTo(string[] array, int arrayIndex) method GetEnumerator (line 34) | public IEnumerator GetEnumerator() method Remove (line 39) | public bool Remove(string item) method GetEnumerator (line 44) | IEnumerator IEnumerable.GetEnumerator() class Bar (line 50) | public class Bar : ReadOnlyCollection method Bar (line 52) | public Bar(IList list) : base(list) class NotPublicAndStatic (line 57) | public class NotPublicAndStatic class NotEffectivelyPublic (line 64) | private class NotEffectivelyPublic class ImmutableUninitialized (line 70) | public class ImmutableUninitialized class WhenNonReadonlyAlwaysReport (line 89) | public class WhenNonReadonlyAlwaysReport class HandleFieldWithMultipleVariables (line 111) | public class HandleFieldWithMultipleVariables class WhenReadonlyAndInitializedToImmutable (line 117) | public class WhenReadonlyAndInitializedToImmutable class WhenReadonlyAndInitializedToImmutableInConstructor (line 126) | public class WhenReadonlyAndInitializedToImmutableInConstructor method WhenReadonlyAndInitializedToImmutableInConstructor (line 131) | static WhenReadonlyAndInitializedToImmutableInConstructor() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NameOfShouldBeUsed.CSharp11.cs class Program (line 5) | class Program method Method_With_RawStringLiterals (line 7) | public void Method_With_RawStringLiterals(int arg1, string argument) method Method_With_NewLinesInStringInterpolation (line 27) | public void Method_With_NewLinesInStringInterpolation(int arg1) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NameOfShouldBeUsed.cs class Program (line 5) | class Program method Method_01 (line 7) | public void Method_01(int arg1, int argument) method ValidateArgument (line 75) | private void ValidateArgument(int v, string longName) method Program (line 85) | public Program(int arg1, int arg2) method Program (line 91) | public Program(string argument, int arg2, object anotherArgument) method Method_02 (line 102) | public bool Method_02(int arg1, int arg1) // Error [CS0100] - duplicat... method MethodWithUnnecessaryParams (line 107) | public bool MethodWithUnnecessaryParams(int a, int two, int of, int that) method SameStringTokens (line 115) | public bool SameStringTokens(int argumentName) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NamedPlaceholdersShouldBeUnique.cs class Program (line 7) | public class Program method Compliant (line 9) | void Compliant(ILogger logger, string foo, string bar) method Noncompliant (line 63) | void Noncompliant(ILogger logger, string foo, string bar, string baz, ... class NotLogger (line 174) | public class NotLogger method LogDebug (line 176) | public void LogDebug(string message, params object[] args) { } method Compliant (line 193) | void Compliant(ILogger logger, string arg) method Noncompliant (line 200) | void Noncompliant(ILogger logger, string arg) method Compliant (line 218) | void Compliant(ILoggerBase logger, string arg) method Noncompliant (line 225) | void Noncompliant(ILoggerBase logger, string arg) class NotLoggerExtensions (line 180) | public static class NotLoggerExtensions method LogCritical (line 182) | public static void LogCritical(this Program.NotLogger logger, string m... class Program (line 191) | public class Program method Compliant (line 9) | void Compliant(ILogger logger, string foo, string bar) method Noncompliant (line 63) | void Noncompliant(ILogger logger, string foo, string bar, string baz, ... class NotLogger (line 174) | public class NotLogger method LogDebug (line 176) | public void LogDebug(string message, params object[] args) { } method Compliant (line 193) | void Compliant(ILogger logger, string arg) method Noncompliant (line 200) | void Noncompliant(ILogger logger, string arg) method Compliant (line 218) | void Compliant(ILoggerBase logger, string arg) method Noncompliant (line 225) | void Noncompliant(ILoggerBase logger, string arg) class Program (line 216) | public class Program method Compliant (line 9) | void Compliant(ILogger logger, string foo, string bar) method Noncompliant (line 63) | void Noncompliant(ILogger logger, string foo, string bar, string baz, ... class NotLogger (line 174) | public class NotLogger method LogDebug (line 176) | public void LogDebug(string message, params object[] args) { } method Compliant (line 193) | void Compliant(ILogger logger, string arg) method Noncompliant (line 200) | void Noncompliant(ILogger logger, string arg) method Compliant (line 218) | void Compliant(ILoggerBase logger, string arg) method Noncompliant (line 225) | void Noncompliant(ILoggerBase logger, string arg) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NativeMethodsShouldBeWrapped.Latest.SourceGenerator.cs class ExternMethods (line 4) | public static unsafe partial class ExternMethods method DllImportAttributeAppliedToThisFunction (line 6) | [System.Runtime.InteropServices.DllImportAttribute("foo.dll", EntryPoi... method CompliantDllImportAttributeAppliedToThisFunction (line 14) | [System.Runtime.InteropServices.DllImportAttribute("foo.dll", EntryPoi... method DllImportAttributeAppliedToGeneratedLocalFunction (line 22) | [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.Lib... method CompliantDllImportAttributeAppliedToGeneratedLocalFunction (line 56) | [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.Lib... class ExternMethods (line 12) | public static unsafe partial class ExternMethods method DllImportAttributeAppliedToThisFunction (line 6) | [System.Runtime.InteropServices.DllImportAttribute("foo.dll", EntryPoi... method CompliantDllImportAttributeAppliedToThisFunction (line 14) | [System.Runtime.InteropServices.DllImportAttribute("foo.dll", EntryPoi... method DllImportAttributeAppliedToGeneratedLocalFunction (line 22) | [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.Lib... method CompliantDllImportAttributeAppliedToGeneratedLocalFunction (line 56) | [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.Lib... class ExternMethods (line 20) | public static unsafe partial class ExternMethods method DllImportAttributeAppliedToThisFunction (line 6) | [System.Runtime.InteropServices.DllImportAttribute("foo.dll", EntryPoi... method CompliantDllImportAttributeAppliedToThisFunction (line 14) | [System.Runtime.InteropServices.DllImportAttribute("foo.dll", EntryPoi... method DllImportAttributeAppliedToGeneratedLocalFunction (line 22) | [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.Lib... method CompliantDllImportAttributeAppliedToGeneratedLocalFunction (line 56) | [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.Lib... class ExternMethods (line 54) | public static unsafe partial class ExternMethods method DllImportAttributeAppliedToThisFunction (line 6) | [System.Runtime.InteropServices.DllImportAttribute("foo.dll", EntryPoi... method CompliantDllImportAttributeAppliedToThisFunction (line 14) | [System.Runtime.InteropServices.DllImportAttribute("foo.dll", EntryPoi... method DllImportAttributeAppliedToGeneratedLocalFunction (line 22) | [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.Lib... method CompliantDllImportAttributeAppliedToGeneratedLocalFunction (line 56) | [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.Lib... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NativeMethodsShouldBeWrapped.Latest.cs type IInterface (line 3) | public interface IInterface method RemoveDirectory1 (line 5) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory2 (line 8) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] class ExternMethods (line 15) | public static partial class ExternMethods method DllImportAttributeAppliedToThisFunction (line 17) | [LibraryImport("foo.dll")] method CompliantDllImportAttributeAppliedToThisFunction (line 20) | [LibraryImport("foo.dll")] method DllImportAttributeAppliedToGeneratedLocalFunction (line 23) | [LibraryImport("foo.dll", StringMarshalling = StringMarshalling.Utf8)] method CompliantDllImportAttributeAppliedToGeneratedLocalFunction (line 26) | [LibraryImport("foo.dll", StringMarshalling = StringMarshalling.Utf8)] method CompliantDllImportAttributeAppliedToThisFunctionNoncompliantWrapper (line 31) | public static void CompliantDllImportAttributeAppliedToThisFunctionNon... method CompliantDllImportAttributeAppliedToThisFunctionCompliantWrapper (line 36) | public static void CompliantDllImportAttributeAppliedToThisFunctionCom... method CompliantDllImportAttributeAppliedToGeneratedLocalFunctionWrapper (line 44) | public static void CompliantDllImportAttributeAppliedToGeneratedLocalF... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NativeMethodsShouldBeWrapped.TopLevelStatements.cs type Record (line 6) | public record Record type Record (line 23) | public record Record type Foo (line 36) | interface Foo method Bar (line 38) | [DllImport("mynativelib")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NativeMethodsShouldBeWrapped.cs class Program (line 6) | public class Program method DoSomething (line 8) | private static T DoSomething(T x) => x; method Extern0 (line 10) | extern private static void Extern0(); method Extern1 (line 12) | extern private static void Extern1(string s, int x); method Extern2 (line 14) | extern public static void Extern2(string s, int x); method Extern3 (line 17) | extern internal protected static void Extern3(string s, int x); method Extern4 (line 21) | extern private static int Extern4(string s); method Wrapper1 (line 23) | public static void Wrapper1(string s, int x) // Noncompliant {{Make th... method Wrapper2 (line 28) | public static void Wrapper2() // Compliant, no arguments method Wrapper3 (line 33) | public static int Wrapper3() // Compliant, no arguments method Wrapper4 (line 41) | public static void Wrapper4(string s, int x) // Compliant, more than o... method Wrapper5 (line 47) | public static void Wrapper5(string s, int x) // Compliant, more than o... method Wrapper6 (line 56) | public static void Wrapper6(string s, int x) // Compliant, parameters ... method Wrapper7 (line 61) | public static void Wrapper7(string s, int x) // Compliant, parameters ... method Wrapper8 (line 66) | public static void Wrapper8(string s, int x) => // Noncompliant {{Make... method Wrapper9 (line 69) | public static void Wrapper9(string s, int x) => // Compliant, paramete... method Wrapper10 (line 72) | public static void Wrapper10(string s, int x) => // Compliant, paramet... method Wrapper11 (line 75) | public static int Wrapper11() => // Compliant, no arguments class PrivateClass (line 78) | private class PrivateClass method Extern (line 80) | extern public static void Extern(); class PrivateClass2 (line 83) | internal class PrivateClass2 method Extern (line 85) | extern public static void Extern(); method RemoveDirectory1 (line 94) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory2 (line 98) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory3 (line 101) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory4 (line 104) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory5 (line 107) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory6 (line 110) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] // Error [CS0601] method RemoveDirectory7 (line 113) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] // Error [CS0601] class Program (line 92) | public class Program method DoSomething (line 8) | private static T DoSomething(T x) => x; method Extern0 (line 10) | extern private static void Extern0(); method Extern1 (line 12) | extern private static void Extern1(string s, int x); method Extern2 (line 14) | extern public static void Extern2(string s, int x); method Extern3 (line 17) | extern internal protected static void Extern3(string s, int x); method Extern4 (line 21) | extern private static int Extern4(string s); method Wrapper1 (line 23) | public static void Wrapper1(string s, int x) // Noncompliant {{Make th... method Wrapper2 (line 28) | public static void Wrapper2() // Compliant, no arguments method Wrapper3 (line 33) | public static int Wrapper3() // Compliant, no arguments method Wrapper4 (line 41) | public static void Wrapper4(string s, int x) // Compliant, more than o... method Wrapper5 (line 47) | public static void Wrapper5(string s, int x) // Compliant, more than o... method Wrapper6 (line 56) | public static void Wrapper6(string s, int x) // Compliant, parameters ... method Wrapper7 (line 61) | public static void Wrapper7(string s, int x) // Compliant, parameters ... method Wrapper8 (line 66) | public static void Wrapper8(string s, int x) => // Noncompliant {{Make... method Wrapper9 (line 69) | public static void Wrapper9(string s, int x) => // Compliant, paramete... method Wrapper10 (line 72) | public static void Wrapper10(string s, int x) => // Compliant, paramet... method Wrapper11 (line 75) | public static int Wrapper11() => // Compliant, no arguments class PrivateClass (line 78) | private class PrivateClass method Extern (line 80) | extern public static void Extern(); class PrivateClass2 (line 83) | internal class PrivateClass2 method Extern (line 85) | extern public static void Extern(); method RemoveDirectory1 (line 94) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory2 (line 98) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory3 (line 101) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory4 (line 104) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory5 (line 107) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory6 (line 110) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] // Error [CS0601] method RemoveDirectory7 (line 113) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] // Error [CS0601] class Foo (line 117) | internal class Foo method RemoveDirectory1 (line 119) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NestedCodeBlock.Latest.cs class FieldKeyword (line 1) | public class FieldKeyword FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NestedCodeBlock.TopLevelStatements.cs type TestRecord (line 10) | record TestRecord FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NestedCodeBlock.cs class Program (line 6) | class Program type Point (line 28) | struct Point method Point (line 32) | public Point(int x, int y) type MyEnum (line 42) | public enum MyEnum method Program (line 48) | public Program() method Method (line 55) | public void Method(int value) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NoExceptionsInFinally.cs class MyTestCases (line 6) | public class MyTestCases method Method1 (line 8) | public void Method1() method Method2 (line 20) | public void Method2() method Method3 (line 39) | public void Method3() method Method4 (line 58) | public void Method4() method Method5 (line 75) | public void Method5() method Method6 (line 101) | public void Method6() method Method7 (line 129) | public void Method7() method Method8 (line 163) | public void Method8() method Method9 (line 174) | public void Method9() method Method10 (line 193) | public void Method10() method Method11 (line 212) | public void Method11() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NonAsyncTaskShouldNotReturnNull.Latest.Partial.cs class PartialProperties (line 3) | public partial class PartialProperties FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NonAsyncTaskShouldNotReturnNull.Latest.cs type IMath (line 3) | public interface IMath method GetValue (line 5) | public static virtual Task GetValue() class PartialProperties (line 11) | public partial class PartialProperties class Extensions (line 17) | public static class Extensions method extension (line 19) | extension(string s) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NonAsyncTaskShouldNotReturnNull.cs class CompliantUseCases (line 6) | public class CompliantUseCases method GetTaskAsync1 (line 8) | public async Task GetTaskAsync1() method GetTaskAsync2 (line 12) | public async Task GetTaskAsync2() method GetTask1 (line 17) | public Task GetTask1() method GetTask2 (line 22) | public Task GetTask2() method GetFooAsync (line 31) | public Task GetFooAsync() method GetBar (line 46) | public Task GetBar() class NonCompliantUseCases (line 54) | public class NonCompliantUseCases method GetTask1 (line 56) | public Task GetTask1() method GetTask2 (line 62) | public Task GetTask2() method GetTaskAsync3 (line 67) | public Task GetTaskAsync3(int a) method GetTask4 (line 77) | public Task GetTask4() => null; method GetTask5 (line 79) | public Task GetTask5(int a) method GetTask6 (line 91) | public Task GetTask6() method GetTask7 (line 96) | public Task GetTask7(bool condition) method GetObjectTask (line 120) | public Task GetObjectTask() method SomeMethodAsync (line 130) | public Task SomeMethodAsync() method SomeMethodNonAsync (line 141) | public Task SomeMethodNonAsync() method SomeMethodParenthesizedAsync (line 150) | public Task SomeMethodParenthesizedAsync() method SomeMethodParenthesizedNonAsync (line 161) | public Task SomeMethodParenthesizedNonAsync() method SomeOtherMethodAsync (line 170) | private Task SomeOtherMethodAsync(Func> f... method GetBar (line 172) | public Task GetBar() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NonDerivedPrivateClassesShouldBeSealed.Latest.cs class ClassWithRecord (line 5) | public class ClassWithRecord type RecordNotExtended (line 7) | private record RecordNotExtended { } type PrivateRecord (line 10) | private record PrivateRecord { } type PrivateRecordExtension (line 12) | private sealed record PrivateRecordExtension : PrivateRecord { } type PublicRecord (line 15) | public record PublicRecord type PublicPositionalRecord (line 22) | public record PublicPositionalRecord class APartialClass (line 29) | public partial class APartialClass type PrivateRecord (line 31) | private record PrivateRecord { } type PrivateRecordExtension (line 36) | private sealed record PrivateRecordExtension : PrivateRecord { } class APartialClass (line 34) | public partial class APartialClass type PrivateRecord (line 31) | private record PrivateRecord { } type PrivateRecordExtension (line 36) | private sealed record PrivateRecordExtension : PrivateRecord { } class ClassNotExtended (line 40) | file class ClassNotExtended { } type RecordNotExtended (line 42) | file record RecordNotExtended { } type RecordNotExtended2 (line 44) | file record class RecordNotExtended2 { } class FileClassVirtualMethod (line 47) | file class FileClassVirtualMethod // Compliant, the class has a virtual ... method AMethod (line 49) | public virtual void AMethod() { } class FileClassVirtualProperty (line 52) | file class FileClassVirtualProperty // Compliant, the class has a virtua... type FileClassVirtualIndexer (line 57) | file record FileClassVirtualIndexer // Compliant, the class has a virtua... type FileClassVirtualEvent (line 66) | file record FileClassVirtualEvent // Compliant, the class has a virtual ... class FileDerivedClass (line 82) | file class FileDerivedClass { } class FileDerivedClassExtension (line 84) | file class FileDerivedClassExtension : FileDerivedClass { } class FileDerivedClassSecondExtension (line 86) | file class FileDerivedClassSecondExtension : FileDerivedClass { } class TheThirdExtension (line 88) | file class TheThirdExtension : FileDerivedClassSecondExtension { } class ClassNotExtendedButFile (line 90) | file sealed class ClassNotExtendedButFile { } type AStruct (line 92) | file struct AStruct { } type ARecordStruct (line 93) | file record struct ARecordStruct { } class FileStaticClass (line 95) | file static class FileStaticClass { } class FileAbstractClass (line 97) | file abstract class FileAbstractClass { } class NotInheritedGenericClass (line 102) | file class NotInheritedGenericClass { } class InheritedGenericClass (line 103) | file class InheritedGenericClass { } class ImplementationClass (line 105) | file class ImplementationClass : InheritedGenericClass { } class ImplementationClass (line 106) | file class ImplementationClass : InheritedGenericClass { } class SealedImplementationClass (line 108) | file sealed class SealedImplementationClass : InheritedGenericClass... class SealedImplementationClass (line 109) | file sealed class SealedImplementationClass : InheritedGenericClass : InheritedGenericCla... type NotInheritedGenericRecord (line 116) | file record NotInheritedGenericRecord { } type InheritedGenericRecord (line 117) | file record InheritedGenericRecord { } type ImplementationRecord (line 119) | file record ImplementationRecord : InheritedGenericRecord { } type ImplementationRecord (line 120) | file record ImplementationRecord : InheritedGenericRecord { } type SealedImplementationRecord (line 122) | file sealed record SealedImplementationRecord : InheritedGenericRecord : InheritedGenericRecor... type AbstractImplementationRecord (line 124) | file abstract record AbstractImplementationRecord : InheritedGenericReco... type AbstractImplementationRecord (line 125) | file abstract record AbstractImplementationRecord : InheritedGenericR... type NotInheritedGenericRecord (line 130) | file record class NotInheritedGenericRecord { } type InheritedGenericRecord (line 131) | file record class InheritedGenericRecord { } type ImplementationRecord (line 133) | file record class ImplementationRecord : InheritedGenericRecord { } type ImplementationRecord (line 134) | file record class ImplementationRecord : InheritedGenericRecord { } type SealedImplementationRecord (line 136) | file sealed record class SealedImplementationRecord : InheritedGenericRe... type SealedImplementationRecord (line 137) | file sealed record class SealedImplementationRecord : InheritedGeneri... type AbstractImplementationRecord (line 138) | file abstract record class AbstractImplementationRecord : InheritedGener... type AbstractImplementationRecord (line 139) | file abstract record class AbstractImplementationRecord : InheritedGe... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NonDerivedPrivateClassesShouldBeSealed.cs class Foo (line 5) | public class Foo class ClassWontBeExtended (line 7) | private class ClassWontBeExtended { } class PrivateClassVirtualMethod (line 10) | private class PrivateClassVirtualMethod // Compliant, the class has a ... method AMethod (line 12) | public virtual void AMethod() { } class PrivateClassVirtualProperty (line 15) | private class PrivateClassVirtualProperty // Compliant, the class has ... class PrivateClassVirtualIndexer (line 20) | private class PrivateClassVirtualIndexer // Compliant, the class has a... class PrivateClassVirtualEvent (line 29) | private class PrivateClassVirtualEvent // Compliant, the class has a v... class ClassWontBeExtendedButSealed (line 44) | private sealed class ClassWontBeExtendedButSealed { } class PrivateDerivedClass (line 46) | private class PrivateDerivedClass { } class PrivateDerivedClassExtension (line 48) | private class PrivateDerivedClassExtension : PrivateDerivedClass { } class PrivateDerivedClassSecondExtension (line 50) | private class PrivateDerivedClassSecondExtension : PrivateDerivedClass... class TheThirdExtension (line 52) | private class TheThirdExtension : PrivateDerivedClassSecondExtension { } class PrivateExternalA (line 54) | private class PrivateExternalA { } class PrivateExternalB (line 55) | private class PrivateExternalB { } class PrivateClass (line 57) | private class PrivateClass class NestedPrivateClass (line 59) | private class NestedPrivateClass { } class ExtendsOuterPrivateClass (line 61) | private sealed class ExtendsOuterPrivateClass : PrivateClass { } class ExtendsExternalPrivateClass (line 63) | private sealed class ExtendsExternalPrivateClass : PrivateExternalA { } class NestedPrivateClassWillBeExtended (line 65) | private class NestedPrivateClassWillBeExtended { } class NestedExtension (line 67) | private class NestedExtension : NestedPrivateClassWillBeExtended { } class SeriouslyNestedClass (line 69) | private sealed class SeriouslyNestedClass class ClassA (line 71) | private sealed class ClassA class ClassB (line 73) | private sealed class ClassB class ClassC (line 75) | private sealed class ClassC : PrivateExternalB { } class PrivateAbstractClass (line 81) | private abstract class PrivateAbstractClass { } type AStruct (line 83) | private struct AStruct { } class InnerPrivateStaticClass (line 85) | private static class InnerPrivateStaticClass { } class Bar (line 88) | public partial class Bar class SomeClass (line 90) | private class SomeClass { } class SomeOtherClass (line 95) | private class SomeOtherClass : SomeClass { } class Bar (line 93) | public partial class Bar class SomeClass (line 90) | private class SomeClass { } class SomeOtherClass (line 95) | private class SomeOtherClass : SomeClass { } class ClassImplementedInTwoFiles (line 98) | public partial class ClassImplementedInTwoFiles class InnerPrivateClass (line 101) | private class InnerPrivateClass { } class AClassWithAnInnerInterface (line 104) | public class AClassWithAnInnerInterface class APrivateClass (line 106) | private class APrivateClass { } type InnerInterface (line 108) | public interface InnerInterface { } class Repro_5160 (line 113) | public class Repro_5160 class Inner (line 115) | private class Inner { } class Inner (line 117) | private class Inner : Inner { } class Inner (line 119) | private class Inner : Inner { } class Inner (line 121) | private sealed class Inner : Inner { } class Inner (line 123) | private class Inner : Inner { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NonDerivedPrivateClassesShouldBeSealed_PartialClass.cs class ClassImplementedInTwoFiles (line 5) | public partial class ClassImplementedInTwoFiles class InnerPrivateClassExtension (line 7) | private sealed class InnerPrivateClassExtension : InnerPrivateClass { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NonFlagsEnumInBitwiseOperation.Fixed.cs type Permissions (line 7) | [Flags] type Permissions2 (line 16) | [Flags] class NonFlagsEnumInBitwiseOperation (line 25) | class NonFlagsEnumInBitwiseOperation method Test (line 27) | void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NonFlagsEnumInBitwiseOperation.cs type Permissions (line 7) | enum Permissions type Permissions2 (line 15) | [Flags] class NonFlagsEnumInBitwiseOperation (line 24) | class NonFlagsEnumInBitwiseOperation method Test (line 26) | void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NormalizeStringsToUppercase.CSharp11.cs class Program (line 5) | class Program method StringLowerCalls (line 7) | void StringLowerCalls() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NormalizeStringsToUppercase.cs class Program (line 5) | class Program method StringLowerCalls (line 7) | void StringLowerCalls() method CharLowerCalls (line 21) | void CharLowerCalls() class Ext (line 36) | static class Ext method ToLower (line 38) | public static string ToLower(this string s, int i) => s; method ToLower (line 39) | public static char ToLower(this char s, int i) => s; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NotAssignedPrivateMember.Latest.Partial.cs class PartialProperties (line 1) | public partial class PartialProperties FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NotAssignedPrivateMember.Latest.cs type Compliant (line 4) | public record Compliant type InteropMethodArgument (line 9) | [StructLayout(LayoutKind.Sequential)] type Record (line 15) | public record Record type PositionalRecord (line 44) | public record PositionalRecord(string Value) class PartialProperties (line 54) | public partial class PartialProperties class FieldKeyWord (line 59) | public class FieldKeyWord FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NotAssignedPrivateMember.cs type ValueType1 (line 6) | struct ValueType1 class RefType (line 11) | class RefType type ValueType2 (line 16) | struct ValueType2 type ISampleInterface (line 21) | public interface ISampleInterface class MyClass (line 26) | class MyClass class Nested (line 28) | class Nested method Nested (line 60) | public Nested() method Print (line 72) | public void Print() method M (line 90) | public void M(ref int f) { } class MyClass2 (line 94) | public class MyClass2 class InteropMethodArgument (line 96) | [StructLayout(LayoutKind.Sequential)] class MyTupleClass (line 103) | public class MyTupleClass method MyTupleClass (line 108) | public MyTupleClass() method GetFoobar (line 113) | private static (int f, int b) GetFoobar() => (1, 2); class Memory (line 116) | public static class Memory method GlobalMemoryStatusEx (line 118) | [return: MarshalAs(UnmanagedType.Bool)] class MEMORYSTATUSEX (line 122) | [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] method MEMORYSTATUSEX (line 134) | public MEMORYSTATUSEX() class OuterFoo (line 157) | public sealed class OuterFoo class InnerFactory (line 159) | private static class InnerFactory class InnerFoo (line 164) | private class InnerFoo method Foo (line 169) | public void Foo() class Repro5232 (line 178) | public class Repro5232 method Print (line 184) | public void Print() class SerializableClass (line 190) | [Serializable] method Print (line 197) | public void Print() class Repro_9106 (line 206) | public class Repro_9106 FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NotAssignedPrivateMember.razor.cs class NotAssignedPrivateMember (line 6) | public partial class NotAssignedPrivateMember method Test (line 10) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/NumberPatternShouldBeRegular.cs class Program (line 5) | class Program method CompliantCases (line 9) | public void CompliantCases() method NonCompliantCases (line 45) | public void NonCompliantCases() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ObjectCreatedDropped.Latest.cs class Noncompliant (line 3) | class Noncompliant method CreatedOnly (line 5) | void CreatedOnly() type SomeRecord (line 10) | record SomeRecord(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ObjectCreatedDropped.cs class ObjectCreatedDropped (line 9) | class ObjectCreatedDropped method Method1 (line 11) | public object Method1() method Disposing (line 45) | void Disposing() class SomeDisposable (line 54) | class SomeDisposable : IDisposable method Dispose (line 56) | public void Dispose() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ObsoleteAttributesNeedExplanation.Latest.cs type Record (line 13) | [Obsolete] // Noncompliant {{Add an explanation.}} class Noncompliant (line 24) | class Noncompliant method WithDiagnostics (line 27) | [Obsolete("", true, DiagnosticId = "42")] // Noncompliant method WithDiagnosticsAndUrlFormat (line 30) | [Obsolete("", true, DiagnosticId = "42", UrlFormat = "https://sonarsou... class Compliant (line 34) | class Compliant method WithDiagnostics (line 36) | [Obsolete("explanation", true, DiagnosticId = "42")] method WithDiagnosticsAndUrlFormat (line 39) | [Obsolete("explanation", true, DiagnosticId = "42", UrlFormat = "https... class Ignore (line 43) | class Ignore method NamedParametersOnly (line 45) | [Obsolete(UrlFormat = "https://sonarsource.com")] class TestCases (line 49) | internal class TestCases method Bar (line 51) | public void Bar(IEnumerable collection) method Call (line 66) | private void Call(Action action) => action(1); class PartialProperties (line 69) | partial class PartialProperties class PartialProperties (line 78) | partial class PartialProperties FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ObsoleteAttributesNeedExplanation.cs class Noncompliant (line 3) | [Obsolete] // Noncompliant ^2#8 {{Add an explanation.}} method WithBrackets (line 6) | [Obsolete()] // Noncompliant method FullyDeclaredNamespace (line 9) | [System.Obsolete] // Noncompliant method GloballyDeclaredNamespace (line 12) | [global::System.Obsolete] // Noncompliant method WithNull (line 15) | [Obsolete(null)] // Noncompliant method WithEmptyString (line 18) | [Obsolete("")] // Noncompliant method WithWhiteSpace (line 21) | [Obsolete(" ")] // Noncompliant method WithTwoArguments (line 24) | [Obsolete("", true)] // Noncompliant method Multiple (line 27) | [Obsolete] // Noncompliant method Combined (line 31) | [Obsolete, CLSCompliant(false)] type Enum (line 35) | [Obsolete] // Noncompliant method Noncompliant (line 38) | [Obsolete] // Noncompliant method Method (line 41) | [Obsolete] // Noncompliant type IInterface (line 57) | [Obsolete] // Noncompliant method Method (line 60) | [Obsolete] // Noncompliant type ProgramStruct (line 65) | [Obsolete] // Noncompliant method Method (line 68) | [Obsolete] // Noncompliant class Compliant (line 72) | [Obsolete("explanation")] type Enum (line 75) | [Obsolete("explanation")] method Compliant (line 78) | [Obsolete("explanation")] method Method (line 81) | [Obsolete("explanation")] method WithTwoArguments (line 84) | [Obsolete("explanation", true)] type IComplaintInterface (line 100) | [Obsolete("explanation")] method Method (line 103) | [Obsolete("explanation")] type ComplaintStruct (line 107) | [Obsolete("explanation")] method Method (line 110) | [Obsolete("explanation")] class Ignore (line 114) | class Ignore method NamedParmetersDifferentOrderFP (line 117) | [Obsolete(error: true, message: "explanation")] // Noncompliant method NamedParmetersDifferentOrder (line 120) | [Obsolete(error: true, message: "")] // Noncompliant for wrong reason class NotApplicable (line 124) | class NotApplicable type Enum (line 126) | [CLSCompliant(false)] method NotApplicable (line 129) | NotApplicable() { } method Method (line 131) | void Method() { } method SameName (line 141) | [NotSystem.Obsolete] class ObsoleteAttribute (line 147) | public class ObsoleteAttribute : Attribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OperatorOverloadsShouldHaveNamedAlternatives.CSharp11.cs type IOperator (line 4) | internal interface IOperator where T : IOperator FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OperatorOverloadsShouldHaveNamedAlternatives.CSharp9.cs type FooNotCompliant (line 1) | public record FooNotCompliant type FooCompliant (line 27) | public record FooCompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OperatorOverloadsShouldHaveNamedAlternatives.cs class FooNotCompliant (line 3) | public class FooNotCompliant class FooCompliant (line 31) | public class FooCompliant method Add (line 56) | public FooCompliant Add(FooCompliant y) => null; method BitwiseAnd (line 57) | public FooCompliant BitwiseAnd(FooCompliant x, FooCompliant y) => null; method BitwiseOr (line 58) | public FooCompliant BitwiseOr(FooCompliant x, FooCompliant y) => null; method Divide (line 59) | public FooCompliant Divide(FooCompliant x, FooCompliant y) => null; method Xor (line 60) | public FooCompliant Xor(FooCompliant x, FooCompliant y) => null; method Equals (line 61) | public bool Equals(FooCompliant x, FooCompliant y) => true; method Compare (line 62) | public FooCompliant Compare(FooCompliant x, FooCompliant y) => null; method Decrement (line 63) | public FooCompliant Decrement(FooCompliant x) => null; method Increment (line 64) | public FooCompliant Increment(FooCompliant x) => null; method LeftShift (line 65) | public FooCompliant LeftShift(FooCompliant x, int y) => null; method RightShift (line 66) | public FooCompliant RightShift(FooCompliant x, int y) => null; method LogicalNot (line 67) | public FooCompliant LogicalNot(FooCompliant x) => null; method Mod (line 68) | public FooCompliant Mod(FooCompliant x, FooCompliant y) => null; method Multiply (line 69) | public FooCompliant Multiply(FooCompliant x, FooCompliant y) => null; method OnesComplement (line 70) | public FooCompliant OnesComplement(FooCompliant x) => null; method Subtract (line 71) | public FooCompliant Subtract(FooCompliant x, FooCompliant y) => null; method Negate (line 72) | public FooCompliant Negate(FooCompliant x) => null; method Plus (line 73) | public FooCompliant Plus(FooCompliant x) => null; class FooCompliant_OtherNames (line 77) | public class FooCompliant_OtherNames method CompareTo (line 84) | public FooCompliant CompareTo(FooCompliant x, FooCompliant y) => null; class FooCompliant_Static (line 87) | public class FooCompliant_Static method Add (line 91) | public static FooCompliant_Static Add(FooCompliant_Static y) => null; class FooCompliant_OtherArguments (line 94) | public class FooCompliant_OtherArguments method Add (line 99) | public FooCompliant_OtherArguments Add() => null; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OperatorsShouldBeOverloadedConsistently.Latest.cs type Compliant (line 1) | public record Compliant // Compliant as == operator cannot be overloaded... type OnlyPlus (line 10) | public record OnlyPlus // Compliant type OnlyMinus (line 15) | public record OnlyMinus // Compliant type OnlyMultiply (line 20) | public record OnlyMultiply // Compliant type OnlyDevide (line 25) | public record OnlyDevide // Compliant type OnlyReminder (line 30) | public record OnlyReminder // Compliant type IPlus (line 37) | public interface IPlus where TSelf : IPlus type IMinus (line 41) | public interface IMinus where TSelf : IMinus type IMulti (line 45) | public interface IMulti class OperatorsInExtensionNoEqualsOperator (line 50) | public class OperatorsInExtensionNoEqualsOperator // FN https://sonarsou... method OperatorsInExtensionNoEqualsOperator (line 56) | public OperatorsInExtensionNoEqualsOperator(int l, int r) class EqualsMethodsInExtensionsEqualsOperatorInClass (line 63) | public class EqualsMethodsInExtensionsEqualsOperatorInClass // Noncompliant class EqualsOperatorsInExtensionsEqualsMethodsInClass (line 69) | public class EqualsOperatorsInExtensionsEqualsMethodsInClass // FN https... method Equals (line 71) | public override bool Equals(object obj) => false; method GetHashCode (line 72) | public override int GetHashCode() => 0; class SingleOperatorsInClassEqualsOperatorsInExtensions (line 75) | public class SingleOperatorsInClassEqualsOperatorsInExtensions // Noncom... method Equals (line 80) | public override bool Equals(object obj) => false; method GetHashCode (line 81) | public override int GetHashCode() => 0; class EqualsOperatorsInClassSingleOperatorsInExtensions (line 84) | public class EqualsOperatorsInClassSingleOperatorsInExtensions // Noncom... class Extensions (line 91) | public static class Extensions method extension (line 93) | extension(OperatorsInExtensionNoEqualsOperator) method extension (line 99) | extension(EqualsMethodsInExtensionsEqualsOperatorInClass) method extension (line 105) | extension(EqualsOperatorsInExtensionsEqualsMethodsInClass) method extension (line 111) | extension(SingleOperatorsInClassEqualsOperatorsInExtensions) method extension (line 117) | extension(EqualsOperatorsInClassSingleOperatorsInExtensions) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OperatorsShouldBeOverloadedConsistently.cs class Foo (line 5) | public class Foo method Foo (line 11) | public Foo(int l, int r) class Foo2 (line 43) | public class Foo2 method Equals (line 53) | public override bool Equals(object obj) => false; method GetHashCode (line 54) | public override int GetHashCode() => 0; class Foo3 (line 57) | public class Foo3 method Equals (line 63) | public override bool Equals(object obj) => false; method GetHashCode (line 64) | public override int GetHashCode() => 0; class Foo4 (line 68) | public class Foo4 method Equals (line 73) | public override bool Equals(object obj) => false; method GetHashCode (line 74) | public override int GetHashCode() => 0; class Foo5 (line 77) | public class Foo5 // Compliant - Covered by CS0216 method Equals (line 81) | public override bool Equals(object obj) => false; method GetHashCode (line 82) | public override int GetHashCode() => 0; class Foo6 (line 85) | public class Foo6 class Foo8 (line 91) | public class Foo8 // Noncompliant {{Provide an implementation for: 'oper... class Foo9 (line 96) | public class Foo9 // Noncompliant {{Provide an implementation for: 'oper... class Foo10 (line 101) | public class Foo10 // Noncompliant {{Provide an implementation for: 'ope... class Foo11 (line 106) | public class Foo11 // Noncompliant {{Provide an implementation for: 'ope... class Foo12 (line 111) | public class Foo12 // Noncompliant {{Provide an implementation for: 'ope... class Foo13 (line 116) | public class Foo13 // Compliant as the unary operators are overriden class EqualsOperatorInClassEqualsMethodsInExtensions (line 123) | public class EqualsOperatorInClassEqualsMethodsInExtensions // Noncompliant class ClassicExtensions (line 129) | public static class ClassicExtensions method Equals (line 131) | public static bool Equals(this EqualsOperatorInClassEqualsMethodsInExt... method GetHashCode (line 132) | public static int GetHashCode(this EqualsOperatorInClassEqualsMethodsI... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OptionalParameter.CSharp10.cs class CallerMember (line 5) | public class CallerMember method Caller_ArgumentExpression (line 7) | public void Caller_ArgumentExpression(bool condition, [CallerArgumentE... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OptionalParameter.CSharp11.cs type IInterface (line 3) | public interface IInterface method Method (line 5) | static abstract void Method(int i = 42); class Base (line 9) | public class Base : IInterface method Method (line 11) | public static void Method(int i = 42) method Method2 (line 15) | public static void Method2(int i = 42) //Noncompliant {{Use the overlo... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OptionalParameter.Web.cs class MyController (line 5) | [ApiController] method Get (line 9) | [HttpGet] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OptionalParameter.cs type IInterface (line 5) | public interface IInterface method Method (line 7) | void Method(int i = 42); class Base (line 11) | public class Base method Method (line 13) | public virtual void Method(int i = 42) //Noncompliant {{Use the overlo... class OptionalParameter (line 17) | public class OptionalParameter : Base method Method (line 19) | public override void Method(int i = 42) //Compliant method OptionalParameter (line 23) | public OptionalParameter(int i = 0, // Noncompliant method OptionalParameter (line 27) | public OptionalParameter() method OptionalParameter (line 30) | private OptionalParameter(int i = 0) // Compliant, private method PrivateFoo (line 34) | private void PrivateFoo(int i = 42) // Compliant, private method InternalFoo (line 37) | internal void InternalFoo(int i = 42) // Compliant, internal method ProtectedFoo (line 40) | protected void ProtectedFoo(int i = 42) // Noncompliant method InternalProtectedFoo (line 43) | internal protected void InternalProtectedFoo(int i = 42) // Noncompliant method PublicFoo (line 47) | public void PublicFoo(int i = 42) // Noncompliant class CallerMember (line 51) | public class CallerMember method Caller_LineNumber (line 53) | public void Caller_LineNumber([CallerLineNumber] int line = 0) { } method Caller_FilePath (line 54) | public void Caller_FilePath([CallerFilePath] string sourceFilePath = "... method Caller_MemberName (line 55) | public void Caller_MemberName([CallerMemberName] string memberName = "... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OptionalParameterNotPassedToBaseCall.Latest.cs type Base (line 1) | record Base type Derived (line 7) | record Derived : Base FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OptionalParameterNotPassedToBaseCall.cs class BaseClass (line 3) | public class BaseClass method MyMethod (line 5) | public virtual void MyMethod(int j, int i = 1) { } method MyMethod2 (line 6) | public virtual void MyMethod2(int i = 1) { } class DerivedClass (line 9) | public class DerivedClass : BaseClass method MyMethod (line 11) | public override void MyMethod(int j, int i = 1) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OptionalParameterWithDefaultValue.Fixed.cs class OptionalParameterWithDefaultValue (line 8) | public class OptionalParameterWithDefaultValue class MyClass (line 10) | class MyClass method DoStuff (line 12) | public void DoStuff([Optional][DefaultParameterValue(4)]int i, int j... method DoStuff1 (line 17) | public void DoStuff1([Optional][DefaultParameterValue(value: 4)]int ... method DoStuff2 (line 22) | public void DoStuff2([Optional][DefaultParameterValue(4)]int i, int ... method DoStuff3 (line 27) | public void DoStuff3([DefaultValue(4)]int i, int j = 5) // okay, we ... method DoStuff4 (line 32) | public void DoStuff4([Optional][DefaultValue(typeof(int), "1")]int i... method Main (line 37) | public static void Main() method DoStuff5 (line 43) | public void DoStuff5([DefaultParameterValue(4)][DefaultValue(4)]int ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OptionalParameterWithDefaultValue.Latest.cs type OptionalParameterWithDefaultValue (line 8) | public interface OptionalParameterWithDefaultValue method Virtual (line 10) | static virtual void Virtual([Optional][DefaultValue(4)]int i, int j = ... method Abstract (line 15) | static abstract void Abstract([Optional] [DefaultValue(4)] int i, int ... method Abstract2 (line 17) | static abstract void Abstract2([Optional] [DefaultParameterValue(4)] i... method DoStuff3 (line 19) | static virtual void DoStuff3([Optional][DefaultParameterValue(4)]int i... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OptionalParameterWithDefaultValue.cs class OptionalParameterWithDefaultValue (line 8) | public class OptionalParameterWithDefaultValue class MyClass (line 10) | class MyClass method DoStuff (line 12) | public void DoStuff([Optional][DefaultValue(4)]int i, int j = 5) // ... method DoStuff1 (line 18) | public void DoStuff1([Optional][DefaultValue(value: 4)]int i, int j ... method DoStuff2 (line 23) | public void DoStuff2([Optional][DefaultParameterValue(4)]int i, int ... method DoStuff3 (line 28) | public void DoStuff3([DefaultValue(4)]int i, int j = 5) // okay, we ... method DoStuff4 (line 33) | public void DoStuff4([Optional][DefaultValue(typeof(int), "1")]int i... method Main (line 38) | public static void Main() method DoStuff5 (line 44) | public void DoStuff5([DefaultParameterValue(4)][DefaultValue(4)]int ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OptionalRefOutParameter.Fixed.cs class OptionalRefOutParameter (line 7) | public class OptionalRefOutParameter method DoStuff (line 9) | public void DoStuff(ref int i) // Fixed method DoStuff2 (line 13) | public void DoStuff2(out int i) // Fixed method DoStuff3 (line 18) | public void DoStuff3([Optional] int i) method Main (line 23) | public static void Main() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OptionalRefOutParameter.Latest.cs type OptionalRefOutParameter (line 3) | public record OptionalRefOutParameter FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OptionalRefOutParameter.cs class OptionalRefOutParameter (line 7) | public class OptionalRefOutParameter method DoStuff (line 9) | public void DoStuff([Optional] ref int i) // Noncompliant method DoStuff2 (line 14) | public void DoStuff2([Optional] out int i) // Noncompliant {{Remove th... method DoStuff3 (line 19) | public void DoStuff3([Optional] int i) method Main (line 24) | public static void Main() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OrderByRepeated.Fixed.cs class OrderByRepeated (line 8) | class OrderByRepeated method Test (line 10) | public void Test() method Coverage (line 23) | public void Coverage() method Foo (line 36) | public void Foo() { } class MyExtensions (line 39) | static class MyExtensions method OrderBy (line 41) | public static IOrderedEnumerable OrderBy(this IEnumerable so... method ThenBy (line 42) | public static IEnumerable ThenBy(this IEnumerable source, st... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OrderByRepeated.cs class OrderByRepeated (line 8) | class OrderByRepeated method Test (line 10) | public void Test() method Coverage (line 24) | public void Coverage() method Foo (line 37) | public void Foo() { } class MyExtensions (line 40) | static class MyExtensions method OrderBy (line 42) | public static IOrderedEnumerable OrderBy(this IEnumerable so... method ThenBy (line 43) | public static IEnumerable ThenBy(this IEnumerable source, st... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OverrideGetHashCodeOnOverridingEquals.Latest.cs type OverrideOnlyGetHashCode (line 1) | public record OverrideOnlyGetHashCode // Compliant - `Equals can't be ov... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/OverrideGetHashCodeOnOverridingEquals.cs type IInterface (line 6) | interface IInterface class OverrideOnlyEqualsClass (line 11) | class OverrideOnlyEqualsClass // Noncompliant {{This class overrides 'Eq... method Equals (line 14) | public override bool Equals(object obj) class OverrideOnlyGetHashCodeClass (line 20) | class OverrideOnlyGetHashCodeClass // Noncompliant {{This class override... method GetHashCode (line 23) | public override int GetHashCode() class ValidClass (line 29) | class ValidClass method Equals (line 31) | public override bool Equals(object obj) method GetHashCode (line 36) | public override int GetHashCode() type OverrideOnlyEqualsStruct (line 42) | struct OverrideOnlyEqualsStruct // Noncompliant {{This struct overrides ... method Equals (line 45) | public override bool Equals(object obj) type OverrideOnlyGetHashCodeStruct (line 51) | struct OverrideOnlyGetHashCodeStruct // Noncompliant {{This struct overr... method GetHashCode (line 54) | public override int GetHashCode() type ValidStruct (line 60) | struct ValidStruct method Equals (line 62) | public override bool Equals(object obj) method GetHashCode (line 67) | public override int GetHashCode() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PInvokesShouldNotBeVisible.CSharp11.cs type IInterface (line 3) | public interface IInterface method RemoveDirectory1 (line 5) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory2 (line 8) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PInvokesShouldNotBeVisible.CSharp9.cs type Record (line 3) | public record Record FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PInvokesShouldNotBeVisible.cs class Program (line 6) | public class Program method RemoveDirectory1 (line 8) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory2 (line 12) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory3 (line 15) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory4 (line 18) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory5 (line 21) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] method RemoveDirectory6 (line 24) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] // Error [CS060... method RemoveDirectory7 (line 27) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] // Error [CS0601] class Foo (line 31) | internal class Foo method RemoveDirectory1 (line 33) | [DllImport("kernel32.dll", CharSet = CharSet.Unicode)] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ParameterAssignedTo.Latest.cs type Record (line 12) | public record Record type Record2 (line 35) | public record struct Record2 class AClass (line 45) | public class AClass method Foo (line 47) | void Foo(int x) class PartialProperties (line 53) | public partial class PartialProperties class PartialProperties (line 71) | public partial class PartialProperties FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ParameterAssignedTo.cs class ParameterAssignedToStatic (line 6) | public static class ParameterAssignedToStatic method f7 (line 8) | static void f7(this int a) method f0 (line 26) | static void f0(this string x) class ParameterAssignedTo (line 33) | public class ParameterAssignedTo method f00 (line 35) | void f00(string x) method f01 (line 41) | void f01(string x) method f02 (line 48) | void f02(int x) method f03 (line 54) | void f03(int x) method f04 (line 59) | void f04(int x) method f05 (line 64) | void f05(int x) method f06 (line 69) | void f06(int x) method f1 (line 74) | void f1(int a) method f2 (line 79) | void f2(int a) method f3 (line 85) | void f3(ref int a) method f4 (line 90) | void f4(out int a) method f5 (line 95) | static void f5() method f6 (line 99) | void f6(int a, int b, int c, int d, int e) method f8 (line 110) | void f8(Func param) method f9 (line 171) | public void f9() method f10 (line 176) | public void f10(Func param) method f11 (line 182) | public void f11(int a, int b, int c, int d, bool e, int f) method f12 (line 192) | public int f12(int param) method f13 (line 199) | public void f13(string x) method f14 (line 208) | public void f14(string x) method f15 (line 213) | public void f15(string x) method f16 (line 219) | public string f16(string x) method f17 (line 228) | public string f17(string text) class ExceptionHandling (line 240) | public class ExceptionHandling method foo (line 242) | void foo() method quix (line 256) | void quix(Exception e) method serialized (line 265) | void serialized() method nested (line 285) | void nested() method FormatMessage (line 305) | private string FormatMessage(Exception e) => ""; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ParameterNameMatchesOriginal.Latest.Partial.cs class PartialIndexers (line 3) | public partial class PartialIndexers FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ParameterNameMatchesOriginal.Latest.cs type IParameterNamesInPartialMethods (line 3) | public partial interface IParameterNamesInPartialMethods method DoSomething (line 5) | partial void DoSomething(int x, int y); method DoSomething2 (line 6) | partial void DoSomething2(int x, int y); method DoSomething (line 11) | partial void DoSomething(int x, int y) method DoSomething2 (line 15) | partial void DoSomething2(int someParam, int y) //Noncompliant {{Renam... type IParameterNamesInPartialMethods (line 9) | public partial interface IParameterNamesInPartialMethods method DoSomething (line 5) | partial void DoSomething(int x, int y); method DoSomething2 (line 6) | partial void DoSomething2(int x, int y); method DoSomething (line 11) | partial void DoSomething(int x, int y) method DoSomething2 (line 15) | partial void DoSomething2(int someParam, int y) //Noncompliant {{Renam... type Record (line 23) | public partial record Record type Record (line 35) | public partial record Record type BaseRecord (line 45) | public abstract record BaseRecord type RecordOne (line 51) | public record RecordOne : BaseRecord type IAnotherInterface (line 60) | public interface IAnotherInterface method DoSomething (line 62) | static abstract void DoSomething(string value); method DoSomethingElse (line 63) | static abstract void DoSomethingElse(string value); class AnotherClass (line 66) | public class AnotherClass : IAnotherInterface method DoSomething (line 68) | public static void DoSomething(string renamedParam) // Noncompliant method DoSomethingElse (line 72) | public static void DoSomethingElse(string value) class PartialIndexers (line 80) | public partial class PartialIndexers FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ParameterNameMatchesOriginal.cs class ParameterNamesInPartialMethod (line 6) | public partial class ParameterNamesInPartialMethod method DoSomething (line 8) | partial void DoSomething(int x, int y); method DoSomething2 (line 9) | partial void DoSomething2(int x, int y); method DoSomething3 (line 11) | partial void DoSomething3(int x, int y); method DoSomething4 (line 13) | public void DoSomething4(int x, int y) method DoSomething (line 20) | partial void DoSomething(int x, int y) method DoSomething2 (line 25) | partial void DoSomething2(int someParam, int y) //Noncompliant {{Renam... method DoSomething3 (line 31) | partial void DoSomething3(int x, int y, int z); class ParameterNamesInPartialMethod (line 18) | public partial class ParameterNamesInPartialMethod method DoSomething (line 8) | partial void DoSomething(int x, int y); method DoSomething2 (line 9) | partial void DoSomething2(int x, int y); method DoSomething3 (line 11) | partial void DoSomething3(int x, int y); method DoSomething4 (line 13) | public void DoSomething4(int x, int y) method DoSomething (line 20) | partial void DoSomething(int x, int y) method DoSomething2 (line 25) | partial void DoSomething2(int someParam, int y) //Noncompliant {{Renam... method DoSomething3 (line 31) | partial void DoSomething3(int x, int y, int z); class BaseClass (line 34) | public abstract class BaseClass method DoSomethingVirtual (line 36) | public virtual void DoSomethingVirtual(int x, int y) method DoSomethingAbstract (line 40) | public abstract void DoSomethingAbstract(int x, int y); method SomeMethod (line 123) | public abstract void SomeMethod(T someParameter); method SomeMethod (line 125) | public abstract void SomeMethod(T someParameter, int intParam); class ChildClass (line 43) | public class ChildClass : BaseClass method DoSomethingAbstract (line 45) | public override void DoSomethingAbstract(int x, int someParam) //Nonco... method DoSomethingVirtual (line 50) | public override void DoSomethingVirtual(int x, int someParam) //Noncom... class ChildClassLevel2 (line 56) | public abstract class ChildClassLevel2 : ChildClass method DoSomethingAbstract (line 58) | public override void DoSomethingAbstract(int x, int y) //Noncompliant ... method DoSomethingVirtual (line 63) | public override void DoSomethingVirtual(int x, int y) //Noncompliant {... class InterfaceImplementation (line 69) | public class InterfaceImplementation : IComparer method Compare (line 71) | public int Compare(InterfaceImplementation a, InterfaceImplementation y) type IGenericInterface (line 77) | public interface IGenericInterface method DoSomething (line 79) | void DoSomething(); method DoSomething (line 80) | void DoSomething(A value); method DoSomething (line 81) | void DoSomething(A value, int intValue); method DoSomethingElse (line 82) | void DoSomethingElse(A value); method DoSomethingElse (line 83) | void DoSomethingElse(A value, ParameterClass parameterClassValue); method TryOneMoreTime (line 84) | void TryOneMoreTime(AnotherParameterClass value); method DoSomethingCaseSensitive (line 85) | void DoSomethingCaseSensitive(A value, int intValue); class ParameterClass (line 87) | public class ParameterClass { } class AnotherParameterClass (line 88) | public class AnotherParameterClass { } class Implementation (line 89) | public class Implementation : IGenericInterface method DoSomething (line 91) | public void DoSomething() { } method DoSomething (line 92) | public void DoSomething(ParameterClass parameter) { } method DoSomething (line 93) | public void DoSomething(AnotherParameterClass randomName) { } method DoSomethingElse (line 94) | public void DoSomethingElse(ParameterClass completelyAnotherName) { } method DoSomething (line 95) | public void DoSomething(ParameterClass value, int myValue) { } method DoSomethingElse (line 97) | public void DoSomethingElse(ParameterClass value, ParameterClass val) { } method TryOneMoreTime (line 99) | public void TryOneMoreTime(AnotherParameterClass anotherParameter) { } method DoSomethingCaseSensitive (line 101) | public void DoSomethingCaseSensitive(ParameterClass Value, int IntValu... type StructImplementation (line 105) | public struct StructImplementation : IGenericInterface method DoSomething (line 107) | public void DoSomething() { } method DoSomething (line 108) | public void DoSomething(ParameterClass parameter) { } method DoSomething (line 109) | public void DoSomething(AnotherParameterClass randomName) { } method DoSomethingElse (line 110) | public void DoSomethingElse(ParameterClass completelyAnotherName) { } method DoSomething (line 111) | public void DoSomething(ParameterClass value, int myValue) { } method DoSomethingElse (line 113) | public void DoSomethingElse(ParameterClass value, ParameterClass val) { } method TryOneMoreTime (line 115) | public void TryOneMoreTime(AnotherParameterClass anotherParameter) { } method DoSomethingCaseSensitive (line 117) | public void DoSomethingCaseSensitive(ParameterClass Value, int IntValu... class BaseClass (line 121) | public abstract class BaseClass method DoSomethingVirtual (line 36) | public virtual void DoSomethingVirtual(int x, int y) method DoSomethingAbstract (line 40) | public abstract void DoSomethingAbstract(int x, int y); method SomeMethod (line 123) | public abstract void SomeMethod(T someParameter); method SomeMethod (line 125) | public abstract void SomeMethod(T someParameter, int intParam); class ClassOne (line 128) | public class ClassOne : BaseClass method SomeMethod (line 130) | public override void SomeMethod(int renamedParam) { } method SomeMethod (line 132) | public override void SomeMethod(int someParameter, int renamedParam) { } class AbstractClassWithGenericMethod (line 136) | public abstract class AbstractClassWithGenericMethod method Foo (line 138) | abstract public void Foo(T val); method Bar (line 139) | abstract public void Bar(T val); class InheritedClassWithDefinition (line 142) | public class InheritedClassWithDefinition : AbstractClassWithGenericMethod method Foo (line 144) | public override void Foo(T myNewName) { } method Bar (line 146) | public override void Bar(T val) { } type IAnotherGenericInterface (line 149) | public interface IAnotherGenericInterface method DoSomething (line 151) | void DoSomething(A value); method DoSomething (line 152) | void DoSomething(A value, int intValue); type IAnotherInterface (line 155) | public interface IAnotherInterface : IAnotherGenericInterface { } type BaseInterface (line 181) | public interface BaseInterface method Apply (line 183) | void Apply(SomeInterface param); class BasicImplementation (line 186) | public class BasicImplementation : BaseInterface method Apply (line 188) | public void Apply(SomeInterface intValueParam) { } class StillGeneric (line 191) | public class StillGeneric : BaseInterface method Apply (line 193) | public void Apply(SomeInterface renamedParam) { } class AbstractClass (line 196) | public abstract class AbstractClass method Apply (line 198) | public abstract void Apply(SomeInterface intValueParam); class OverridenCompliant (line 201) | public class OverridenCompliant : AbstractClass method Apply (line 203) | public override void Apply(SomeInterface intValueParam) { } class OverridenNonCompliant (line 206) | public class OverridenNonCompliant : AbstractClass method Apply (line 208) | public override void Apply(SomeInterface renamedParam) { } type BaseInterface2 (line 211) | public interface BaseInterface2 method Apply (line 213) | void Apply(Tuple param); class SomeClass (line 216) | public class SomeClass : BaseInterface2 method Apply (line 218) | public void Apply(Tuple renamed) { } class BaseRepro (line 221) | public abstract class BaseRepro method SomeMethod (line 223) | public abstract int SomeMethod(int SomeParam1, int SomeParam2); class Reproducer (line 226) | public class Reproducer : BaseRepro method SomeMethod (line 228) | public override int SomeMethod(int _, int SomeParam2) => SomeParam2; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ParameterNamesShouldNotDuplicateMethodNames.cs class Program (line 6) | class Program method Method1 (line 8) | public void Method1(string method1, string METHOD1, string argument) method @int (line 16) | public int @int(int @int) => 0; method @int (line 19) | public int @int(string @int1) => 0; class WithLocalFunctions (line 22) | class WithLocalFunctions method Method (line 24) | public void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ParameterTypeShouldMatchRouteTypeConstraint.Latest.cs class ParameterTypeShouldMatchRouteTypeConstraint_Constant (line 5) | [Route("""/route/{RawStringLiteralParam:bool}""")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ParameterTypeShouldMatchRouteTypeConstraint.Partial.razor.cs class ParameterTypeShouldMatchRouteTypeConstraint_Partial (line 6) | public partial class ParameterTypeShouldMatchRouteTypeConstraint_Partial... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ParameterTypeShouldMatchRouteTypeConstraint.cs class ParameterTypeShouldMatchRouteTypeConstraint (line 5) | [Route("/route/{BoolParam:bool}")] // Secondary [bool] {{This route para... class ParameterTypeShouldMatchRouteTypeConstraint_EdgeCase (line 29) | [Route("/route/{FullyQualifiedParam:bool}")] // Secondary [fully-qualifi... class Constants (line 67) | public static class Constants class ParameterTypeShouldMatchRouteTypeConstraint_Constant (line 75) | [Route(Constants.COMPLIANT_ROUTE)] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ParameterValidationInAsyncShouldBeWrapped.CSharp10.cs class InvalidCases (line 7) | public class InvalidCases method FooAsync (line 9) | public static async Task FooAsync(string something) // Noncomp... method ThrowExpressionAsync (line 18) | public static async Task ThrowExpressionAsync(string something... class ValidCases (line 27) | public class ValidCases method FooAsync (line 29) | public static Task FooAsync(string something) method FooInternalAsync (line 36) | private static async Task FooInternalAsync(string something) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ParameterValidationInAsyncShouldBeWrapped.CSharp11.cs type IInvalidCases (line 6) | public interface IInvalidCases method FooAsync (line 8) | static virtual async Task FooAsync(string something) // Noncom... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ParameterValidationInAsyncShouldBeWrapped.cs class InvalidCases (line 8) | public class InvalidCases method FooAsync (line 10) | public static async Task FooAsync(string something) // Noncomp... method IndirectUsageAsync (line 20) | public static async Task IndirectUsageAsync(string something) ... method IndirectUsageWithMethodCallAsync (line 29) | public static async Task IndirectUsageWithMethodCallAsync(stri... method GetArgumentExpression (line 38) | private static ArgumentNullException GetArgumentExpression(string name) method OnSomeEvent (line 44) | public async void OnSomeEvent(object sender, EventArgs args) // Compliant method Foo (line 54) | public void Foo(object sender, EventArgs args) { } class ValidCases (line 57) | public class ValidCases class Repro_6449 (line 60) | public class Repro_6449 method CheckAsync (line 62) | public Task CheckAsync() => Task.FromResult(new int[] { 1 }); method Check2Async (line 63) | public Task Check2Async() => Task.FromResult(1); method HasS4457Async (line 65) | public async Task HasS4457Async(int request) // Compliant method FooAsync (line 73) | public static Task FooAsync(string something) method FooInternalAsync (line 80) | private static async Task FooInternalAsync(string something) method DoAsync (line 86) | public async Task DoAsync() // Compliant - no args check method FooAsync (line 91) | public async Task FooAsync(int age) // Compliant - the exception doesn... method WithLocalFunctionAsync (line 102) | public static Task WithLocalFunctionAsync(string something) // Complia... method WithFuncAsync (line 118) | public async Task WithFuncAsync() method WithAsyncFunc (line 134) | public Task WithAsyncFunc(string s) method DoSomethingAsync (line 147) | public async Task DoSomethingAsync(string value) method OnButtonPressed (line 158) | private async void OnButtonPressed( object sender, EventArgs e) // Com... method Main (line 167) | private static async Task Main(string[] args) // Compliant, should n... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ParameterValidationInYieldShouldBeWrapped.Latest.cs class InvalidCases (line 5) | public static class InvalidCases method YieldReturn (line 7) | public static IEnumerable YieldReturn(string something) // Non... method YieldBreak (line 15) | public static IEnumerable YieldBreak(string something) // Noncomp... method ThrowExpression (line 23) | public static IEnumerable ThrowExpression(string something) // FN... method AsyncThenYield (line 31) | public static async IAsyncEnumerable AsyncThenYield(object arg) /... method NestedAsyncThenYield (line 44) | public static async IAsyncEnumerable NestedAsyncThenYield(object ... class ValidCases (line 57) | public static class ValidCases method Foo (line 59) | public static IEnumerable Foo(string something) // Compliant -... method FooIterator (line 66) | private static IEnumerable FooIterator(string something) type IInvalidCases (line 72) | public interface IInvalidCases method Foo (line 74) | public static virtual IEnumerable Foo(string something) // Non... class InlineArrays (line 83) | class InlineArrays method Invalid (line 85) | IEnumerable Invalid(Buffer? buffer) // Noncompliant method Valid (line 94) | IEnumerable Valid(Buffer? buffer) // Compliant type Buffer (line 107) | [System.Runtime.CompilerServices.InlineArray(10)] class NewExtensions (line 114) | public static class NewExtensions method Noncompliant (line 118) | public IEnumerable Noncompliant(Func predicate... method Compliant (line 131) | public IEnumerable Compliant(Func predicate) method CompliantIterator (line 140) | private static IEnumerable CompliantIterator(IEnumerable YieldReturn(string something) // Non... method GetSomething (line 17) | public static IEnumerable GetSomething(string value) // Noncompli... method YieldBreak (line 27) | public static IEnumerable YieldBreak(int a) // Noncompliant method IndirectUsageAsync (line 37) | public static IEnumerable IndirectUsageAsync(string something)... method IndirectUsageWithMethodCallAsync (line 45) | public static IEnumerable IndirectUsageWithMethodCallAsync(str... method GetArgumentExpression (line 53) | private static ArgumentNullException GetArgumentExpression(string name) method ThrowWithoutArgument (line 59) | public static IEnumerable ThrowWithoutArgument(int a) // Noncompl... method ThrowWithAdHocArgument (line 66) | public static IEnumerable ThrowWithAdHocArgument(int a) // Noncom... class ValidCases (line 73) | public static class ValidCases method Foo (line 75) | public static IEnumerable Foo(string something) // Compliant -... method FooIterator (line 82) | private static IEnumerable FooIterator(string something) method WithLocalFunction (line 87) | public static IEnumerable WithLocalFunction(string something) ... method WithFunc (line 99) | public static IEnumerable WithFunc(string foo) class NullCoalescing (line 117) | class NullCoalescing method Invalid (line 119) | IEnumerable Invalid(int? i) // FN method ValidWithSecondMethod (line 126) | IEnumerable ValidWithSecondMethod(int? i) // Compliant method SecondMethod (line 132) | IEnumerable SecondMethod() { yield return 1; } method ValidWithLocalFunction (line 134) | IEnumerable ValidWithLocalFunction(int? i) // Compliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ParametersCorrectOrder.Latest.cs type IInterface (line 5) | public interface IInterface method SomeMethod (line 7) | static virtual void SomeMethod(int a, int b) { } class SomeClass (line 10) | public class SomeClass where T : IInterface method SomeClass (line 12) | public SomeClass() class Lambdas (line 24) | class Lambdas method InvokedFromAnotherLambda (line 28) | void InvokedFromAnotherLambda() method InvokedFromLocalFunction (line 41) | void InvokedFromLocalFunction() method InvokedFromAMethod (line 55) | void InvokedFromAMethod(int a, int b) class StaticLocalFunctions (line 62) | class StaticLocalFunctions method M1 (line 64) | public void M1() class BaseConstructor (line 81) | class BaseConstructor class Base (line 83) | class Base(int a, int b) // Secondary [Base1, Base2, Base3, Base4, Bas... method Base (line 85) | Base(int a, int b, string c) : this(b, a) { } method Base (line 87) | Base(string c, int a, int b) : this(b, a) { } class ParamsFullyInverted (line 90) | class ParamsFullyInverted(int a, int b) : Base(b, a); class ParamsPartiallyInverted (line 92) | class ParamsPartiallyInverted(int a, int b, int c) : BaseConstructor.B... class ParamsPartiallyInvertedWithAdditionalParamAfter (line 94) | class ParamsPartiallyInvertedWithAdditionalParamAfter(int a, int b, st... class ParamsPartiallyInvertedWithAdditionalParamBefore (line 95) | class ParamsPartiallyInvertedWithAdditionalParamBefore(string s, int a... method MyMethod (line 97) | Base MyMethod(int b, int a) class WithRecordStructs (line 104) | class WithRecordStructs method Basics (line 106) | void Basics(int a, int b, int c) method WithPromotion (line 111) | void WithPromotion(short a, short b) method WithCasting (line 117) | void WithCasting(long a, long b) type SomeRecord (line 122) | record SomeRecord(int a, int b) // Secondary [SomeRecord1, SomeRecord... class WithRecords (line 129) | class WithRecords method Basics (line 131) | void Basics(int a, int b, int c) method WithPromotion (line 136) | void WithPromotion(short a, short b) method WithCasting (line 141) | void WithCasting(long a, long b) type SomeRecordStruct (line 146) | record struct SomeRecordStruct(int a, int b) // Secondary [SomeRecordS... class DefaultLambdaParameters (line 156) | public class DefaultLambdaParameters method InvokedFromAnotherLambda (line 158) | void InvokedFromAnotherLambda() method InvokedFromLocalFunction (line 171) | void InvokedFromLocalFunction() class NewExtensions (line 180) | public static class NewExtensions method divide (line 184) | static double divide(int divisor, int dividend) // Sec... class TestExtensions (line 198) | public class TestExtensions method doTheThing (line 200) | void doTheThing(int divisor, int dividend) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ParametersCorrectOrder.cs class Params (line 6) | public class Params method method (line 8) | public void method(int i, int k = 5, params int[] rest) method call (line 12) | public void call() method call2 (line 17) | public void call2() class Other (line 25) | public static class Other method call (line 27) | public static void call() class Extensions (line 37) | public static class Extensions method Ex (line 39) | public static void Ex(this string self, string v1, string v2) method Ex (line 43) | public static void Ex(this string self, string v1, string v2, int x) class ParametersCorrectOrder (line 52) | public partial class ParametersCorrectOrder method divide (line 54) | partial void divide(int divisor, int someOther, int dividend, int p = ... method divide (line 60) | partial void divide(int a, int b, int c, int p, int other, int other2) method m (line 65) | public void m(int a, int b) // Secondary [5] method doTheThing (line 69) | public void doTheThing() class ParametersCorrectOrder (line 58) | public partial class ParametersCorrectOrder method divide (line 54) | partial void divide(int divisor, int someOther, int dividend, int p = ... method divide (line 60) | partial void divide(int a, int b, int c, int p, int other, int other2) method m (line 65) | public void m(int a, int b) // Secondary [5] method doTheThing (line 69) | public void doTheThing() class A (line 108) | public class A class B (line 110) | public class B class C (line 112) | public class C method C (line 114) | public C(string left, string right) { } class Foo (line 119) | public class Foo method Foo (line 121) | public Foo(string left, string right) { } method Method (line 123) | public void Method(string left, string right) { } method Bar (line 125) | public void Bar() class Program (line 141) | class Program method Struct (line 143) | void Struct(DateTime a, string b) method ClassAndInterface (line 148) | void ClassAndInterface(Boo a, string b) method Bar1 (line 154) | void Bar1(DateTime b, string a) { } method Bar2 (line 155) | void Bar2(Boo b, string a) { } method Bar3 (line 156) | void Bar3(IBoo b, string a) { } type IBoo (line 158) | interface IBoo { } class Boo (line 159) | class Boo : IBoo { } class WithLocalFunctions (line 161) | class WithLocalFunctions method M2 (line 163) | public void M2() method M3 (line 176) | public void M3() class InvokingConstructorViaNew (line 188) | class InvokingConstructorViaNew method Test (line 190) | void Test(int a, int b, int c) class SomeClass (line 198) | class SomeClass method SomeClass (line 200) | public SomeClass(int a, int b) { } method SomeClass (line 201) | public SomeClass(int a, int b, int c) { } class InvokingConstructorViaThis (line 205) | class InvokingConstructorViaThis class SomeClass (line 207) | class SomeClass method SomeClass (line 209) | public SomeClass(int a, int b) { } method SomeClass (line 210) | public SomeClass(int a, int b, string c) : this(b, a) { } method SomeClass (line 211) | public SomeClass(string c, int a, int b) : this(b, a) { } class InvokingConstructorViaBase (line 215) | class InvokingConstructorViaBase class Base (line 217) | class Base method Base (line 219) | public Base(int a, int b) { } method Base (line 220) | public Base(int a, int b, int c) { } class ParamsFullyInverted (line 223) | class ParamsFullyInverted : Base method ParamsFullyInverted (line 225) | public ParamsFullyInverted(int a, int b) : base(b, a) { } class ParamsPartiallyInverted (line 229) | class ParamsPartiallyInverted : Base method ParamsPartiallyInverted (line 231) | public ParamsPartiallyInverted(int a, int b, int c) : base(b, a, c) { } class ParamsFullyInvertedWithAdditionalParamAfter (line 234) | class ParamsFullyInvertedWithAdditionalParamAfter : Base method ParamsFullyInvertedWithAdditionalParamAfter (line 236) | public ParamsFullyInvertedWithAdditionalParamAfter(int a, int b, str... class ParamsFullyInvertedWithAdditionalParamBefore (line 239) | class ParamsFullyInvertedWithAdditionalParamBefore : Base method ParamsFullyInvertedWithAdditionalParamBefore (line 241) | public ParamsFullyInvertedWithAdditionalParamBefore(string s, int a,... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PartCreationPolicyShouldBeUsedWithExportAttribute.Latest.cs type Program1 (line 3) | [Export(typeof(object))] type Program2_Base (line 9) | [InheritedExport(typeof(object))] type Program2 (line 15) | [PartCreationPolicy(CreationPolicy.Any)] // Compliant, InheritedExport i... type Program3 (line 20) | [PartCreationPolicy(CreationPolicy.Any)] // Noncompliant type Program4 (line 25) | [PartCreationPolicy(CreationPolicy.Any)] // Noncompliant type Foo (line 36) | [Export(typeof(Foo))] type Bar (line 42) | [PartCreationPolicy(CreationPolicy.Any)] // Noncompliant class PrimaryConstructors (line 47) | class PrimaryConstructors class Class1 (line 49) | [PartCreationPolicy(CreationPolicy.Any)] // Noncompliant class Class2 (line 52) | [InheritedExport(typeof(object))] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PartCreationPolicyShouldBeUsedWithExportAttribute.cs class Program1 (line 4) | [Export(typeof(object))] class Program2_Base (line 10) | [InheritedExport(typeof(object))] class Program2 (line 16) | [PartCreationPolicy(CreationPolicy.Any)] // Compliant, InheritedExport i... class Program3 (line 21) | [PartCreationPolicy(CreationPolicy.Any)] // Noncompliant {{Add the 'Expo... class Program4 (line 27) | [PartCreationPolicy(CreationPolicy.Any)] // Noncompliant, Export is not ... class Program5 (line 32) | class Program5 method Method (line 34) | [PartCreationPolicy(CreationPolicy.Any)] // Error [CS0592] - Compliant... class Program6 (line 44) | [MyExport] class Program7_Base (line 48) | [MyInheritedExport(typeof(object))] class Program7 (line 52) | [PartCreationPolicy(CreationPolicy.Any)] // Compliant, MyInheritedExport... class Program8 (line 55) | [Foo] class Program9 (line 59) | [PartCreationPolicy(CreationPolicy.NonShared)] // Compliant, InheritedEx... class Program11 (line 62) | [PartCreationPolicy(CreationPolicy.Shared)] // Compliant, MyInheritedExp... class Program12 (line 65) | [PartCreationPolicy(CreationPolicy.NonShared)] // Noncompliant class MyExportAttribute (line 68) | class MyExportAttribute : ExportAttribute { } class MyInheritedExportAttribute (line 70) | class MyInheritedExportAttribute : InheritedExportAttribute method MyInheritedExportAttribute (line 72) | public MyInheritedExportAttribute(System.Type type) { } class FooAttribute (line 75) | class FooAttribute : Attribute { } type IMyInheritedExportInterface (line 77) | [InheritedExport(typeof(object))] type IFoo (line 80) | interface IFoo { } type IBar (line 81) | interface IBar { } type IQix (line 82) | interface IQix { } class AClass1 (line 92) | [AliasForExport(typeof(object))] class AClass2 (line 96) | [AliasForInheritedExport(typeof(object))] class AClass3 (line 100) | [AliasForExport(typeof(object))] class AClass4 (line 104) | [AliasForPartCreationPolicy(CreationPolicy.Any)] // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PartialMethodNoImplementation.Latest.Partial.cs type Record3 (line 1) | public partial record Record3 type RecordStruct3 (line 31) | public partial record struct RecordStruct3 class PartialConstructorHasImplementation (line 61) | public partial class PartialConstructorHasImplementation method PartialConstructorHasImplementation (line 63) | public partial PartialConstructorHasImplementation() { } class PartialConstructorNoImplementation (line 66) | public partial class PartialConstructorNoImplementation FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PartialMethodNoImplementation.Latest.cs type Record (line 1) | public partial record Record type Record (line 17) | public partial record Record type Record2 (line 40) | public partial record Record2 type Record3 (line 62) | public partial record Record3 type RecordStruct (line 79) | public partial record struct RecordStruct type RecordStruct (line 93) | public partial record struct RecordStruct type RecordStruct3 (line 116) | public partial record struct RecordStruct3 class PartialConstructorHasImplementation (line 131) | public partial class PartialConstructorHasImplementation method PartialConstructorHasImplementation (line 133) | public partial PartialConstructorHasImplementation(); class PartialConstructorNoImplementation (line 136) | public partial class PartialConstructorNoImplementation method PartialConstructorNoImplementation (line 138) | public partial PartialConstructorNoImplementation(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PartialMethodNoImplementation.cs class PartialMethodNoImplementation (line 7) | public abstract partial class PartialMethodNoImplementation method Method (line 9) | partial void Method(); method OtherM (line 12) | void OtherM() method OkMethod (line 21) | partial void OkMethod(); method OkMethod (line 22) | partial void OkMethod() method OkMethod2 (line 27) | partial void OkMethod2() method OkMethod2 (line 31) | partial void OkMethod2(); method M (line 33) | public abstract void M(); method ArrowMethod (line 35) | partial void ArrowMethod(string s); method ArrowMethod (line 36) | partial void ArrowMethod(string s) => Console.WriteLine(s); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PasswordsShouldBeStoredCorrectly.Core.cs class Testcases (line 7) | class Testcases method PasswordHasherOptions_IterationCount (line 12) | void PasswordHasherOptions_IterationCount(int iterations) method PasswordHasherOptions_CompatibilityMode (line 52) | void PasswordHasherOptions_CompatibilityMode(PasswordHasherCompatibili... method KeyDerivation_Pbkdf2 (line 91) | void KeyDerivation_Pbkdf2(int iterations) method Rfc2898DeriveBytes_Pbkdf2 (line 119) | void Rfc2898DeriveBytes_Pbkdf2(int iterations, byte[] bs, HashAlgorith... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PointersShouldBePrivate.CSharp11.cs class NativeInts (line 3) | public unsafe class NativeInts FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PointersShouldBePrivate.CSharp9.cs type Record (line 3) | public unsafe record Record class Class (line 14) | public unsafe class Class FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PointersShouldBePrivate.cs class Program (line 6) | public class Program class PublicInnerClass (line 31) | public class PublicInnerClass class PrivateInnerClass (line 36) | private class PrivateInnerClass class InternalInnerClass (line 41) | internal class InternalInnerClass class PointerTypes (line 47) | public unsafe class PointerTypes class PublicInnerClass (line 70) | public class PublicInnerClass class PrivateInnerClass (line 75) | private class PrivateInnerClass class InternalInnerClass (line 80) | internal class InternalInnerClass type SomeStruct (line 85) | public struct SomeStruct FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PreferGuidEmpty.Fixed.cs class Compliant (line 4) | class Compliant method Empty (line 10) | void Empty() method NotEmpty (line 15) | void NotEmpty() method NullableDefault (line 22) | void NullableDefault() method NotInitialized (line 30) | void NotInitialized(string str) method OptionalParameter (line 36) | void OptionalParameter(Guid id = default) { } method NotGuid (line 38) | void NotGuid() method DoesNotCrashOnDictionaryCreation (line 44) | Dictionary DoesNotCrashOnDictionaryCreation() class NonCompliant (line 53) | class NonCompliant method DefaultCtor (line 59) | void DefaultCtor() method DefaultInitialization (line 64) | void DefaultInitialization() method EmptyString (line 74) | void EmptyString() type GuidAssignmentStruct (line 81) | struct GuidAssignmentStruct class GuidClass (line 87) | class GuidClass method GuidClass (line 89) | public GuidClass(Guid param) { } method Method (line 90) | public void Method(Guid param) { } class NullableGuidClass (line 92) | class NullableGuidClass method NullableGuidClass (line 94) | public NullableGuidClass(Guid? param) { } method Method (line 95) | public void Method(Guid? param) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PreferGuidEmpty.Latest.cs class Program (line 6) | public class Program method Foo (line 10) | public void Foo() method Get (line 21) | public Guid Get() => default; method Test (line 24) | private void Test(Guid guid = default) // Compliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PreferGuidEmpty.cs class Compliant (line 4) | class Compliant method Empty (line 10) | void Empty() method NotEmpty (line 15) | void NotEmpty() method NullableDefault (line 22) | void NullableDefault() method NotInitialized (line 30) | void NotInitialized(string str) method OptionalParameter (line 36) | void OptionalParameter(Guid id = default) { } method NotGuid (line 38) | void NotGuid() method DoesNotCrashOnDictionaryCreation (line 44) | Dictionary DoesNotCrashOnDictionaryCreation() class NonCompliant (line 53) | class NonCompliant method DefaultCtor (line 59) | void DefaultCtor() method DefaultInitialization (line 65) | void DefaultInitialization() method EmptyString (line 75) | void EmptyString() type GuidAssignmentStruct (line 82) | struct GuidAssignmentStruct class GuidClass (line 88) | class GuidClass method GuidClass (line 90) | public GuidClass(Guid param) { } method Method (line 91) | public void Method(Guid param) { } class NullableGuidClass (line 93) | class NullableGuidClass method NullableGuidClass (line 95) | public NullableGuidClass(Guid? param) { } method Method (line 96) | public void Method(Guid? param) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PreferJaggedArraysOverMultidimensional.Latest.cs class PartialProperties (line 1) | partial class PartialProperties class PartialProperties (line 7) | partial class PartialProperties FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PreferJaggedArraysOverMultidimensional.cs class Program (line 3) | class Program method Program (line 22) | public Program(string[,] array) // Noncompliant method Foo (line 25) | public float[,] Foo() // Noncompliant method Bar (line 30) | public void Bar(string[,] multiDimArrayParameter) // Noncompliant method FooBar (line 34) | public void FooBar() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PrivateFieldUsedAsLocalVariable.Latest.cs type Record (line 1) | record Record type RecordStruct (line 48) | record struct RecordStruct class NullConditionalAssignment (line 92) | public class NullConditionalAssignment class Sample (line 94) | public class Sample method Test (line 101) | void Test() method useSample (line 113) | void useSample(Sample sample) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PrivateFieldUsedAsLocalVariable.cs class PrivateFieldUsedAsLocalVariable (line 6) | class PrivateFieldUsedAsLocalVariable method Use (line 14) | void Use(int foo) { } method M1 (line 16) | void M1() method M2 (line 29) | void M2() method M3 (line 38) | void M3() method M4 (line 47) | void M4(bool p1) method M5 (line 67) | void M5() method M6 (line 78) | void M6(int F13, int F14) method M7 (line 93) | public int M7() => F18; method M8 (line 94) | void M8() method M9 (line 105) | void M9(PrivateFieldUsedAsLocalVariable inst) method M10 (line 130) | void M10() method M11 (line 137) | void M11(out int a, ref int b) method PrivateFieldUsedAsLocalVariable (line 145) | PrivateFieldUsedAsLocalVariable() : this(F27) // Error [CS0120] method PrivateFieldUsedAsLocalVariable (line 151) | PrivateFieldUsedAsLocalVariable(int a) method M12 (line 173) | void M12() method M13 (line 181) | void M13() method M14 (line 206) | void M14() method M15 (line 212) | public void M15(int i) => F36 = i + 1; method MethodWithSideEffect (line 225) | void MethodWithSideEffect() method M16 (line 230) | void M16() method M17 (line 237) | void M17() method M18 (line 246) | void M18() type SomeStruct (line 251) | struct SomeStruct method M19 (line 259) | void M19() method M20 (line 265) | void M20() class SomePartialClass (line 275) | public partial class SomePartialClass method M1 (line 279) | void M1() type SomeStruct (line 286) | public struct SomeStruct method M1 (line 290) | void M1() class AccessInExpressionBodiedConstructs (line 297) | public class AccessInExpressionBodiedConstructs method M1 (line 302) | public string M1() => F1 ?? (F1 = "test"); method AccessInExpressionBodiedConstructs (line 310) | AccessInExpressionBodiedConstructs() type CompoundAssignmentReadAsWellAsWrite (line 327) | public struct CompoundAssignmentReadAsWellAsWrite method M1 (line 330) | void M1() class MethodUpdateTest (line 338) | public class MethodUpdateTest method Reset (line 342) | private void Reset() => value = 0; method TestMethod (line 344) | public void TestMethod() class TestsForS4487Harmony (line 357) | public class TestsForS4487Harmony method M1 (line 361) | public void M1() method M2 (line 368) | public void M2() method M6 (line 375) | public void M6(int F14) method M15 (line 392) | public void M15(int i) => F36 = i + 1; class Broker (line 395) | public class Broker method Process (line 398) | public void Process() { Receive?.Invoke(this, EventArgs.Empty); } class Repro_8239 (line 402) | public class Repro_8239 method Program (line 406) | public void Program(Broker broker) method Broker_Receive (line 418) | private void Broker_Receive(object sender, EventArgs e) class Repro_8239_Compliant (line 424) | public class Repro_8239_Compliant method Program (line 428) | public void Program(Broker broker) method Broker_Receive (line 440) | private void Broker_Receive(object sender, EventArgs e) class Repo_8239_Variation (line 446) | public class Repo_8239_Variation method Program (line 450) | public void Program() method Increment (line 463) | private void Increment(int dummy) class Repo_8239_Variation_Noncompliant (line 467) | public class Repo_8239_Variation_Noncompliant method Program (line 471) | public void Program() method Increment (line 483) | private void Increment(int dummy) => FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PrivateStaticMethodUsedOnlyByNestedClass.CSharpLatest.cs class OuterClass (line 3) | class OuterClass method OnlyUsedByNestedInterface (line 5) | static void OnlyUsedByNestedInterface() { } method PrivateProtectedMethod (line 6) | private protected static void PrivateProtectedMethod() { } type INestedInterface (line 8) | interface INestedInterface method Foo (line 10) | void Foo() type IOuterInterface (line 18) | interface IOuterInterface method OnlyUsedByNestedClass (line 20) | static void OnlyUsedByNestedClass() { } class NestedClass (line 22) | class NestedClass method Foo (line 24) | void Foo() type OuterRecord (line 34) | record OuterRecord type OuterRecordClass (line 59) | record class OuterRecordClass type OuterRecordStruct (line 81) | record struct OuterRecordStruct class ExtensionMethods (line 106) | public static class ExtensionMethods method extension (line 108) | extension(ExtensionMethods) method ThisIsCompliant (line 115) | private static void ThisIsCompliant() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PrivateStaticMethodUsedOnlyByNestedClass.cs class OuterClass (line 5) | class OuterClass method OnlyUsedOnceByNestedClass (line 7) | static void OnlyUsedOnceByNestedClass() { } method OnlyUsedByNestedClassMultipleTimes (line 9) | static void OnlyUsedByNestedClassMultipleTimes() { } method OnlyUsedByNestedClassWithClassName (line 10) | static void OnlyUsedByNestedClassWithClassName() { } method UsedByMultipleSiblingNestedClasses (line 11) | static void UsedByMultipleSiblingNestedClasses() { } method UsedByOuterAndNestedClasses (line 12) | static void UsedByOuterAndNestedClasses() { } method UsedBySiblingAndDeeperNestedClasses (line 13) | static void UsedBySiblingAndDeeperNestedClasses() { } method OnlyUsedByDeeperNestedClass (line 14) | static void OnlyUsedByDeeperNestedClass() { } method UsedByNestedClassAndDeeperNestedClass (line 15) | static void UsedByNestedClassAndDeeperNestedClass() { } method UsedByDeeperNestedClassesOnTheSameLevel (line 16) | static void UsedByDeeperNestedClassesOnTheSameLevel() { } method UnusedMethod (line 17) | static void UnusedMethod() { } method NotStatic (line 19) | void NotStatic() { } method PublicMethod (line 23) | public static void PublicMethod() { } method ProtectedMethod (line 24) | protected static void ProtectedMethod() { } method InternalMethod (line 25) | internal static void InternalMethod() { } method ProtectedInternalMethod (line 26) | protected internal static void ProtectedInternalMethod() { } method PrivateMethod (line 27) | private static void PrivateMethod() { } method PrivateMethod (line 28) | private static void PrivateMethod(int arg) { } method GenericMethod (line 30) | static T GenericMethod(T arg) => arg; method Recursive (line 33) | static int Recursive(int n) => Recursive(n - 1); method MutuallyRecursive1 (line 34) | static void MutuallyRecursive1() => MutuallyRecursive2(); method MutuallyRecursive2 (line 35) | static void MutuallyRecursive2() => MutuallyRecursive1(); method ExternalMethod (line 37) | [DllImport("SomeLibrary.dll")] method UsedOnlyByPropertyInNestedClass (line 40) | static int UsedOnlyByPropertyInNestedClass() => 42; method UsedOnlyByFieldInitializerInNestedClass (line 41) | static int UsedOnlyByFieldInitializerInNestedClass() => 42; method UsedOnlyByConstructorInNestedClass (line 42) | static void UsedOnlyByConstructorInNestedClass() { } method AssignedToDelegateInNestedClass (line 43) | static void AssignedToDelegateInNestedClass() { } method UsedInNameOfExpressionInNestedClass (line 44) | static void UsedInNameOfExpressionInNestedClass() { } method Foo (line 46) | void Foo() class NestedClass (line 51) | class NestedClass method NestedClass (line 56) | public NestedClass() method NestedClassMethodUsedByDeeperNestedClass (line 61) | static void NestedClassMethodUsedByDeeperNestedClass() { } method Bar (line 63) | void Bar() method FooBaz (line 93) | void FooBaz() class DeeperNestedClass (line 98) | class DeeperNestedClass method FooBar (line 100) | void FooBar() class AnotherDeeperNestedClass (line 110) | class AnotherDeeperNestedClass method Foo (line 112) | void Foo() class SiblingNestedClass (line 119) | class SiblingNestedClass method Baz (line 121) | void Baz() class ClassContainsStruct (line 129) | class ClassContainsStruct method OnlyUsedByNestedStruct (line 131) | static void OnlyUsedByNestedStruct() { } type NestedStruct (line 133) | struct NestedStruct method Foo (line 135) | void Foo() type StructContainsClass (line 142) | struct StructContainsClass method OnlyUsedByNestedClass (line 144) | private static void OnlyUsedByNestedClass() { } class NestedClass (line 146) | class NestedClass method Foo (line 148) | void Foo() class PartialOuterClass (line 155) | partial class PartialOuterClass method OnlyUsedByNestedClass (line 157) | static void OnlyUsedByNestedClass() { } method PartialOnlyUsedByNestedClass (line 158) | static partial void PartialOnlyUsedByNestedClass() { } method PartialOnlyUsedByNestedClass (line 163) | static partial void PartialOnlyUsedByNestedClass(); class NestedClass (line 165) | class NestedClass method Foo (line 167) | void Foo() class PartialOuterClass (line 161) | partial class PartialOuterClass method OnlyUsedByNestedClass (line 157) | static void OnlyUsedByNestedClass() { } method PartialOnlyUsedByNestedClass (line 158) | static partial void PartialOnlyUsedByNestedClass() { } method PartialOnlyUsedByNestedClass (line 163) | static partial void PartialOnlyUsedByNestedClass(); class NestedClass (line 165) | class NestedClass method Foo (line 167) | void Foo() class DebugViewClass (line 175) | [DebuggerDisplay("{UsedByDebuggerDisplay()}")] method UsedByDebuggerDisplay (line 178) | static string UsedByDebuggerDisplay() => ""; class NestedClass (line 180) | class NestedClass method Foo (line 182) | void Foo() class EdgeCaseWithLongCommonPaths (line 189) | public class EdgeCaseWithLongCommonPaths method StaticMethod (line 191) | private static void StaticMethod() { } class MiddleOne (line 193) | public class MiddleOne class InsideMiddleOne (line 195) | public class InsideMiddleOne class Foo (line 197) | public class Foo class FooLeaf (line 199) | public class FooLeaf method Method (line 201) | public void Method() => StaticMethod(); class Bar (line 205) | public class Bar method Method (line 207) | public void Method() => StaticMethod(); class BarLeaf (line 208) | public class BarLeaf method Method (line 210) | public void Method() => StaticMethod(); class MiddleTwo (line 215) | public class MiddleTwo { method StaticMethod (line 216) | public void StaticMethod() method Method (line 219) | public void Method() => StaticMethod(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertiesAccessCorrectField.Latest.Partial.cs class PartialProperties (line 4) | public partial class PartialProperties FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertiesAccessCorrectField.Latest.cs class NullCoalesceAssignment (line 3) | class NullCoalesceAssignment class NullCoalesceAssignment_SubExpression (line 23) | class NullCoalesceAssignment_SubExpression type Record (line 44) | public record Record class SomeClass (line 84) | public class SomeClass(object y) class PartialProperties (line 99) | public partial class PartialProperties class FieldKeyword (line 111) | class FieldKeyword class FieldKeywordEscaped (line 118) | class FieldKeywordEscaped class NullConditonalAssignment (line 128) | class NullConditonalAssignment class Sample (line 130) | public class Sample FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertiesAccessCorrectField.NetFramework.cs class CustomControl (line 9) | public class CustomControl : UserControl method ColorPropertyChanged (line 39) | private static void ColorPropertyChanged(DependencyObject d, Dependenc... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertiesAccessCorrectField.cs class NonCompliantClass_FromRspec (line 8) | class NonCompliantClass_FromRspec class NonCompliant_PartialClass (line 28) | partial class NonCompliant_PartialClass class NonCompliant_PartialClass (line 34) | partial class NonCompliant_PartialClass type NonCompliantStruct_FromRspec (line 43) | struct NonCompliantStruct_FromRspec class NonCompliant_UnderscoresInNamesAndCasing (line 62) | class NonCompliant_UnderscoresInNamesAndCasing class NonCompliant_FieldTypeIsIgnored (line 81) | class NonCompliant_FieldTypeIsIgnored class NonCompliant_AssigningToExpression (line 93) | class NonCompliant_AssigningToExpression class NonCompliant_PartialClass (line 104) | partial class NonCompliant_PartialClass class NonCompliant_PartialClass (line 108) | partial class NonCompliant_PartialClass class NonCompliant_PartialClass (line 112) | partial class NonCompliant_PartialClass class NonCompliant_ComplexProperty (line 122) | class NonCompliant_ComplexProperty class NonCompliant_Parentheses (line 158) | class NonCompliant_Parentheses class NonCompliant_OuterClass (line 176) | class NonCompliant_OuterClass type NonCompliant_NestedClass (line 181) | struct NonCompliant_NestedClass class Compliant_Indexer (line 195) | class Compliant_Indexer class CompliantClass (line 208) | class CompliantClass class Compliant_ImplicitProperties (line 235) | class Compliant_ImplicitProperties class WrappedClass (line 245) | class WrappedClass class Compliant_WrappedObject (line 250) | class Compliant_WrappedObject class BaseClass (line 261) | class BaseClass class ChildClass (line 266) | class ChildClass : BaseClass class Base (line 277) | public class Base class SubClass (line 282) | public class SubClass : Base class Repro_8110 (line 300) | class Repro_8110 class Base (line 302) | class Base class Intermediate (line 321) | class Intermediate : Base { } class PrivateField_DerivedCallsOtherFieldInBase (line 323) | class PrivateField_DerivedCallsOtherFieldInBase : Base class PrivateField_DerivedCallsOtherFieldInDerived (line 332) | class PrivateField_DerivedCallsOtherFieldInDerived : Base class PrivateField_GrandchildCallsOtherFieldInBase (line 343) | class PrivateField_GrandchildCallsOtherFieldInBase : Intermediate class ProtectedField_DerivedCallsOtherFieldInBase (line 352) | class ProtectedField_DerivedCallsOtherFieldInBase : Base class ProtectedField_DerivedCallsOtherFieldInDerived (line 361) | class ProtectedField_DerivedCallsOtherFieldInDerived : Base class ProtectedField_DerivedCallsOverriddenBaseAccessor (line 372) | class ProtectedField_DerivedCallsOverriddenBaseAccessor : Base class ProtectedField_DerivedCallsOtherBaseAccessor (line 381) | class ProtectedField_DerivedCallsOtherBaseAccessor : Base class ProtectedField_GrandchildCallsOtherFieldInBase (line 396) | class ProtectedField_GrandchildCallsOtherFieldInBase : Intermediate class MultipleOperations (line 406) | class MultipleOperations type MultipleOperationsStruct (line 425) | struct MultipleOperationsStruct class FooViewModel (line 445) | public class FooViewModel : ViewModelBase class FooViewModelWithoutSet (line 463) | public class FooViewModelWithoutSet : ViewModelBase method MySet (line 468) | public bool MySet(int x, int y) => true; class NoFieldUsage (line 483) | public class NoFieldUsage method Bar (line 520) | void Bar() { } class UpdateWithOut (line 523) | public class UpdateWithOut method Assign (line 533) | private void Assign(int value, out int result) class UpdateWithOut2 (line 539) | public class UpdateWithOut2 method Assign (line 550) | private void Assign(int value, out int result) class MultipleStatements (line 556) | public class MultipleStatements class SpecialUsages (line 605) | public class SpecialUsages class Repro_2867 (line 670) | public class Repro_2867 class ValueWrapper (line 672) | private class ValueWrapper class CrossProcedural_Repro_2435 (line 688) | public class CrossProcedural_Repro_2435 method GetByExpression (line 715) | private int GetByExpression() => this.expressionValue; method SetByExpression (line 716) | private void SetByExpression(int value) => this.expressionValue = value; method IrrelevantFunction (line 782) | private int IrrelevantFunction() method IrrelevantProcedure (line 787) | private void IrrelevantProcedure(int value) method GetByBody (line 792) | private int GetByBody() method SetByBody (line 797) | private void SetByBody(int value) method GetTooNestedA (line 808) | private int GetTooNestedA() => GetTooNestedB(); method SetTooNestedA (line 809) | private void SetTooNestedA(int value) => SetTooNestedB(value); method GetTooNestedB (line 811) | private int GetTooNestedB() => this.tooNested; method SetTooNestedB (line 812) | private void SetTooNestedB(int value) => this.tooNested = value; method GetTooComplex (line 833) | private int GetTooComplex() => this.tooComplex; method SetTooComplex (line 834) | private void SetTooComplex(int value) => this.tooComplex = value; class Repro3441 (line 852) | public class Repro3441 class TestCases (line 870) | public class TestCases method GetValue (line 887) | private static int GetValue() => 1; class ContainsConstraint (line 905) | public class ContainsConstraint class AClass (line 919) | public class AClass class Repro_NET2939 (line 950) | class Repro_NET2939 // https://sonarsource.atlassian.net/browse/NET-2939 FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertiesShouldBePreferred.CSharp10.cs type RecordStruct (line 1) | public record struct RecordStruct type PositionalRecordStruct (line 18) | public record struct PositionalRecordStruct(string Parameter) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertiesShouldBePreferred.CSharp11.cs type IBase (line 8) | public interface IBase method GetStuff (line 10) | static abstract string GetStuff(); class SomeClass (line 13) | public class SomeClass : IBase method GetStuff (line 15) | public static string GetStuff() => ""; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertiesShouldBePreferred.CSharp9.cs type RecordBase (line 1) | public record RecordBase type Record (line 6) | public record Record : RecordBase type PositionalRecord (line 28) | public record PositionalRecord(string Parameter) : RecordBase FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertiesShouldBePreferred.cs class Foo (line 9) | public class Foo method GetFooMethod (line 11) | public virtual string GetFooMethod() => ""; class Bar (line 14) | public class Bar : Foo, IEnumerable method GetName (line 18) | public string GetName() method GetFooMethod (line 24) | public override string GetFooMethod() => ""; method GetEnumerator (line 26) | public IEnumerator GetEnumerator() => null; method GetEnumerator (line 28) | IEnumerator IEnumerable.GetEnumerator() => null; method Get (line 30) | public object Get() => null; method GetName2 (line 32) | private string GetName2() => null; method GetName3 (line 34) | public string[] GetName3() => null; method GetName4 (line 36) | public object GetName4() => null; method GetName5 (line 38) | public List GetName5() => null; method NameGet6 (line 40) | public List NameGet6() => null; method GetName7 (line 42) | public string GetName7(int param) => null; method GetName8 (line 44) | protected string GetName8() => null; method GetName9 (line 46) | protected internal string GetName9() => null; method GetName10 (line 48) | internal string GetName10() => null; type IBase (line 59) | public interface IBase method GetStuff (line 61) | string GetStuff(); type SomeStruct (line 64) | public struct SomeStruct method GetStuff (line 66) | public string GetStuff() { return ""; } type IFoo (line 69) | public interface IFoo method GetEnumerator (line 73) | IMyEnumerator GetEnumerator(); type IMyEnumerator (line 76) | public interface IMyEnumerator method MoveNext (line 79) | bool MoveNext(); class CustomAwaiter (line 84) | public class CustomAwaiter method CustomAwaiter (line 86) | public CustomAwaiter(int simulateDelayMilliseconds) method CustomAwaiter (line 93) | public CustomAwaiter(int simulateDelayMilliseconds, T result) class CustomAwaiter (line 91) | public class CustomAwaiter : CustomAwaiter method CustomAwaiter (line 86) | public CustomAwaiter(int simulateDelayMilliseconds) method CustomAwaiter (line 93) | public CustomAwaiter(int simulateDelayMilliseconds, T result) class CustomAwaitable (line 99) | public class CustomAwaitable method CustomAwaitable (line 103) | public CustomAwaitable(int simulateDelayMilliseconds) method GetAwaiter (line 108) | public CustomAwaiter GetAwaiter() // Compliant, name is excluded method CustomAwaitable (line 118) | public CustomAwaitable(int simulateDelayMilliseconds, T result) method GetAwaiter (line 124) | public new CustomAwaiter GetAwaiter() // Compliant, name is excluded class CustomAwaitable (line 114) | public class CustomAwaitable : CustomAwaitable method CustomAwaitable (line 103) | public CustomAwaitable(int simulateDelayMilliseconds) method GetAwaiter (line 108) | public CustomAwaiter GetAwaiter() // Compliant, name is excluded method CustomAwaitable (line 118) | public CustomAwaitable(int simulateDelayMilliseconds, T result) method GetAwaiter (line 124) | public new CustomAwaiter GetAwaiter() // Compliant, name is excluded class AsyncTests (line 131) | public class AsyncTests method GetResultAsync (line 133) | public async void GetResultAsync() // Compliant - use async method GetSomething1 (line 138) | public Task GetSomething1() => Task.FromResult(true); method GetSomething2 (line 139) | public Task GetSomething2() => Task.FromResult(true); method GetSomething3 (line 140) | public ValueTask GetSomething3() => default(ValueTask); class Repro_3136 (line 144) | public class Repro_3136 method GetRandom (line 148) | [NoProperty] method GetBothSupportedAndNotSupportedPropertyUsage (line 151) | [NoProperty] method GetUsageIncludingProperty (line 155) | [PropertyOrMethod] method GetUsageForAll (line 158) | [AllTargets] method GetUsageForAll2 (line 161) | [AllTargets] method GetNoUsagedDefined (line 165) | [NoUsageDefined] class AllTargetsAttribute (line 168) | [AttributeUsage(AttributeTargets.All)] class PropertyOrMethodAttribute (line 171) | [AttributeUsage(AttributeTargets.Property | AttributeTargets.Method)] class NoPropertyAttribute (line 174) | [AttributeUsage(AttributeTargets.All ^ AttributeTargets.Property)] class NoUsageDefinedAttribute (line 177) | private sealed class NoUsageDefinedAttribute : Attribute { } class Repro_8739 (line 182) | public class Repro_8739 method GetNodes (line 186) | public IEnumerable GetNodes() => method GetNodesOriginal (line 189) | public IEnumerable GetNodesOriginal() where T : Exception => method Calculate (line 192) | private static IEnumerable Calculate() => null; class GenericType (line 194) | public class GenericType method GetNodes (line 196) | public IEnumerable GetNodes() => // Noncompliant, this can be a ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertyGetterWithThrow.Latest.Partial.cs class PartialProperties (line 5) | public partial class PartialProperties FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertyGetterWithThrow.Latest.cs class PartialProperties (line 5) | public partial class PartialProperties class FieldKeyword (line 45) | public class FieldKeyword FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertyGetterWithThrow.cs class PropertyGetterWithThrow (line 5) | public class PropertyGetterWithThrow method FactoryMethod (line 94) | private NotSupportedException FactoryMethod() method FactoryMethod2 (line 106) | private Exception FactoryMethod2() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertyNamesShouldNotMatchGetMethods.Latest.Partial1.g.cs class PartialCrossFile (line 13) | public partial class PartialCrossFile method GetFoo (line 16) | public partial int GetFoo(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertyNamesShouldNotMatchGetMethods.Latest.Partial2.cs class PartialCrossFile (line 3) | public partial class PartialCrossFile method GetFoo (line 5) | public partial int GetFoo() => 1; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertyNamesShouldNotMatchGetMethods.Latest.cs type Base (line 5) | public record Base type Record (line 10) | public record Record : Base type PositionalRecord (line 58) | public record PositionalRecord : Base type RecordStruct (line 105) | public record struct RecordStruct type PositionalRecordStruct (line 148) | public record struct PositionalRecordStruct class PartialProperties (line 192) | public partial class PartialProperties method GetFoo (line 196) | public void GetFoo() { } class PartialProperties (line 199) | public partial class PartialProperties method GetFoo (line 196) | public void GetFoo() { } class PartialCrossFile (line 205) | public partial class PartialCrossFile FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertyNamesShouldNotMatchGetMethods.cs class Base (line 5) | public class Base class Program (line 10) | public class Program : Base method GetFoo (line 15) | public int GetFoo() method GetDateAsString (line 20) | public string GetDateAsString() method Bar (line 29) | public int Bar() // Secondary method GetColor (line 36) | public string GetColor() { return ""; } method GetDay (line 39) | private string GetDay() { return ""; } method GetWhatever (line 44) | public string GetWhatever() // Secondary method SOMEWEIRDCASE (line 52) | public string SOMEWEIRDCASE() // Secondary method GetMyProperty (line 58) | public int GetMyProperty() => 42; type SomeStruct (line 61) | public struct SomeStruct method GetFoo (line 65) | public int GetFoo() // Secondary method GetDateAsString (line 69) | public string GetDateAsString() method Bar (line 76) | public int Bar() // Error [CS0102] method GetColor (line 83) | public string GetColor() { return ""; } method GetDay (line 86) | private string GetDay() { return ""; } method GetWhatever (line 88) | public string GetWhatever() method SOMEWEIRDCASE (line 96) | public string SOMEWEIRDCASE() // Secondary method GetMyProperty (line 101) | public int GetMyProperty() => 42; type ISomething (line 104) | public interface ISomething method GetValue (line 107) | int GetValue(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertyToAutoProperty.Latest.cs class MyAttribute (line 3) | public class MyAttribute : Attribute { } type Record (line 5) | public unsafe record Record type Coord (line 76) | public struct Coord class PartialProperties (line 84) | public partial class PartialProperties class PartialProperties (line 102) | public partial class PartialProperties class FieldKeyword (line 110) | public class FieldKeyword class Extensions (line 132) | public static class Extensions method extension (line 134) | extension(string s) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertyToAutoProperty.cs class MyAttribute (line 6) | public class MyAttribute : Attribute { } class SomeException (line 8) | public class SomeException : Exception { } class PropertyToAutoProperty (line 10) | public class PropertyToAutoProperty class SomePropertyToAutoProperty (line 112) | public class SomePropertyToAutoProperty class VolatileField (line 123) | public class VolatileField class SingleAccessorAutoProperty (line 134) | public class SingleAccessorAutoProperty FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertyWriteOnly.Latest.Partial.cs class PartialProperties (line 3) | public partial class PartialProperties FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertyWriteOnly.Latest.cs type PropertyWriteOnly (line 1) | record PropertyWriteOnly type PropertyWriteOnlyInPositionalRecord (line 13) | record PropertyWriteOnlyInPositionalRecord(int Parameter) type A (line 29) | public record A type B (line 38) | public record B : A type IPropertyWriteOnly (line 47) | public interface IPropertyWriteOnly class PartialProperties (line 60) | public partial class PartialProperties FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PropertyWriteOnly.cs class PropertyWriteOnly (line 3) | public class PropertyWriteOnly type PropertyWriteOnlyStruct (line 26) | public struct PropertyWriteOnlyStruct class A (line 52) | public class A class B (line 61) | public class B : A class Program (line 68) | public class Program method Main (line 70) | public static void Main(string[] args) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ProvideDeserializationMethodsForOptionalFields.Latest.cs type Compliant (line 4) | [Serializable] type NoEventHandlerMethods (line 23) | public record NoEventHandlerMethods // Noncompliant type OnlyOnDeserializingEventHandlerMethod (line 29) | public record OnlyOnDeserializingEventHandlerMethod // Noncompliant type Record (line 38) | [Serializable] type NoEventHandlerMethodsWithParams (line 57) | public record NoEventHandlerMethodsWithParams(string Name) // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ProvideDeserializationMethodsForOptionalFields.cs class NoEventHandlerMethods (line 6) | public class NoEventHandlerMethods // Noncompliant {{Add deserialization... class OnlyOnDeserializingEventHandlerMethod (line 13) | public class OnlyOnDeserializingEventHandlerMethod // Noncompliant {{Add... method OnDeserializing (line 18) | [OnDeserializing] class OnlyOnDeserializedEventHandlerMethod (line 25) | public class OnlyOnDeserializedEventHandlerMethod // Noncompliant {{Add ... method OnDeserialized (line 30) | [OnDeserialized] class Compliant (line 37) | [Serializable] method OnDeserializing (line 43) | [OnDeserializing] method OnDeserialized (line 49) | [OnDeserialized] type NoncompliantStruct (line 56) | public struct NoncompliantStruct // Noncompliant {{Add deserialization e... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PublicConstantField.CSharp10.cs type Record (line 1) | public record struct Record FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PublicConstantField.CSharp9.cs type Record (line 1) | public record Record FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PublicConstantField.cs class A (line 3) | public class A class b (line 11) | internal class b FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PublicMethodWithMultidimensionalArray.Latest.Partial.cs class PartialConstructor (line 2) | public partial class PartialConstructor method PartialConstructor (line 4) | public partial PartialConstructor(int[][] matrix) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PublicMethodWithMultidimensionalArray.Latest.cs type IFace (line 3) | public interface IFace method Method1 (line 5) | static virtual void Method1(int[,] a) { } method Method2 (line 7) | static abstract void Method2(int[,] a); class PublicMethodWithMultidimensionalArray (line 10) | public class PublicMethodWithMultidimensionalArray : IFace method Method1 (line 12) | public static void Method1(int[,] a) { } method Method2 (line 14) | public static void Method2(int[,] a) { } class PrimaryConstructors (line 23) | public class PrimaryConstructors class C0 (line 25) | public class C0(int[] a); class C1 (line 26) | public class C1(int[][] a); class C2 (line 27) | public class C2(int[,] a); class C3 (line 28) | public class C3(params int[] a); class C4 (line 29) | public class C4(params int[][][] a); class C5 (line 30) | public class C5(int i); class C6 (line 31) | public class C6(params int[][] a); class Aliases (line 34) | public class Aliases(IntMatrix a) // Noncompliant method Aliases (line 36) | public Aliases(IntMatrix a, int i) : this(a) { } method AMethod1 (line 38) | public void AMethod1(IntMatrix a) { } method AMethod2 (line 39) | public void AMethod2(params IntMatrix a) { } class InlineArrays (line 46) | public class InlineArrays method AMethod1 (line 48) | public void AMethod1(Buffer[] a) { } method AMethod1 (line 49) | public void AMethod1(Buffer[,] a) { } method AMethod2 (line 50) | public void AMethod2(params Buffer[] a) { } method AMethod3 (line 51) | public void AMethod3(params Buffer[][] a) { } type Buffer (line 54) | [System.Runtime.CompilerServices.InlineArray(10)] class Extensions (line 61) | public static class Extensions method extension (line 63) | extension(string s) class PartialConstructor (line 72) | public partial class PartialConstructor method PartialConstructor (line 74) | public partial PartialConstructor(int[][] matrix); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PublicMethodWithMultidimensionalArray.cs type IFace (line 1) | public interface IFace method Method5 (line 3) | void Method5(int[,] a); class Base (line 7) | public abstract class Base method Method4 (line 9) | public abstract void Method4(int[,] a); class PublicMethodWithMultidimensionalArray (line 12) | public class PublicMethodWithMultidimensionalArray : Base, IFace method Method (line 14) | public void Method(int a) method MethodX (line 17) | public void MethodX(int[] a) method Method1 (line 20) | public void Method1(int[][] a) //Noncompliant method Method2 (line 23) | void Method2(int[][] a) //Compliant method Method3 (line 26) | public void Method3(int[,] a) //Noncompliant method Method4 (line 30) | public override void Method4(int[,] a) //Compliant, overrides method Method5 (line 34) | public void Method5(int[,] a) //Compliant, implements interface method Method6 (line 38) | void Method6(params int[][,] a) // Compliant method Method7 (line 42) | public void Method7(params int[][] a) // Compliant method Method8 (line 46) | public void Method8(params int[][][] a) // Noncompliant method Method9 (line 50) | public void Method9(int[][] a, params int[][] b) // Noncompliant method Method10 (line 54) | public void Method10(int[,][] a) // Noncompliant class Other (line 59) | internal class Other method Method1 (line 61) | public void Method1(int[][] a) // Compliant, class is internal class Constructors (line 69) | public class Constructors method Constructors (line 71) | public Constructors(int[][] a) { } method Constructors (line 72) | public Constructors(int[,] a) { } method Constructors (line 73) | public Constructors(params int[] a) { } method Constructors (line 74) | public Constructors(params int[][][] a) { } method Constructors (line 75) | public Constructors(int i) { } class ExtensionMethod (line 79) | public static class ExtensionMethod method Method1 (line 81) | public static void Method1(this T[,] dataMatrix, int a) { } method Method2 (line 82) | public static void Method2(this T data, T[,] dataMatrix) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PureAttributeOnVoidMethod.CSharp7.cs type Record (line 3) | record Record // Error [CS0246] The type or namespace name 'record' co... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PureAttributeOnVoidMethod.Latest.cs class PureAttributes (line 6) | public class PureAttributes method WithExplicitInParamater (line 10) | [Pure] // Noncompliant type IInterface (line 18) | interface IInterface method DoSomething1 (line 20) | [Pure] // Noncompliant {{Remove the 'Pure' attribute or change the met... method DoSomething2 (line 23) | [Pure] // Noncompliant {{Remove the 'Pure' attribute or change the met... method DoSomething3 (line 26) | [Pure] type Record (line 30) | record Record class PureAttribute (line 64) | public class PureAttribute : System.Attribute { } class Repro_5117 (line 69) | public class Repro_5117 method Method (line 71) | public void Method() class Extensions (line 90) | public static class Extensions method extension (line 92) | extension (string s) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/PureAttributeOnVoidMethod.cs class MyAttribute (line 10) | public class MyAttribute : Attribute { } class Person (line 12) | class Person method ConfigureAge (line 16) | [Pure] // Noncompliant {{Remove the 'Pure' attribute or change the met... method TaskDoesNotReturn (line 23) | [Pure] // Noncompliant method AsyncTaskDoesNotReturn (line 29) | [Pure] // Noncompliant method ConfigureAge2 (line 35) | [My] method ConfigureAge3 (line 41) | [Pure] method ConfigureAge4 (line 47) | [Pure] method VoidWithRef (line 53) | [Pure] method TaskOfTReturns (line 59) | [Pure] method TaskWithOutParameter (line 65) | [Pure] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundancyInConstructorDestructorDeclaration.BaseCall.Fixed.cs class MyClass (line 7) | class MyClass method MyClass (line 9) | public MyClass() method MyClass (line 13) | public MyClass(int p) class DefaultBaseConstructorCall (line 19) | class DefaultBaseConstructorCall : MyClass method DefaultBaseConstructorCall (line 21) | public DefaultBaseConstructorCall() /*c*/ // Fixed method DefaultBaseConstructorCall (line 25) | public DefaultBaseConstructorCall(string s) method DefaultBaseConstructorCall (line 29) | public DefaultBaseConstructorCall(string[] s) method DefaultBaseConstructorCall (line 33) | public DefaultBaseConstructorCall(string[] s, int i) /*comment method DefaultBaseConstructorCall (line 38) | public DefaultBaseConstructorCall(int parameter) : base(parameter) class MyClass1 (line 43) | public class MyClass1 method MyClass1 (line 45) | static MyClass1() // Fixed method MyClass1 (line 49) | public MyClass1() // Fixed class MyClass2 (line 59) | public class MyClass2 method MyClass2 (line 61) | private MyClass2() class MyClass3 (line 66) | public class MyClass3 method MyClass3 (line 68) | public MyClass3(int i) class MyClass4 (line 73) | public class MyClass4 method MyClass4 (line 75) | public MyClass4() method MyClass4 (line 78) | public MyClass4(int i) class MyClass5 (line 83) | public class MyClass5 : MyClass4 method MyClass5 (line 85) | public MyClass5() : base() // Fixed class MyClass6 (line 90) | public class MyClass6 : MyClass4 method MyClass6 (line 92) | public MyClass6() : base(10) class MyClass7 (line 97) | public class MyClass7 class LambdaCtor (line 111) | class LambdaCtor method LambdaCtor (line 114) | LambdaCtor() => i++; class LambdaCtorWithLineEnding (line 117) | class LambdaCtorWithLineEnding method LambdaCtorWithLineEnding (line 120) | LambdaCtorWithLineEnding() class LambdaCtorTrailing (line 124) | class LambdaCtorTrailing method LambdaCtorTrailing (line 127) | LambdaCtorTrailing() /*b*/ => /*c*/ i++ /*d*/ ; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundancyInConstructorDestructorDeclaration.CSharp10.Fixed.cs type StaticCtor (line 3) | record struct StaticCtor type RecordStruct (line 7) | record struct RecordStruct type PositionalRecordStruct (line 11) | record struct PositionalRecordStruct(string Property) type Struct (line 16) | struct Struct type Repro_8087 (line 21) | public readonly struct Repro_8087 method Repro_8087 (line 24) | public Repro_8087() { } type StructWithFieldInitializer (line 29) | struct StructWithFieldInitializer method StructWithFieldInitializer (line 31) | public StructWithFieldInitializer() { } type StructWithPropertyInitializer (line 35) | struct StructWithPropertyInitializer method StructWithPropertyInitializer (line 37) | public StructWithPropertyInitializer(int someParam) { } type RecordStructWithFieldInitializer (line 41) | record struct RecordStructWithFieldInitializer type RecordStructWithPropertyInitializer (line 47) | record struct RecordStructWithPropertyInitializer type PartialStructWithPropertyInitializer (line 53) | partial struct PartialStructWithPropertyInitializer method PartialStructWithPropertyInitializer (line 55) | public PartialStructWithPropertyInitializer() { } type PartialStructWithPropertyInitializer (line 58) | partial struct PartialStructWithPropertyInitializer method PartialStructWithPropertyInitializer (line 55) | public PartialStructWithPropertyInitializer() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundancyInConstructorDestructorDeclaration.CSharp10.cs type StaticCtor (line 3) | record struct StaticCtor type RecordStruct (line 8) | record struct RecordStruct type PositionalRecordStruct (line 13) | record struct PositionalRecordStruct(string Property) type Struct (line 18) | struct Struct method Struct (line 20) | public Struct() { } type Repro_8087 (line 24) | public readonly struct Repro_8087 method Repro_8087 (line 27) | public Repro_8087() { } type StructWithFieldInitializer (line 32) | struct StructWithFieldInitializer method StructWithFieldInitializer (line 34) | public StructWithFieldInitializer() { } type StructWithPropertyInitializer (line 38) | struct StructWithPropertyInitializer method StructWithPropertyInitializer (line 40) | public StructWithPropertyInitializer(int someParam) { } type RecordStructWithFieldInitializer (line 44) | record struct RecordStructWithFieldInitializer type RecordStructWithPropertyInitializer (line 50) | record struct RecordStructWithPropertyInitializer type PartialStructWithPropertyInitializer (line 56) | partial struct PartialStructWithPropertyInitializer method PartialStructWithPropertyInitializer (line 58) | public PartialStructWithPropertyInitializer() { } type PartialStructWithPropertyInitializer (line 61) | partial struct PartialStructWithPropertyInitializer method PartialStructWithPropertyInitializer (line 58) | public PartialStructWithPropertyInitializer() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundancyInConstructorDestructorDeclaration.CSharp11.Fixed.cs type StructWithMulitpleField (line 1) | struct StructWithMulitpleField method StructWithMulitpleField (line 3) | public StructWithMulitpleField() { } type StructWithMulitpleField2 (line 7) | struct StructWithMulitpleField2 method StructWithMulitpleField2 (line 9) | public StructWithMulitpleField2() { } type Noncompliant (line 13) | public struct Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundancyInConstructorDestructorDeclaration.CSharp11.cs type StructWithMulitpleField (line 1) | struct StructWithMulitpleField method StructWithMulitpleField (line 3) | public StructWithMulitpleField() { } type StructWithMulitpleField2 (line 7) | struct StructWithMulitpleField2 method StructWithMulitpleField2 (line 9) | public StructWithMulitpleField2() { } type Noncompliant (line 13) | public struct Noncompliant method Noncompliant (line 15) | public Noncompliant() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundancyInConstructorDestructorDeclaration.CSharp12.cs class AClassWithBody (line 6) | class AClassWithBody() { } class AClassWithoutBody (line 8) | class AClassWithoutBody(); class BaseClass (line 10) | public abstract class BaseClass(string value); class BaseClassNoValue (line 11) | public abstract class BaseClassNoValue{ }; class SomeClass (line 13) | public class SomeClass() : BaseClass("SomeValue"); class DefaultStyle (line 15) | public class DefaultStyle : BaseClass method DefaultStyle (line 17) | public DefaultStyle() : base("SomeValue") //... class AClass (line 21) | public class AClass() : BaseClassNoValue; type BaseRecordClass (line 23) | public abstract record class BaseRecordClass(string value); type SomeRecordClass (line 25) | public record class SomeRecordClass() : BaseRecordClass("SomeValue"); type DefaultStyleRecordClass (line 27) | public record class DefaultStyleRecordClass : BaseRecordClass type AStructWithBody (line 33) | struct AStructWithBody() { } type AStructWithoutBody (line 34) | struct AStructWithoutBody(); type ARecordWithBody (line 35) | record ARecordWithBody() { } type ARecordWithoutBody (line 36) | record ARecordWithoutBody(); type ARecordStructWithBody (line 37) | record struct ARecordStructWithBody() { } type ARecordStructWithoutBody (line 38) | record struct ARecordStructWithoutBody(); type AStructWithFieldInitializer (line 43) | struct AStructWithFieldInitializer() // Compliant type AStructWithFieldDoubleInitializers (line 48) | struct AStructWithFieldDoubleInitializers() // Compliant type AStructWithPropertyInitializer (line 53) | struct AStructWithPropertyInitializer() // Compliant type ARecordStructWithFieldInitializer (line 58) | record struct ARecordStructWithFieldInitializer() // Compliant type PartialStructWithPropertyInitializer (line 63) | partial struct PartialStructWithPropertyInitializer() // Compliant type PartialStructWithPropertyInitializer (line 67) | partial struct PartialStructWithPropertyInitializer type PartialRecordStructWithFieldInitializer (line 72) | partial record struct PartialRecordStructWithFieldInitializer() // Compl... type PartialRecordStructWithFieldInitializer (line 76) | partial record struct PartialRecordStructWithFieldInitializer class AClassWithFieldInitializer (line 84) | class AClassWithFieldInitializer() // Noncompliant class AClassWithPropertyInitializer (line 89) | class AClassWithPropertyInitializer() // Noncompliant class ARecordWithFieldInitializer (line 94) | class ARecordWithFieldInitializer() // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundancyInConstructorDestructorDeclaration.CSharp9.Fixed.cs type RecordBase (line 3) | record RecordBase type Record (line 9) | record Record : RecordBase type StaticCtor (line 24) | record StaticCtor type Foo (line 29) | record Foo type Bar (line 36) | record Bar type FooWithParams (line 44) | record FooWithParams(string name) class Repro_FP_8436 (line 52) | public class Repro_FP_8436 type BaseRecord (line 54) | public abstract record BaseRecord(string Value); type RecordStyle (line 56) | public record RecordStyle() : BaseRecord("SomeValue"); type DefaultStyle (line 58) | public record DefaultStyle : BaseRecord FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundancyInConstructorDestructorDeclaration.CSharp9.cs type RecordBase (line 3) | record RecordBase type Record (line 9) | record Record : RecordBase type StaticCtor (line 25) | record StaticCtor type Foo (line 30) | record Foo type Bar (line 37) | record Bar type FooWithParams (line 45) | record FooWithParams(string name) class Repro_FP_8436 (line 53) | public class Repro_FP_8436 type BaseRecord (line 55) | public abstract record BaseRecord(string Value); type RecordStyle (line 57) | public record RecordStyle() : BaseRecord("SomeValue"); type DefaultStyle (line 59) | public record DefaultStyle : BaseRecord FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundancyInConstructorDestructorDeclaration.Constructor.Fixed.cs class MyClass (line 7) | class MyClass method MyClass (line 9) | public MyClass() method MyClass (line 13) | public MyClass(int p) class DefaultBaseConstructorCall (line 19) | class DefaultBaseConstructorCall : MyClass method DefaultBaseConstructorCall (line 21) | public DefaultBaseConstructorCall() /*c*/ : /*don't keep*/ base() // ... method DefaultBaseConstructorCall (line 27) | public DefaultBaseConstructorCall(string s) method DefaultBaseConstructorCall (line 32) | public DefaultBaseConstructorCall(string[] s) method DefaultBaseConstructorCall (line 42) | public DefaultBaseConstructorCall(string[] s, int i) /*comment method DefaultBaseConstructorCall (line 52) | public DefaultBaseConstructorCall(int parameter) : base(parameter) class MyClass1 (line 57) | public class MyClass1 class MyClass2 (line 65) | public class MyClass2 method MyClass2 (line 67) | private MyClass2() class MyClass3 (line 72) | public class MyClass3 method MyClass3 (line 74) | public MyClass3(int i) class MyClass4 (line 79) | public class MyClass4 method MyClass4 (line 81) | public MyClass4() method MyClass4 (line 84) | public MyClass4(int i) class MyClass5 (line 89) | public class MyClass5 : MyClass4 class MyClass6 (line 93) | public class MyClass6 : MyClass4 method MyClass6 (line 95) | public MyClass6() : base(10) class MyClass7 (line 100) | public class MyClass7 class LambdaCtor (line 114) | class LambdaCtor method LambdaCtor (line 117) | LambdaCtor() : base() => i++; class LambdaCtorWithLineEnding (line 120) | class LambdaCtorWithLineEnding method LambdaCtorWithLineEnding (line 123) | LambdaCtorWithLineEnding() class LambdaCtorTrailing (line 128) | class LambdaCtorTrailing method LambdaCtorTrailing (line 131) | LambdaCtorTrailing() : /*a*/ base() /*b*/ => /*c*/ i++ /*d*/ ; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundancyInConstructorDestructorDeclaration.Destructor.Fixed.cs class MyClass (line 7) | class MyClass method MyClass (line 9) | public MyClass() method MyClass (line 13) | public MyClass(int p) class DefaultBaseConstructorCall (line 19) | class DefaultBaseConstructorCall : MyClass method DefaultBaseConstructorCall (line 21) | public DefaultBaseConstructorCall() /*c*/ : /*don't keep*/ base() // ... method DefaultBaseConstructorCall (line 27) | public DefaultBaseConstructorCall(string s) method DefaultBaseConstructorCall (line 32) | public DefaultBaseConstructorCall(string[] s) method DefaultBaseConstructorCall (line 42) | public DefaultBaseConstructorCall(string[] s, int i) /*comment method DefaultBaseConstructorCall (line 52) | public DefaultBaseConstructorCall(int parameter) : base(parameter) class MyClass1 (line 57) | public class MyClass1 method MyClass1 (line 59) | static MyClass1() // Fixed method MyClass1 (line 63) | public MyClass1() // Fixed class MyClass2 (line 69) | public class MyClass2 method MyClass2 (line 71) | private MyClass2() class MyClass3 (line 76) | public class MyClass3 method MyClass3 (line 78) | public MyClass3(int i) class MyClass4 (line 83) | public class MyClass4 method MyClass4 (line 85) | public MyClass4() method MyClass4 (line 88) | public MyClass4(int i) class MyClass5 (line 93) | public class MyClass5 : MyClass4 method MyClass5 (line 95) | public MyClass5() : base() // Fixed class MyClass6 (line 100) | public class MyClass6 : MyClass4 method MyClass6 (line 102) | public MyClass6() : base(10) class MyClass7 (line 107) | public class MyClass7 class LambdaCtor (line 121) | class LambdaCtor method LambdaCtor (line 124) | LambdaCtor() : base() => i++; class LambdaCtorWithLineEnding (line 127) | class LambdaCtorWithLineEnding method LambdaCtorWithLineEnding (line 130) | LambdaCtorWithLineEnding() class LambdaCtorTrailing (line 135) | class LambdaCtorTrailing method LambdaCtorTrailing (line 138) | LambdaCtorTrailing() : /*a*/ base() /*b*/ => /*c*/ i++ /*d*/ ; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundancyInConstructorDestructorDeclaration.cs class MyClass (line 7) | class MyClass method MyClass (line 9) | public MyClass() method MyClass (line 13) | public MyClass(int p) class DefaultBaseConstructorCall (line 19) | class DefaultBaseConstructorCall : MyClass method DefaultBaseConstructorCall (line 21) | public DefaultBaseConstructorCall() /*c*/ : /*don't keep*/ base() // ... method DefaultBaseConstructorCall (line 27) | public DefaultBaseConstructorCall(string s) method DefaultBaseConstructorCall (line 32) | public DefaultBaseConstructorCall(string[] s) method DefaultBaseConstructorCall (line 43) | public DefaultBaseConstructorCall(string[] s, int i) /*comment method DefaultBaseConstructorCall (line 53) | public DefaultBaseConstructorCall(int parameter) : base(parameter) class MyClass1 (line 58) | public class MyClass1 method MyClass1 (line 60) | static MyClass1() // Noncompliant method MyClass1 (line 64) | public MyClass1() // Noncompliant {{Remove this redundant constructor.}} class MyClass2 (line 74) | public class MyClass2 method MyClass2 (line 76) | private MyClass2() class MyClass3 (line 81) | public class MyClass3 method MyClass3 (line 83) | public MyClass3(int i) class MyClass4 (line 88) | public class MyClass4 method MyClass4 (line 90) | public MyClass4() method MyClass4 (line 93) | public MyClass4(int i) class MyClass5 (line 98) | public class MyClass5 : MyClass4 method MyClass5 (line 100) | public MyClass5() : base() // Noncompliant class MyClass6 (line 105) | public class MyClass6 : MyClass4 method MyClass6 (line 107) | public MyClass6() : base(10) class MyClass7 (line 112) | public class MyClass7 class LambdaCtor (line 126) | class LambdaCtor method LambdaCtor (line 129) | LambdaCtor() : base() => i++; class LambdaCtorWithLineEnding (line 132) | class LambdaCtorWithLineEnding method LambdaCtorWithLineEnding (line 135) | LambdaCtorWithLineEnding() class LambdaCtorTrailing (line 140) | class LambdaCtorTrailing method LambdaCtorTrailing (line 143) | LambdaCtorTrailing() : /*a*/ base() /*b*/ => /*c*/ i++ /*d*/ ; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantArgument.Latest.cs class DefaultLambdaParameters (line 3) | class DefaultLambdaParameters method SingleDefaultArgument (line 5) | void SingleDefaultArgument() method MultipleDefaultArguments (line 14) | void MultipleDefaultArguments() method NamedArguments (line 25) | void NamedArguments() class PrimaryConstructors (line 35) | class PrimaryConstructors method SingleDefaultArgument (line 37) | void SingleDefaultArgument() method MultipleDefaultArguments (line 45) | void MultipleDefaultArguments() method NamedArguments (line 55) | void NamedArguments() class C1 (line 60) | class C1(int i = 42); class C2 (line 61) | class C2(int i = 41, int j = 42); class C3 (line 62) | class C3() : C1(42); class ConstructorInitializerBase (line 65) | class ConstructorInitializerBase method ConstructorInitializerBase (line 67) | public ConstructorInitializerBase(int i = 42) { } method ConstructorInitializerBase (line 68) | public ConstructorInitializerBase(bool _) : this(42) { } class Derived (line 70) | class Derived : ConstructorInitializerBase method Derived (line 72) | public Derived() : base(42) { } type IInterfaceWithDefaultMethod (line 77) | public interface IInterfaceWithDefaultMethod method Write (line 79) | public void Write(int i, int j = 5) { } class Consumer (line 82) | public class Consumer method Consumer (line 84) | public Consumer(IInterfaceWithDefaultMethod i) class WithLocalFunctions (line 90) | public class WithLocalFunctions method Method (line 92) | public void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantArgument.Named.Fixed.cs class RedundantArgument (line 7) | public static class RedundantArgument method M (line 9) | public static void M(int x, int y = 5, int z = 7) { /* ... */ } method M2 (line 10) | public static void M2(int x, int y, int z) { /* ... */ } method M3 (line 11) | public static void M3(int x = 1, int y = 5, int z = 7) { /* ... */ } method Ext (line 12) | public static void Ext(this int self, int y = 5, params int[] paramete... method Ext2 (line 13) | public static void Ext2(this int self, int y, params int[] parameters)... method Test (line 15) | public static void Test() class RedundantArgsInExpressionTrees (line 49) | public class RedundantArgsInExpressionTrees method FuncWithOptionals (line 51) | private static string FuncWithOptionals(string str = null, params stri... method takeExpression (line 64) | void takeExpression(Expression> expr) { } method Method1 (line 66) | public void Method1() class PositionalDefaultBeforeNonDefault (line 79) | public class PositionalDefaultBeforeNonDefault // https://sonarsource.at... method M (line 81) | public static void M(int x, int y = 5, int z = 7) { } method M3 (line 82) | public static void M3(int x = 1, int y = 5, int z = 7) { } method WithOptional (line 83) | public static void WithOptional(bool a = false, bool b = false) { } method PositionalDefaultBeforeNonDefault (line 84) | public PositionalDefaultBeforeNonDefault(int timeout = 30, int retries... method Methods (line 85) | public void Methods() method Constructors (line 91) | public void Constructors() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantArgument.NoNamed.Fixed.cs class RedundantArgument (line 7) | public static class RedundantArgument method M (line 9) | public static void M(int x, int y = 5, int z = 7) { /* ... */ } method M2 (line 10) | public static void M2(int x, int y, int z) { /* ... */ } method M3 (line 11) | public static void M3(int x = 1, int y = 5, int z = 7) { /* ... */ } method Ext (line 12) | public static void Ext(this int self, int y = 5, params int[] paramete... method Ext2 (line 13) | public static void Ext2(this int self, int y, params int[] parameters)... method Test (line 15) | public static void Test() class RedundantArgsInExpressionTrees (line 45) | public class RedundantArgsInExpressionTrees method FuncWithOptionals (line 47) | private static string FuncWithOptionals(string str = null, params stri... method takeExpression (line 60) | void takeExpression(Expression> expr) { } method Method1 (line 62) | public void Method1() class PositionalDefaultBeforeNonDefault (line 75) | public class PositionalDefaultBeforeNonDefault // https://sonarsource.at... method M (line 77) | public static void M(int x, int y = 5, int z = 7) { } method M3 (line 78) | public static void M3(int x = 1, int y = 5, int z = 7) { } method WithOptional (line 79) | public static void WithOptional(bool a = false, bool b = false) { } method PositionalDefaultBeforeNonDefault (line 80) | public PositionalDefaultBeforeNonDefault(int timeout = 30, int retries... method Methods (line 81) | public void Methods() method Constructors (line 87) | public void Constructors() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantArgument.TopLevelStatements.cs type Record (line 43) | record Record FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantArgument.cs class RedundantArgument (line 7) | public static class RedundantArgument method M (line 9) | public static void M(int x, int y = 5, int z = 7) { /* ... */ } method M2 (line 10) | public static void M2(int x, int y, int z) { /* ... */ } method M3 (line 11) | public static void M3(int x = 1, int y = 5, int z = 7) { /* ... */ } method Ext (line 12) | public static void Ext(this int self, int y = 5, params int[] paramete... method Ext2 (line 13) | public static void Ext2(this int self, int y, params int[] parameters)... method Test (line 15) | public static void Test() class RedundantArgsInExpressionTrees (line 54) | public class RedundantArgsInExpressionTrees method FuncWithOptionals (line 56) | private static string FuncWithOptionals(string str = null, params stri... method takeExpression (line 69) | void takeExpression(Expression> expr) { } method Method1 (line 71) | public void Method1() class PositionalDefaultBeforeNonDefault (line 84) | public class PositionalDefaultBeforeNonDefault // https://sonarsource.at... method M (line 86) | public static void M(int x, int y = 5, int z = 7) { } method M3 (line 87) | public static void M3(int x = 1, int y = 5, int z = 7) { } method WithOptional (line 88) | public static void WithOptional(bool a = false, bool b = false) { } method PositionalDefaultBeforeNonDefault (line 89) | public PositionalDefaultBeforeNonDefault(int timeout = 30, int retries... method Methods (line 90) | public void Methods() method Constructors (line 96) | public void Constructors() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantCast.Fixed.cs class RedundantCast (line 8) | public class RedundantCast method foo (line 10) | void foo(long l) method method (line 29) | void method(IEnumerable enumerable) method M (line 32) | void M() method N (line 39) | public void N(int[,] numbers) method OfTypeWithReferenceTypes (line 45) | public void OfTypeWithReferenceTypes(IEnumerable param) method CastWithReferenceTypes (line 61) | public void CastWithReferenceTypes(IEnumerable param) class MyEnumerableExtensions (line 76) | public static class MyEnumerableExtensions method OfType (line 78) | public static IEnumerable OfType(this IEnumerable source) => method Cast (line 80) | public static IEnumerable Cast(this IEnumerable source) => method OfType (line 82) | public static int OfType(this IEnumerable source) => 0; method Cast (line 83) | public static int Cast(this IEnumerable source) => 0; class TestWithCustomExtension (line 86) | public class TestWithCustomExtension method UnlikelyCases (line 88) | public void UnlikelyCases(IEnumerable intValues, List str... class MoreTests (line 100) | public class MoreTests method Foo (line 102) | public void Foo(IEnumerable enumerable, IEnumerable genericEnu... method OfType (line 113) | public void OfType() => OfType(); class Repro_9498 (line 117) | public class Repro_9498 method Sample (line 119) | void Sample(float x) class NumberLiteralSuffixes (line 126) | public class NumberLiteralSuffixes method Numbers (line 128) | void Numbers() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantCast.Latest.cs class InvocationTests (line 8) | public class InvocationTests method Invocations (line 10) | public static void Invocations() method GetInts (line 29) | public static int[] GetInts() => null; method GetObjects (line 30) | public static object[] GetObjects() => null; class CastOnNullable (line 34) | public class CastOnNullable method Array (line 36) | public static IEnumerable Array() method Tuple (line 42) | public void Tuple() method ValueTypes (line 47) | public void ValueTypes(int nonNullable, int? nullable) class AnonTypes (line 57) | public class AnonTypes method Simple (line 59) | public void Simple(string nonNullable, string? nullable) method Array (line 67) | public void Array(string nonNullable, string? nullable) method SwitchExpression (line 77) | public void SwitchExpression(string nonNullable, string? nullable) class HoldsObject (line 92) | internal class HoldsObject method HoldsObject (line 95) | public HoldsObject(object o) class Repro_8413 (line 103) | class Repro_8413 method GetNonNullStringsDirectCast (line 105) | public IEnumerable GetNonNullStringsDirectCast(IEnumerable GetNonNullStringsMethodCast(IEnumerable GetNonNullStringsAsCast(IEnumerable WhereNotNull(IEnumerable result) => method Another (line 126) | public static IEnumerable Another(IEnumerable result) => method SpanConversion (line 129) | public static void SpanConversion() class DefaultLiteralTest (line 143) | public class DefaultLiteralTest method NET2198 (line 146) | public static void NET2198() type Result (line 152) | public record Result class Foo (line 157) | public class Foo { } class Extensions (line 160) | static class Extensions method extension (line 162) | extension(IEnumerable source) method Method (line 170) | static void Method(IEnumerable intValues, List stringValues) class FieldKeyword (line 182) | class FieldKeyword class ImplicitSpanConversion (line 191) | class ImplicitSpanConversion method Method (line 193) | void Method(string[] array) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantCast.cs class RedundantCast (line 8) | public class RedundantCast method foo (line 10) | void foo(long l) method method (line 32) | void method(IEnumerable enumerable) method M (line 35) | void M() method N (line 42) | public void N(int[,] numbers) method OfTypeWithReferenceTypes (line 48) | public void OfTypeWithReferenceTypes(IEnumerable param) method CastWithReferenceTypes (line 64) | public void CastWithReferenceTypes(IEnumerable param) class MyEnumerableExtensions (line 79) | public static class MyEnumerableExtensions method OfType (line 81) | public static IEnumerable OfType(this IEnumerable source) => method Cast (line 83) | public static IEnumerable Cast(this IEnumerable source) => method OfType (line 85) | public static int OfType(this IEnumerable source) => 0; method Cast (line 86) | public static int Cast(this IEnumerable source) => 0; class TestWithCustomExtension (line 89) | public class TestWithCustomExtension method UnlikelyCases (line 91) | public void UnlikelyCases(IEnumerable intValues, List str... class MoreTests (line 103) | public class MoreTests method Foo (line 105) | public void Foo(IEnumerable enumerable, IEnumerable genericEnu... method OfType (line 116) | public void OfType() => OfType(); class Repro_9498 (line 120) | public class Repro_9498 method Sample (line 122) | void Sample(float x) class NumberLiteralSuffixes (line 129) | public class NumberLiteralSuffixes method Numbers (line 131) | void Numbers() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantConditionalAroundAssignment.Fixed.cs class RedundantConditionalAroundAssignment (line 3) | public class RedundantConditionalAroundAssignment method Test (line 5) | public static void Test() method MemberAccess (line 126) | void MemberAccess(RedundantConditionalAroundAssignment r, int a) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantConditionalAroundAssignment.Latest.Fixed.cs class CSharp9 (line 3) | class CSharp9 method Method (line 5) | void Method() class SomeClass (line 80) | public class SomeClass type Record (line 85) | record Record class SwitchExpressionCases (line 107) | public static class SwitchExpressionCases method ToWebsocketUri (line 109) | public static Uri ToWebsocketUri(this Uri uri) method M (line 124) | static string M(string s) => class Repro6447 (line 134) | class Repro6447 method MyMethod (line 136) | void MyMethod() class CSharp10 (line 147) | class CSharp10 method Method (line 149) | void Method() class SomeClass (line 170) | public class SomeClass class SomeOtherClass (line 175) | public class SomeOtherClass class SomeClass (line 181) | public class SomeClass method Noncompliant (line 183) | public void Noncompliant(byte[] bytes) method IndexAccess (line 193) | void IndexAccess() class DataBuffer (line 215) | public class DataBuffer class FieldKeyword (line 224) | class FieldKeyword FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantConditionalAroundAssignment.Latest.cs class CSharp9 (line 3) | class CSharp9 method Method (line 5) | void Method() class SomeClass (line 98) | public class SomeClass type Record (line 103) | record Record class SwitchExpressionCases (line 125) | public static class SwitchExpressionCases method ToWebsocketUri (line 127) | public static Uri ToWebsocketUri(this Uri uri) method M (line 142) | static string M(string s) => class Repro6447 (line 152) | class Repro6447 method MyMethod (line 154) | void MyMethod() class CSharp10 (line 165) | class CSharp10 method Method (line 167) | void Method() class SomeClass (line 194) | public class SomeClass class SomeOtherClass (line 199) | public class SomeOtherClass class SomeClass (line 205) | public class SomeClass method Noncompliant (line 207) | public void Noncompliant(byte[] bytes) method IndexAccess (line 217) | void IndexAccess() class DataBuffer (line 239) | public class DataBuffer class FieldKeyword (line 248) | class FieldKeyword FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantConditionalAroundAssignment.cs class RedundantConditionalAroundAssignment (line 3) | public class RedundantConditionalAroundAssignment method Test (line 5) | public static void Test() method MemberAccess (line 142) | void MemberAccess(RedundantConditionalAroundAssignment r, int a) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantDeclaration.ArraySize.Fixed.cs class RedundantDeclaration (line 6) | abstract class RedundantDeclaration method RedundantDeclaration (line 8) | public RedundantDeclaration() method M (line 78) | public void M() method N (line 85) | public Delegate N() method O (line 92) | public BoolDelegate O() method P (line 97) | public Func P() method Test (line 102) | public abstract void Test(object o, BoolDelegate f); method Test2 (line 103) | public abstract void Test2(object o, Delegate f); method RefDelegateMethod (line 111) | private void RefDelegateMethod(MyMethod2 f) { } method Funcify (line 113) | public static Func Funcify(Func f)... method Funcify2 (line 114) | public static Func Funcify2(Func(T? x) where T : struct { } method NullableTest2 (line 117) | public static void NullableTest2(int? x) { } method Handle (line 119) | private void Handle(object sender, EventArgs e) {} method Handle (line 120) | private void Handle(int i, int j) {} FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantDeclaration.ArrayType.Fixed.cs class RedundantDeclaration (line 6) | abstract class RedundantDeclaration method RedundantDeclaration (line 8) | public RedundantDeclaration() method M (line 79) | public void M() method N (line 86) | public Delegate N() method O (line 93) | public BoolDelegate O() method P (line 98) | public Func P() method Test (line 103) | public abstract void Test(object o, BoolDelegate f); method Test2 (line 104) | public abstract void Test2(object o, Delegate f); method RefDelegateMethod (line 112) | private void RefDelegateMethod(MyMethod2 f) { } method Funcify (line 114) | public static Func Funcify(Func f)... method Funcify2 (line 115) | public static Func Funcify2(Func(T? x) where T : struct { } method NullableTest2 (line 118) | public static void NullableTest2(int? x) { } method Handle (line 120) | private void Handle(object sender, EventArgs e) {} method Handle (line 121) | private void Handle(int i, int j) {} FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantDeclaration.CSharp10.Fixed.cs class RedundantDeclaration (line 6) | abstract class RedundantDeclaration method M (line 8) | public void M() method Test (line 14) | public abstract void Test(object o, Delegate f); class Repro_NET3456 (line 19) | class Repro_NET3456 class BindingAttribute (line 21) | [AttributeUsage(AttributeTargets.Parameter)] method Test (line 24) | void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantDeclaration.CSharp10.cs class RedundantDeclaration (line 6) | abstract class RedundantDeclaration method M (line 8) | public void M() method Test (line 14) | public abstract void Test(object o, Delegate f); class Repro_NET3456 (line 19) | class Repro_NET3456 class BindingAttribute (line 21) | [AttributeUsage(AttributeTargets.Parameter)] method Test (line 24) | void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantDeclaration.CSharp12.ArraySize.Fixed.cs class AClass (line 13) | class AClass method AliasWithArraySize (line 15) | void AliasWithArraySize() method AliasWithUnnecessaryType (line 20) | void AliasWithUnnecessaryType() method AliasWithInitializer (line 25) | void AliasWithInitializer() method AliasWithEmptyParamsList (line 32) | void AliasWithEmptyParamsList() class CollectionExpressions (line 44) | class CollectionExpressions method ExplicitTypeDeclaration (line 46) | void ExplicitTypeDeclaration() method VarDeclarationWithInlineAssignment (line 54) | void VarDeclarationWithInlineAssignment() method VarDeclarationWithReassignment (line 59) | void VarDeclarationWithReassignment() method VarDeclarationWithReassignmentToEmptyCollection (line 68) | void VarDeclarationWithReassignmentToEmptyCollection() class ReproNet882 (line 79) | public class ReproNet882 method Method (line 81) | public void Method() method OnErrorEvent (line 89) | private void OnErrorEvent(object sender, EventArgs e) { } method AddHandler (line 91) | public void AddHandler(Delegate handler) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantDeclaration.CSharp12.LambdaParameterType.Fixed.cs class AClass (line 13) | class AClass method AliasWithArraySize (line 15) | void AliasWithArraySize() method AliasWithUnnecessaryType (line 20) | void AliasWithUnnecessaryType() method AliasWithInitializer (line 25) | void AliasWithInitializer() method AliasWithEmptyParamsList (line 32) | void AliasWithEmptyParamsList() class CollectionExpressions (line 44) | class CollectionExpressions method ExplicitTypeDeclaration (line 46) | void ExplicitTypeDeclaration() method VarDeclarationWithInlineAssignment (line 54) | void VarDeclarationWithInlineAssignment() method VarDeclarationWithReassignment (line 59) | void VarDeclarationWithReassignment() method VarDeclarationWithReassignmentToEmptyCollection (line 68) | void VarDeclarationWithReassignmentToEmptyCollection() class ReproNet882 (line 79) | public class ReproNet882 method Method (line 81) | public void Method() method OnErrorEvent (line 89) | private void OnErrorEvent(object sender, EventArgs e) { } method AddHandler (line 91) | public void AddHandler(Delegate handler) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantDeclaration.CSharp12.cs class AClass (line 13) | class AClass method AliasWithArraySize (line 15) | void AliasWithArraySize() method AliasWithUnnecessaryType (line 20) | void AliasWithUnnecessaryType() method AliasWithInitializer (line 25) | void AliasWithInitializer() method AliasWithEmptyParamsList (line 32) | void AliasWithEmptyParamsList() class CollectionExpressions (line 44) | class CollectionExpressions method ExplicitTypeDeclaration (line 46) | void ExplicitTypeDeclaration() method VarDeclarationWithInlineAssignment (line 54) | void VarDeclarationWithInlineAssignment() method VarDeclarationWithReassignment (line 59) | void VarDeclarationWithReassignment() method VarDeclarationWithReassignmentToEmptyCollection (line 68) | void VarDeclarationWithReassignmentToEmptyCollection() class ReproNet882 (line 79) | public class ReproNet882 method Method (line 81) | public void Method() method OnErrorEvent (line 89) | private void OnErrorEvent(object sender, EventArgs e) { } method AddHandler (line 91) | public void AddHandler(Delegate handler) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantDeclaration.CSharp9.Fixed.cs type Record (line 23) | record Record class RedundantDeclaration (line 34) | public class RedundantDeclaration method RedundantDeclaration (line 36) | public RedundantDeclaration() type Point (line 88) | public record Point(int x, int y); type ChildPoint (line 90) | public record ChildPoint(int x, int y) : Point(x ,y); class NaturalDelegateTypes (line 93) | abstract class NaturalDelegateTypes method M (line 95) | public void M() method Test (line 101) | public abstract void Test(object o, Delegate f); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantDeclaration.CSharp9.cs type Record (line 30) | record Record class RedundantDeclaration (line 41) | public class RedundantDeclaration method RedundantDeclaration (line 43) | public RedundantDeclaration() type Point (line 99) | public record Point(int x, int y); type ChildPoint (line 101) | public record ChildPoint(int x, int y) : Point(x ,y); class NaturalDelegateTypes (line 104) | abstract class NaturalDelegateTypes method M (line 106) | public void M() method Test (line 112) | public abstract void Test(object o, Delegate f); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantDeclaration.DelegateParameterList.Fixed.cs class RedundantDeclaration (line 6) | abstract class RedundantDeclaration method RedundantDeclaration (line 8) | public RedundantDeclaration() method M (line 80) | public void M() method N (line 87) | public Delegate N() method O (line 94) | public BoolDelegate O() method P (line 99) | public Func P() method Test (line 104) | public abstract void Test(object o, BoolDelegate f); method Test2 (line 105) | public abstract void Test2(object o, Delegate f); method RefDelegateMethod (line 113) | private void RefDelegateMethod(MyMethod2 f) { } method Funcify (line 115) | public static Func Funcify(Func f)... method Funcify2 (line 116) | public static Func Funcify2(Func(T? x) where T : struct { } method NullableTest2 (line 119) | public static void NullableTest2(int? x) { } method Handle (line 121) | private void Handle(object sender, EventArgs e) {} method Handle (line 122) | private void Handle(int i, int j) {} FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantDeclaration.ExplicitDelegate.Fixed.cs class RedundantDeclaration (line 6) | abstract class RedundantDeclaration method RedundantDeclaration (line 8) | public RedundantDeclaration() method M (line 78) | public void M() method N (line 85) | public Delegate N() method O (line 92) | public BoolDelegate O() method P (line 97) | public Func P() method Test (line 102) | public abstract void Test(object o, BoolDelegate f); method Test2 (line 103) | public abstract void Test2(object o, Delegate f); method RefDelegateMethod (line 111) | private void RefDelegateMethod(MyMethod2 f) { } method Funcify (line 113) | public static Func Funcify(Func f)... method Funcify2 (line 114) | public static Func Funcify2(Func(T? x) where T : struct { } method NullableTest2 (line 117) | public static void NullableTest2(int? x) { } method Handle (line 119) | private void Handle(object sender, EventArgs e) {} method Handle (line 120) | private void Handle(int i, int j) {} FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantDeclaration.ExplicitNullable.Fixed.cs class RedundantDeclaration (line 6) | abstract class RedundantDeclaration method RedundantDeclaration (line 8) | public RedundantDeclaration() method M (line 80) | public void M() method N (line 87) | public Delegate N() method O (line 94) | public BoolDelegate O() method P (line 99) | public Func P() method Test (line 104) | public abstract void Test(object o, BoolDelegate f); method Test2 (line 105) | public abstract void Test2(object o, Delegate f); method RefDelegateMethod (line 113) | private void RefDelegateMethod(MyMethod2 f) { } method Funcify (line 115) | public static Func Funcify(Func f)... method Funcify2 (line 116) | public static Func Funcify2(Func(T? x) where T : struct { } method NullableTest2 (line 119) | public static void NullableTest2(int? x) { } method Handle (line 121) | private void Handle(object sender, EventArgs e) {} method Handle (line 122) | private void Handle(int i, int j) {} FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantDeclaration.LambdaParameterType.Fixed.cs class RedundantDeclaration (line 6) | abstract class RedundantDeclaration method RedundantDeclaration (line 8) | public RedundantDeclaration() method M (line 80) | public void M() method N (line 87) | public Delegate N() method O (line 94) | public BoolDelegate O() method P (line 99) | public Func P() method Test (line 104) | public abstract void Test(object o, BoolDelegate f); method Test2 (line 105) | public abstract void Test2(object o, Delegate f); method RefDelegateMethod (line 113) | private void RefDelegateMethod(MyMethod2 f) { } method Funcify (line 115) | public static Func Funcify(Func f)... method Funcify2 (line 116) | public static Func Funcify2(Func(T? x) where T : struct { } method NullableTest2 (line 119) | public static void NullableTest2(int? x) { } method Handle (line 121) | private void Handle(object sender, EventArgs e) {} method Handle (line 122) | private void Handle(int i, int j) {} FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantDeclaration.ObjectInitializer.Fixed.cs class RedundantDeclaration (line 6) | abstract class RedundantDeclaration method RedundantDeclaration (line 8) | public RedundantDeclaration() method M (line 80) | public void M() method N (line 87) | public Delegate N() method O (line 94) | public BoolDelegate O() method P (line 99) | public Func P() method Test (line 104) | public abstract void Test(object o, BoolDelegate f); method Test2 (line 105) | public abstract void Test2(object o, Delegate f); method RefDelegateMethod (line 113) | private void RefDelegateMethod(MyMethod2 f) { } method Funcify (line 115) | public static Func Funcify(Func f)... method Funcify2 (line 116) | public static Func Funcify2(Func(T? x) where T : struct { } method NullableTest2 (line 119) | public static void NullableTest2(int? x) { } method Handle (line 121) | private void Handle(object sender, EventArgs e) {} method Handle (line 122) | private void Handle(int i, int j) {} FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantDeclaration.cs class RedundantDeclaration (line 6) | abstract class RedundantDeclaration method RedundantDeclaration (line 8) | public RedundantDeclaration() method M (line 88) | public void M() method N (line 95) | public Delegate N() method O (line 102) | public BoolDelegate O() method P (line 107) | public Func P() method Test (line 112) | public abstract void Test(object o, BoolDelegate f); method Test2 (line 113) | public abstract void Test2(object o, Delegate f); method RefDelegateMethod (line 121) | private void RefDelegateMethod(MyMethod2 f) { } method Funcify (line 123) | public static Func Funcify(Func f)... method Funcify2 (line 124) | public static Func Funcify2(Func(T? x) where T : struct { } method NullableTest2 (line 127) | public static void NullableTest2(int? x) { } method Handle (line 129) | private void Handle(object sender, EventArgs e) {} method Handle (line 130) | private void Handle(int i, int j) {} FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantInheritanceList.CSharp10.Fixed.cs type IBaseContract (line 3) | interface IBaseContract { } type IContract (line 5) | interface IContract : IBaseContract { } type Record (line 7) | record Record { } type RedunantInterfaceImpl (line 9) | record struct RedunantInterfaceImpl : IContract { } type RedunantInterfaceImplPositionalRecord (line 11) | record struct RedunantInterfaceImplPositionalRecord(int SomeProperty) : ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantInheritanceList.CSharp10.cs type IBaseContract (line 3) | interface IBaseContract { } type IContract (line 5) | interface IContract : IBaseContract { } type Record (line 7) | record Record : Object { } type RedunantInterfaceImpl (line 9) | record struct RedunantInterfaceImpl : IContract, IBaseContract { } type RedunantInterfaceImplPositionalRecord (line 11) | record struct RedunantInterfaceImplPositionalRecord(int SomeProperty) : ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantInheritanceList.CSharp9.Fixed.cs type Record (line 3) | record Record { } type OtherRecord (line 5) | record OtherRecord : IContract { } type SubRecord (line 7) | record SubRecord : OtherRecord { } type RedunantInterfaceImpl (line 9) | record RedunantInterfaceImpl : IContract { } type PositionalRecord (line 11) | record PositionalRecord(int SomeProperty) { } type OtherPositionalRecord (line 13) | record OtherPositionalRecord(int SomeProperty) : IContract { } type SubPositionalRecord (line 15) | record SubPositionalRecord(int SomeProperty) : OtherPositionalRecord(Som... type RedunantInterfaceImplPositionalRecord (line 17) | record RedunantInterfaceImplPositionalRecord(int SomeProperty) : IContra... type IContract (line 19) | interface IContract : IBaseContract { } type IBaseContract (line 21) | interface IBaseContract { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantInheritanceList.CSharp9.cs type Record (line 3) | record Record : Object { } type OtherRecord (line 5) | record OtherRecord : Object, IContract { } type SubRecord (line 7) | record SubRecord : OtherRecord { } type RedunantInterfaceImpl (line 9) | record RedunantInterfaceImpl : IContract, IBaseContract { } type PositionalRecord (line 11) | record PositionalRecord(int SomeProperty) : Object { } type OtherPositionalRecord (line 13) | record OtherPositionalRecord(int SomeProperty) : Object, IContract { } type SubPositionalRecord (line 15) | record SubPositionalRecord(int SomeProperty) : OtherPositionalRecord(Som... type RedunantInterfaceImplPositionalRecord (line 17) | record RedunantInterfaceImplPositionalRecord(int SomeProperty) : IContra... type IContract (line 19) | interface IContract : IBaseContract { } type IBaseContract (line 21) | interface IBaseContract { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantInheritanceList.Fixed.cs type MyEnum (line 5) | enum MyEnum : long type MyEnum2 (line 8) | enum MyEnum2 type MyEnum3 (line 11) | enum MyEnum3 class AA (line 15) | class AA //Fixed class AAA (line 17) | class AAA class A (line 20) | class A class B (line 22) | class B : class BB (line 26) | class BB type IBase (line 30) | interface IBase { } type IA (line 31) | interface IA : IBase { } type IB (line 32) | interface IB : IA type IPrint1 (line 35) | interface IPrint1 method Print (line 37) | void Print(); class Base (line 39) | class Base : IPrint1 method Print (line 41) | public void Print() { } class A1 (line 43) | class A1 : Base class A2 (line 45) | class A2 : Base, IPrint1 method Print (line 47) | public new void Print() { } class A3 (line 49) | class A3 : Base, IPrint1 method Print (line 51) | void IPrint1.Print() { } type IB1 (line 54) | interface IB1 method Method (line 56) | void Method(); type IB2 (line 59) | interface IB2 : IB1 class C1 (line 63) | class C1 : IB2 method Method (line 65) | public void Method() { } type IM (line 68) | public interface IM method Print (line 70) | void Print(); type IM2 (line 73) | public interface IM2 : IM // not redundant class Base2 (line 77) | public class Base2 : IM method Print (line 79) | public void Print() class Derived1 (line 85) | public class Derived1 : Base2, IM // not redundant method Print (line 87) | public void Print() class Derived2 (line 93) | public class Derived2 : IM2 method Print (line 95) | public void Print() class Derived2B (line 101) | public class Derived2B : IM2 method Print (line 103) | public void Print() class Derived3 (line 109) | public class Derived3 : IM2 method Print (line 111) | void IM.Print() class Derived4 (line 117) | public class Derived4 : Base2, IM method Print (line 119) | void IM.Print() type IMyInt (line 124) | interface IMyInt method M (line 126) | void M(); class X1 (line 129) | class X1 : IMyInt method M (line 131) | public void M() class X2 (line 137) | class X2 : X1 method M (line 139) | public new void M() class X3 (line 145) | class X3 : X2, IMyInt // Compliant type RedunantInterfaceImpl (line 149) | struct RedunantInterfaceImpl : IA { } class Foo (line 152) | class Foo { } type IBar (line 154) | interface IBar method Test (line 156) | int Test(); class Bar (line 159) | class Bar : Foo { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantInheritanceList.cs type MyEnum (line 5) | enum MyEnum : long type MyEnum2 (line 8) | enum MyEnum2 type MyEnum3 (line 13) | enum MyEnum3 class AA (line 17) | class AA : Object //Noncompliant {{'Object' should not be explicitly ext... class AAA (line 19) | class AAA://Noncompliant class A (line 23) | class A class B (line 26) | class B : class BB (line 32) | class BB type IBase (line 37) | interface IBase { } type IA (line 38) | interface IA : IBase { } type IB (line 39) | interface IB : IA type IPrint1 (line 43) | interface IPrint1 method Print (line 45) | void Print(); class Base (line 47) | class Base : IPrint1 method Print (line 49) | public void Print() { } class A1 (line 51) | class A1 : Base class A2 (line 54) | class A2 : Base, IPrint1 method Print (line 56) | public new void Print() { } class A3 (line 58) | class A3 : Base, IPrint1 method Print (line 60) | void IPrint1.Print() { } type IB1 (line 63) | interface IB1 method Method (line 65) | void Method(); type IB2 (line 68) | interface IB2 : IB1 class C1 (line 72) | class C1 : IB2 method Method (line 75) | public void Method() { } type IM (line 78) | public interface IM method Print (line 80) | void Print(); type IM2 (line 83) | public interface IM2 : IM // not redundant class Base2 (line 87) | public class Base2 : IM method Print (line 89) | public void Print() class Derived1 (line 95) | public class Derived1 : Base2, IM // not redundant method Print (line 97) | public void Print() class Derived2 (line 103) | public class Derived2 : IM2 method Print (line 105) | public void Print() class Derived2B (line 111) | public class Derived2B : IM, // Noncompliant method Print (line 114) | public void Print() class Derived3 (line 120) | public class Derived3 : IM2 method Print (line 123) | void IM.Print() class Derived4 (line 129) | public class Derived4 : Base2, IM method Print (line 131) | void IM.Print() type IMyInt (line 136) | interface IMyInt method M (line 138) | void M(); class X1 (line 141) | class X1 : IMyInt method M (line 143) | public void M() class X2 (line 149) | class X2 : X1 method M (line 151) | public new void M() class X3 (line 157) | class X3 : X2, IMyInt // Compliant type RedunantInterfaceImpl (line 161) | struct RedunantInterfaceImpl : IA, IBase { } class Foo (line 165) | class Foo { } type IBar (line 167) | interface IBar method Test (line 169) | int Test(); class Bar (line 172) | class Bar : Foo, IBar { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantJumpStatement.Latest.cs class RedundantJumpStatement (line 3) | public class RedundantJumpStatement method CSharp8_StaticLocalFunctions (line 5) | void CSharp8_StaticLocalFunctions() type IWithDefaultImplementation (line 24) | public interface IWithDefaultImplementation method Reset (line 30) | void Reset() method ResetIfZero (line 37) | void ResetIfZero() type Record (line 47) | record Record class RedundantJumpStatement_C9Patterns (line 61) | public class RedundantJumpStatement_C9Patterns method AllPatterns_C9Patterns (line 63) | void AllPatterns_C9Patterns(int[] numbers, int[][] arrays) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantJumpStatement.cs class RedundantJumpStatement (line 5) | public class RedundantJumpStatement method Foo1 (line 7) | void Foo1() method Foo2 (line 30) | void Foo2(bool a) method Loop_Continue (line 43) | void Loop_Continue(bool a) method Switch_Goto (line 59) | void Switch_Goto(int j) method Switch_Return (line 72) | void Switch_Return(int j) method YieldBreak1 (line 84) | IEnumerable YieldBreak1(int j) method YieldReturn (line 89) | IEnumerable YieldReturn(int j) method YieldBreak2 (line 94) | IEnumerable YieldBreak2(int j) method LongChain (line 100) | void LongChain() method RegressionTest_1265 (line 118) | void RegressionTest_1265() method RedundantJumpInTryCatch1 (line 136) | void RedundantJumpInTryCatch1() method RedundantJumpInTryCatch2 (line 153) | void RedundantJumpInTryCatch2() class Repro_3105 (line 172) | public class Repro_3105 method DoSomething (line 174) | public void DoSomething() method Invoke (line 181) | void Invoke(Action a) class Repro_3193 (line 187) | public class Repro_3193 method Foo (line 189) | void Foo(Log Logger) class Log (line 214) | public class Log method Finally (line 216) | public void Finally() { } class Repro_1149 (line 220) | public class Repro_1149 method LocalFunctionAfterReturn (line 222) | public void LocalFunctionAfterReturn(List items) method LocalFunctionBeforeReturn (line 234) | public void LocalFunctionBeforeReturn(List items) method LocalFunctionAfterGoto (line 246) | public void LocalFunctionAfterGoto(List items) method LabeledLocalFunctionAfterReturn (line 259) | public void LabeledLocalFunctionAfterReturn(List items) method LocalFunctionAfterYieldReturnYieldBreak (line 272) | public IEnumerable LocalFunctionAfterYieldReturnYieldBreak(List method Process (line 112) | public virtual string Process(string input) class SubClass (line 118) | internal class SubClass : BaseClass method Process (line 120) | public override string Process(string input) class UnsafeClass (line 126) | unsafe class UnsafeClass class UnsafeClass2 (line 131) | unsafe class UnsafeClass2 // Fixed class UnsafeClass3 (line 135) | unsafe class UnsafeClass3 // Fixed method M (line 137) | unsafe void M() // Fixed class Point (line 143) | class Point class Class4 (line 149) | class Class4 type MyInterface (line 151) | unsafe interface MyInterface method Method (line 153) | unsafe int* Method(); class Inner (line 159) | unsafe class Inner { } method Class4 (line 171) | unsafe ~Class4() // Fixed method M (line 174) | void M() class Foo (line 199) | public class Foo class Bar (line 201) | public class Bar class Baz (line 203) | public unsafe class Baz // Fixed class Foo2 (line 209) | public unsafe class Foo2 class Bar (line 211) | public unsafe class Bar // Fixed class Baz (line 215) | public unsafe class Baz // Fixed class Checked (line 222) | public class Checked method M (line 224) | public static void M() type FixedArraySample (line 323) | public unsafe struct FixedArraySample class StackAlloc (line 328) | public class StackAlloc method M (line 330) | private unsafe void M() class UnsafeHidden (line 336) | public class UnsafeHidden method Method (line 338) | private unsafe int* Method() { return null; } method Method2 (line 339) | private unsafe void Method2(int* p) { } method M1 (line 340) | public unsafe void M1() method WithUndefinedInvocation (line 345) | public unsafe void WithUndefinedInvocation() // Fixed method M2 (line 351) | public unsafe void M2() class UnsafeParameter (line 357) | public class UnsafeParameter method Method (line 361) | public unsafe void Method() class UnsafeCtor (line 367) | public class UnsafeCtor method UnsafeCtor (line 369) | public UnsafeCtor() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantModifier.Fixed.Partial.cs class C1 (line 5) | public class C1 method MyNotOverriddenMethod (line 7) | public virtual void MyNotOverriddenMethod() { } class Partial1Part (line 9) | internal class Partial1Part //Fixed method Method (line 11) | void Method() { } type PartialStruct (line 13) | struct PartialStruct //Fixed type PartialInterface (line 16) | interface PartialInterface //Fixed class Partial2Part (line 20) | internal partial class Partial2Part method MyOverriddenMethod (line 26) | public virtual void MyOverriddenMethod() { } class Partial2Part (line 24) | internal abstract partial class Partial2Part method MyOverriddenMethod (line 26) | public virtual void MyOverriddenMethod() { } class Override (line 33) | internal class Override : Partial2Part method MyOverriddenMethod (line 35) | public override void MyOverriddenMethod() { } type SomeEnumeration (line 49) | public enum SomeEnumeration class SealedClass (line 55) | sealed class SealedClass : Partial2Part method MyOverriddenMethod (line 57) | public override sealed void MyOverriddenMethod() { } class AbstractClass (line 73) | abstract class AbstractClass : Partial2Part method MyOverriddenMethod (line 75) | public override sealed void MyOverriddenMethod() { } class SealedClassWithoutRedundantKeywordOnMembers (line 91) | sealed class SealedClassWithoutRedundantKeywordOnMembers : Partial2Part method MyOverriddenMethod (line 93) | public override void MyOverriddenMethod() { } class BaseClass (line 110) | internal class BaseClass method Process (line 112) | public virtual string Process(string input) class SubClass (line 118) | internal class SubClass : BaseClass method Process (line 120) | public override string Process(string input) class UnsafeClass (line 126) | unsafe class UnsafeClass class UnsafeClass2 (line 131) | unsafe class UnsafeClass2 // Fixed class UnsafeClass3 (line 135) | unsafe class UnsafeClass3 // Fixed method M (line 137) | unsafe void M() // Fixed class Point (line 143) | class Point class Class4 (line 149) | class Class4 type MyInterface (line 151) | unsafe interface MyInterface method Method (line 153) | unsafe int* Method(); class Inner (line 159) | unsafe class Inner { } method Class4 (line 171) | unsafe ~Class4() // Fixed method M (line 174) | void M() class Foo (line 199) | public class Foo class Bar (line 201) | public class Bar class Baz (line 203) | public unsafe class Baz // Fixed class Foo2 (line 209) | public unsafe class Foo2 class Bar (line 211) | public unsafe class Bar // Fixed class Baz (line 215) | public unsafe class Baz // Fixed class Checked (line 222) | public class Checked method M (line 224) | public static void M() type FixedArraySample (line 330) | public unsafe struct FixedArraySample class StackAlloc (line 335) | public class StackAlloc method M (line 337) | private unsafe void M() class UnsafeHidden (line 343) | public class UnsafeHidden method Method (line 345) | private unsafe int* Method() { return null; } method Method2 (line 346) | private unsafe void Method2(int* p) { } method M1 (line 347) | public unsafe void M1() method WithUndefinedInvocation (line 352) | public unsafe void WithUndefinedInvocation() // Fixed method M2 (line 358) | public unsafe void M2() class UnsafeParameter (line 364) | public class UnsafeParameter method Method (line 368) | public unsafe void Method() class UnsafeCtor (line 374) | public class UnsafeCtor method UnsafeCtor (line 376) | public UnsafeCtor() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantModifier.Fixed.Sealed.cs class C1 (line 5) | public class C1 method MyNotOverriddenMethod (line 7) | public virtual void MyNotOverriddenMethod() { } class Partial1Part (line 9) | internal partial class Partial1Part //Fixed method Method (line 11) | void Method() { } type PartialStruct (line 13) | partial struct PartialStruct //Fixed type PartialInterface (line 16) | partial interface PartialInterface //Fixed class Partial2Part (line 20) | internal partial class Partial2Part method MyOverriddenMethod (line 26) | public virtual void MyOverriddenMethod() { } class Partial2Part (line 24) | internal abstract partial class Partial2Part method MyOverriddenMethod (line 26) | public virtual void MyOverriddenMethod() { } class Override (line 33) | internal class Override : Partial2Part method MyOverriddenMethod (line 35) | public override void MyOverriddenMethod() { } type SomeEnumeration (line 49) | public enum SomeEnumeration class SealedClass (line 55) | sealed class SealedClass : Partial2Part method MyOverriddenMethod (line 57) | public override void MyOverriddenMethod() { } class AbstractClass (line 73) | abstract class AbstractClass : Partial2Part method MyOverriddenMethod (line 75) | public override sealed void MyOverriddenMethod() { } class SealedClassWithoutRedundantKeywordOnMembers (line 91) | sealed class SealedClassWithoutRedundantKeywordOnMembers : Partial2Part method MyOverriddenMethod (line 93) | public override void MyOverriddenMethod() { } class BaseClass (line 110) | internal class BaseClass method Process (line 112) | public virtual string Process(string input) class SubClass (line 118) | internal class SubClass : BaseClass method Process (line 120) | public override string Process(string input) class UnsafeClass (line 126) | unsafe class UnsafeClass class UnsafeClass2 (line 131) | unsafe class UnsafeClass2 // Fixed class UnsafeClass3 (line 135) | unsafe class UnsafeClass3 // Fixed method M (line 137) | unsafe void M() // Fixed class Point (line 143) | class Point class Class4 (line 149) | class Class4 type MyInterface (line 151) | unsafe interface MyInterface method Method (line 153) | unsafe int* Method(); class Inner (line 159) | unsafe class Inner { } method Class4 (line 171) | unsafe ~Class4() // Fixed method M (line 174) | void M() class Foo (line 199) | public class Foo class Bar (line 201) | public class Bar class Baz (line 203) | public unsafe class Baz // Fixed class Foo2 (line 209) | public unsafe class Foo2 class Bar (line 211) | public unsafe class Bar // Fixed class Baz (line 215) | public unsafe class Baz // Fixed class Checked (line 222) | public class Checked method M (line 224) | public static void M() type FixedArraySample (line 330) | public unsafe struct FixedArraySample class StackAlloc (line 335) | public class StackAlloc method M (line 337) | private unsafe void M() class UnsafeHidden (line 343) | public class UnsafeHidden method Method (line 345) | private unsafe int* Method() { return null; } method Method2 (line 346) | private unsafe void Method2(int* p) { } method M1 (line 347) | public unsafe void M1() method WithUndefinedInvocation (line 352) | public unsafe void WithUndefinedInvocation() // Fixed method M2 (line 358) | public unsafe void M2() class UnsafeParameter (line 364) | public class UnsafeParameter method Method (line 368) | public unsafe void Method() class UnsafeCtor (line 374) | public class UnsafeCtor method UnsafeCtor (line 376) | public UnsafeCtor() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantModifier.Fixed.Unsafe.cs class C1 (line 5) | public class C1 method MyNotOverriddenMethod (line 7) | public virtual void MyNotOverriddenMethod() { } class Partial1Part (line 9) | internal partial class Partial1Part //Fixed method Method (line 11) | void Method() { } type PartialStruct (line 13) | partial struct PartialStruct //Fixed type PartialInterface (line 16) | partial interface PartialInterface //Fixed class Partial2Part (line 20) | internal partial class Partial2Part method MyOverriddenMethod (line 26) | public virtual void MyOverriddenMethod() { } class Partial2Part (line 24) | internal abstract partial class Partial2Part method MyOverriddenMethod (line 26) | public virtual void MyOverriddenMethod() { } class Override (line 33) | internal class Override : Partial2Part method MyOverriddenMethod (line 35) | public override void MyOverriddenMethod() { } type SomeEnumeration (line 49) | public enum SomeEnumeration class SealedClass (line 55) | sealed class SealedClass : Partial2Part method MyOverriddenMethod (line 57) | public override sealed void MyOverriddenMethod() { } class AbstractClass (line 73) | abstract class AbstractClass : Partial2Part method MyOverriddenMethod (line 75) | public override sealed void MyOverriddenMethod() { } class SealedClassWithoutRedundantKeywordOnMembers (line 91) | sealed class SealedClassWithoutRedundantKeywordOnMembers : Partial2Part method MyOverriddenMethod (line 93) | public override void MyOverriddenMethod() { } class BaseClass (line 110) | internal class BaseClass method Process (line 112) | public virtual string Process(string input) class SubClass (line 118) | internal class SubClass : BaseClass method Process (line 120) | public override string Process(string input) class UnsafeClass (line 126) | unsafe class UnsafeClass class UnsafeClass2 (line 131) | class UnsafeClass2 // Fixed class UnsafeClass3 (line 135) | class UnsafeClass3 // Fixed method M (line 137) | void M() // Fixed class Point (line 143) | class Point class Class4 (line 149) | class Class4 type MyInterface (line 151) | unsafe interface MyInterface method Method (line 153) | int* Method(); class Inner (line 159) | class Inner { } method M (line 174) | void M() class Foo (line 193) | public class Foo class Bar (line 195) | public class Bar class Baz (line 197) | public class Baz // Fixed class Foo2 (line 203) | public unsafe class Foo2 class Bar (line 205) | public class Bar // Fixed class Baz (line 209) | public class Baz // Fixed class Checked (line 216) | public class Checked method M (line 218) | public static void M() type FixedArraySample (line 324) | public unsafe struct FixedArraySample class StackAlloc (line 329) | public class StackAlloc method M (line 331) | private unsafe void M() class UnsafeHidden (line 337) | public class UnsafeHidden method Method (line 339) | private unsafe int* Method() { return null; } method Method2 (line 340) | private unsafe void Method2(int* p) { } method M1 (line 341) | public unsafe void M1() method WithUndefinedInvocation (line 346) | public void WithUndefinedInvocation() // Fixed method M2 (line 352) | public unsafe void M2() class UnsafeParameter (line 358) | public class UnsafeParameter method Method (line 362) | public unsafe void Method() class UnsafeCtor (line 368) | public class UnsafeCtor method UnsafeCtor (line 370) | public UnsafeCtor() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantModifier.Latest.Fixed.Checked.cs type Record (line 5) | public record Record type PartialRecordDeclaredOnlyOnce (line 10) | internal partial record PartialRecordDeclaredOnlyOnce // Fixed type PartialPositionalRecordDeclaredOnlyOnce (line 15) | internal partial record PartialPositionalRecordDeclaredOnlyOnce(string p... type PartialDeclaredMultipleTimes (line 20) | internal partial record PartialDeclaredMultipleTimes type PartialDeclaredMultipleTimes (line 24) | internal partial record PartialDeclaredMultipleTimes type BaseRecord (line 28) | abstract record BaseRecord type SealedRecord (line 35) | sealed record SealedRecord : BaseRecord type BaseRecord (line 42) | internal record BaseRecord type SubRecord (line 50) | internal record SubRecord : BaseRecord type UnsafeRecord (line 55) | internal unsafe record UnsafeRecord // Fixed type Foo (line 70) | public record Foo method Method (line 239) | public static void Method() type RecordNewSyntax (line 144) | public unsafe record RecordNewSyntax(string Input) // Fixed type UnsafeRecordStruct (line 152) | internal unsafe record struct UnsafeRecordStruct // Fixed type Foo (line 163) | public record struct Foo method Method (line 239) | public static void Method() type RecordNewSyntax (line 229) | public unsafe record struct RecordNewSyntax(string Input) // Fixed class Foo (line 237) | public class Foo method Method (line 239) | public static void Method() class PartialFoo (line 257) | file partial class PartialFoo { } class PartialFooBar (line 259) | file partial class PartialFooBar { } class PartialFileClass (line 261) | file partial class PartialFileClass { } class PartialFileClass (line 262) | file partial class PartialFileClass { } class UnsafeClass (line 265) | file unsafe class UnsafeClass class UnsafeClass2 (line 270) | file unsafe class UnsafeClass2 // Fixed type MyInterface (line 275) | file unsafe interface MyInterface method Method (line 277) | unsafe int* Method(); class Base (line 283) | public class Base class Thingy (line 288) | public sealed partial class Thingy : Base FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantModifier.Latest.Fixed.Partial.cs type Record (line 5) | public record Record type PartialRecordDeclaredOnlyOnce (line 10) | internal record PartialRecordDeclaredOnlyOnce // Fixed type PartialPositionalRecordDeclaredOnlyOnce (line 15) | internal record PartialPositionalRecordDeclaredOnlyOnce(string parameter... type PartialDeclaredMultipleTimes (line 20) | internal partial record PartialDeclaredMultipleTimes type PartialDeclaredMultipleTimes (line 24) | internal partial record PartialDeclaredMultipleTimes type BaseRecord (line 28) | abstract record BaseRecord type SealedRecord (line 35) | sealed record SealedRecord : BaseRecord type BaseRecord (line 42) | internal record BaseRecord type SubRecord (line 50) | internal record SubRecord : BaseRecord type UnsafeRecord (line 55) | internal unsafe record UnsafeRecord // Fixed type Foo (line 70) | public record Foo method Method (line 246) | public static void Method() type RecordNewSyntax (line 148) | public unsafe record RecordNewSyntax(string Input) // Fixed type UnsafeRecordStruct (line 156) | internal unsafe record struct UnsafeRecordStruct // Fixed type Foo (line 167) | public record struct Foo method Method (line 246) | public static void Method() type RecordNewSyntax (line 236) | public unsafe record struct RecordNewSyntax(string Input) // Fixed class Foo (line 244) | public class Foo method Method (line 246) | public static void Method() class PartialFoo (line 266) | file class PartialFoo { } class PartialFooBar (line 268) | file class PartialFooBar { } class PartialFileClass (line 270) | file partial class PartialFileClass { } class PartialFileClass (line 271) | file partial class PartialFileClass { } class UnsafeClass (line 274) | file unsafe class UnsafeClass class UnsafeClass2 (line 279) | file unsafe class UnsafeClass2 // Fixed type MyInterface (line 284) | file unsafe interface MyInterface method Method (line 286) | unsafe int* Method(); class Base (line 292) | public class Base class Thingy (line 297) | public sealed class Thingy : Base FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantModifier.Latest.Fixed.Sealed.cs type Record (line 5) | public record Record type PartialRecordDeclaredOnlyOnce (line 10) | internal partial record PartialRecordDeclaredOnlyOnce // Fixed type PartialPositionalRecordDeclaredOnlyOnce (line 15) | internal partial record PartialPositionalRecordDeclaredOnlyOnce(string p... type PartialDeclaredMultipleTimes (line 20) | internal partial record PartialDeclaredMultipleTimes type PartialDeclaredMultipleTimes (line 24) | internal partial record PartialDeclaredMultipleTimes type BaseRecord (line 28) | abstract record BaseRecord type SealedRecord (line 35) | sealed record SealedRecord : BaseRecord type BaseRecord (line 42) | internal record BaseRecord type SubRecord (line 50) | internal record SubRecord : BaseRecord type UnsafeRecord (line 55) | internal unsafe record UnsafeRecord // Fixed type Foo (line 70) | public record Foo method Method (line 246) | public static void Method() type RecordNewSyntax (line 148) | public unsafe record RecordNewSyntax(string Input) // Fixed type UnsafeRecordStruct (line 156) | internal unsafe record struct UnsafeRecordStruct // Fixed type Foo (line 167) | public record struct Foo method Method (line 246) | public static void Method() type RecordNewSyntax (line 236) | public unsafe record struct RecordNewSyntax(string Input) // Fixed class Foo (line 244) | public class Foo method Method (line 246) | public static void Method() class PartialFoo (line 266) | file partial class PartialFoo { } class PartialFooBar (line 268) | file partial class PartialFooBar { } class PartialFileClass (line 270) | file partial class PartialFileClass { } class PartialFileClass (line 271) | file partial class PartialFileClass { } class UnsafeClass (line 274) | file unsafe class UnsafeClass class UnsafeClass2 (line 279) | file unsafe class UnsafeClass2 // Fixed type MyInterface (line 284) | file unsafe interface MyInterface method Method (line 286) | unsafe int* Method(); class Base (line 292) | public class Base class Thingy (line 297) | public sealed partial class Thingy : Base FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantModifier.Latest.Fixed.Unsafe.cs type Record (line 5) | public record Record type PartialRecordDeclaredOnlyOnce (line 10) | internal partial record PartialRecordDeclaredOnlyOnce // Fixed type PartialPositionalRecordDeclaredOnlyOnce (line 15) | internal partial record PartialPositionalRecordDeclaredOnlyOnce(string p... type PartialDeclaredMultipleTimes (line 20) | internal partial record PartialDeclaredMultipleTimes type PartialDeclaredMultipleTimes (line 24) | internal partial record PartialDeclaredMultipleTimes type BaseRecord (line 28) | abstract record BaseRecord type SealedRecord (line 35) | sealed record SealedRecord : BaseRecord type BaseRecord (line 42) | internal record BaseRecord type SubRecord (line 50) | internal record SubRecord : BaseRecord type UnsafeRecord (line 55) | internal record UnsafeRecord // Fixed type Foo (line 70) | public record Foo method Method (line 246) | public static void Method() type RecordNewSyntax (line 148) | public record RecordNewSyntax(string Input) // Fixed type UnsafeRecordStruct (line 156) | internal record struct UnsafeRecordStruct // Fixed type Foo (line 167) | public record struct Foo method Method (line 246) | public static void Method() type RecordNewSyntax (line 236) | public record struct RecordNewSyntax(string Input) // Fixed class Foo (line 244) | public class Foo method Method (line 246) | public static void Method() class PartialFoo (line 266) | file partial class PartialFoo { } class PartialFooBar (line 268) | file partial class PartialFooBar { } class PartialFileClass (line 270) | file partial class PartialFileClass { } class PartialFileClass (line 271) | file partial class PartialFileClass { } class UnsafeClass (line 274) | file unsafe class UnsafeClass class UnsafeClass2 (line 279) | file class UnsafeClass2 // Fixed type MyInterface (line 284) | file unsafe interface MyInterface method Method (line 286) | int* Method(); class Base (line 292) | public class Base class Thingy (line 297) | public sealed partial class Thingy : Base FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantModifier.Latest.Partial.cs class PartialFooBar (line 3) | file partial class PartialFooBar { } class Thingy (line 9) | public sealed partial class Thingy FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantModifier.Latest.cs type Record (line 5) | public record Record type PartialRecordDeclaredOnlyOnce (line 10) | internal partial record PartialRecordDeclaredOnlyOnce // Noncompliant type PartialPositionalRecordDeclaredOnlyOnce (line 15) | internal partial record PartialPositionalRecordDeclaredOnlyOnce(string p... type PartialDeclaredMultipleTimes (line 20) | internal partial record PartialDeclaredMultipleTimes type PartialDeclaredMultipleTimes (line 24) | internal partial record PartialDeclaredMultipleTimes type BaseRecord (line 28) | abstract record BaseRecord type SealedRecord (line 35) | sealed record SealedRecord : BaseRecord type BaseRecord (line 42) | internal record BaseRecord type SubRecord (line 50) | internal record SubRecord : BaseRecord type UnsafeRecord (line 55) | internal unsafe record UnsafeRecord // Noncompliant type Foo (line 70) | public record Foo method Method (line 248) | public static void Method() type RecordNewSyntax (line 150) | public unsafe record RecordNewSyntax(string Input) // Noncompliant For t... type UnsafeRecordStruct (line 158) | internal unsafe record struct UnsafeRecordStruct // Noncompliant type Foo (line 169) | public record struct Foo method Method (line 248) | public static void Method() type RecordNewSyntax (line 238) | public unsafe record struct RecordNewSyntax(string Input) // Noncompliant class Foo (line 246) | public class Foo method Method (line 248) | public static void Method() class PartialFoo (line 268) | file partial class PartialFoo { } class PartialFooBar (line 270) | file partial class PartialFooBar { } class PartialFileClass (line 272) | file partial class PartialFileClass { } class PartialFileClass (line 273) | file partial class PartialFileClass { } class UnsafeClass (line 276) | file unsafe class UnsafeClass class UnsafeClass2 (line 281) | file unsafe class UnsafeClass2 // Noncompliant type MyInterface (line 287) | file unsafe interface MyInterface method Method (line 289) | unsafe int* Method(); class Base (line 295) | public class Base class Thingy (line 300) | public sealed partial class Thingy : Base FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantModifier.Preprocessor.Net.Partial.cs class TargetDependent (line 6) | public static partial class TargetDependent method GetPattern (line 8) | private static partial Regex GetPattern() { return null; } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantModifier.Preprocessor.Net.cs class TargetDependent (line 6) | public static partial class TargetDependent method Matches (line 8) | public static bool Matches(string ns) => Pattern.IsMatch(ns); method GetPattern (line 15) | [GeneratedRegex(@"\.v(?[1-9][0-9]+(_[0-9]+)*)\.", RegexOption... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantModifier.Preprocessor.NetFx.cs class TargetDependent (line 6) | public static partial class TargetDependent // Noncompliant FP - Only wh... method Matches (line 8) | public static bool Matches(string ns) => Pattern.IsMatch(ns); method GetPattern (line 15) | [GeneratedRegex(@"\.v(?[1-9][0-9]+(_[0-9]+)*)\.", RegexOption... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantModifier.Preprocessor.cs class TargetDependent (line 6) | public static partial class TargetDependent // Noncompliant FP - Only wh... method Matches (line 8) | public static bool Matches(string ns) => Pattern.IsMatch(ns); method GetPattern (line 15) | [GeneratedRegex(@"\.v(?[1-9][0-9]+(_[0-9]+)*)\.", RegexOption... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantModifier.cs class C1 (line 5) | public class C1 method MyNotOverriddenMethod (line 7) | public virtual void MyNotOverriddenMethod() { } class Partial1Part (line 9) | internal partial class Partial1Part //Noncompliant method Method (line 12) | void Method() { } type PartialStruct (line 14) | partial struct PartialStruct //Noncompliant {{'partial' is gratuitous in... type PartialInterface (line 17) | partial interface PartialInterface //Noncompliant class Partial2Part (line 21) | internal partial class Partial2Part method MyOverriddenMethod (line 27) | public virtual void MyOverriddenMethod() { } class Partial2Part (line 25) | internal abstract partial class Partial2Part method MyOverriddenMethod (line 27) | public virtual void MyOverriddenMethod() { } class Override (line 34) | internal class Override : Partial2Part method MyOverriddenMethod (line 36) | public override void MyOverriddenMethod() { } type SomeEnumeration (line 50) | public enum SomeEnumeration class SealedClass (line 56) | sealed class SealedClass : Partial2Part method MyOverriddenMethod (line 58) | public override sealed void MyOverriddenMethod() { } class AbstractClass (line 75) | abstract class AbstractClass : Partial2Part method MyOverriddenMethod (line 77) | public override sealed void MyOverriddenMethod() { } class SealedClassWithoutRedundantKeywordOnMembers (line 93) | sealed class SealedClassWithoutRedundantKeywordOnMembers : Partial2Part method MyOverriddenMethod (line 95) | public override void MyOverriddenMethod() { } class BaseClass (line 112) | internal class BaseClass method Process (line 114) | public virtual string Process(string input) class SubClass (line 120) | internal class SubClass : BaseClass method Process (line 122) | public override string Process(string input) class UnsafeClass (line 128) | unsafe class UnsafeClass class UnsafeClass2 (line 133) | unsafe class UnsafeClass2 // Noncompliant class UnsafeClass3 (line 138) | unsafe class UnsafeClass3 // Noncompliant {{'unsafe' is redundant in thi... method M (line 140) | unsafe void M() // Noncompliant class Point (line 147) | class Point class Class4 (line 153) | class Class4 type MyInterface (line 155) | unsafe interface MyInterface method Method (line 157) | unsafe int* Method(); class Inner (line 163) | unsafe class Inner { } method Class4 (line 175) | unsafe ~Class4() // Noncompliant method M (line 178) | void M() class Foo (line 203) | public class Foo class Bar (line 205) | public class Bar class Baz (line 207) | public unsafe class Baz // Noncompliant class Foo2 (line 213) | public unsafe class Foo2 class Bar (line 215) | public unsafe class Bar // Noncompliant class Baz (line 219) | public unsafe class Baz // Noncompliant class Checked (line 226) | public class Checked method M (line 228) | public static void M() type FixedArraySample (line 336) | public unsafe struct FixedArraySample class StackAlloc (line 341) | public class StackAlloc method M (line 343) | private unsafe void M() class UnsafeHidden (line 349) | public class UnsafeHidden method Method (line 351) | private unsafe int* Method() { return null; } method Method2 (line 352) | private unsafe void Method2(int* p) { } method M1 (line 353) | public unsafe void M1() method WithUndefinedInvocation (line 358) | public unsafe void WithUndefinedInvocation() // Noncompliant method M2 (line 364) | public unsafe void M2() class UnsafeParameter (line 370) | public class UnsafeParameter method Method (line 374) | public unsafe void Method() class UnsafeCtor (line 380) | public class UnsafeCtor method UnsafeCtor (line 382) | public UnsafeCtor() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantNullCheck.CSharp10.Fixed.cs type SomeClass (line 10) | sealed record SomeClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantNullCheck.CSharp10.cs type SomeClass (line 10) | sealed record SomeClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantNullCheck.CSharp11.cs class SomeClass (line 1) | public class SomeClass method SomeMethod (line 3) | public void SomeMethod(object[] objects) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantNullCheck.CSharp9.Fixed.cs type Apple (line 220) | sealed record Apple FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantNullCheck.CSharp9.cs type Apple (line 230) | sealed record Apple FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantNullCheck.Fixed.Batch.cs class RedundantNullCheck (line 5) | public class RedundantNullCheck method TestRedundantNullCheck (line 7) | public void TestRedundantNullCheck(Object a, RedundantNullCheck b) method TestRedundantInvertedNullCheck (line 86) | public void TestRedundantInvertedNullCheck(Object a, RedundantNullChec... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantNullCheck.Fixed.cs class RedundantNullCheck (line 5) | public class RedundantNullCheck method TestRedundantNullCheck (line 7) | public void TestRedundantNullCheck(Object a, RedundantNullCheck b) method TestRedundantInvertedNullCheck (line 86) | public void TestRedundantInvertedNullCheck(Object a, RedundantNullChec... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantNullCheck.cs class RedundantNullCheck (line 5) | public class RedundantNullCheck method TestRedundantNullCheck (line 7) | public void TestRedundantNullCheck(Object a, RedundantNullCheck b) method TestRedundantInvertedNullCheck (line 90) | public void TestRedundantInvertedNullCheck(Object a, RedundantNullChec... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantNullableTypeComparison.cs class MyClass (line 6) | public class MyClass method GetType (line 8) | public Type GetType() class RedundantNullableTypeComparison (line 15) | public class RedundantNullableTypeComparison method RedundantNullableTypeComparison (line 17) | public RedundantNullableTypeComparison() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantParenthesesExpression.cs class Bar (line 7) | class Bar method Bar (line 9) | public Bar(object param) { } class Foo (line 12) | class Foo method Invoke (line 16) | void Invoke(object param) { } method Del (line 18) | object Del() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantParenthesesObjectCreation.CSharp10.cs class TestCases (line 5) | internal class TestCases method A (line 7) | [NonGeneric()] int A() => 1; method M (line 8) | public void M() class NonGenericAttribute (line 21) | public class NonGenericAttribute : Attribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantParenthesesObjectCreation.CSharp11.cs class TestCases (line 5) | internal class TestCases method M (line 7) | [Generic()] // Noncompliant class GenericAttribute (line 22) | public class GenericAttribute : Attribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantParenthesesObjectCreation.CSharp9.cs type Record (line 8) | [MyAttribute] // Compliant type RecordNoncompliant (line 13) | [MyAttribute()] // Noncompliant {{Remove these redundant parentheses.}} class MyAttribute (line 18) | public class MyAttribute : Attribute FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantParenthesesObjectCreation.Fixed.cs class MyAttribute (line 6) | public class MyAttribute : Attribute { class MyClass (line 10) | [MyAttribute] // Fixed method MyClass (line 15) | public MyClass() method MyClass (line 19) | public MyClass(int i) method CreateNew (line 24) | public static MyClass CreateNew(int propertyValue) method CreateNew2 (line 32) | public static MyClass CreateNew2(int propertyValue) method CreateNew3 (line 40) | public static MyClass CreateNew3(int propertyValue) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantParenthesesObjectCreation.cs class MyAttribute (line 6) | public class MyAttribute : Attribute { class MyClass (line 10) | [MyAttribute()] // Noncompliant {{Remove these redundant parentheses.}} method MyClass (line 16) | public MyClass() method MyClass (line 20) | public MyClass(int i) method CreateNew (line 25) | public static MyClass CreateNew(int propertyValue) method CreateNew2 (line 34) | public static MyClass CreateNew2(int propertyValue) method CreateNew3 (line 42) | public static MyClass CreateNew3(int propertyValue) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantPropertyNamesInAnonymousClass.Fixed.cs class RedundantPropertyNamesInAnonymousClass (line 6) | class RedundantPropertyNamesInAnonymousClass method M (line 10) | public void M() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantPropertyNamesInAnonymousClass.Latest.Partial.cs class PartialPropertyClass (line 4) | public partial class PartialPropertyClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantPropertyNamesInAnonymousClass.Latest.cs class PartialPropertyClass (line 3) | public partial class PartialPropertyClass method M (line 17) | public void M() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantPropertyNamesInAnonymousClass.cs class RedundantPropertyNamesInAnonymousClass (line 6) | class RedundantPropertyNamesInAnonymousClass method M (line 10) | public void M() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantToArrayCall.CSharp11.Fixed.cs class RedundantToArrayCall (line 7) | public class RedundantToArrayCall method Utf8StringLiterals (line 9) | public void Utf8StringLiterals() method ReadOnlySpans (line 21) | public void ReadOnlySpans(ReadOnlySpan span) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantToArrayCall.CSharp11.cs class RedundantToArrayCall (line 7) | public class RedundantToArrayCall method Utf8StringLiterals (line 9) | public void Utf8StringLiterals() method ReadOnlySpans (line 21) | public void ReadOnlySpans(ReadOnlySpan span) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantToArrayCall.Fixed.cs class RedundantToArrayCall (line 6) | public class RedundantToArrayCall method ToCharArray (line 8) | public char[] ToCharArray() method Literals (line 13) | public void Literals() method Coverage (line 27) | public void Coverage() method Foo (line 36) | public IEnumerable Foo() => null; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantToArrayCall.cs class RedundantToArrayCall (line 6) | public class RedundantToArrayCall method ToCharArray (line 8) | public char[] ToCharArray() method Literals (line 13) | public void Literals() method Coverage (line 28) | public void Coverage() method Foo (line 37) | public IEnumerable Foo() => null; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantToStringCall.CSharp10.cs type Record (line 1) | record Record FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantToStringCall.CSharp11.cs class Foo (line 1) | class Foo method Method (line 3) | public void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantToStringCall.CSharp9.cs type Record (line 1) | record Record FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantToStringCall.Fixed.cs class MyClass (line 5) | public class MyClass class MyBase (line 12) | public class MyBase { } class RedundantToStringCall (line 14) | public class RedundantToStringCall : MyBase method RedundantToStringCall (line 16) | public RedundantToStringCall() class Repro_3665 (line 48) | public class Repro_3665 method Repro (line 50) | public void Repro(Uri a, Uri b, Uri c, Uri d) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RedundantToStringCall.cs class MyClass (line 5) | public class MyClass class MyBase (line 12) | public class MyBase { } class RedundantToStringCall (line 14) | public class RedundantToStringCall : MyBase method RedundantToStringCall (line 16) | public RedundantToStringCall() class Repro_3665 (line 49) | public class Repro_3665 method Repro (line 51) | public void Repro(Uri a, Uri b, Uri c, Uri d) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ReferenceEqualityCheckWhenEqualsExists.cs class DependencyObject (line 9) | public class DependencyObject method Equals (line 11) | public sealed override bool Equals(object obj) class CollectionViewSource (line 20) | public class CollectionViewSource : DependencyObject type IMyInterface (line 27) | interface IMyInterface { } type IMyInterfaceWithoutImplementations (line 28) | interface IMyInterfaceWithoutImplementations { } class Base (line 30) | class Base method Equals (line 32) | public override bool Equals(object obj) class MyClass (line 38) | class MyClass : Base, IMyInterface class MyClass2 (line 43) | internal class MyClass2 : IMyInterface class ReferenceEqualityCheckWhenEqualsExists (line 55) | class ReferenceEqualityCheckWhenEqualsExists method Main (line 57) | static void Main(IMyInterface x, IMyInterface y) method CompareExchange (line 82) | private static T1 CompareExchange(ref T1 reference, T1 expectedVal... method CompareExchange2 (line 88) | private static T2 CompareExchange2(ref T2 reference, T2 expectedVa... type IWithGeneric (line 97) | interface IWithGeneric method Something (line 99) | void Something(); class UsingInterfaces (line 102) | class UsingInterfaces method Compare (line 104) | public void Compare(IWithGeneric a, IWithGeneric b) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ReferenceEqualityCheckWhenEqualsExists2.cs type IMyInterface (line 8) | interface IMyInterface { } type IMyInterfaceWithoutImplementations (line 9) | interface IMyInterfaceWithoutImplementations { } class Base (line 11) | class Base method Equals (line 13) | public override bool Equals(object obj) class MyClass (line 19) | class MyClass : Base, IMyInterface class MyClass2 (line 24) | internal class MyClass2 : IMyInterface class ReferenceEqualityCheckWhenEqualsExists (line 36) | class ReferenceEqualityCheckWhenEqualsExists method Main (line 38) | static void Main(IMyInterface x, IMyInterface y) method CompareExchange (line 63) | private static T1 CompareExchange(ref T1 reference, T1 expectedVal... method CompareExchange2 (line 69) | private static T2 CompareExchange2(ref T2 reference, T2 expectedVa... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ReferenceEqualsOnValueType.cs class ReferenceEqualsOnValueType (line 6) | public class ReferenceEqualsOnValueType method ReferenceEqualsOnValueType (line 8) | public ReferenceEqualsOnValueType() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RegularExpressions/RegexMustHaveValidSyntax.Latest.cs class Compliant (line 5) | class Compliant method ImplicitObject (line 9) | void ImplicitObject() method Interpolated (line 14) | void Interpolated(string subPattern) method RawString (line 20) | void RawString() method DiagnosticStringSyntaxAttribute (line 28) | void DiagnosticStringSyntaxAttribute() method NewEnumerateSplitsMethod (line 35) | void NewEnumerateSplitsMethod(ReadOnlySpan input, RegexOptions o... class Noncompliant (line 47) | class Noncompliant method ImplicitObject (line 51) | void ImplicitObject() method Interpolated (line 57) | void Interpolated() method RawString (line 63) | void RawString() method DiagnosticStringSyntaxAttribute (line 72) | void DiagnosticStringSyntaxAttribute() method EnumerateSplitsAndMatchesMethod (line 80) | void EnumerateSplitsAndMatchesMethod(ReadOnlySpan input, RegexOp... method EscapeSequence (line 91) | void EscapeSequence() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RegularExpressions/RegexMustHaveValidSyntax.cs class Compliant (line 5) | class Compliant method Ctor (line 7) | void Ctor() method Static (line 18) | void Static() method Unknown (line 24) | void Unknown(string unknown) method Multiline (line 29) | bool Multiline(string input) method ConcatanationMultiline (line 37) | bool ConcatanationMultiline(string input) method ConcatanationSingleIne (line 45) | bool ConcatanationSingleIne(string input) class Noncompliant (line 54) | class Noncompliant method Ctor (line 58) | void Ctor() method Static (line 66) | void Static() method Multiline (line 77) | bool Multiline(string input) method ConcatanationMultiline (line 85) | bool ConcatanationMultiline(string input) method ConcatanationSingleIne (line 93) | bool ConcatanationSingleIne(string input) class DoesNotCrash (line 108) | class DoesNotCrash method UnknownVariable (line 110) | bool UnknownVariable(string input) class NoRegex (line 116) | public class NoRegex method NoRegex (line 118) | public NoRegex(string pattern, RegexOptions options) { } method IsMatch (line 120) | public static bool IsMatch(string input, string pattern, RegexOptions ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RemoveObsoleteCode.Latest.cs type R (line 9) | [Obsolete] // Noncompliant class PartialProperties (line 21) | partial class PartialProperties class PartialProperties (line 30) | partial class PartialProperties FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RemoveObsoleteCode.cs class Program (line 5) | [Obsolete] // Noncompliant {{Do not forget to remove this deprecated cod... method Program (line 15) | [ObsoleteAttribute()] // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RequireAttributeUsageAttribute.CSharp11.cs class GenericAttribute (line 5) | public class GenericAttribute : Attribute { } class MyCompliantAttribute (line 7) | [AttributeUsage(AttributeTargets.Class)] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RequireAttributeUsageAttribute.cs class MyInvalidAttribute (line 3) | public class MyInvalidAttribute : Attribute class MyCompliantAttribute (line 8) | [AttributeUsage(AttributeTargets.Class)] class MyInvalidInheritedAttribute (line 13) | public class MyInvalidInheritedAttribute : MyCompliantAttribute class MyInheritedAttribute (line 18) | [AttributeUsage(AttributeTargets.Class)] class AbstractAttribute (line 23) | public abstract class AbstractAttribute : Attribute // Compliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Resources/AnotherResources.Designer.cs class AnotherResources (line 22) | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resource... method AnotherResources (line 31) | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Mic... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Resources/SomeResources.Designer.cs class SomeResources (line 22) | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resource... method SomeResources (line 31) | [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Mic... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ReturnEmptyCollectionInsteadOfNull.Latest.cs class SwitchExpressionClass (line 11) | class SwitchExpressionClass method SwitchExpression (line 13) | List SwitchExpression(string str) method SwitchExpression2 (line 23) | List SwitchExpression2(string str) => class MyClass (line 35) | class MyClass method GetNullableArrayOfNonNullableValueType (line 37) | public byte[]? GetNullableArrayOfNonNullableValueType(string itemId) =... method GetNullableArrayOfNullableValueType (line 38) | public byte?[]? GetNullableArrayOfNullableValueType(string itemId) => ... method GetNonNullableArrayOfNullableValueType (line 39) | public byte?[] GetNonNullableArrayOfNullableValueType(string itemId) =... method GetNullableArrayOfNonNullableReferenceType (line 41) | public object[]? GetNullableArrayOfNonNullableReferenceType(string ite... method GetNullableArrayOfNullableReferenceType (line 42) | public object?[]? GetNullableArrayOfNullableReferenceType(string itemI... method GetNonNullableArrayOfNullableReferenceType (line 43) | public object?[] GetNonNullableArrayOfNullableReferenceType(string ite... method GetArray (line 44) | public byte[] GetArray(string itemId) => null; class MyGenericClass (line 47) | class MyGenericClass where T : struct method GetNullableListOfNonNullableValueGenericType (line 49) | public List? GetNullableListOfNonNullableValueGenericType(string it... method GetNullableListOfNullableValueGenericType (line 50) | public List? GetNullableListOfNullableValueGenericType(string item... method GetNonNullableListOfNullableValueGenericType (line 51) | public List GetNonNullableListOfNullableValueGenericType(string it... method GetList (line 52) | public List GetList(string itemId) => null; type Record (line 56) | record Record class TernariesAndDefaults (line 78) | class TernariesAndDefaults method Foo1 (line 82) | public static IEnumerable Foo1() => null; method Foo2 (line 83) | public static IEnumerable Foo2() => (null); method Foo3 (line 84) | public static IEnumerable Foo3() => default; method Foo4 (line 85) | public static IEnumerable Foo4() => (default); method Foo5 (line 86) | public static IEnumerable Foo5() => true ? null : new List Foo6() => method Foo7 (line 98) | public static IEnumerable Foo7() method Foo8 (line 122) | public static IEnumerable Foo8() class Operators (line 132) | class Operators : IAdditionOperators ReturnImmutableArray() => default; type ValueTypeCollection (line 221) | public readonly struct ValueTypeCollection(byte bits) : IReadOnlyColle... method GetEnumerator (line 225) | public IEnumerator GetEnumerator() => method GetEnumerator (line 228) | IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); class SpanConversions (line 233) | class SpanConversions FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ReturnEmptyCollectionInsteadOfNull.cs class Program (line 8) | class Program method ArrowedGetStrings1 (line 34) | IEnumerable ArrowedGetStrings1() => null; method ArrowedGetStrings3 (line 37) | string[] ArrowedGetStrings3() => null; method ArrowedGetStrings4 (line 38) | ICollection ArrowedGetStrings4() => null; method ArrowedGetArray (line 39) | Array ArrowedGetArray() => null; method ArrowedGetObject (line 40) | object ArrowedGetObject() => null; method GetValues (line 42) | IEnumerable GetValues(string str) method AssignedToNullVariable (line 53) | IEnumerable AssignedToNullVariable(int value) method AssignedToNullVariable2 (line 59) | IEnumerable AssignedToNullVariable2(int value) method DoSomething (line 71) | void DoSomething() method GetString (line 75) | string GetString() method Method (line 83) | public List Method() method GetXmlNode (line 92) | public XmlNode GetXmlNode() method GetXmlDocument (line 97) | public XmlDocument GetXmlDocument() method GetXmlElement (line 102) | public XmlElement GetXmlElement() method GetSomeStrings (line 112) | public IEnumerable GetSomeStrings() method GetSomeStrings2 (line 123) | public IEnumerable GetSomeStrings2() method TestNullFromLambda (line 134) | static IEnumerable TestNullFromLambda() method TestNullFromParenthesizedLambda (line 149) | static IEnumerable TestNullFromParenthesizedLambda() method MethodWithLambdaStillRaisesIssue (line 159) | static IEnumerable MethodWithLambdaStillRaisesIssue() method NoncompliantMethodWithSecondaryLocation (line 170) | List NoncompliantMethodWithSecondaryLocation(string str) class PropertyWithoutAccessorList (line 185) | class PropertyWithoutAccessorList class MyClass (line 193) | class MyClass class MyOtherClass (line 198) | class MyOtherClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ReturnTypeNamedPartialShouldBeEscaped.CSharp8-13.cs class Noncompliant (line 5) | public class Noncompliant method Method (line 10) | public partial Method(int a) => null; method Qualified (line 12) | public ReturnTypeNamedPartial.partial Qualified() => null; method Alias (line 15) | global::ReturnTypeNamedPartial.partial Alias() => null; method Refs (line 18) | ref partial Refs(ref partial p) => ref p; method Nested (line 21) | Parent.partial Nested() => null; method Method (line 98) | public partial Method(int a) => default; method Qualified (line 100) | public ReturnTypeNamedPartial.partial Qualified() => default; method Alias (line 103) | global::ReturnTypeNamedPartial.partial Alias() => default; method Refs (line 106) | ref partial Refs(ref partial p) => ref p; class Compliant (line 25) | public class Compliant method Method (line 29) | @partial Method() => null; method Qualified (line 31) | public ReturnTypeNamedPartial.@partial Qualified() => null; method Alias (line 33) | global::ReturnTypeNamedPartial.@partial Alias() => null; method Refs (line 35) | ref @partial Refs(ref partial p) => ref p; method Pointer (line 37) | unsafe partial* Pointer() => null; method Array (line 39) | partial[] Array() => null; method List (line 41) | List List() => null; method Generic (line 43) | partial Generic() => null; method Qualified (line 49) | public ReturnTypeNamedPartial.partial Qualified() => null; method GenericAlias (line 51) | global::ReturnTypeNamedPartial.partial GenericAlias() => null; method GenericRefs (line 53) | ref partial GenericRefs(ref partial p) => ref p; method GenericLocalFunction (line 55) | void GenericLocalFunction() method Method (line 114) | @partial Method() => default; method Qualified (line 116) | public ReturnTypeNamedPartial.@partial Qualified() => default; method Alias (line 118) | global::ReturnTypeNamedPartial.@partial Alias() => default; method Refs (line 120) | ref @partial Refs(ref partial p) => ref p; method Pointer (line 122) | unsafe partial* Pointer() => default; method Array (line 124) | partial[] Array() => default; method List (line 126) | List List() => default; method Qualified (line 132) | public ReturnTypeNamedPartial.partial Qualified() => default; method GenericAlias (line 134) | global::ReturnTypeNamedPartial.partial GenericAlias() => default; method GenericRefs (line 136) | ref partial GenericRefs(ref partial p) => ref p; method GenericLocalFunction (line 138) | void GenericLocalFunction() method Method (line 169) | partial.Compliant Method() => null; method Method2 (line 171) | global::partial.Compliant Method2() => null; method Nested (line 60) | partial.Nested Nested() => null; method Nested (line 62) | Parent.partial Nested() => null; method NestedEscaped (line 64) | Parent.@partial NestedEscaped() => null; method Nullable (line 66) | partial? Nullable() => null; method VoidMethod (line 68) | void VoidMethod() { } method TupleMethod (line 70) | (int, int) TupleMethod() { return (1, 0); } class partial (line 73) | public class partial class Nested (line 75) | public class Nested { } class partial (line 78) | public class partial { } class Nested (line 75) | public class Nested { } class Parent (line 80) | public class Parent class partial (line 82) | public class partial { } class Noncompliant (line 93) | public class Noncompliant method Method (line 10) | public partial Method(int a) => null; method Qualified (line 12) | public ReturnTypeNamedPartial.partial Qualified() => null; method Alias (line 15) | global::ReturnTypeNamedPartial.partial Alias() => null; method Refs (line 18) | ref partial Refs(ref partial p) => ref p; method Nested (line 21) | Parent.partial Nested() => null; method Method (line 98) | public partial Method(int a) => default; method Qualified (line 100) | public ReturnTypeNamedPartial.partial Qualified() => default; method Alias (line 103) | global::ReturnTypeNamedPartial.partial Alias() => default; method Refs (line 106) | ref partial Refs(ref partial p) => ref p; class Compliant (line 110) | public class Compliant method Method (line 29) | @partial Method() => null; method Qualified (line 31) | public ReturnTypeNamedPartial.@partial Qualified() => null; method Alias (line 33) | global::ReturnTypeNamedPartial.@partial Alias() => null; method Refs (line 35) | ref @partial Refs(ref partial p) => ref p; method Pointer (line 37) | unsafe partial* Pointer() => null; method Array (line 39) | partial[] Array() => null; method List (line 41) | List List() => null; method Generic (line 43) | partial Generic() => null; method Qualified (line 49) | public ReturnTypeNamedPartial.partial Qualified() => null; method GenericAlias (line 51) | global::ReturnTypeNamedPartial.partial GenericAlias() => null; method GenericRefs (line 53) | ref partial GenericRefs(ref partial p) => ref p; method GenericLocalFunction (line 55) | void GenericLocalFunction() method Method (line 114) | @partial Method() => default; method Qualified (line 116) | public ReturnTypeNamedPartial.@partial Qualified() => default; method Alias (line 118) | global::ReturnTypeNamedPartial.@partial Alias() => default; method Refs (line 120) | ref @partial Refs(ref partial p) => ref p; method Pointer (line 122) | unsafe partial* Pointer() => default; method Array (line 124) | partial[] Array() => default; method List (line 126) | List List() => default; method Qualified (line 132) | public ReturnTypeNamedPartial.partial Qualified() => default; method GenericAlias (line 134) | global::ReturnTypeNamedPartial.partial GenericAlias() => default; method GenericRefs (line 136) | ref partial GenericRefs(ref partial p) => ref p; method GenericLocalFunction (line 138) | void GenericLocalFunction() method Method (line 169) | partial.Compliant Method() => null; method Method2 (line 171) | global::partial.Compliant Method2() => null; method Nullable (line 143) | partial? Nullable() => null; method TupleMethod (line 145) | (partial, partial) TupleMethod() => default; type INoncompliant (line 151) | interface INoncompliant method Method (line 153) | partial Method(); type ICompliant (line 156) | interface ICompliant method Method (line 158) | @partial Method(); class Compliant (line 167) | class Compliant method Method (line 29) | @partial Method() => null; method Qualified (line 31) | public ReturnTypeNamedPartial.@partial Qualified() => null; method Alias (line 33) | global::ReturnTypeNamedPartial.@partial Alias() => null; method Refs (line 35) | ref @partial Refs(ref partial p) => ref p; method Pointer (line 37) | unsafe partial* Pointer() => null; method Array (line 39) | partial[] Array() => null; method List (line 41) | List List() => null; method Generic (line 43) | partial Generic() => null; method Qualified (line 49) | public ReturnTypeNamedPartial.partial Qualified() => null; method GenericAlias (line 51) | global::ReturnTypeNamedPartial.partial GenericAlias() => null; method GenericRefs (line 53) | ref partial GenericRefs(ref partial p) => ref p; method GenericLocalFunction (line 55) | void GenericLocalFunction() method Method (line 114) | @partial Method() => default; method Qualified (line 116) | public ReturnTypeNamedPartial.@partial Qualified() => default; method Alias (line 118) | global::ReturnTypeNamedPartial.@partial Alias() => default; method Refs (line 120) | ref @partial Refs(ref partial p) => ref p; method Pointer (line 122) | unsafe partial* Pointer() => default; method Array (line 124) | partial[] Array() => default; method List (line 126) | List List() => default; method Qualified (line 132) | public ReturnTypeNamedPartial.partial Qualified() => default; method GenericAlias (line 134) | global::ReturnTypeNamedPartial.partial GenericAlias() => default; method GenericRefs (line 136) | ref partial GenericRefs(ref partial p) => ref p; method GenericLocalFunction (line 138) | void GenericLocalFunction() method Method (line 169) | partial.Compliant Method() => null; method Method2 (line 171) | global::partial.Compliant Method2() => null; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ReturnTypeNamedPartialShouldBeEscaped.Latest.cs class Compliant (line 5) | public class Compliant method Method (line 9) | @partial Method() => null; method Qualified (line 11) | public ReturnTypeNamedPartial.@partial Qualified() => null; method Alias (line 13) | global::ReturnTypeNamedPartial.@partial Alias() => null; method Refs (line 15) | ref @partial Refs(ref partial p) => ref p; method Pointer (line 17) | unsafe partial* Pointer() => null; method Array (line 19) | partial[] Array() => null; method List (line 21) | List List() => null; method Generic (line 23) | partial Generic() => null; method Qualified (line 29) | public ReturnTypeNamedPartial.partial Qualified() => null; method GenericAlias (line 31) | global::ReturnTypeNamedPartial.partial GenericAlias() => null; method GenericRefs (line 33) | ref partial GenericRefs(ref partial p) => ref p; method GenericLocalFunction (line 35) | void GenericLocalFunction() method Method (line 85) | partial.Compliant Method() => null; method Method2 (line 87) | global::partial.Compliant Method2() => null; method Nullable (line 40) | partial? Nullable() => null; method VoidMethod (line 42) | void VoidMethod() { } method TupleMethod (line 44) | (partial, partial) TupleMethod() => default; class CompilerErrors (line 47) | public class CompilerErrors method FirstMethod (line 57) | public ReturnTypeNamedPartial.partial FirstMethod() // Error [CS0102] ... method SecondMethod (line 67) | partial SecondMethod() // Error [CS0751] A partial member must be decl... class partial (line 75) | public class partial { } class partial (line 77) | public class partial { } class Compliant (line 83) | class Compliant method Method (line 9) | @partial Method() => null; method Qualified (line 11) | public ReturnTypeNamedPartial.@partial Qualified() => null; method Alias (line 13) | global::ReturnTypeNamedPartial.@partial Alias() => null; method Refs (line 15) | ref @partial Refs(ref partial p) => ref p; method Pointer (line 17) | unsafe partial* Pointer() => null; method Array (line 19) | partial[] Array() => null; method List (line 21) | List List() => null; method Generic (line 23) | partial Generic() => null; method Qualified (line 29) | public ReturnTypeNamedPartial.partial Qualified() => null; method GenericAlias (line 31) | global::ReturnTypeNamedPartial.partial GenericAlias() => null; method GenericRefs (line 33) | ref partial GenericRefs(ref partial p) => ref p; method GenericLocalFunction (line 35) | void GenericLocalFunction() method Method (line 85) | partial.Compliant Method() => null; method Method2 (line 87) | global::partial.Compliant Method2() => null; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ReturnTypeNamedPartialShouldBeEscaped.TopLevelStatements.CSharp9-13.cs class Noncompliant (line 17) | class Noncompliant method Method (line 19) | global::partial Method() => null; class Compliant (line 23) | class Compliant method Method (line 25) | global::@partial Method() => null; class partial (line 28) | class partial { } class partial (line 30) | class partial { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ReturnTypeNamedPartialShouldBeEscaped.TopLevelStatements.Latest.cs class Errors (line 19) | class Errors method Method (line 21) | global::partial Method() => null; class Compliant (line 30) | class Compliant method Method (line 32) | global::@partial Method() => null; class partial (line 35) | class partial { } class partial (line 37) | class partial { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ReturnValueIgnored.Latest.cs class CSharp13 (line 9) | class CSharp13 method ReadOnlySet (line 12) | void ReadOnlySet(HashSet set) method LinqExtensions (line 24) | void LinqExtensions(List list) class CSharp14 (line 32) | class CSharp14 method NullConditionalAssignment (line 36) | void NullConditionalAssignment(CSharp14 sample, List list) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ReturnValueIgnored.TopLevelStatements.cs type Record (line 44) | record Record FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ReturnValueIgnored.cs class PureType (line 8) | [Pure] method GetValue (line 11) | public static int GetValue() => 42; class NonPureType (line 14) | public class NonPureType method GetValue (line 16) | public static int GetValue() => 42; class ReturnValueIgnored (line 19) | class ReturnValueIgnored method Method (line 21) | [Pure] method Method (line 23) | [Pure] method Test (line 26) | void Test() method M (line 63) | void M(object o) { } class Ext (line 66) | public static class Ext method DoSomething (line 68) | public static int DoSomething(this IEnumerable self, Action acti... method DoSomething (line 69) | public static int DoSomething(this string self, Action action) { retur... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ReversedOperators.Latest.cs class CSharp14 (line 1) | class CSharp14 FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ReversedOperators.cs class ReversedOperators (line 3) | public class ReversedOperators method ReversedOperators (line 5) | public ReversedOperators() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RightCurlyBraceStartsLine.cs class RightCurlyBraceStartsLine (line 6) | public class RightCurlyBraceStartsLine method doSomething (line 8) | private void doSomething() { throw new Exception();} method doSomething (line 9) | private void doSomething(object[] os) { throw new Exception();} method RightCurlyBraceStartsLine (line 10) | public RightCurlyBraceStartsLine() method f1 (line 14) | public void f1() method f2 (line 19) | public void f2() method f3 (line 35) | public void f3() class Foo (line 51) | public class Foo { } class DummyCl (line 53) | public class DummyCl FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RuleFailure/InvalidSyntax.cs method Method2 (line 10) | public void Method2(int i, int j) { } class DuplicatedInterfaces (line 12) | class DuplicatedInterfaces: IList, IList {} class InvalidSyntax (line 14) | class InvalidSyntax method Method (line 17) | public void Method(int i, int j,) class C (line 23) | private class C method C (line 25) | public C() method GetHashCode (line 32) | public override int GetHashCode() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RuleFailure/PerformanceTestCases.cs class PerformanceTestCases (line 5) | class PerformanceTestCases method Bar (line 7) | static void Bar() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/RuleFailure/SpecialCases.cs class SpecialCases (line 10) | public class SpecialCases method ParamsMethod (line 12) | public void ParamsMethod(int i, params int[] j) { } method MethodExpressionBody (line 13) | public int MethodExpressionBody(int i, params int[] j) => 42; method ArgListMethod (line 16) | public void ArgListMethod(__arglist) method DynamicMethod (line 20) | public void DynamicMethod(dynamic i) method MessageBox (line 29) | [DllImport("User32.dll", CharSet = CharSet.Unicode)] method Main (line 32) | static int Main() class MyExtensions (line 38) | public static class MyExtensions method Ext (line 40) | public static void Ext(this string s) method GetDict (line 50) | public static Dictionary GetDict() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SecurityPInvokeMethodShouldNotBeCalled.CSharp11.cs type RpcAuthnLevel (line 6) | public enum RpcAuthnLevel type RpcImpLevel (line 17) | public enum RpcImpLevel type EoAuthnCap (line 26) | public enum EoAuthnCap class Program (line 45) | class Program method CoSetProxyBlanket (line 47) | [DllImport("OlE32.dll")] method CoInitializeSecurity (line 50) | [DllImport("ole32", BestFitMapping = false, CallingConvention = Callin... method CoInitializeSecurity (line 53) | public static void CoInitializeSecurity(int param) { } method CoInitializeSecurity (line 54) | public extern void CoInitializeSecurity(string param); method CoInitializeSecurity (line 55) | public static extern int CoInitializeSecurity(int param1, string param2); method Main (line 57) | static void Main(string[] args) class CompliantWithCompilationErrors (line 73) | public class CompliantWithCompilationErrors method CoSetProxyBlanket (line 75) | [DllImport(BestFitMapping = false)] // Error [CS7036] method CoInitializeSecurity (line 78) | [DllImport(BestFitMapping = false, EntryPoint = "ole32.dll", ExactSpel... method Somemethod (line 81) | public void Somemethod() class LibraryImportAttributeImports (line 89) | public unsafe partial class LibraryImportAttributeImports method CoInitializeSecurity (line 94) | [LibraryImport("ole32")] method CoInitializeSecurity (line 102) | [System.Runtime.InteropServices.DllImportAttribute("ole32", EntryPoint... method M (line 105) | public void M() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SecurityPInvokeMethodShouldNotBeCalled.CSharp12.cs class AliasAnyType (line 5) | class AliasAnyType method CoSetProxyBlanket (line 7) | [DllImport("OlE32.dll")] method Test (line 18) | void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SecurityPInvokeMethodShouldNotBeCalled.cs type RpcAuthnLevel (line 6) | public enum RpcAuthnLevel type RpcImpLevel (line 17) | public enum RpcImpLevel type EoAuthnCap (line 26) | public enum EoAuthnCap class Program (line 45) | class Program method CoSetProxyBlanket (line 47) | [DllImport("OlE32.dll")] method CoInitializeSecurity (line 50) | [DllImport("ole32", BestFitMapping = false, CallingConvention = Callin... method CoInitializeSecurity (line 53) | public static void CoInitializeSecurity(int param) { } method CoInitializeSecurity (line 54) | public extern void CoInitializeSecurity(string param); method CoInitializeSecurity (line 55) | public static extern int CoInitializeSecurity(int param1, string param2); method CoInitializeSecurity (line 56) | [DllImport] // Error [CS7036] method CoInitializeSecurity (line 58) | [DllImport(null)] // Error [CS0591] method CoInitializeSecurity (line 60) | [DllImport(wrongParameterName: "ole32")] // Error [CS1739] the right n... method CoInitializeSecurity (line 62) | [DllImport("noOle32")] method Main (line 65) | static void Main(string[] args) class CompliantWithCompilationErrors (line 85) | public class CompliantWithCompilationErrors method CoSetProxyBlanket (line 87) | [DllImport(BestFitMapping = false)] // Error [CS7036] method CoInitializeSecurity (line 90) | [DllImport(BestFitMapping = false, EntryPoint = "ole32.dll", ExactSpel... method Somemethod (line 93) | public void Somemethod() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SelfAssignment.Latest.Partial.cs class PartialProperties (line 1) | partial class PartialProperties FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SelfAssignment.Latest.cs class CSharp8 (line 1) | class CSharp8 method CoalescingAssignment (line 3) | void CoalescingAssignment() class WithPrimaryConstructorParams (line 12) | class WithPrimaryConstructorParams(int unused, int usedInInlineInitializ... method WithPrimaryConstructorParams (line 16) | WithPrimaryConstructorParams(int usedInMethod) : this(0, 0, usedInMethod) method AssigningParamToParam (line 23) | void AssigningParamToParam() class WithInlineArrays (line 30) | class WithInlineArrays method Test (line 32) | void Test(Buffer b) type Buffer (line 38) | [System.Runtime.CompilerServices.InlineArray(10)] class PartialProperties (line 45) | partial class PartialProperties method MyMethod (line 49) | void MyMethod() class CSharp14 (line 56) | class CSharp14 class Extensions (line 77) | static class Extensions method extension (line 79) | extension(CSharp14 sample) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SelfAssignment.cs class SelfAssignment (line 9) | class SelfAssignment method SelfAssignment (line 11) | public SelfAssignment() { } method SelfAssignment (line 12) | public SelfAssignment(int Prop1) { } method Test (line 16) | public void Test(SelfAssignment other) class Sample (line 50) | public class Sample method Sample (line 55) | public Sample(string first) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SerializationConstructorsShouldBeSecured.CSharp9.cs type Foo (line 7) | [Serializable] type Foo_ok (line 29) | [Serializable] type Bar (line 41) | [Serializable] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SerializationConstructorsShouldBeSecured.cs class Foo (line 11) | [Serializable] method Foo (line 16) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method Foo (line 22) | protected Foo(SerializationInfo info, StreamingContext context) // Non... method GetObjectData (line 28) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class Foo_ok (line 34) | [Serializable] method Foo_ok (line 37) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method Foo_ok (line 40) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method GetObjectData (line 43) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class Foo2 (line 46) | [Serializable] method Foo2 (line 49) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method Foo2 (line 53) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method GetObjectData (line 56) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class Foo2_ok (line 60) | [Serializable] method Foo2_ok (line 63) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method Foo2_ok (line 67) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method GetObjectData (line 71) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class Foo3 (line 74) | [Serializable] method Foo3 (line 77) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method Foo3 (line 81) | [GacIdentityPermission(SecurityAction.Demand, Unrestricted = true)] method Foo3 (line 84) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method GetObjectData (line 88) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class Foo3_ok (line 91) | [Serializable] method Foo3_ok (line 94) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method Foo3_ok (line 98) | [GacIdentityPermission(SecurityAction.Demand, Unrestricted = true)] method Foo3_ok (line 101) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method GetObjectData (line 106) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class Foo4 (line 110) | public class Foo4 : ISerializable method Foo4 (line 112) | [FileIOPermissionAttribute(SecurityAction.InheritanceDemand)] method Foo4 (line 115) | [FileIOPermissionAttribute(SecurityAction.Demand)] method GetObjectData (line 118) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class Foo4_ok (line 121) | public class Foo4_ok : ISerializable method Foo4_ok (line 123) | [FileIOPermissionAttribute(SecurityAction.InheritanceDemand)] method Foo4_ok (line 126) | [FileIOPermissionAttribute(SecurityAction.InheritanceDemand)] method GetObjectData (line 129) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class Foo5 (line 133) | public class Foo5 : ISerializable method Foo5 (line 135) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = false)] method Foo5 (line 138) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method GetObjectData (line 141) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class Foo5_ok (line 144) | public class Foo5_ok : ISerializable method Foo5_ok (line 146) | [FileIOPermissionAttribute(SecurityAction.Demand)] method Foo5_ok (line 149) | [FileIOPermissionAttribute(SecurityAction.Demand)] method GetObjectData (line 152) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class Foo6 (line 156) | public class Foo6 : ISerializable method Foo6 (line 158) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method Foo6 (line 161) | [FileIOPermissionAttribute(SecurityAction.Demand)] method GetObjectData (line 164) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class Foo6_ok (line 167) | public class Foo6_ok : ISerializable method Foo6_ok (line 169) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method Foo6_ok (line 172) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method GetObjectData (line 175) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class MalformedAttributes (line 178) | [Serializable] method MalformedAttributes (line 181) | [FileIOPermissionAttribute(SecurityAction.Whatever_Mate)] // Error [CS... method MalformedAttributes (line 184) | protected MalformedAttributes(SerializationInfo info, StreamingContext... method GetObjectData (line 186) | public void GetObjectData(SerializationInfo info, StreamingContext con... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SerializationConstructorsShouldBeSecured_NoAssemblyAttribute.cs class Foo (line 10) | [Serializable] method Foo (line 15) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method Foo (line 21) | protected Foo(SerializationInfo info, StreamingContext context) // Com... method GetObjectData (line 26) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... class Foo_ok (line 32) | [Serializable] method Foo_ok (line 35) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method Foo_ok (line 38) | [FileIOPermissionAttribute(SecurityAction.Demand, Unrestricted = true)] method GetObjectData (line 41) | void ISerializable.GetObjectData(SerializationInfo info, StreamingCont... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SerializationConstructorsShouldBeSecured_Part1.cs class PartialFoo (line 8) | [Serializable] method PartialFoo (line 11) | [FileIOPermission(SecurityAction.Demand, Unrestricted = true)] method GetObjectData (line 15) | public void GetObjectData(SerializationInfo info, StreamingContext con... class PartialFoo_ok (line 18) | [Serializable] method PartialFoo_ok (line 21) | [FileIOPermission(SecurityAction.Demand, Unrestricted = true)] method GetObjectData (line 25) | public void GetObjectData(SerializationInfo info, StreamingContext con... class PartialFoo2 (line 29) | [Serializable] method PartialFoo2 (line 32) | [FileIOPermission(SecurityAction.Demand, Unrestricted = true)] method GetObjectData (line 35) | public void GetObjectData(SerializationInfo info, StreamingContext con... class PartialFoo2_ok (line 38) | [Serializable] method PartialFoo2_ok (line 41) | [FileIOPermission(SecurityAction.Demand, Unrestricted = true)] method GetObjectData (line 45) | public void GetObjectData(SerializationInfo info, StreamingContext con... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SerializationConstructorsShouldBeSecured_Part2.cs class PartialFoo (line 6) | public partial class PartialFoo method PartialFoo (line 8) | [FileIOPermission(SecurityAction.Demand, Unrestricted = true)] class PartialFoo_ok (line 12) | public partial class PartialFoo_ok : ISerializable method PartialFoo_ok (line 14) | [FileIOPermission(SecurityAction.Demand, Unrestricted = true)] class PartialFoo2 (line 20) | public partial class PartialFoo2 : ISerializable method PartialFoo2 (line 22) | [FileIOPermission(SecurityAction.Demand, Unrestricted = true)] class PartialFoo2_ok (line 27) | public partial class PartialFoo2_ok : ISerializable method PartialFoo2_ok (line 29) | [FileIOPermission(SecurityAction.Demand, Unrestricted = true)] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SetLocaleForDataTypes.CSharp9.cs type Record (line 22) | record Record FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SetLocaleForDataTypes.cs class Program (line 7) | class Program method Foo (line 16) | void Foo() method Bar (line 36) | void Bar(DataColumn column) method Bar (line 41) | void Bar(DataSet set) method BadCase1 (line 46) | DataTable BadCase1() method BadCase2 (line 52) | DataSet BadCase2() method BadCase3 (line 58) | DataTable BadCase3() method MoreTest (line 65) | void MoreTest() method BadSyntax (line 73) | void BadSyntax() method CornerCases (line 78) | void CornerCases() method Bar (line 84) | void Bar() method MultipleVariableDeclarators (line 94) | void MultipleVariableDeclarators() class FooBar (line 106) | public class FooBar method FooBar (line 108) | public FooBar(DataTable datatable) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SetPropertiesInsteadOfMethods.Latest.cs class CSharp13 (line 33) | class CSharp13 method NewCollectionTypes (line 35) | void NewCollectionTypes(HashSet set) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SetPropertiesInsteadOfMethods.cs class Program (line 6) | static class Program method SortedSet (line 8) | static void SortedSet() method DerivesFromSortedSet (line 39) | static void DerivesFromSortedSet() method TrueNegatives (line 74) | static void TrueNegatives() class DerivesFromSetType (line 100) | class DerivesFromSetType : SortedSet method Fluent (line 102) | public DerivesFromSetType Fluent() => this; class DerivesFromSetTypeButHidesEnumerableMethods (line 105) | class DerivesFromSetTypeButHidesEnumerableMethods : SortedSet method Min (line 107) | public T Min() => default(T); method Max (line 108) | public T Max() => default(T); class DoesNotDeriveFromSetType (line 111) | class DoesNotDeriveFromSetType : IEnumerable method GetEnumerator (line 113) | public IEnumerator GetEnumerator() => null; method GetEnumerator (line 114) | IEnumerator IEnumerable.GetEnumerator() => null; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ShiftDynamicNotInteger.CSharp11.cs class MyClass (line 6) | public class MyClass class ShiftDynamicNotInteger (line 14) | class ShiftDynamicNotInteger method Test (line 16) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ShiftDynamicNotInteger.CSharp9.cs type ImplicitCast (line 13) | record ImplicitCast type NoImplicitCast (line 18) | record NoImplicitCast { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ShiftDynamicNotInteger.cs class MyClass (line 6) | public class MyClass class ShiftDynamicNotInteger (line 14) | class ShiftDynamicNotInteger method Test (line 16) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ShouldImplementExportedInterfaces.CSharp9.cs type MyInterface (line 4) | interface MyInterface { } type NotExported (line 6) | [Export(typeof(MyInterface))] // Noncompliant type NotExportedPositional (line 12) | [Export(typeof(MyInterface))] // Noncompliant type Descendant (line 18) | [Export(typeof(MyInterface))] type Exported (line 24) | [Export(typeof(MyInterface))] type NotExported_NamedArgs_ReverseOrder (line 30) | [Export(contractType: typeof(IComparable), contractName: "asdasd")] // N... type ISomething (line 36) | interface ISomething { } type Something (line 38) | [Export(typeof(ISomething<>))] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ShouldImplementExportedInterfaces.System.Composition.cs type IContract (line 3) | public interface IContract { } class DoesNotImplement (line 5) | [Export(typeof(IContract))] // Noncompliant class Implements (line 10) | [Export(typeof(IContract))] // Compliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ShouldImplementExportedInterfaces.cs class Constants (line 6) | static class Constants type MyInterface (line 11) | interface MyInterface { } class NotExported (line 13) | [Export(typeof(MyInterface))] // Noncompliant {{Implement 'MyInterface' ... class NotExported_NamedArgs_ReverseOrder (line 21) | [Export(contractType: typeof(IComparable), contractName: "asdasd")] // N... class NotExported_MultipleArgs (line 27) | [Export("something", typeof(MyInterface))] // Noncompliant class NotExported_Multiple (line 33) | [Export(typeof(MyInterface)), Export(typeof(IComparable)), Export(typeof... method Dispose (line 38) | public void Dispose() { } class NotExported_FullAttributeName (line 41) | [ExportAttribute(typeof(MyInterface))] // Noncompliant class Exported (line 46) | [Export(typeof(MyInterface))] class Exporting_Ourselves (line 52) | [Export] class Exporting_CornerCase (line 59) | [Export()] class InvalidSyntax (line 64) | [Export(1)] // Error [CS1503] class OtherAttributes (line 72) | [Import(typeof(MyInterface))] // Error [CS0592] - cannot import here class Descendant (line 79) | [Export(typeof(MyInterface))] class ExportingMembers_Are_Ignored (line 85) | class ExportingMembers_Are_Ignored method MyMethod (line 95) | [Export(typeof(MyInterface))] type ISomething (line 100) | interface ISomething { } class BaseThing (line 101) | public class BaseThing { } class BaseThing2 (line 102) | public class BaseThing2 { } class BaseSomethingImplementation (line 104) | [Export(typeof(ISomething))] class Something (line 111) | [Export(typeof(ISomething))] // Noncompliant {{Implement 'ISo... class SomethingImplementation (line 116) | [Export(typeof(ISomething))] // Noncompliant class Soomething (line 122) | [Export(typeof(ISomething<>))] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ShouldImplementExportedInterfaces_Part1.cs class Exported (line 6) | [Export(typeof(IDisposable))] class NotExported (line 11) | [Export(typeof(IDisposable))] // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ShouldImplementExportedInterfaces_Part2.cs class Exported (line 6) | partial class Exported : IDisposable method Dispose (line 8) | public void Dispose() { } class NotExported (line 11) | partial class NotExported FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SingleStatementPerLine.CSharp9.cs type Record (line 14) | record Record FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SingleStatementPerLine.cs class SingleStatementPerLine (line 4) | class SingleStatementPerLine method SingleStatementPerLine (line 6) | public SingleStatementPerLine(bool someCondition) method doSomething (line 65) | void doSomething() { } class Something (line 68) | class Something method Tell (line 70) | public void Tell(string m) { } method SetResult (line 71) | public void SetResult(bool b) { } class NancyContext (line 76) | class NancyContext { } class Response (line 77) | class Response { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SpecifyIFormatProviderOrCultureInfo.Latest.cs class Program (line 8) | class Program method TestCases (line 10) | void TestCases() class Repro_8233 (line 18) | class Repro_8233 method IgnoreCulture (line 20) | public void IgnoreCulture() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SpecifyIFormatProviderOrCultureInfo.cs class Methods (line 7) | static class Methods method DoStuff (line 9) | public static int DoStuff(string foo) => 1; method DoStuff (line 11) | [Obsolete] method DoStuff2 (line 15) | public static int DoStuff2(string foo) => 1; method DoStuff2 (line 17) | [Obsolete] method DoStuff2 (line 19) | public static int DoStuff2(string foo, CultureInfo foo2) => 1; method DoStuff3 (line 21) | public static int DoStuff3(string foo) => 1; method DoStuff3 (line 22) | public static int DoStuff3(int foo, IFormatProvider format) => 1; method DoStuff4 (line 24) | public static int DoStuff4(string foo, string bar, string quix) => 1; method DoStuff4 (line 25) | public static int DoStuff4(string foo, string bar, int quix, IFormatPr... method DoStuff5 (line 27) | public static int DoStuff5(string foo, string bar, string quix) => 1; method DoStuff5 (line 28) | public static int DoStuff5(string foo, string bar, string quix, IForma... method DoStuff6 (line 30) | public static int DoStuff6(string foo, string bar, string quix) => 1; method DoStuff6 (line 31) | public static int DoStuff6(string foo, CultureInfo cultureInfo, string... method DoStuff7 (line 33) | public static int DoStuff7(string foo, string bar, string quix) => 1; method DoStuff7 (line 34) | public static int DoStuff7(CultureInfo cultureInfo, string foo, string... method DoStuff8 (line 36) | public static int DoStuff8(string foo, string bar, string quix) => 1; method DoStuff8 (line 37) | public static int DoStuff8(CultureInfo cultureInfo, string foo, IForma... method DoStuff9 (line 39) | public static int DoStuff9(string foo, string bar, string quix) => 1; method DoStuff9 (line 40) | public static int DoStuff9(CultureInfo cultureInfo, IFormatProvider fo... method DoStuff10 (line 42) | public static bool DoStuff10(string foo, bool @default = false) => true; method DoStuff10 (line 43) | public static bool DoStuff10(string foo) => true; method DoStuff11 (line 45) | public static bool DoStuff11(string foo, params string[] args) => true; method DoStuff11 (line 46) | public static bool DoStuff11(string foo, int bar, params string[] args... method DoStuff12 (line 48) | public static bool DoStuff12(string foo, IFormatProvider provider, int... method DoStuff12 (line 49) | public static bool DoStuff12(string foo, params string[] args) => true; method MyFormat (line 53) | public static string MyFormat(IFormatProvider provider, String format,... method MyFormat (line 54) | public static string MyFormat(String format, params object[] args) => ""; method MyFormat (line 55) | public static string MyFormat(String format, object arg0) => ""; method MyFormat (line 56) | public static string MyFormat(String format, object arg0, object arg1)... method MyFormat2 (line 58) | public static string MyFormat2(IFormatProvider provider, string format... method MyFormat2 (line 59) | public static string MyFormat2(string format, bool boolCheck, string a... method MyFormat2 (line 60) | public static string MyFormat2(string format, string arg0) => ""; method MyFormat2 (line 61) | public static string MyFormat2(string format, bool boolCheck, Program ... method MyFormat2 (line 62) | public static string MyFormat2(string format, Program program, params ... method DoStuff13 (line 64) | public static string DoStuff13(CultureInfo cultureInfo, params object[... method DoStuff13 (line 65) | public static string DoStuff13(Program program) => ""; method DoStuff14 (line 67) | public static string DoStuff14(CultureInfo cultureInfo) => ""; method DoStuff14 (line 68) | public static string DoStuff14(Program program) => ""; class Program (line 71) | class Program type Colors (line 73) | enum Colors { Red, Green, Blue, Yellow = 12 }; method InvalidCases (line 75) | void InvalidCases() method ValidCases (line 112) | void ValidCases(MyFormat myFormat) class MyFormat (line 164) | class MyFormat : IFormatProvider method GetFormat (line 166) | public object GetFormat(Type formatType) => null; class MyObject (line 169) | class MyObject { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SpecifyStringComparison.cs class Program (line 7) | class Program method MyMethod (line 9) | public void MyMethod(string value) { } method MyMethod (line 10) | public void MyMethod(string value, StringComparison comparisonType) { } method MyMethod1 (line 12) | public void MyMethod1(string value1, string value2) { } method MyMethod1 (line 13) | public void MyMethod1(string value1) { } method MyMethod1 (line 14) | public void MyMethod1(string value1, StringComparison comparisonType) { } method MyMethod2 (line 16) | public void MyMethod2(string value) { } method MyMethod2 (line 18) | [Obsolete] method MyMethod3 (line 21) | public void MyMethod3(StringComparison comparisonType, string format, ... method MyMethod3 (line 22) | public void MyMethod3(string format, params string[] args) { } method MyMethod4 (line 24) | public void MyMethod4(string foo, params string[] args) { } method MyMethod4 (line 25) | public void MyMethod4(string foo, int bar, params string[] args) { } method MyMethod5 (line 27) | public void MyMethod5(StringComparison comparisonType, string format, ... method MyMethod5 (line 28) | public void MyMethod5(string format, params string[] args) { } method Contains (line 30) | public static void Contains(T expected, IEnumerable collection) { } method Contains (line 31) | public static void Contains(T expected, IEnumerable collection, ... method Contains (line 32) | public static void Contains(IEnumerable collection, Predicate... method Contains2 (line 34) | public static void Contains2(T expected, IEnumerable collection)... method Contains2 (line 35) | public static void Contains2(T expected, IEnumerable collection,... method Contains2 (line 36) | public static void Contains2(IEnumerable collection, Predicate(T expected, IEnumerable collection)... method Contains3 (line 39) | public static void Contains3(T expected, IEnumerable collecti... method InvalidCalls (line 41) | void InvalidCalls() method ValidCalls (line 63) | void ValidCalls() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SqlKeywordsDelimitedBySpace.CSharp10.FileScopedNamespaceDeclaration.cs type Record (line 7) | record Record type RecordStruct (line 17) | record struct RecordStruct FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SqlKeywordsDelimitedBySpace.CSharp10.GlobalUsingConsumer.cs class Foo (line 5) | class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SqlKeywordsDelimitedBySpace.Latest.cs class Examples (line 8) | class Examples method VariousSqlKeywords (line 10) | public void VariousSqlKeywords(string unknownValue) method RawStringLiterals (line 154) | void RawStringLiterals(string unknownValue) method NewlinesInStringInterpolation (line 167) | void NewlinesInStringInterpolation() class Repro_6249 (line 64) | public class Repro_6249 method Method (line 68) | public void Method() class Interpolation (line 76) | public class Interpolation class Repro_6355 (line 103) | public class Repro_6355 method Example (line 105) | void Example(string parameter) class Repro_NET1322 (line 142) | public class Repro_NET1322 class Examples (line 152) | class Examples method VariousSqlKeywords (line 10) | public void VariousSqlKeywords(string unknownValue) method RawStringLiterals (line 154) | void RawStringLiterals(string unknownValue) method NewlinesInStringInterpolation (line 167) | void NewlinesInStringInterpolation() class Repro_9177 (line 179) | public class Repro_9177 type ArtifactDto (line 181) | record ArtifactDto(string Id, string TagIdentifier); class PrimaryConstructors (line 205) | class PrimaryConstructors class C1 (line 207) | class C1(string sql = "SELECT x" + "FROM y"); type S1 (line 208) | struct S1(string sql = "SELECT x" + "FROM y"); type R1 (line 209) | record R1(string sql = "SELECT x" + "FROM y"); type RS1 (line 210) | record struct RS1(string sql = "SELECT x" + "FROM y"); class DefaultLambdaParameters (line 213) | class DefaultLambdaParameters method Test (line 215) | void Test() class CollectionExpressions (line 222) | class CollectionExpressions method MonoDimensional (line 224) | void MonoDimensional() method MultiDimensional (line 235) | void MultiDimensional() class MyClass (line 250) | public class MyClass method NewEscapeSequence (line 253) | void NewEscapeSequence() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SqlKeywordsDelimitedBySpace.cs class NonCompliantExamples (line 9) | class NonCompliantExamples method VariousSqlKeywords (line 11) | public void VariousSqlKeywords() class CompliantExamples (line 101) | class CompliantExamples method ValidCases (line 119) | void ValidCases(string parameter) method InterpolatedAndRawStringsAreIgnored (line 162) | public void InterpolatedAndRawStringsAreIgnored(string col1, string co... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SqlKeywordsDelimitedBySpace_DefaultNamespace.cs class Foo (line 3) | class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SqlKeywordsDelimitedBySpace_InsideNamespace.cs class Foo (line 5) | class Foo class Foo (line 15) | class Foo class Foo (line 26) | class Foo class Foo (line 37) | class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticFieldInGenericClass.Latest.Partial.cs class PartialClass (line 3) | partial class PartialClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticFieldInGenericClass.Latest.cs type StaticFieldInGenericRecord (line 6) | record StaticFieldInGenericRecord type StaticFieldInGenericPositionalRecord (line 18) | record StaticFieldInGenericPositionalRecord(int Property) type IStatic (line 30) | public interface IStatic type StaticFieldInGenericRecordStruct (line 40) | record struct StaticFieldInGenericRecordStruct type StaticFieldInGenericPositionalRecordStruct (line 54) | record struct StaticFieldInGenericPositionalRecordStruct(int Property) class LengthLimitedSingletonCollection (line 72) | public partial class LengthLimitedSingletonCollection where T : new() class LengthLimitedSingletonCollection (line 78) | public partial class LengthLimitedSingletonCollection where T : new() class PartialClass (line 85) | partial class PartialClass class ExtensionProperties (line 90) | class ExtensionProperties { } class Extensions (line 92) | static class Extensions class FieldKeyword (line 100) | class FieldKeyword FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticFieldInGenericClass.cs class C (line 8) | internal class C class StaticFieldInGenericClass (line 13) | class StaticFieldInGenericClass class NestedClass (line 36) | private static class NestedClass method InitColumns (line 66) | private static void InitColumns() { } type StaticFieldInGenericStruct (line 71) | struct StaticFieldInGenericStruct class Wrapper (line 80) | public class Wrapper where T : class method CreateEmpty (line 86) | private static T CreateEmpty() => null; class GenericBase (line 93) | public class GenericBase { } type IGeneric (line 94) | public interface IGeneric { } type IBoring (line 95) | public interface IBoring { } class GenericDerived (line 97) | public class GenericDerived : GenericBase, IBoring class ImplementsInterface (line 102) | public class ImplementsInterface : IBoring, IGeneric class ImplementsInterfaceGeneric (line 107) | public class ImplementsInterfaceGeneric : IBoring, IGeneric class ImplementsInterfaceGenericIrrelevantForBase (line 112) | public class ImplementsInterfaceGenericIrrelevantForBase : IBoring, I... class Outer (line 117) | public class Outer class Inner (line 119) | public class Inner class InnerGeneric (line 124) | public class InnerGeneric : GenericBase FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticFieldInitializerOrder.Latest.Partial.cs type IStaticFieldsOrder (line 3) | public partial interface IStaticFieldsOrder class MyClass (line 13) | public partial class MyClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticFieldInitializerOrder.Latest.cs class StaticFieldInitializerOrder (line 6) | public class StaticFieldInitializerOrder type IStaticFieldsOrder (line 11) | public partial interface IStaticFieldsOrder method M (line 29) | public static int M(int i) { return i; } type IBadExample (line 32) | public interface IBadExample type IGoodExample (line 39) | public interface IGoodExample method IGoodExample (line 44) | static IGoodExample() type StaticFieldsOrderRecord (line 53) | public record StaticFieldsOrderRecord type StaticFieldsOrderPositionalRecord (line 72) | public record StaticFieldsOrderPositionalRecord(String Parameter) type StaticFieldsOrderRecordStruct (line 94) | public record struct StaticFieldsOrderRecordStruct type StaticFieldsOrderPositionalRecordStruct (line 113) | public record struct StaticFieldsOrderPositionalRecordStruct(String Para... class MyClass (line 135) | public partial class MyClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticFieldInitializerOrder.Partial.cs class StaticFieldInitializerOrder (line 9) | public partial class StaticFieldInitializerOrder type StaticFieldsOrderStruct (line 16) | public partial struct StaticFieldsOrderStruct FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticFieldInitializerOrder.cs class StaticFieldInitializerOrder (line 5) | public partial class StaticFieldInitializerOrder method M (line 28) | public static int M(int i) { return i; } type StaticFieldsOrderStruct (line 31) | public partial struct StaticFieldsOrderStruct method M (line 49) | public static int M(int i) { return i; } class Derived (line 52) | public class Derived : Base class Base (line 57) | public class Base FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticFieldVisible.Latest.cs type StaticFieldVisible (line 3) | public record StaticFieldVisible type Shape (line 18) | public record Shape type PositionalShape (line 26) | public record PositionalShape(int Property) type StaticFieldVisibleStruct (line 34) | public struct StaticFieldVisibleStruct method StaticFieldVisibleStruct (line 36) | public StaticFieldVisibleStruct() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticFieldVisible.cs class StaticFieldVisible (line 5) | public class StaticFieldVisible class Shape (line 37) | public class Shape class EmptyShape (line 42) | private class EmptyShape : Shape FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticFieldWrittenFromInstanceConstructor.Latest.Partial.cs class Person (line 5) | public partial class Person method Person (line 7) | public partial Person(DateTime birthday) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticFieldWrittenFromInstanceConstructor.Latest.cs class Person (line 5) | public class Person method Person (line 9) | public Person(DateTime birthday) method Person (line 58) | public Person(DateTime birthday) method Person (line 67) | public Person() : this(DateTime.Now) method Person (line 112) | public Person(DateTime birthday) method Person (line 125) | public partial Person(DateTime birthday); type Person (line 18) | public record Person method Person (line 9) | public Person(DateTime birthday) method Person (line 58) | public Person(DateTime birthday) method Person (line 67) | public Person() : this(DateTime.Now) method Person (line 112) | public Person(DateTime birthday) method Person (line 125) | public partial Person(DateTime birthday); type Person (line 47) | public struct Person method Person (line 9) | public Person(DateTime birthday) method Person (line 58) | public Person(DateTime birthday) method Person (line 67) | public Person() : this(DateTime.Now) method Person (line 112) | public Person(DateTime birthday) method Person (line 125) | public partial Person(DateTime birthday); type RecordStructPerson (line 78) | public record struct RecordStructPerson class Person (line 108) | public class Person method Person (line 9) | public Person(DateTime birthday) method Person (line 58) | public Person(DateTime birthday) method Person (line 67) | public Person() : this(DateTime.Now) method Person (line 112) | public Person(DateTime birthday) method Person (line 125) | public partial Person(DateTime birthday); class Person (line 121) | public partial class Person method Person (line 9) | public Person(DateTime birthday) method Person (line 58) | public Person(DateTime birthday) method Person (line 67) | public Person() : this(DateTime.Now) method Person (line 112) | public Person(DateTime birthday) method Person (line 125) | public partial Person(DateTime birthday); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticFieldWrittenFromInstanceConstructor.cs class Person (line 5) | public class Person method Person (line 12) | public Person(DateTime birthday) method Person (line 21) | public Person() : this(DateTime.Now) method Person (line 26) | static Person() class PartialPerson (line 32) | public partial class PartialPerson method PartialPerson (line 39) | public PartialPerson(DateTime birthday) class PartialPerson (line 37) | public partial class PartialPerson method PartialPerson (line 39) | public PartialPerson(DateTime birthday) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticFieldWrittenFromInstanceMember.Latest.cs class StaticFieldWrittenFromInstanceMember (line 3) | class StaticFieldWrittenFromInstanceMember method DoSomething (line 7) | public void DoSomething() method DoSomethingStatic (line 12) | public static void DoSomethingStatic() type IStaticFieldWrittenFromInstanceMember (line 18) | interface IStaticFieldWrittenFromInstanceMember method DoSomething (line 24) | public void DoSomething() method DoSomethingStatic (line 34) | public static void DoSomethingStatic() type Record (line 50) | record Record class Class (line 73) | class Class type Structure (line 90) | struct Structure method Method (line 97) | public void Method() => count++; method DoSomethingStatic (line 99) | public static void DoSomethingStatic() => count++; method StaticFoo (line 101) | public static Action StaticFoo() => static x => method Foo (line 106) | public Action Foo() => static x => method Foo2 (line 111) | public Action Foo2() => static x => method CallFoo (line 117) | public void CallFoo() => Foo()(1); type RecordStructure (line 120) | record struct RecordStructure class CSharp11 (line 149) | class CSharp11 class CSharp13 (line 165) | class CSharp13 class PartialClass (line 167) | partial class PartialClass class PartialClass (line 180) | partial class PartialClass class CSharp14 (line 188) | static class CSharp14 class Sample (line 190) | class Sample method extension (line 197) | extension(Sample sample) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticFieldWrittenFromInstanceMember.TopLevelStatements.cs type Record (line 5) | record Record type Structure (line 10) | struct Structure type RecordStructure (line 15) | record struct RecordStructure FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticFieldWrittenFromInstanceMember.cs class StaticFieldWrittenFromInstanceMember (line 5) | class StaticFieldWrittenFromInstanceMember method DoSomething (line 12) | public void DoSomething() method DoSomethingStatic (line 23) | public static void DoSomethingStatic() class PartialClass (line 48) | public partial class PartialClass method Foo (line 58) | void Foo() method Bar (line 62) | void Bar() => field++; class PartialClass (line 56) | public partial class PartialClass method Foo (line 58) | void Foo() method Bar (line 62) | void Bar() => field++; class NotCompileable (line 65) | public class NotCompileable : NotKnownType // Error [CS0246] method Method (line 68) | void Method() class Extensions (line 74) | public static class Extensions class Sample (line 76) | public class Sample method Method (line 82) | public static void Method(this Sample sample) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticSealedClassProtectedMembers.Latest.Partial.cs class PartialPropertyClass (line 3) | sealed partial class PartialPropertyClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticSealedClassProtectedMembers.Latest.cs type Record (line 4) | sealed record Record class PartialPropertyClass (line 32) | sealed partial class PartialPropertyClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StaticSealedClassProtectedMembers.cs class Class1 (line 5) | sealed class Class1 method Class1 (line 33) | private Class1(int counter, string name) // Compliant method Class1 (line 36) | public Class1(int counter) // Compliant method Class1 (line 39) | internal Class1(long counter) // Compliant method Class1 (line 42) | protected Class1() // Noncompliant method Class1 (line 46) | internal protected Class1(string name) // Noncompliant method Test1 (line 50) | protected void Test1() // Noncompliant method Test2 (line 55) | protected internal void Test2() // Noncompliant method Test3 (line 59) | private void Test3() // Compliant class Base1 (line 80) | public class Base1 method Method1 (line 82) | protected virtual void Method1() // Compliant class Subclass1 (line 88) | public sealed class Subclass1 : Base1 method Method1 (line 90) | protected override void Method1() // Compliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StreamReadStatement.Latest.cs class StreamReadStatement (line 8) | public class StreamReadStatement method StreamReadStatement (line 10) | public StreamReadStatement(string fileName) method ReadAtLeast (line 22) | public void ReadAtLeast(string fileName) method ReadAtLeastAsync (line 31) | public async Task ReadAtLeastAsync(string fileName) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StreamReadStatement.cs class StreamReadStatement (line 8) | public class StreamReadStatement method StreamReadStatement (line 12) | public StreamReadStatement(string fileName) method Read (line 32) | public void Read() { } class DerivedStream (line 35) | public class DerivedStream : Stream method Flush (line 82) | public override void Flush() method Read (line 87) | public void Read(byte[] buffer, int offset, string count) { /* do some... method Read (line 89) | public override int Read(byte[] buffer, int offset, int count) method Seek (line 94) | public override long Seek(long offset, SeekOrigin origin) method SetLength (line 99) | public override void SetLength(long value) method Write (line 104) | public override void Write(byte[] buffer, int offset, int count) class Program (line 110) | public class Program method Foo (line 112) | public async Task Foo() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringConcatenationInLoop.Latest.cs class StringConcatenationInLoop (line 6) | public class StringConcatenationInLoop method StringConcatenationInLoop (line 8) | public StringConcatenationInLoop() class Partial (line 27) | public partial class Partial class Partial (line 32) | public partial class Partial { class MyClass (line 40) | public class MyClass method TaskWhenEach (line 42) | async Task TaskWhenEach() method PartialProperties (line 56) | void PartialProperties() class NullConditionalAssignment (line 70) | class NullConditionalAssignment method Method (line 73) | void Method(NullConditionalAssignment sample) class FieldKeyword (line 82) | class FieldKeyword FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringConcatenationInLoop.cs class StringConcatenationInLoop (line 6) | public class StringConcatenationInLoop method StringConcatenationInLoop (line 11) | public StringConcatenationInLoop(IList objects, string p, St... method Repro_5521 (line 101) | void Repro_5521(IList objects) method Repro_7713 (line 111) | void Repro_7713() class MyObject (line 128) | public class MyObject class Sample (line 133) | class Sample method M (line 136) | void M(List others) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringFormatValidator.EdgeCases.cs class StringFormatValidatorEdgeCases (line 3) | public class StringFormatValidatorEdgeCases method EdgeCases (line 6) | void EdgeCases(string bar) method Foo (line 19) | string Foo(string bar) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringFormatValidator.Latest.cs class CSharp12 (line 4) | class CSharp12 method CollectionExpressions (line 6) | void CollectionExpressions(string s1, string s2) class CSharp13 (line 18) | class CSharp13 method EscapeSequence (line 20) | void EscapeSequence() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringFormatValidator.RuntimeExceptionFree.CSharp11.cs class StringFormatValidatorRuntimeExceptionFree (line 3) | public class StringFormatValidatorRuntimeExceptionFree method System_String_Format (line 5) | void System_String_Format(string[] args) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringFormatValidator.RuntimeExceptionFree.cs class StringFormatValidatorRuntimeExceptionFree (line 3) | public class StringFormatValidatorRuntimeExceptionFree method System_String_Format (line 8) | void System_String_Format(string[] args) method System_Console_Write (line 80) | void System_Console_Write(string[] args) method System_Console_WriteLine (line 94) | void System_Console_WriteLine(string[] args) method System_Text_StringBuilder_AppendFormat (line 99) | void System_Text_StringBuilder_AppendFormat(string[] args) method System_IO_TextWriter_Write (line 111) | void System_IO_TextWriter_Write(string[] args) method System_IO_TextWriter_WriteLine (line 126) | void System_IO_TextWriter_WriteLine(string[] args) method System_Diagnostics_Debug_WriteLine (line 141) | void System_Diagnostics_Debug_WriteLine(string[] args) method System_Diagnostics_Trace_TraceError (line 155) | void System_Diagnostics_Trace_TraceError(string[] args) method System_Diagnostics_Trace_TraceInformation (line 167) | void System_Diagnostics_Trace_TraceInformation(string[] args) method System_Diagnostics_Trace_TraceWarning (line 179) | void System_Diagnostics_Trace_TraceWarning(string[] args) method System_Diagnostics_TraceSource_TraceInformation (line 191) | void System_Diagnostics_TraceSource_TraceInformation(string[] args) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringFormatValidator.TypoFree.CSharp11.cs class StringFormatValidatorTypoFree (line 3) | public class StringFormatValidatorTypoFree method Test (line 5) | void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringFormatValidator.TypoFree.cs class StringFormatValidatorTypoFree (line 4) | public class StringFormatValidatorTypoFree method Test (line 6) | void Test() method System_Console_Write (line 30) | void System_Console_Write(string[] args) method System_Console_WriteLine (line 41) | void System_Console_WriteLine(string[] args) method System_Text_StringBuilder_AppendFormat (line 51) | void System_Text_StringBuilder_AppendFormat(string[] args) method System_IO_TextWriter_Write (line 62) | void System_IO_TextWriter_Write(string[] args) method System_IO_TextWriter_WriteLine (line 73) | void System_IO_TextWriter_WriteLine(string[] args) method System_Diagnostics_Debug_WriteLine (line 85) | void System_Diagnostics_Debug_WriteLine(string[] args) method System_Diagnostics_Trace_TraceError (line 95) | void System_Diagnostics_Trace_TraceError(string[] args) method System_Diagnostics_Trace_TraceInformation (line 105) | void System_Diagnostics_Trace_TraceInformation(string[] args) method System_Diagnostics_Trace_TraceWarning (line 115) | void System_Diagnostics_Trace_TraceWarning(string[] args) method System_Diagnostics_TraceSource_TraceInformation (line 125) | void System_Diagnostics_TraceSource_TraceInformation(string[] args) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringLiteralShouldNotBeDuplicated.Dapper.cs class RepeatedParameterNamesInDatabase (line 5) | public class RepeatedParameterNamesInDatabase method ExecuteSqlCommandsForUsers (line 7) | public void ExecuteSqlCommandsForUsers(SqlConnection connection) method ExecuteSqlCommandsForCompanies (line 15) | public void ExecuteSqlCommandsForCompanies(SqlConnection connection) method ExecuteSqlCommandsForProducts (line 23) | public void ExecuteSqlCommandsForProducts(SqlConnection connection) method ExecuteSqlCommandsForCountries (line 31) | public void ExecuteSqlCommandsForCountries(SqlConnection connection) class Product (line 39) | public class Product { } class Country (line 40) | public class Country { } class Company (line 41) | public class Company { } class User (line 42) | public class User { } class FN (line 45) | public class FN method A (line 49) | public void A() => throw new System.ArgumentException("Invalid argumen... method NameIsValueArgument (line 52) | public void NameIsValueArgument(SqlConnection connection) method UsedInMethodSecondTime (line 59) | public void UsedInMethodSecondTime(SqlConnection connection) method UsedInMethodThirdTime (line 66) | public void UsedInMethodThirdTime(SqlConnection connection) class User (line 73) | public class User { } class Company (line 74) | public class Company { } class Product (line 75) | public class Product { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringLiteralShouldNotBeDuplicated.Latest.cs type Record (line 6) | record Record type RecordStruct (line 65) | record struct RecordStruct class FooNonCompliant (line 122) | public class FooNonCompliant class FooLessThanFiveCharacters (line 134) | public class FooLessThanFiveCharacters class FooNonCompliantStringInterpolation (line 145) | public class FooNonCompliantStringInterpolation class EfCoreMigration (line 161) | public class EfCoreMigration : Migration method Up (line 163) | protected override void Up(MigrationBuilder migrationBuilder) method Down (line 180) | protected override void Down(MigrationBuilder migrationBuilder) class EscapeSequence (line 200) | class EscapeSequence class PartialClass (line 208) | partial class PartialClass class PartialClass (line 215) | partial class PartialClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringLiteralShouldNotBeDuplicated.Partial.cs class PartialClassCrossFileFN (line 3) | partial class PartialClassCrossFileFN FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringLiteralShouldNotBeDuplicated.WithTopLevelStatements.cs type Record (line 14) | record Record class PartialInTopLevelStatementsFile (line 70) | partial class PartialInTopLevelStatementsFile class PartialInTopLevelStatementsFile (line 76) | partial class PartialInTopLevelStatementsFile FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringLiteralShouldNotBeDuplicated.cs class EfClassicMigration (line 4) | public class EfClassicMigration : DbMigration method Up (line 6) | public override void Up() method Down (line 14) | public override void Down() class Program (line 25) | public class Program method Program (line 43) | public Program() method Do (line 51) | public void Do(string s = "foobar") method Validate (line 64) | public void Validate(object foobar) class OuterClass (line 75) | public class OuterClass class InnerClass (line 79) | private class InnerClass type InnerStruct (line 87) | private struct InnerStruct method InnerStruct (line 94) | public InnerStruct(string s) type OuterStruct (line 104) | public struct OuterStruct method OuterStruct (line 107) | public OuterStruct(string s) type InnerStruct (line 112) | private struct InnerStruct method InnerStruct (line 119) | public InnerStruct(string s) class SpecialChar (line 129) | public class SpecialChar class PartialClassSameFile (line 154) | partial class PartialClassSameFile class PartialClassSameFile (line 160) | partial class PartialClassSameFile class PartialClassCrossFileFN (line 166) | partial class PartialClassCrossFileFN FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringLiteralShouldNotBeDuplicated_Attributes.cs class ConstantsInAttributesShouldBeIgnored (line 13) | public class ConstantsInAttributesShouldBeIgnored class Class1 (line 33) | [DebuggerDisplay("12345", Name = "12345", TargetTypeName = "12345")] // ... method DoStuff (line 43) | [DebuggerStepThrough] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringOffsetMethods.Latest.cs class StringOffsetMethods (line 5) | public class StringOffsetMethods method StringOffsetMethods (line 7) | public StringOffsetMethods() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringOffsetMethods.cs class StringOffsetMethods (line 5) | public class StringOffsetMethods method StringOffsetMethods (line 7) | public StringOffsetMethods() method StringOffsetMethodsCases (line 16) | public void StringOffsetMethodsCases(string x) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringOperationWithoutCulture.CSharp10.cs class StringOperationWithoutCulture (line 4) | public class StringOperationWithoutCulture method TestDateTimeMethodsNet6 (line 7) | void TestDateTimeMethodsNet6() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringOperationWithoutCulture.CSharp11.cs class StringOperationWithoutCulture (line 3) | public class StringOperationWithoutCulture method TestInterpolatedStrings (line 5) | void TestInterpolatedStrings() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringOperationWithoutCulture.cs class StringOperationWithoutCulture (line 9) | public class StringOperationWithoutCulture method Test (line 11) | void Test() method TestExpressions (line 47) | void TestExpressions() method TestDateTimeTypes (line 59) | void TestDateTimeTypes() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringOrIntegralTypesForIndexers.Latest.Partial.cs class PartialIndexerClass (line 5) | partial class PartialIndexerClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringOrIntegralTypesForIndexers.Latest.cs type Foo (line 3) | record Foo class Class (line 26) | class Class { } type Record (line 27) | record Record { } type PositionalRecord (line 28) | record PositionalRecord(int SomeProperty) { } class PartialIndexerClass (line 34) | partial class PartialIndexerClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/StringOrIntegralTypesForIndexers.cs class Test1 (line 5) | class Test1 class Test2 (line 14) | class Test2 class Test3 (line 23) | class Test3 class Test4 (line 31) | class Test4 class Test5 (line 39) | class Test5 class Test6 (line 47) | class Test6 class Test7 (line 55) | class Test7 class Test8 (line 63) | class Test8 class Test9 (line 71) | class Test9 class Test10 (line 79) | class Test10 class Test11 (line 87) | class Test11 class Test12 (line 95) | class Test12 class Test13 (line 103) | class Test13 class Test14 (line 111) | class Test14 class Test15 (line 119) | class Test15 class Test16 (line 127) | class Test16 class Test17 (line 135) | class Test17 class Test18 (line 143) | class Test18 class Test19 (line 149) | class Test19 class Test20 (line 155) | class Test20 class Test21 (line 163) | class Test21 FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SuppressFinalizeUseless.CSharp9.cs type Noncompliant (line 11) | sealed record Noncompliant type Compliant (line 16) | record Compliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SuppressFinalizeUseless.Fixed.cs class Base (line 5) | class Base method M (line 7) | public void M() class Derived1 (line 15) | class Derived1 : Base method M (line 17) | public void M() class Derived2 (line 25) | sealed class Derived2 : Base method M (line 27) | public void M() class C1 (line 33) | sealed class C1 method M (line 35) | public void M() class C2 (line 40) | class C2 method M (line 42) | public void M() class B1 (line 48) | class B1 { } class C3 (line 49) | sealed class C3 : B1 method M (line 51) | public void M() class Dummy (line 56) | sealed class Dummy method SuppressFinalize (line 58) | public void SuppressFinalize(object o) method M (line 60) | public void M() class Compliant (line 66) | sealed class Compliant method M (line 70) | public void M() class NoThis (line 76) | class NoThis method M (line 78) | public void M() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SuppressFinalizeUseless.cs class Base (line 5) | class Base method M (line 7) | public void M() class Derived1 (line 15) | class Derived1 : Base method M (line 17) | public void M() class Derived2 (line 25) | sealed class Derived2 : Base method M (line 27) | public void M() class C1 (line 33) | sealed class C1 method M (line 35) | public void M() class C2 (line 42) | class C2 method M (line 44) | public void M() class B1 (line 50) | class B1 { } class C3 (line 51) | sealed class C3 : B1 method M (line 53) | public void M() class Dummy (line 59) | sealed class Dummy method SuppressFinalize (line 61) | public void SuppressFinalize(object o) method M (line 63) | public void M() class Compliant (line 69) | sealed class Compliant method M (line 73) | public void M() class NoThis (line 79) | class NoThis method M (line 81) | public void M() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SwaggerActionReturnType.cs class CompliantBaseline (line 7) | [ApiController] method ReturnsNoValue (line 12) | [HttpGet("foo")] method NotSuccessfulResult (line 15) | [HttpGet("foo")] method HasProducesTypeOf (line 18) | [HttpGet("foo")] method HasProducesGeneric (line 22) | [HttpGet("foo")] method HasProducesResponseTypeTypeOf (line 26) | [HttpGet("foo")] method HasProducesResponseTypeTypeOf2 (line 30) | [HttpGet("foo")] method HasProducesResponseTypeAsParameter (line 34) | [HttpGet("foo")] method HasProducesResponseTypeGeneric (line 38) | [HttpGet("foo")] method HasProducesResponseTypeGeneric2 (line 42) | [HttpGet("foo")] method HasSwaggerResponse (line 46) | [HttpGet("foo")] method HasSwaggerResponse2 (line 50) | [HttpGet("foo")] method IResult_HasAnnotation (line 54) | [HttpGet("foo")] method TypedResponse1 (line 58) | [HttpGet("foo")] method TypedResponse2 (line 61) | [HttpGet("foo")] method TypedResponse3 (line 64) | [HttpGet("foo")] method TypedResponse4 (line 70) | [HttpGet("foo")] method AnnotatedForWrongStatusCode (line 78) | [Route("foo")] method IgnoreApiTrue (line 85) | [HttpGet("foo")] class NocompliantBaseline (line 90) | [ApiController] method NewObjectResult (line 96) | [HttpGet("foo")] method ReturnsOkWithValue (line 102) | [HttpGet("foo")] method ReturnsMultipleValues (line 110) | [HttpGet("foo")] method ReturnsMultipleValuesTernary (line 126) | [HttpGet("foo")] method ReturnsMultipleValuesSwitch (line 137) | [HttpGet("foo")] method MarkedWithRoute (line 154) | [Route("foo")] method HasProducesTypeOf (line 162) | [HttpGet("foo")] method AnnotatedWithNoType (line 167) | [Route("foo")] method AnnotatedWithNoType2 (line 176) | [Route("foo")] method IgnoreApiFalse (line 185) | [HttpGet("foo")] method UnusedSuccessResponse (line 190) | [HttpGet("foo")] class NotApiController (line 198) | public class NotApiController : Controller method Foo (line 200) | [HttpGet("foo")] class NotAController (line 204) | [NonController] method Foo (line 208) | [HttpGet("foo")] class NotPublicAction (line 212) | [ApiController] method Foo (line 215) | [HttpGet("foo")] class UsesApiConventionMethod (line 219) | [ApiController] method Foo (line 222) | [HttpGet("foo")] class UsesApiConventionType (line 227) | [ApiController] method Foo (line 231) | [HttpGet("foo")] class AnnotatedAtControllerLevel (line 235) | [ApiController] method ReturnsOkWithValue (line 239) | [HttpGet("foo")] class AnnotatedAtControllerLevelWithTypeOf (line 243) | [ApiController] method ReturnsOkWithValue (line 247) | [HttpGet("foo")] class AnnotatedAtControllerLevelWithNoType (line 251) | [ApiController] method ReturnsOkWithValue (line 255) | [HttpGet("foo")] class IgnoreApiTrueController (line 263) | [ApiController] method ReturnsOkWithValue (line 267) | [HttpGet("foo")] class SwaggerResponseController (line 271) | [ApiController] method Foo (line 275) | [HttpGet("foo")] class IgnoreApiFalseController (line 279) | [ApiController] method ReturnsOkWithValue (line 283) | [HttpGet("foo")] class Foo (line 290) | public class Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SwitchCaseFallsThroughToDefault.Fixed.cs class SwitchCaseFallsThroughToDefault (line 3) | public class SwitchCaseFallsThroughToDefault method handleA (line 5) | private void handleA() { } method handleB (line 6) | private void handleB() { } method handleTheRest (line 7) | private void handleTheRest() { } method SwitchCaseFallsThroughToDefault (line 9) | public SwitchCaseFallsThroughToDefault(char ch) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SwitchCaseFallsThroughToDefault.cs class SwitchCaseFallsThroughToDefault (line 3) | public class SwitchCaseFallsThroughToDefault method handleA (line 5) | private void handleA() { } method handleB (line 6) | private void handleB() { } method handleTheRest (line 7) | private void handleTheRest() { } method SwitchCaseFallsThroughToDefault (line 9) | public SwitchCaseFallsThroughToDefault(char ch) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SwitchCasesMinimumThree.cs class SwitchCasesMinimumThree (line 3) | public class SwitchCasesMinimumThree method SwitchCasesMinimumThree (line 5) | public SwitchCasesMinimumThree(int n) method SwitchExpressionsWithNone (line 31) | public int SwitchExpressionsWithNone(int n) => method SwitchExpressionsWithOne (line 38) | public int SwitchExpressionsWithOne(int n) => method SwitchExpressionsWithTwo (line 44) | public int SwitchExpressionsWithTwo(int n) => method SwitchExpressions (line 51) | public int SwitchExpressions(string type) method SwitchExpressionsWithTwoNonDefault (line 71) | public int SwitchExpressionsWithTwoNonDefault(int n) => method SwitchExpressionsWithMany (line 78) | public int SwitchExpressionsWithMany(int n) => FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SwitchDefaultClauseEmpty.Fixed.cs class SwitchDefaultClauseEmpty (line 5) | public class SwitchDefaultClauseEmpty type Fruit (line 7) | public enum Fruit method SwitchDefaultClauseEmpty (line 15) | public SwitchDefaultClauseEmpty(Fruit fruit) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SwitchDefaultClauseEmpty.cs class SwitchDefaultClauseEmpty (line 5) | public class SwitchDefaultClauseEmpty type Fruit (line 7) | public enum Fruit method SwitchDefaultClauseEmpty (line 15) | public SwitchDefaultClauseEmpty(Fruit fruit) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SwitchSectionShouldNotHaveTooManyStatements_CustomValue.cs class Program (line 5) | public class Program method Program (line 7) | public Program(int myVariable) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SwitchSectionShouldNotHaveTooManyStatements_DefaultValue.cs class Program (line 5) | public class Program method Program (line 7) | public Program(int myVariable) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SwitchShouldNotBeNested.cs class Program (line 5) | public class Program method Program (line 7) | public Program(char choice, int value) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SwitchWithoutDefault.cs class SwitchWithoutDefault (line 3) | public class SwitchWithoutDefault method SwitchWithoutDefault (line 5) | public SwitchWithoutDefault(int n) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/SyntaxWalker_InsufficientExecutionStackException.cs class Foo (line 5) | public class Foo method Bar (line 7) | private string Bar() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TabCharacter.cs class TabCharacter (line 5) | public class TabCharacter method TabCharacter (line 7) | public TabCharacter() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TaskConfigureAwait.NetCore.cs class TaskConfigureAwait (line 6) | public class TaskConfigureAwait method Test (line 8) | public async void Test() method GetNumber (line 26) | private Task GetNumber() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TaskConfigureAwait.NetFx.cs class TaskConfigureAwait (line 6) | public class TaskConfigureAwait method Test (line 8) | public async void Test() method GetNumber (line 26) | private Task GetNumber() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestClassShouldHaveTestMethod.Latest.cs class TestSuite (line 5) | [TestClass] method Method (line 8) | public void Method() method Method (line 72) | public void Method() type TestSuiteRecord1 (line 20) | [TestClass] type TestSuiteRecord2 (line 28) | [TestClass] type PositionalRecord (line 37) | [TestClass] class DerivedTestSuite (line 46) | [DerivedTest] method Method (line 49) | public void Method() class DerivedTestAttribute (line 54) | public class DerivedTestAttribute : TestClassAttribute class ClassTest1 (line 58) | [TestClass] class TestSuite (line 69) | [TestFixture] method Method (line 8) | public void Method() method Method (line 72) | public void Method() class ClassTest2 (line 84) | [TestFixture] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestClassShouldHaveTestMethod.MsTest.cs class ClassTest2 (line 6) | [TestClass] class ClassTest4 (line 12) | [TestClass] method Foo (line 15) | public void Foo() { } class ClassTest5 (line 18) | class ClassTest5 method Foo (line 20) | public void Foo() { } class ClassTest6 (line 23) | class ClassTest6 method Foo (line 25) | public void Foo() { } class ClassTest9 (line 28) | [TestClass] method Foo (line 31) | [TestMethod] class ClassTest12 (line 35) | [TestClass] method Foo (line 38) | [DataTestMethod] class MyCommonCode1 (line 43) | [TestClass] method BeforeTests (line 46) | [TestInitialize] method AfterTests (line 51) | [TestCleanup] class MySubCommonCode1 (line 57) | [TestClass] class MySubCommonCode11 (line 62) | public class MySubCommonCode11 : MyCommonCode1 // Compliant class TestFooBase (line 66) | [TestClass] method Foo_WhenFoo_ExpectsFoo (line 69) | [TestMethod] class TestSubFoo (line 74) | [TestClass] class SetupAttributes1 (line 93) | [TestClass] method BeforeTests (line 96) | [AssemblyInitialize] class SetupAttributes2 (line 102) | [TestClass] method AfterTests (line 105) | [AssemblyCleanup] class SetupAttributes3 (line 112) | [TestClass] method BeforeTests (line 115) | [AssemblyInitialize] method AfterTests (line 120) | [AssemblyCleanup] class SetupAttributes4 (line 126) | [TestClass] method BeforeTests (line 129) | [TestInitialize] class SetupAttributes5 (line 135) | [TestClass] method AfterTests (line 138) | [TestCleanup] class SetupAttributes6 (line 145) | [TestClass] method BeforeTests (line 148) | [TestInitialize] method AfterTests (line 153) | [TestCleanup] class SetupAttributes7 (line 159) | [TestClass] method BeforeTests (line 162) | [ClassInitializeAttribute] class SetupAttributes8 (line 168) | [TestClass] method AfterTests (line 171) | [ClassCleanupAttribute] class SetupAttributes9 (line 178) | [TestClass] method BeforeTests (line 181) | [ClassInitializeAttribute] method AfterTests (line 186) | [ClassCleanupAttribute] class NoTestClassAttribute (line 192) | public class NoTestClassAttribute method BeforeTests (line 194) | [TestInitialize] method AfterTests (line 199) | [TestCleanup] class DerivedTestClassAttribute (line 209) | public class DerivedTestClassAttribute: TestClassAttribute class DerivedTestMethodAttribute (line 214) | public class DerivedTestMethodAttribute: TestMethodAttribute class DerivedDataTestMethodAttribute (line 219) | public class DerivedDataTestMethodAttribute : DataTestMethodAttribute class DerivedClassAttribute (line 224) | [DerivedTestClass] class DerivedMethodAttribute1 (line 230) | [DerivedTestClassAttribute] method Foo (line 233) | [DerivedTestMethod] class DerivedMethodAttribute2 (line 237) | [DerivedTestClass] method Foo (line 240) | [DerivedTestMethod] class A (line 248) | [TestClass] method Test (line 251) | [TestMethod] class B (line 257) | [TestClass] class C (line 262) | [TestClass] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestClassShouldHaveTestMethod.NUnit.cs class ClassTest1 (line 6) | [TestFixture] class ClassTest3 (line 12) | [TestFixture] method Foo (line 15) | public void Foo() { } class ClassTest5 (line 18) | class ClassTest5 method Foo (line 20) | public void Foo() { } class ClassTest6 (line 23) | class ClassTest6 method Foo (line 25) | public void Foo() { } class ClassTest7 (line 28) | [TestFixture] method Foo (line 31) | [Test] class ClassTest8 (line 35) | [TestFixture] method Foo (line 38) | [TestCase("")] class ClassTest10 (line 43) | [TestFixture] method Foo (line 46) | [Theory] class MyCommonCode2 (line 50) | [TestFixture] class MySubCommonCode2 (line 55) | [TestFixture] class MySubCommonCode22 (line 60) | public class MySubCommonCode22 : MyCommonCode2 // Compliant class ClassTest11 (line 64) | [TestFixture] method DivideTest (line 67) | [TestCaseSource("DivideCases")] class TestFooBase (line 81) | [TestFixture] method Foo_WhenFoo_ExpectsFoo (line 84) | [Test] class TestSubFoo (line 89) | [TestFixture] class DerivedTestFixtureAttribute (line 99) | public class DerivedTestFixtureAttribute : TestFixtureAttribute class DerivedTestCaseAttribute (line 104) | public class DerivedTestCaseAttribute : TestCaseAttribute class DerivedTheoryAttribute (line 109) | public class DerivedTheoryAttribute : TheoryAttribute class DerivedClassAttribute (line 114) | [DerivedTestFixtureAttribute] class DerivedMethodAttribute1 (line 120) | [DerivedTestFixtureAttribute] method Foo (line 123) | [DerivedTestCaseAttribute] class DerivedMethodAttribute2 (line 127) | [DerivedTestFixtureAttribute] method Foo (line 130) | [DerivedTheoryAttribute] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestClassShouldHaveTestMethod.NUnit3.cs class CustomTestAttribute (line 9) | public class CustomTestAttribute : Attribute, ITestBuilder method BuildFrom (line 11) | public IEnumerable BuildFrom(IMethodInfo method, Test suit... class DerivedCustomTestAttribute (line 14) | public class DerivedCustomTestAttribute : CustomTestAttribute { } type IWrongInterface (line 16) | public interface IWrongInterface { } class FakeAttribute (line 18) | public class FakeAttribute : Attribute, IWrongInterface { } class Fixture (line 20) | [TestFixture] method Foo (line 23) | [CustomTest] class Fixture2 (line 27) | [TestFixture] method Bar (line 30) | [DerivedCustomTest] class Fixture3 (line 34) | [TestFixture] method Baz (line 38) | [FakeAttribute] class A (line 42) | [TestFixture] class Nested (line 45) | public class Nested : A method Test (line 47) | [Test] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestClassShouldHaveTestMethod.NUnit4.cs class ClassTest1 (line 7) | [TestFixture] class ClassTest11 (line 13) | [TestFixture] method DivideTest (line 16) | [TestCaseSource("DivideCases")] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.Custom.Common.cs class BaseTest (line 9) | [TestClass] method CustomAssertionMethod (line 12) | [AssertionMethod] method TestMethod1 (line 15) | [TestMethod] method TestMethod2 (line 22) | [TestMethod] method TestMethod3 (line 28) | [TestMethod] method TestMethod4 (line 34) | [TestMethod] method TestMethod5 (line 40) | [TestMethod] method TestMethod6 (line 47) | [TestMethod] method TestMethod7 (line 51) | [TestMethod] class DerivedTest (line 56) | [TestClass] method Derived (line 59) | [TestMethod] method CustomAssertionMethod (line 65) | protected override void CustomAssertionMethod() class Validator (line 75) | public class Validator method StaticWithAttribute (line 77) | [AssertionMethodAttribute] method StaticWrongAttribute (line 80) | [NotAssertionMethodAttribute] method StaticNoAttribute (line 83) | public static void StaticNoAttribute() { } method InstanceWithAttribute (line 85) | [AssertionMethod] method InstanceWithAttributeAndArg (line 88) | [AssertionMethod] class AttributedType (line 92) | [AssertionMethod] // Missused attribute method AttributeOnType (line 95) | public static void AttributeOnType() { } class AssertionMethodAttribute (line 101) | public class AssertionMethodAttribute : Attribute { } class NotAssertionMethodAttribute (line 102) | public class NotAssertionMethodAttribute : Attribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.Custom.V3.cs class BaseTest (line 8) | [TestClass] method TestMethod8 (line 11) | [TestMethod] class DerivedExpectedExceptionAttribute (line 22) | public class DerivedExpectedExceptionAttribute : ExpectedExceptionBaseAt... method Verify (line 22) | protected override void Verify(Exception exception) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.Latest.cs class TestSuite (line 5) | [TestClass] method Method (line 8) | public void Method() method Method (line 71) | public void Method() method Method (line 88) | public void Method() class WithPartialMethods (line 20) | [TestClass] method ThisHasNoAssert (line 23) | [TestMethod] method ThisInvokesSomethingWithAssert (line 26) | [TestMethod] method ThisHasNoAssert (line 32) | public partial void ThisHasNoAssert() // Noncompliant method DoNothing (line 37) | private void DoNothing() { } method ThisInvokesSomethingWithAssert (line 39) | public partial void ThisInvokesSomethingWithAssert() method DoTheWork (line 44) | private void DoTheWork() => class WithPartialMethods (line 30) | public partial class WithPartialMethods method ThisHasNoAssert (line 23) | [TestMethod] method ThisInvokesSomethingWithAssert (line 26) | [TestMethod] method ThisHasNoAssert (line 32) | public partial void ThisHasNoAssert() // Noncompliant method DoNothing (line 37) | private void DoNothing() { } method ThisInvokesSomethingWithAssert (line 39) | public partial void ThisInvokesSomethingWithAssert() method DoTheWork (line 44) | private void DoTheWork() => class DerivedTestSuite (line 48) | [TestClass] method TestMethod1 (line 51) | [DerivedTestMethodAttribute] class DerivedTestMethodAttribute (line 59) | public class DerivedTestMethodAttribute : TestMethodAttribute class TestSuite (line 68) | [TestFixture] method Method (line 8) | public void Method() method Method (line 71) | public void Method() method Method (line 88) | public void Method() class TestSuite (line 86) | class TestSuite method Method (line 8) | public void Method() method Method (line 71) | public void Method() method Method (line 88) | public void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.Moq.cs type ICalculator (line 7) | internal interface ICalculator method Add (line 11) | int Add(int a, int b); class MoqVerifyTests (line 14) | [TestClass] method MoqVerify (line 17) | [TestMethod] method MoqVerifyAdd (line 25) | [TestMethod] method MoqVerifyRemove (line 33) | [TestMethod] method MoqVerifySet (line 41) | [TestMethod] method MoqVerifyGet (line 49) | [TestMethod] method MoqVerifyNoOtherCalls (line 57) | [TestMethod] method MoqVerifyAll (line 65) | [TestMethod] method MoqNoVerify (line 73) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.MsTest.AnotherFile.cs class HelperFromAnotherSyntaxTree (line 5) | public class HelperFromAnotherSyntaxTree method DoNothing (line 7) | public static void DoNothing() { } method Is42Nested (line 9) | public static void Is42Nested(int i) => method Is42 (line 12) | public static void Is42(int i) => FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.MsTest.Common.cs class Program (line 13) | [TestClass] method TestMethod1 (line 16) | [TestMethod] method TestMethod2 (line 23) | [TestMethod] method TestMethod3 (line 30) | [TestMethod] method TestMethod5 (line 37) | [TestMethod] method TestMethod8 (line 44) | [TestMethod] method TestMethod9 (line 47) | [TestMethod] method TestMethod10 (line 53) | [TestMethod] method TestMethod11 (line 59) | [TestMethod] method TestMethod12 (line 65) | [TestMethod] method TestMethod13 (line 71) | [TestMethod] method TestMethod14 (line 77) | [TestMethod] method TestMethod15 (line 84) | [TestMethod] method TestMethod16 (line 91) | [TestMethod] method TestMethod17 (line 97) | [TestMethod] method TestMethod18 (line 104) | [TestMethod] method TestMethod18_UndefinedException (line 110) | [TestMethod] method TestMethod19 (line 116) | [TestMethod] method TestMethod20 (line 122) | [TestMethod] method TestMethod21 (line 136) | [TestMethod] method TestMethod22 (line 142) | [TestMethod] method ArrowMethod1 (line 148) | [TestMethod] method ArrowMethod2 (line 152) | [TestMethod] method DoNothing (line 155) | public void DoNothing() { } method AssertSomething (line 157) | public void AssertSomething() method ShouldSomething (line 162) | public void ShouldSomething() method ExpectSomething (line 167) | public void ExpectSomething() method MustSomething (line 172) | public void MustSomething() method VerifySomething (line 177) | public void VerifySomething() method ValidateSomething (line 182) | public void ValidateSomething() method DerivedTestMethod1 (line 187) | [DerivedTestMethod] method DerivedTestMethod2 (line 194) | [DerivedTestMethod] class Program_DataTestMethod (line 202) | [TestClass] method TestMethod1 (line 205) | [DataTestMethod] method TestMethod2 (line 212) | [DataTestMethod] method TestMethod3 (line 219) | [DataTestMethod] method TestMethod5 (line 226) | [DataTestMethod] method TestMethod8 (line 233) | [DataTestMethod] method TestMethod9 (line 239) | [DataTestMethod] method TestMethod10 (line 245) | [DataTestMethod] method TestMethod11 (line 251) | [DataTestMethod] method TestMethod12 (line 257) | [DataTestMethod] method TestMethod13 (line 263) | [DataTestMethod] method TestMethod14 (line 269) | [DataTestMethod] method TestMethod15 (line 276) | [DataTestMethod] method AssertSomething (line 282) | public void AssertSomething() method ShouldSomething (line 287) | public void ShouldSomething() method ExpectSomething (line 292) | public void ExpectSomething() method MustSomething (line 297) | public void MustSomething() method VerifySomething (line 302) | public void VerifySomething() method ValidateSomething (line 307) | public void ValidateSomething() class Class1 (line 313) | public class Class1 method Add (line 315) | public int Add(int a, int b) => a + b; class UnitTest1 (line 318) | [TestClass] method TestMethod1 (line 321) | [TestMethod] class NSubstituteAndShouldlyTests (line 332) | [TestClass] method Received (line 335) | [TestMethod] method Shouldly (line 338) | [TestMethod] class WithHelperMethods (line 346) | [TestClass] method TestMethod1 (line 349) | [TestMethod] method TestMethod2 (line 355) | [TestMethod] method Complex (line 359) | [TestMethod] method DoNothing (line 388) | private void DoNothing(StringBuilder sb) method Recursion (line 393) | [TestMethod] method Recursion (line 397) | private void Recursion(int cnt) method NestedTwoTimes (line 403) | [TestMethod] method NestedThreeTimes (line 407) | [TestMethod] method NestedThree (line 411) | private void NestedThree() => method NestedTwo (line 414) | private void NestedTwo() => method DoTheWork (line 417) | private void DoTheWork(string s, int i) => method TestMethod3 (line 420) | [TestMethod] method DoTheWorkByInvocationName (line 424) | private void DoTheWorkByInvocationName(string s, int i) => method TestMethod4 (line 427) | [TestMethod] method DoTheWorkWithThrow (line 431) | private void DoTheWorkWithThrow() method MixedSyntaxTrees (line 436) | [TestMethod] method MixedSyntaxTreesNested (line 440) | [TestMethod] method MixedSyntaxTreesMissingAssertion (line 444) | [TestMethod] method AssertionIsInConstructor (line 448) | [TestMethod] method AssertionIsInSetter (line 454) | [TestMethod] class BadDesign (line 461) | private class BadDesign method BadDesign (line 463) | public BadDesign() { } method BadDesign (line 465) | public BadDesign(string s, int i) => class DerivedTestMethodAttribute (line 475) | public class DerivedTestMethodAttribute : TestMethodAttribute FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.MsTest.Latest.cs class Program (line 15) | [TestClass] method DerivedTestMethod1 (line 18) | [DerivedTestMethod] class DerivedTestMethodAttribute (line 26) | [AttributeUsage(AttributeTargets.Method, Inherited = false)] method DerivedTestMethodAttribute (line 29) | public DerivedTestMethodAttribute([CallerFilePath] string callerFilePa... method ExecuteAsync (line 32) | public override Task ExecuteAsync(ITestMethod testMethod... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.MsTest.V3.cs class Program (line 13) | [TestClass] method TestMethod1 (line 16) | [TestMethod] method TestMethod2 (line 23) | [DataTestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.NUnit.FsCheck.cs class FsCheckTests (line 10) | public class FsCheckTests method NumberPlusNumberEqualsNumberTimesTwo (line 12) | [Property] method ModuloFiveReturnNaturalNumberBetweenMinus4AndPlus4 (line 18) | [Test] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.NUnit.cs class BaseClass (line 16) | class BaseClass method AssertSomething (line 18) | public void AssertSomething() method ShouldSomething (line 23) | public void ShouldSomething() method ExpectSomething (line 28) | public void ExpectSomething() method MustSomething (line 33) | public void MustSomething() method VerifySomething (line 38) | public void VerifySomething() method ValidateSomething (line 43) | public void ValidateSomething() class TestAttributeTests (line 49) | [TestFixture] method Test1 (line 52) | [Test] method Test2 (line 59) | [Test] method Test3 (line 66) | [Test] method Test5 (line 73) | [Test] method Test8 (line 80) | [Test] method Test9 (line 86) | [Test] method Test10 (line 92) | [Test] method Test11 (line 98) | [Test] method Test12 (line 104) | [Test] method Test13 (line 110) | [Test] method Test14 (line 116) | [Test] method Test15 (line 123) | [Test] method TestMethod16 (line 130) | [Test] method Test17 (line 136) | [Test] method TestViaExpectedResult (line 142) | [Test(ExpectedResult = 42)] class TestCaseAttributeTests (line 149) | [TestFixture] method TestCase1 (line 152) | [TestCase] method TestCase2 (line 159) | [TestCase] method TestCase3 (line 166) | [TestCase] method TestCase5 (line 173) | [TestCase] method TestCase8 (line 180) | [TestCase] method TestCase9 (line 186) | [TestCase] method TestCase10 (line 192) | [TestCase] method TestCase11 (line 198) | [TestCase] method TestCase12 (line 204) | [TestCase] method TestCase13 (line 210) | [TestCase] method TestCase14 (line 216) | [TestCase] method TestCase15 (line 223) | [TestCase] method TestCase16 (line 229) | [TestCase] method TestCase17 (line 236) | [TestCase("foo", ExpectedResult = "foo")] method TestCase18 (line 243) | [TestCase("foo", ExpectedResult = "foo")] method TestCase19 (line 250) | [TestCase("foo", ExpectedResult = "foo")] method TestCase20 (line 256) | [TestCase("foo", ExpectedResult = "foo")] method TestCase21 (line 262) | [TestCase] method TestCase22 (line 268) | [TestCase] class TestCaseSourceAttributeTests (line 275) | [TestFixture] method TestCaseSource1 (line 279) | [TestCaseSource("Foo")] method TestCaseSource2 (line 286) | [TestCaseSource("Foo")] method TestCaseSource3 (line 293) | [TestCaseSource("Foo")] method TestCaseSource5 (line 300) | [TestCaseSource("Foo")] method TestCaseSource8 (line 307) | [TestCaseSource("Foo")] method TestCaseSource9 (line 313) | [TestCaseSource("Foo")] method TestCaseSource10 (line 319) | [TestCaseSource("Foo")] method TestCaseSource11 (line 325) | [TestCaseSource("Foo")] method TestCaseSource12 (line 331) | [TestCaseSource("Foo")] method TestCaseSource13 (line 337) | [TestCaseSource("Foo")] method TestCaseSource14 (line 343) | [TestCaseSource("Foo")] method TestCaseSource15 (line 350) | [TestCaseSource("Foo")] method TestCaseSource16 (line 356) | [TestCaseSource("Foo")] method TestCaseSource17 (line 369) | [Test] method TestCaseSource18 (line 376) | [Test] class TheoryAttributeTests (line 384) | [TestFixture] method Theory1 (line 388) | [Theory] method Theory2 (line 395) | [Theory] method Theory3 (line 402) | [Theory] method Theory5 (line 409) | [Theory] method Theory8 (line 416) | [Theory] method Theory9 (line 422) | [Theory] method Theory10 (line 428) | [Theory] method Theory11 (line 434) | [Theory] method Theory12 (line 440) | [Theory] method Theory13 (line 446) | [Theory] method Theory14 (line 452) | [Theory] method Theory15 (line 459) | [Theory] class TypeExtensionsTests (line 466) | [TestFixture] method GetFriendlyFullName (line 469) | [TestCase(typeof(string), ExpectedResult = "System.String")] method NoNamedParameter (line 478) | [TestCase(typeof(string[]), "System.String[]")] class NSubstituteTests (line 485) | [TestFixture] method NSubstituteTests (line 490) | public NSubstituteTests() method NoAssert (line 495) | [TestCase] method Received (line 500) | [TestCase] method ReceivedExpression (line 506) | [TestCase] method ReceivedNameSpace (line 509) | [TestCase] method ReceivedWithAnyArgs (line 512) | [TestCase] method ReceivedWithQuantity (line 518) | [TestCase] method ReceivedExpressionWithQuantity (line 524) | [TestCase] method ReceivedNameSpaceWithQuantity (line 527) | [TestCase] method ReceivedWithAnyArgsWithQuantity (line 530) | [TestCase] method DidNotReceived (line 536) | [TestCase] method DidNotReceiveWithAnyArgs (line 542) | [TestCase] method ReceivedInOrder (line 548) | [TestCase] class ShouldlyTests (line 559) | public class ShouldlyTests method Foo (line 562) | public dynamic Foo() => null; method Bar (line 563) | public void Bar() { } method W (line 565) | [TestCase] method X (line 577) | [TestCase] method Y (line 580) | [TestCase] method Z (line 583) | [TestCase] method Dynamic (line 586) | [TestCase] method CompleteIn (line 593) | [TestCase] type ICalculator (line 600) | internal interface ICalculator method Add (line 602) | int Add(int a, int b); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.NUnit4.cs class TestAttributeTests (line 6) | [TestFixture] method Test1 (line 9) | [Test] method Test2 (line 16) | [Test] method Test3 (line 23) | [Test] method Test4 (line 30) | [Test] method Test5 (line 36) | [Test] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.SourceGenerators.cs class SourceGenerator (line 9) | [Generator] method Initialize (line 12) | public void Initialize(IncrementalGeneratorInitializationContext context) method Execute (line 19) | public static void Execute() { } class TestGeneratorUnitTest (line 22) | [TestClass] method Test (line 25) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.XUnit.FsCheck.cs class FsCheckTests (line 9) | public class FsCheckTests method NumberPlusNumberEqualsNumberTimesTwo (line 11) | [Property] method ModuloFiveReturnNaturalNumberBetweenMinus4AndPlus4 (line 17) | [Fact] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.Xunit.Legacy.cs class Program (line 9) | public class Program method Fact1 (line 11) | [Fact] method Fact2 (line 18) | [Fact] method Fact3 (line 25) | [Fact] method Fact5 (line 32) | [Fact] method Fact8 (line 39) | [Fact] method Fact9 (line 45) | [Fact] method Fact10 (line 51) | [Fact] method Fact11 (line 57) | [Fact] method Fact12 (line 63) | [Fact] method Fact13 (line 69) | [Fact] method Fact14 (line 75) | [Fact] method Fact15 (line 82) | [Fact(Skip = "reason")] method Fact16 (line 87) | [Fact] method Fact17 (line 93) | [Fact] method Theory1 (line 99) | [Theory] method Theory2 (line 107) | [Theory] method Theory3 (line 114) | [Theory] method Theory5 (line 121) | [Theory] method Theory8 (line 128) | [Theory] method Theory9 (line 135) | [Theory] method Theory10 (line 142) | [Theory] method Theory11 (line 149) | [Theory] method Theory12 (line 156) | [Theory] method Theory13 (line 163) | [Theory] method Theory14 (line 170) | [Theory] method Theory15 (line 178) | [Theory(Skip = "reason")] method AssertSomething (line 184) | public void AssertSomething(int arg1) method ShouldSomething (line 189) | public void ShouldSomething(int arg1) method ExpectSomething (line 194) | public void ExpectSomething(int arg1) method MustSomething (line 199) | public void MustSomething(int arg1) method VerifySomething (line 204) | public void VerifySomething(int arg1) method ValidateSomething (line 209) | public void ValidateSomething(int arg1) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.Xunit.cs class Program (line 12) | public class Program method Fact1 (line 14) | [Fact] method Fact2 (line 21) | [Fact] method Fact3 (line 28) | [Fact] method Fact5 (line 35) | [Fact] method Fact8 (line 42) | [Fact] method Fact9 (line 45) | [Fact] method Fact10 (line 51) | [Fact] method Fact11 (line 57) | [Fact] method Fact12 (line 63) | [Fact] method Fact13 (line 69) | [Fact] method Fact14 (line 75) | [Fact] method Fact15 (line 82) | [Fact] method Fact16 (line 89) | [Fact] method Fact17 (line 95) | [Fact(Skip = "reason")] method Fact18 (line 100) | [Fact] method Fact19 (line 106) | [Fact] method Theory1 (line 112) | [Theory] method Theory2 (line 120) | [Theory] method Theory3 (line 127) | [Theory] method Theory5 (line 134) | [Theory] method Theory8 (line 141) | [Theory] method Theory9 (line 148) | [Theory] method Theory10 (line 155) | [Theory] method Theory11 (line 162) | [Theory] method Theory12 (line 169) | [Theory] method Theory13 (line 176) | [Theory] method Theory14 (line 183) | [Theory] method Theory15 (line 191) | [Theory(Skip = "reason")] method AssertSomething (line 197) | public void AssertSomething(int arg1) method ShouldSomething (line 202) | public void ShouldSomething(int arg1) method ExpectSomething (line 207) | public void ExpectSomething(int arg1) method MustSomething (line 212) | public void MustSomething(int arg1) method VerifySomething (line 217) | public void VerifySomething(int arg1) method ValidateSomething (line 222) | public void ValidateSomething(int arg1) class NSubstituteAndShouldlyTests (line 232) | public class NSubstituteAndShouldlyTests method Received (line 234) | [Fact] method Shouldly (line 237) | [Fact] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldContainAssertion.XunitV3.cs class XUnitV3Tests (line 8) | public class XUnitV3Tests method Fact1 (line 12) | [Fact] method SkippedFact1 (line 19) | [Fact(Skip = "Reason")] method SkippedFact2 (line 25) | [Fact(SkipExceptions = new Type[] { typeof(NotSupportedException) })] method SkippedFact3 (line 31) | [Fact(SkipType = typeof(XUnitV3Tests))] method SkippedFact4 (line 38) | [Fact(SkipUnless = nameof(SkipIndicator))] method SkippedFact5 (line 44) | [Fact(SkipWhen = nameof(SkipIndicator))] method SkippedFact6 (line 50) | [Fact(Explicit = true)] method SkippedFact7 (line 56) | [Fact(Explicit = false)] method SkippedFact8 (line 62) | [Fact] method SkippedFact9 (line 68) | [Fact] method SkippedFact10 (line 74) | [Fact] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldHaveCorrectSignature.Latest.cs class TestSuite (line 5) | [TestClass] method Method (line 8) | public void Method() method Method (line 45) | public void Method() method Method (line 62) | public void Method() class DerivedTestSuite (line 18) | [DerivedTestClassAttribute] method Method (line 21) | public void Method() class DerivedTestClassAttribute (line 31) | public class DerivedTestClassAttribute : TestClassAttribute { } class DerivedTestMethodAttribute (line 33) | public class DerivedTestMethodAttribute: TestMethodAttribute { } class DerivedDataTestMethodAttribute (line 35) | public class DerivedDataTestMethodAttribute : DataTestMethodAttribute... class TestSuite (line 42) | [TestFixture] method Method (line 8) | public void Method() method Method (line 45) | public void Method() method Method (line 62) | public void Method() class TestSuite (line 60) | class TestSuite method Method (line 8) | public void Method() method Method (line 45) | public void Method() method Method (line 62) | public void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldHaveCorrectSignature.Misc.cs class TestThatIssuesAreOnlyReportedOnceForPartialClasses (line 6) | public partial class TestThatIssuesAreOnlyReportedOnceForPartialClasses method PrivateTestMethod (line 13) | [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod] class TestThatIssuesAreOnlyReportedOnceForPartialClasses (line 10) | [TestClass] method PrivateTestMethod (line 13) | [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod] class MultipleFaultsInEachMethod (line 20) | [TestClass] method PrivateVoidGenericTestMethod (line 23) | [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod] method PrivateVoidTestMethod (line 29) | [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod] method VoidGenericTestMethod (line 35) | [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod] method PrivateGenericTestMethod (line 41) | [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod] class NonTestAttributesAreIgnored (line 48) | [TestClass] method PrivateTestMethod (line 51) | [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod] class InvalidAttributes (line 59) | [TestClass] method AMethod (line 62) | [UnknownAttribute] // Shouldn't fail // Error [CS0246, CS0246] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldHaveCorrectSignature.MsTest.Legacy.cs class MsTestTest (line 6) | [TestClass] method PrivateTestMethod (line 9) | [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod] method ProtectedTestMethod (line 15) | [TestMethod] method InternalTestMethod (line 20) | [TestMethod] method AsyncTestMethod (line 25) | [TestMethod] method GenericTestMethod (line 30) | [TestMethod] method MultiErrorsMethod1 (line 35) | [TestMethod] method MultiErrorsMethod2 (line 40) | [TestMethod] method DoSomethingAsync (line 45) | [TestMethod] class MsTestTest_DataTestMethods (line 58) | [TestClass] method PrivateTestMethod (line 61) | [Microsoft.VisualStudio.TestTools.UnitTesting.DataTestMethod] method ProtectedTestMethod (line 67) | [DataTestMethod] method InternalTestMethod (line 72) | [DataTestMethod] method AsyncTestMethod (line 77) | [DataTestMethod] method GenericTestMethod (line 82) | [DataTestMethod] method MultiErrorsMethod1 (line 87) | [DataTestMethod] method MultiErrorsMethod2 (line 92) | [DataTestMethod] method DoSomethingAsync (line 97) | [DataTestMethod] class TestSuite (line 109) | [DerivedTestClassAttribute] method NestedTest (line 112) | [DerivedTestMethodAttribute] method NestedDataTest (line 115) | [DerivedDataTestMethodAttribute] class DerivedTestClassAttribute (line 119) | public class DerivedTestClassAttribute : TestClassAttribute { } class DerivedTestMethodAttribute (line 121) | public class DerivedTestMethodAttribute : TestMethodAttribute { } class DerivedDataTestMethodAttribute (line 123) | public class DerivedDataTestMethodAttribute : DataTestMethodAttribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldHaveCorrectSignature.MsTest.cs class MsTestTest (line 6) | [TestClass] method PrivateTestMethod (line 9) | [Microsoft.VisualStudio.TestTools.UnitTesting.TestMethod] method ProtectedTestMethod (line 15) | [TestMethod] method InternalTestMethod (line 20) | [TestMethod] method AsyncTestMethod (line 25) | [TestMethod] method GenericTestMethod (line 30) | [TestMethod] method MultiErrorsMethod1 (line 35) | [TestMethod] method MultiErrorsMethod2 (line 40) | [TestMethod] method DoSomethingAsync (line 45) | [TestMethod] class MsTestTest_DataTestMethods (line 58) | [TestClass] method PrivateTestMethod (line 61) | [Microsoft.VisualStudio.TestTools.UnitTesting.DataTestMethod] method ProtectedTestMethod (line 67) | [DataTestMethod] method InternalTestMethod (line 72) | [DataTestMethod] method AsyncTestMethod (line 77) | [DataTestMethod] method GenericTestMethod (line 82) | [DataTestMethod] method MultiErrorsMethod1 (line 87) | [DataTestMethod] method MultiErrorsMethod2 (line 92) | [DataTestMethod] method DoSomethingAsync (line 97) | [DataTestMethod] class TestSuite (line 109) | [DerivedTestClassAttribute] method NestedTest (line 112) | [DerivedTestMethodAttribute] method NestedDataTest (line 115) | [DerivedDataTestMethodAttribute] class DerivedTestClassAttribute (line 119) | public class DerivedTestClassAttribute : TestClassAttribute { } class DerivedTestMethodAttribute (line 121) | public class DerivedTestMethodAttribute : TestMethodAttribute { } class DerivedDataTestMethodAttribute (line 123) | public class DerivedDataTestMethodAttribute : DataTestMethodAttribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldHaveCorrectSignature.NUnit.cs class NUnitTest (line 5) | class NUnitTest method PrivateTestMethod (line 7) | [NUnit.Framework.Test] method ProtectedTestMethod (line 12) | [Test] method InternalTestMethod (line 17) | [Test] method AsyncTestMethod (line 22) | [Test] method GenericTestMethod (line 27) | [Test] method ValidTest (line 32) | [Test] class NUnitTest_TestCase (line 38) | class NUnitTest_TestCase method PrivateTestMethod (line 40) | [NUnit.Framework.TestCase(42)] method ProtectedTestMethod (line 45) | [TestCase(42)] method InternalTestMethod (line 50) | [TestCase(42)] method AsyncTestMethod (line 55) | [TestCase(42)] method GenericTestMethod (line 60) | [TestCase(42)] method ValidTest (line 65) | [TestCase(42)] class NUnitTest_TestCaseSource (line 71) | class NUnitTest_TestCaseSource method PrivateTestMethod (line 75) | [NUnit.Framework.TestCaseSource("DataProvider")] method ProtectedTestMethod (line 80) | [TestCaseSource("DataProvider")] method InternalTestMethod (line 85) | [TestCaseSource("DataProvider")] method AsyncTestMethod (line 90) | [TestCaseSource("DataProvider")] method GenericTestMethod (line 95) | [TestCaseSource("DataProvider")] method ValidTest (line 100) | [TestCaseSource("DataProvider")] class NUnitTest_Theories (line 107) | public class NUnitTest_Theories method PrivateTestMethod (line 109) | [NUnit.Framework.Theory] method ProtectedTestMethod (line 114) | [Theory] method InternalTestMethod (line 119) | [Theory] method AsyncTestMethod (line 124) | [Theory] method GenericTestMethod (line 129) | [Theory] method ValidTest (line 134) | [Theory] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldHaveCorrectSignature.Xunit.Legacy.cs class XUnitTest (line 7) | public class XUnitTest method PrivateTestMethod (line 10) | [Xunit.Fact] method ProtectedTestMethod (line 15) | [Fact] method InternalTestMethod (line 20) | [Fact] method AsyncTestMethod (line 25) | [Fact] method GenericTestMethod (line 30) | [Fact] method PrivateTestMethod_Theory (line 36) | [Xunit.Extensions.Theory] method ProtectedTestMethod_Theory (line 42) | [Theory] method InternalTestMethod_Theory (line 48) | [Theory] method AsyncTestMethod_Theory (line 54) | [Theory] method GenericTestMethod_Theory (line 60) | [Theory] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldHaveCorrectSignature.Xunit.cs class XUnitTest (line 6) | public class XUnitTest method PrivateTestMethod (line 9) | [Xunit.Fact] method ProtectedTestMethod (line 14) | [Fact] method InternalTestMethod (line 19) | [Fact] method AsyncTestMethod (line 24) | [Fact] method GenericTestMethod (line 29) | [Fact] method PrivateTestMethod_Theory (line 35) | [Xunit.Theory] method ProtectedTestMethod_Theory (line 41) | [Theory] method InternalTestMethod_Theory (line 47) | [Theory] method AsyncTestMethod_Theory (line 53) | [Theory] method GenericTestMethod_Theory (line 59) | [Theory] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldNotBeIgnored.Latest.cs class TestSuite (line 5) | [TestClass] method Method (line 8) | public void Method() method Method (line 51) | public void Method() method Method (line 68) | public void Method() class TestSuiteDerived (line 19) | [DerivedTestClassAttribute] method Foo1 (line 22) | [DerivedTestMethodAttribute] method Foo2 (line 29) | [DerivedDataTestMethodAttribute] class DerivedTestClassAttribute (line 37) | public class DerivedTestClassAttribute : TestClassAttribute { } class DerivedTestMethodAttribute (line 39) | public class DerivedTestMethodAttribute : TestMethodAttribute { } class DerivedDataTestMethodAttribute (line 41) | public class DerivedDataTestMethodAttribute : DataTestMethodAttribute... class TestSuite (line 48) | [TestFixture] method Method (line 8) | public void Method() method Method (line 51) | public void Method() method Method (line 68) | public void Method() class TestSuite (line 66) | class TestSuite method Method (line 8) | public void Method() method Method (line 51) | public void Method() method Method (line 68) | public void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldNotBeIgnored.MsTest.cs class MsTestClass_TestMethods (line 5) | [TestClass] method Foo1 (line 8) | [TestMethod] method Foo2 (line 15) | [TestMethod] method Foo3 (line 21) | [Ignore, TestMethod] // This test is ignored because 'blah blah' method Foo4 (line 26) | [TestMethod] method Foo5 (line 32) | [TestMethod] class MsTestClass_DataTestMethods (line 40) | [TestClass] method Foo1 (line 43) | [DataTestMethod] method Foo2 (line 50) | [DataTestMethod] method Foo3 (line 56) | [Ignore, DataTestMethod] // This test is ignored because 'blah blah' method Foo4 (line 61) | [DataTestMethod] method Foo5 (line 67) | [DataTestMethod] class MsTestClass1 (line 75) | [Ignore, TestClass] method Test1 (line 79) | [TestMethod] class MsTestClass2 (line 85) | [Ignore] class MsTestClass3 (line 90) | [Ignore, TestClass] // This test is ignored because 'blah blah' class MsTestClass4 (line 95) | [Ignore("Ignored because reasons"), TestClass] class TestSuite (line 105) | [DerivedTestClassAttribute] method Foo1 (line 108) | [DerivedTestMethodAttribute] method Foo2 (line 115) | [DerivedDataTestMethodAttribute] class DerivedTestClassAttribute (line 123) | public class DerivedTestClassAttribute : TestClassAttribute { } class DerivedTestMethodAttribute (line 125) | public class DerivedTestMethodAttribute : TestMethodAttribute { } class DerivedDataTestMethodAttribute (line 127) | public class DerivedDataTestMethodAttribute : DataTestMethodAttribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldNotBeIgnored.NUnit.V2.cs class NUnitClass (line 7) | [TestFixture] method Foo1 (line 12) | [Test] method Foo2 (line 19) | [Test] method Foo3 (line 25) | [Test] method Foo4 (line 32) | [TestCase("")] method Foo5 (line 39) | [TestCase("")] method Foo6 (line 45) | [TestCase("")] method Foo7 (line 52) | [TestCase("")] method Foo8 (line 59) | [TestCase("")] method DivideTest (line 65) | [TestCaseSource("DivideCases")] method Theory1 (line 81) | [Theory] method Theory2 (line 88) | [Theory] method Theory3 (line 94) | [Theory] class IgnoredClass1 (line 101) | [TestFixture, Ignore] method TestInIgnoredClass (line 104) | [Test] class IgnoredClass2 (line 110) | [Ignore] class IgnoredClass3 (line 115) | [Ignore, TestFixture] // This test is ignored because 'blah blah' class IgnoredClass4 (line 120) | [Ignore("Ignored because reasons"), TestFixture] class DerivedIgnoreAttribute (line 125) | public class DerivedIgnoreAttribute : NUnit.Framework.IgnoreAttribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldNotBeIgnored.NUnit.cs class NUnitClass (line 7) | [TestFixture] method Foo1 (line 12) | [Test] method Theory3 (line 27) | [Theory] class IgnoredClass4 (line 34) | [Ignore("Ignored because reasons"), TestFixture] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldNotBeIgnored.Xunit.cs class XUnitClass (line 10) | [MSTest.Ignore()] method Foo1 (line 13) | [Fact] method Foo2 (line 19) | [Theory] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestMethodShouldNotBeIgnored.Xunit.v1.cs class XUnitClass (line 13) | [MSTest.Ignore()] method Foo1 (line 16) | [Fact] method Foo2 (line 22) | [Theory] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TestsShouldNotUseThreadSleep.cs class Compliant (line 9) | class Compliant method TestWithoutThreadSleep (line 11) | [Test] method CallToOtherSleepMethod (line 17) | [Test] method ThreadSleepNotInTest (line 23) | void ThreadSleepNotInTest() method Sleep (line 37) | private void Sleep(int durartion) { } class NonCompliant (line 40) | class NonCompliant method ThreadSleepInNUnitTest (line 42) | [Test] method ThreadSleepInXUnitTest (line 49) | [Fact] method ThreadSleepInMSTest (line 55) | [TestMethod] method ThreadSleepViaAlias (line 61) | [Test] method ThreadSleepViaStaticImport (line 67) | [Test] method ThreadSleepInLocalFunction (line 73) | [Test] method ThreadSleepInLambdaFunction (line 84) | [Test] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ThisShouldNotBeExposedFromConstructors.CSharp10.cs type AStruct (line 3) | struct AStruct method AStruct (line 7) | public AStruct() class OtherClass (line 16) | static class OtherClass method StaticMethod (line 20) | public static void StaticMethod(AStruct r) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ThisShouldNotBeExposedFromConstructors.CSharp9.cs type Record (line 3) | record Record class OtherClass (line 20) | static class OtherClass method StaticMethod (line 24) | public static void StaticMethod(Record r) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ThisShouldNotBeExposedFromConstructors.cs class Program (line 7) | class Program method Program (line 9) | public Program() method Method (line 35) | public void Method() method StaticMethod (line 48) | public static void StaticMethod(Program program) { } method InstanceMethod (line 54) | public void InstanceMethod(Program program) { } class Other (line 62) | static class Other method StaticMethod (line 66) | public static void StaticMethod(Program program) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ThreadResumeOrSuspendShouldNotBeCalled.cs class Program (line 5) | class Program method Foo (line 7) | void Foo() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ThreadStaticNonStaticField.Fixed.cs class XAttribute (line 5) | class XAttribute : Attribute { } class ThreadStaticNonStaticField (line 6) | public class ThreadStaticNonStaticField class ThreadStaticNonStaticFieldDerivedAttribute (line 22) | public class ThreadStaticNonStaticFieldDerivedAttribute class DerivedThreadStaticAttribute (line 28) | public class DerivedThreadStaticAttribute : ThreadStaticAttribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ThreadStaticNonStaticField.Latest.Fixed.cs class XAttribute (line 5) | class XAttribute : Attribute { } type Record (line 7) | record Record type StructRecord (line 20) | record struct StructRecord class ThreadStaticNonStaticField (line 34) | public class ThreadStaticNonStaticField class ThreadStaticAttribute (line 41) | public class ThreadStaticAttribute : ThreadStaticAttribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ThreadStaticNonStaticField.Latest.cs class XAttribute (line 5) | class XAttribute : Attribute { } type Record (line 7) | record Record type StructRecord (line 22) | record struct StructRecord class ThreadStaticNonStaticField (line 39) | public class ThreadStaticNonStaticField class ThreadStaticAttribute (line 48) | public class ThreadStaticAttribute : ThreadStaticAttribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ThreadStaticNonStaticField.cs class XAttribute (line 5) | class XAttribute : Attribute { } class ThreadStaticNonStaticField (line 6) | public class ThreadStaticNonStaticField class ThreadStaticNonStaticFieldDerivedAttribute (line 30) | public class ThreadStaticNonStaticFieldDerivedAttribute class DerivedThreadStaticAttribute (line 36) | public class DerivedThreadStaticAttribute : ThreadStaticAttribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ThreadStaticWithInitializer.Latest.cs type Foo (line 6) | record Foo class ThreadStaticWithInitializer (line 19) | public class ThreadStaticWithInitializer class Foo (line 21) | public class Foo class ThreadStaticAttribute (line 30) | public class ThreadStaticAttribute : ThreadStaticAttribute { } class Foo (line 38) | public class Foo class ThreadStaticWithInitializer (line 36) | public class ThreadStaticWithInitializer class Foo (line 21) | public class Foo class ThreadStaticAttribute (line 30) | public class ThreadStaticAttribute : ThreadStaticAttribute { } class Foo (line 38) | public class Foo class Partial (line 51) | public partial class Partial class Partial (line 66) | public partial class Partial FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ThreadStaticWithInitializer.cs class ThreadStaticWithInitializer (line 5) | public class ThreadStaticWithInitializer class Foo (line 7) | public class Foo class ThreadStaticWithInitializerDerivedAttribute (line 26) | public class ThreadStaticWithInitializerDerivedAttribute class Foo (line 28) | public class Foo class DerivedAttribute (line 34) | public class DerivedAttribute : ThreadStaticAttribute { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ThrowReservedExceptions.Latest.cs class Sample (line 3) | public class Sample method NullCoalesce (line 5) | public void NullCoalesce(object arg) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ThrowReservedExceptions.cs class ThrowReservedExceptions (line 3) | public class ThrowReservedExceptions method Method1 (line 5) | public void Method1() method Arrow (line 44) | public void Arrow() => method Lambda (line 47) | public Action Lambda() => FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ToStringShouldNotReturnNull.Latest.cs class Condition (line 3) | public static class Condition method When (line 5) | public static bool When() class LocalFunctionReturnsNull (line 11) | class LocalFunctionReturnsNull method ToString (line 13) | public override string ToString() class LambdaReturnsNull (line 24) | class LambdaReturnsNull method ToString (line 26) | public override string ToString() method Simple (line 34) | string Simple(Func exp) => exp(null); type RecordReturnsStringEmpty (line 37) | record RecordReturnsStringEmpty type RecordReturnsNull (line 47) | record RecordReturnsNull type SomeInterface (line 57) | public interface SomeInterface method ToString (line 59) | static virtual string ToString() type SomeOtherInterface (line 65) | public interface SomeOtherInterface method ToString (line 67) | static abstract string ToString(); class SomeClass (line 70) | public class SomeClass : SomeOtherInterface method ToString (line 72) | public static string ToString() class Extensions (line 78) | static class Extensions method extension (line 80) | extension(SomeClass s) class StaticExtensions (line 86) | static class StaticExtensions method extension (line 88) | extension(SomeClass) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ToStringShouldNotReturnNull.cs class Condition (line 1) | public static class Condition method When (line 3) | public static bool When() class OtherMethodReturnsNullString (line 11) | class OtherMethodReturnsNullString method Returns (line 13) | string Returns() class ReturnsSomeString (line 19) | class ReturnsSomeString method ToString (line 21) | public override string ToString() class ReturnsEmptyString (line 31) | class ReturnsEmptyString method ToString (line 33) | public override string ToString() class ReturnsStringEmpty (line 43) | class ReturnsStringEmpty method ToString (line 45) | public override string ToString() type ReturnsStringEmptyStruct (line 55) | struct ReturnsStringEmptyStruct method ToString (line 57) | public override string ToString() class ToString (line 64) | class ToString method SomeMethod (line 66) | public string SomeMethod() class Noncompliant (line 73) | class Noncompliant class ReturnsNull (line 75) | public class ReturnsNull method ToString (line 77) | public override string ToString() class ReturnsNullConditionaly (line 88) | public class ReturnsNullConditionaly method ToString (line 90) | public override string ToString() class ReturnsNullViaExpressionBody (line 100) | public class ReturnsNullViaExpressionBody method ToString (line 102) | public override string ToString() => null; class ReturnsNullViaTernaryExpressionBody (line 105) | public class ReturnsNullViaTernaryExpressionBody method ToString (line 107) | public override string ToString() => Condition.When() ? null : strin... class ReturnsNullViaTernary (line 110) | public class ReturnsNullViaTernary method ToString (line 112) | public override string ToString() class ReturnsNullViaNestedTenary (line 118) | public class ReturnsNullViaNestedTenary method ToString (line 120) | public override string ToString() => // Noncompliant type StructReturnsNull (line 126) | struct StructReturnsNull method ToString (line 128) | public override string ToString() class SomeClass (line 135) | public class SomeClass method ToString (line 137) | public static string ToString() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TooManyGenericParameters.CustomValues.cs class Bar (line 6) | class Bar method Foo (line 8) | public void Foo() method Foo (line 12) | public void Foo() method Foo (line 16) | public void Foo() method Foo (line 20) | public void Foo() method Foo (line 24) | public void Foo() method Foo (line 28) | public void Foo() // Noncompliant {{Reduce the num... class Bar (line 34) | class Bar method Foo (line 8) | public void Foo() method Foo (line 12) | public void Foo() method Foo (line 16) | public void Foo() method Foo (line 20) | public void Foo() method Foo (line 24) | public void Foo() method Foo (line 28) | public void Foo() // Noncompliant {{Reduce the num... class Bar (line 38) | class Bar method Foo (line 8) | public void Foo() method Foo (line 12) | public void Foo() method Foo (line 16) | public void Foo() method Foo (line 20) | public void Foo() method Foo (line 24) | public void Foo() method Foo (line 28) | public void Foo() // Noncompliant {{Reduce the num... class Bar (line 42) | class Bar method Foo (line 8) | public void Foo() method Foo (line 12) | public void Foo() method Foo (line 16) | public void Foo() method Foo (line 20) | public void Foo() method Foo (line 24) | public void Foo() method Foo (line 28) | public void Foo() // Noncompliant {{Reduce the num... class Bar (line 46) | class Bar method Foo (line 8) | public void Foo() method Foo (line 12) | public void Foo() method Foo (line 16) | public void Foo() method Foo (line 20) | public void Foo() method Foo (line 24) | public void Foo() method Foo (line 28) | public void Foo() // Noncompliant {{Reduce the num... class Bar (line 50) | class Bar // Noncompliant {{Reduce the number of gen... method Foo (line 8) | public void Foo() method Foo (line 12) | public void Foo() method Foo (line 16) | public void Foo() method Foo (line 20) | public void Foo() method Foo (line 24) | public void Foo() method Foo (line 28) | public void Foo() // Noncompliant {{Reduce the num... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TooManyGenericParameters.DefaultValues.cs class Bar (line 6) | class Bar method Foo (line 8) | public void Foo() method Foo (line 12) | public void Foo() method Foo (line 16) | public void Foo() method Foo (line 20) | public void Foo() method Foo (line 24) | public void Foo() // Noncompliant {{Reduce the number... method Foo (line 29) | public void Foo() // Noncompliant class Bar (line 35) | class Bar method Foo (line 8) | public void Foo() method Foo (line 12) | public void Foo() method Foo (line 16) | public void Foo() method Foo (line 20) | public void Foo() method Foo (line 24) | public void Foo() // Noncompliant {{Reduce the number... method Foo (line 29) | public void Foo() // Noncompliant class Bar (line 39) | class Bar method Foo (line 8) | public void Foo() method Foo (line 12) | public void Foo() method Foo (line 16) | public void Foo() method Foo (line 20) | public void Foo() method Foo (line 24) | public void Foo() // Noncompliant {{Reduce the number... method Foo (line 29) | public void Foo() // Noncompliant class Bar (line 43) | class Bar // Noncompliant {{Reduce the number of generic par... method Foo (line 8) | public void Foo() method Foo (line 12) | public void Foo() method Foo (line 16) | public void Foo() method Foo (line 20) | public void Foo() method Foo (line 24) | public void Foo() // Noncompliant {{Reduce the number... method Foo (line 29) | public void Foo() // Noncompliant class Bar (line 48) | class Bar // Noncompliant method Foo (line 8) | public void Foo() method Foo (line 12) | public void Foo() method Foo (line 16) | public void Foo() method Foo (line 20) | public void Foo() method Foo (line 24) | public void Foo() // Noncompliant {{Reduce the number... method Foo (line 29) | public void Foo() // Noncompliant class Bar (line 53) | class Bar // Noncompliant method Foo (line 8) | public void Foo() method Foo (line 12) | public void Foo() method Foo (line 16) | public void Foo() method Foo (line 20) | public void Foo() method Foo (line 24) | public void Foo() // Noncompliant {{Reduce the number... method Foo (line 29) | public void Foo() // Noncompliant type Str (line 58) | struct Str // Noncompliant {{Reduce the number of generic pa... method Foo (line 61) | public void Foo() { } method Foo (line 63) | public void Foo() { } type IFoo (line 66) | interface IFoo // Noncompliant {{Reduce the number of generi... method Foo (line 69) | void Foo(); method Foo (line 71) | void Foo(); class FrameworkBaseClass (line 78) | public abstract class FrameworkBaseClass // Noncompliant method Method (line 80) | void Method() class Impl (line 91) | public class Impl : FrameworkBaseClass FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TooManyGenericParameters.Latest.cs type Record (line 3) | record Record type PositionalRecord (line 10) | record PositionalRecord(int SomeProperty) type Record (line 17) | record Record { } type Record (line 18) | record Record { } type PositionalRecord (line 20) | record PositionalRecord(int SomeProperty) { } type PositionalRecord (line 21) | record PositionalRecord(int SomeProperty) { } type RecordStruct (line 23) | record struct RecordStruct type PositionalRecordStruct (line 30) | record struct PositionalRecordStruct(int SomeProperty) type RecordStruct (line 36) | record struct RecordStruct { } type RecordStruct (line 37) | record struct RecordStruct { } type PositionalRecordStruct (line 40) | record struct PositionalRecordStruct(int SomeProperty) { } type PositionalRecordStruct (line 41) | record struct PositionalRecordStruct(int SomeProperty) { } class SomeAttribute (line 43) | class SomeAttribute : Attribute // Noncompliant class Bar (line 47) | class Bar(string classParam) // Noncompliant method Method (line 49) | void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TooManyLabelsInSwitch.Latest.cs class TaskWhenEach (line 4) | class TaskWhenEach method Method (line 6) | async Task Method(int n) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TooManyLabelsInSwitch.cs class TooManyLabelsInSwitch (line 5) | public class TooManyLabelsInSwitch type MyEnum (line 7) | public enum MyEnum method TooManyLabelsInSwitch (line 15) | public TooManyLabelsInSwitch(int n, MyEnum en) method SwitchCase (line 149) | public int SwitchCase(char ch, int value) method SwitchCaseWithCodeBlock (line 176) | public int SwitchCaseWithCodeBlock(char ch, int value) method SwitchCaseFallThrough (line 198) | public int SwitchCaseFallThrough(char ch, int value) method FalseNegatives (line 214) | public int FalseNegatives(int a) method TransparentLoops (line 236) | public void TransparentLoops(int n) method Test (line 261) | public int Test(string type) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TooManyLoggingCalls.Castle.Core.Logging.cs class Program (line 4) | public class Program method Log_Debug (line 6) | public void Log_Debug(ILogger logger) method Log_Trace (line 23) | public void Log_Trace(ILogger logger) method Log_Error (line 40) | public void Log_Error(ILogger logger) method Log_Information (line 53) | public void Log_Information(ILogger logger) method Log_Warning (line 66) | public void Log_Warning(ILogger logger) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TooManyLoggingCalls.Log4Net.cs class Program (line 4) | public class Program method Log_Debug (line 6) | public void Log_Debug(ILog logger) method Log_Error (line 23) | public void Log_Error(ILog logger) method Log_Information (line 36) | public void Log_Information(ILog logger) method Log_Warning (line 49) | public void Log_Warning(ILog logger) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TooManyLoggingCalls.Microsoft.Extensions.Logging.cs class Program (line 4) | public class Program method Log_Debug (line 6) | public void Log_Debug(ILogger logger) method Log_Error (line 26) | public void Log_Error(ILogger logger) method Log_Information (line 41) | public void Log_Information(ILogger logger) method Log_Warning (line 55) | public void Log_Warning(ILogger logger) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TooManyLoggingCalls.NLog.cs class Program (line 4) | public class Program method Log_Debug (line 6) | public void Log_Debug(ILogger logger) method Log_Error (line 30) | public void Log_Error(ILogger logger) method Log_Information (line 43) | public void Log_Information(ILogger logger) method Log_Warning (line 57) | public void Log_Warning(ILogger logger) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TooManyLoggingCalls.Serilog.cs class Program (line 6) | public class Program method Log_Debug (line 8) | public void Log_Debug() method Log_Error (line 26) | public void Log_Error() method Log_Information (line 41) | public void Log_Information() method Log_Warning (line 55) | public void Log_Warning() method Log_ILogger (line 68) | public void Log_ILogger(ILogger logger) method Log_UsingStatic (line 76) | public void Log_UsingStatic(ILogger logger) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TooManyLoggingCalls.cs class Program (line 5) | public class Program method Noncompliant_Basic (line 9) | public void Noncompliant_Basic() method Compliant_Basic (line 20) | public void Compliant_Basic() method DifferentMethods_InSameLoggingCategory (line 35) | public void DifferentMethods_InSameLoggingCategory() method MethodsInSameBlock_SeparatedByOtherBlocks_AreCountedTogether (line 47) | public void MethodsInSameBlock_SeparatedByOtherBlocks_AreCountedTogeth... method MethodsInDifferntBlocks_AreNotCountedTogether (line 66) | public void MethodsInDifferntBlocks_AreNotCountedTogether() method NestedBlocks (line 86) | public void NestedBlocks() method MethodOverloads (line 109) | public void MethodOverloads(int arg1, int arg2) method LogMethod_WithLogLevelParameter (line 121) | public void LogMethod_WithLogLevelParameter() method LocalMethodsAndLambdas (line 139) | public void LocalMethodsAndLambdas() method IfStatements (line 174) | public void IfStatements(int arg) method SwitchStatements (line 201) | public void SwitchStatements(int arg) method UsingAliasedLogger (line 224) | public void UsingAliasedLogger(AliasedLogger aliasedLogger) method LoggerExtensionMethods (line 230) | public void LoggerExtensionMethods() type ILogger (line 268) | public interface ILogger { } class FakeLoggerExtensions (line 269) | public static class FakeLoggerExtensions method LogError (line 271) | public static void LogError(this ILogger logger, string message) { } class Test (line 274) | public class Test method FakeLoggerMethods (line 276) | public void FakeLoggerMethods(ILogger logger) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TooManyParameters_CustomValues.Latest.cs type R (line 4) | public record R(int a, int b, int c, int d, int e); type BaseRecord (line 6) | public record BaseRecord type Extend (line 13) | public record Extend : BaseRecord class TooManyParameters (line 25) | public class TooManyParameters : If method F1 (line 27) | public static void F1(int p1, int p2, int p3) { } method F2 (line 29) | public static void F2(int p1, int p2, int p3, int p4) { } method F1 (line 31) | public static void F1(int p1, int p2, int p3, int p4) { } type If (line 34) | public interface If method F1 (line 36) | static abstract void F1(int p1, int p2, int p3); method F2 (line 37) | static abstract void F2(int p1, int p2, int p3, int p4); class LibraryImportAttributeImports (line 40) | public unsafe partial class LibraryImportAttributeImports method ExternWithoutMarshaling (line 42) | [LibraryImport("foo.dll")] method ExternWithoutMarshaling (line 47) | [System.Runtime.InteropServices.DllImportAttribute("foo.dll", EntryPoi... method ExternWithMarshaling (line 50) | [LibraryImport("nativelib", EntryPoint = "ExternWithMarshaling", Strin... method ExternWithMarshaling (line 55) | [System.Runtime.CompilerServices.SkipLocalsInitAttribute] class ZeroOverheadMemberAccess (line 89) | class ZeroOverheadMemberAccess method CallConstructor (line 91) | [UnsafeAccessor(UnsafeAccessorKind.Constructor)] method CallMethod (line 94) | [UnsafeAccessorAttribute(UnsafeAccessorKind.Method, Name = "Method")] method CallStaticMethod (line 97) | [UnsafeAccessor(UnsafeAccessorKind.StaticMethod, Name = "StaticMethod")] class UserData (line 101) | class UserData method UserData (line 103) | UserData(int x1, int x2, int x3, int x4) { } method Method (line 105) | void Method(int x1, int x2, int x3) { } method StaticMethod (line 106) | static void StaticMethod(int x1, int x2, int x3) { } class MyWrongClass (line 110) | public class MyWrongClass(int p1, int p2, int p3, int p4) { } class SubClass (line 112) | public class SubClass(int p1, int p2, int p3, int p4) : MyWrongClass(p1,... class SubClass2 (line 114) | public class SubClass2() : MyWrongClass(1, 2, 3, 4) // Compliant method SubClass2 (line 116) | public SubClass2(int p1, int p2, int p3, int p4, int p5) : this() { } method Method (line 118) | void Method() type MyWrongStruct (line 124) | public struct MyWrongStruct(int p1, int p2, int p3, int p4) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TooManyParameters_CustomValues.cs class TooManyParameters (line 7) | public class TooManyParameters : If method TooManyParameters (line 21) | public TooManyParameters(int p1, int p2, int p3) { } method TooManyParameters (line 22) | public TooManyParameters(int p1, int p2, int p3, int p4) { } method F1 (line 25) | public void F1(int p1, int p2, int p3) { } method F2 (line 27) | public void F2(int p1, int p2, int p3, int p4) { } method F1 (line 29) | public void F1(int p1, int p2, int p3, int p4) { } method F (line 31) | public void F() method Extern (line 47) | [DllImport("foo.dll")] method ExternNoAttribute (line 50) | public static extern void ExternNoAttribute(int p1, int p2, int p3, in... method ExternNoStatic (line 52) | [MethodImpl(MethodImplOptions.InternalCall)] type If (line 56) | public interface If method F1 (line 58) | void F1(int p1, int p2, int p3); method F2 (line 59) | void F2(int p1, int p2, int p3, int p4); class MyWrongClass (line 62) | public class MyWrongClass method MyWrongClass (line 64) | public MyWrongClass(string a, string b, string c, string d, string e, ... method Method (line 69) | public virtual void Method(int a, int b, int c, int d) // Noncompliant class SubClass (line 74) | public class SubClass : MyWrongClass method SubClass (line 78) | public SubClass(string a, string b, string c, string d, string e, stri... method SubClass (line 83) | public SubClass() method Method (line 87) | public override void Method(int a, int b, int c, int d) // Compliant, ... class SubClass2 (line 92) | public class SubClass2 : TooManyParameters method SubClass2 (line 94) | public SubClass2(int p1, int p2, int p3, string s1, string s2, string ... method SubClass2 (line 97) | public SubClass2(int p1, int p2, int p3, string s1, string s2, string ... class TooManyParametersLocalFunctions (line 101) | public class TooManyParametersLocalFunctions method MainMethod (line 103) | public void MainMethod(int p1, int p2, int p3) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TooManyParameters_DefaultValues.cs class TooManyParameters (line 6) | public class TooManyParameters : If method TooManyParameters (line 20) | public TooManyParameters(int p1, int p2, int p3) { } method TooManyParameters (line 21) | public TooManyParameters(int p1, int p2, int p3, int p4) { } method F1 (line 23) | public void F1(int p1, int p2, int p3) { } method F2 (line 25) | public void F2(int p1, int p2, int p3, int p4, int p5, int p6, int p7,... method F1 (line 27) | public void F1(int p1, int p2, int p3, int p4) { } method F (line 29) | public void F() method Extern (line 43) | [DllImport("foo.dll")] type If (line 47) | public interface If method F1 (line 49) | void F1(int p1, int p2, int p3); method F2 (line 50) | void F2(int p1, int p2, int p3, int p4, int p5, int p6, int p7, int p8... class MyWrongClass (line 53) | public class MyWrongClass method MyWrongClass (line 55) | public MyWrongClass(string a, string b, string c, string d, string e, ... class SubClass (line 61) | public class SubClass : MyWrongClass method SubClass (line 65) | public SubClass(string a, string b, string c, string d, string e, stri... method SubClass (line 70) | public SubClass() class SubClass2 (line 75) | public class SubClass2 : TooManyParameters method SubClass2 (line 77) | public SubClass2(int p1, int p2, int p3, string s1, string s2) class WithLocalFunctions (line 84) | public class WithLocalFunctions method Method (line 86) | public void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TrackNotImplementedException.CSharp11.cs type IInterface (line 5) | interface IInterface method FooBar (line 7) | static abstract void FooBar(); class SomeClass (line 10) | public class SomeClass : IInterface method FooBar (line 12) | public static void FooBar() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TrackNotImplementedException.cs class MyException (line 5) | class MyException : NotImplementedException { } class Program (line 7) | class Program method Foo (line 9) | void Foo() method Bar (line 15) | void Bar() method FooBar (line 20) | void FooBar() method FooBar2 (line 25) | void FooBar2() method ByExpression (line 32) | void ByExpression() => throw new NotImplementedException(); method ConditionalExpression (line 35) | int ConditionalExpression(int i) method NullCoalescing (line 38) | void NullCoalescing(object obj) method GetNewByExpression (line 44) | NotImplementedException GetNewByExpression() => new NotImplementedExce... type IInterface (line 47) | interface IInterface method FooBar (line 49) | void FooBar() // Compliant - Default interface methods can be used to ... class WithLocalFunctions (line 54) | public class WithLocalFunctions method Method (line 56) | public void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TryStatementsWithIdenticalCatchShouldBeMerged.cs class Program (line 5) | class Program method Simple (line 7) | void Simple() method DifferentCatches1 (line 34) | void DifferentCatches1() method DifferentCatches2 (line 97) | void DifferentCatches2() method TryStatementsDifferentNesting (line 126) | void TryStatementsDifferentNesting() method Program (line 189) | public Program() // ctor method Lambdas (line 198) | public void Lambdas() method CodeBetweenTryBlocks (line 210) | void CodeBetweenTryBlocks(int x, int y) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TypeExaminationOnSystemType.cs class TypeExaminationOnSystemType (line 6) | public class TypeExaminationOnSystemType method Test (line 8) | public void Test() method ResolveType (line 42) | public Type ResolveType(string id) => Type.GetType(id); method GetType (line 44) | public void GetType(object o) { } method IsInstanceOfType (line 46) | public void IsInstanceOfType(object o) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TypeMemberVisibility.Latest.Partial.cs class PartialPropertyClass (line 5) | internal partial class PartialPropertyClass //Noncompliant class OtherPartialPropertyClass (line 12) | partial class OtherPartialPropertyClass // CompliantFN method VoidMethod (line 17) | public partial void VoidMethod(); method AnotherAnotherVoidMethod (line 18) | partial void AnotherAnotherVoidMethod(); method DoSomething (line 20) | public partial void DoSomething() { } method DoSomethingElse (line 21) | private partial void DoSomethingElse() { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TypeMemberVisibility.Latest.cs type Noncompliant (line 5) | internal record Noncompliant // Noncompliant {{Types should not have mem... type NoncompliantPositionalRecord (line 44) | internal record NoncompliantPositionalRecord(string Property) // Noncomp... class Class (line 50) | internal class Class // Noncompliant type MyRecord (line 52) | public record MyRecord { } type Record (line 56) | internal record Record // Noncompliant type Struct (line 62) | internal struct Struct // Noncompliant type MyRecord (line 64) | public record MyRecord { } type Compliant (line 68) | public record Compliant // Class visibility upgrade makes members compliant type Noncompliant (line 115) | internal record struct Noncompliant // Noncompliant {{Types should not h... type NoncompliantPositionalRecord (line 131) | internal record struct NoncompliantPositionalRecord(string Property) // ... type IContract (line 140) | public interface IContract method Do (line 142) | static abstract void Do(); class SomeClass (line 145) | internal class SomeClass : IContract method Do (line 147) | public static void Do() class LocalFileClass (line 153) | file class LocalFileClass // file-scoped types have no access modifiers.... method Foo (line 155) | public void Foo() { } class PartialPropertyClass (line 161) | internal partial class PartialPropertyClass //Noncompliant class OtherPartialPropertyClass (line 167) | internal partial class OtherPartialPropertyClass //Noncompliant method VoidMethod (line 172) | public partial void VoidMethod() { } method AnotherVoidMethod (line 173) | partial void AnotherVoidMethod(); method DoSomething (line 175) | public partial void DoSomething(); method DoSomethingElse (line 176) | private partial void DoSomethingElse(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TypeMemberVisibility.cs class Noncompliant (line 5) | internal class Noncompliant // Noncompliant {{Types should not have memb... method GetA (line 21) | public int GetA() => 1; method GetB (line 23) | protected internal int GetB() => 1; method GetC (line 24) | internal int GetC() => 1; method GetD (line 25) | protected int GetD() => 1; method GetF (line 26) | private int GetF() => 1; method Noncompliant (line 42) | public Noncompliant(int a) {} method Noncompliant (line 44) | protected internal Noncompliant(int a, int b) {} method Noncompliant (line 45) | internal Noncompliant(int a, int b, int c) {} method Noncompliant (line 46) | protected Noncompliant(int a, int b, int c, int d) {} method Noncompliant (line 47) | private Noncompliant(int a, int b, int c, int d, int e, int f) {} type NestedStructA (line 53) | public struct NestedStructA method FlipCoin (line 56) | public bool FlipCoin() => false; type NestedStructB (line 60) | protected internal struct NestedStructB method FlipCoin (line 62) | public bool FlipCoin() => false; type NestedStructC (line 66) | internal struct NestedStructC method FlipCoin (line 68) | public bool FlipCoin() => false; type NestedStructD (line 72) | protected struct NestedStructD method FlipCoin (line 74) | public bool FlipCoin() => false; type Enum (line 78) | public enum Enum class NestedPrivateClass (line 88) | private class NestedPrivateClass class DerivedNestedPrivateClass (line 98) | private class DerivedNestedPrivateClass : NestedPrivateClass method DerivedNestedPrivateClass (line 100) | internal DerivedNestedPrivateClass() class NestedProtectedClass (line 106) | protected class NestedProtectedClass method Method (line 116) | private void Method() type Struct (line 123) | internal struct Struct // Noncompliant class MyClass (line 125) | public class MyClass { } type MyStruct (line 128) | public struct MyStruct { } type MyEnum (line 130) | public enum MyEnum { } class Compliant (line 134) | public class Compliant // Class visibility upgrade makes members compliant method GetA (line 144) | public int GetA() => 1; method GetB (line 145) | protected internal int GetB() => 1; method GetC (line 146) | internal int GetC() => 1; method Compliant (line 152) | public Compliant(int a) {} method Compliant (line 153) | protected internal Compliant(int a, int b) {} method Compliant (line 154) | internal Compliant(int a, int b, int c) {} type NestedStructA (line 156) | public struct NestedStructA method FlipCoin (line 158) | public bool FlipCoin() => false; type NestedStructB (line 161) | protected internal struct NestedStructB method FlipCoin (line 163) | internal bool FlipCoin() => false; type NestedStructC (line 166) | internal struct NestedStructC method FlipCoin (line 168) | internal bool FlipCoin() => false; class MyClass (line 171) | public class MyClass { } type MyStruct (line 173) | public struct MyStruct { } type MyEnum (line 175) | public enum MyEnum { } class WithMethodOverride (line 178) | internal sealed class WithMethodOverride method ToString (line 180) | public override string ToString() => string.Empty; type IContract (line 183) | public interface IContract method Do (line 185) | void Do(); class SomeClass (line 188) | internal class SomeClass: IContract method Do (line 190) | public void Do() class SomeClass2 (line 196) | internal class SomeClass2: IContract // Noncompliant method Do (line 198) | public void Do() method DoSomethingElse (line 203) | public void DoSomethingElse() { } class Base (line 207) | public class Base method Base (line 209) | public Base() { } method Base (line 211) | public Base(string x) { } method Base (line 213) | public Base(string x, string y) { } class Derived (line 216) | internal class Derived : Base // Noncompliant method Derived (line 218) | public Derived() { } method Derived (line 221) | public Derived(string x) : base(x) { } method Derived (line 223) | internal Derived(string x, string y) : base(x, y) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TypeNamesShouldNotMatchNamespaces.CSharp10.cs type Web (line 1) | public record struct Web { } type IO (line 2) | public record struct IO(string Parameter) { } type Accessibility (line 4) | public record class Accessibility { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TypeNamesShouldNotMatchNamespaces.CSharp9.cs type Web (line 1) | public record Web { } type Accessibility (line 2) | public record Accessibility { } type CompliantName (line 3) | public record CompliantName { } type Runtime (line 4) | public record Runtime(string Parameter) { } type IO (line 5) | record IO { } type Linq (line 9) | public record Linq { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TypeNamesShouldNotMatchNamespaces.cs class Web (line 5) | public class Web { } type IO (line 7) | public enum IO { x }; type Linq (line 13) | public interface Linq { } type Xaml (line 16) | public struct Xaml { } type System (line 19) | interface System { } type Data (line 21) | private interface Data { } class dIrEcToRySeRvIcEs (line 27) | public class dIrEcToRySeRvIcEs { } class Accessibility (line 32) | public class Accessibility { } class Activities (line 33) | public class Activities { } class Addin (line 34) | public class Addin { } class Build (line 35) | public class Build { } class Codedom (line 36) | public class Codedom { } class Collections (line 37) | public class Collections { } class Componentmodel (line 38) | public class Componentmodel { } class Configuration (line 39) | public class Configuration { } class Csharp (line 40) | public class Csharp { } class Custommarshalers (line 41) | public class Custommarshalers { } class Data (line 42) | public class Data { } class Dataflow (line 43) | public class Dataflow { } class Deployment (line 44) | public class Deployment { } class Device (line 45) | public class Device { } class Diagnostics (line 46) | public class Diagnostics { } class Directoryservices (line 47) | public class Directoryservices { } class Drawing (line 48) | public class Drawing { } class Dynamic (line 49) | public class Dynamic { } class Enterpriseservices (line 50) | public class Enterpriseservices { } class Globalization (line 51) | public class Globalization { } class Identitymodel (line 52) | public class Identitymodel { } class Interopservices (line 53) | public class Interopservices { } class Io (line 54) | public class Io { } class Jscript (line 55) | public class Jscript { } class Linq (line 56) | public class Linq { } class Location (line 57) | public class Location { } class Management (line 58) | public class Management { } class Media (line 59) | public class Media { } class Messaging (line 60) | public class Messaging { } class Microsoft (line 61) | public class Microsoft { } class Net (line 62) | public class Net { } class Numerics (line 63) | public class Numerics { } class Printing (line 64) | public class Printing { } class Reflection (line 65) | public class Reflection { } class Resources (line 66) | public class Resources { } class Runtime (line 67) | public class Runtime { } class Security (line 68) | public class Security { } class Server (line 69) | public class Server { } class Servicemodel (line 70) | public class Servicemodel { } class Serviceprocess (line 71) | public class Serviceprocess { } class Speech (line 72) | public class Speech { } class Sqlserver (line 73) | public class Sqlserver { } class System (line 74) | public class System { } class Tasks (line 75) | public class Tasks { } class Text (line 76) | public class Text { } class Threading (line 77) | public class Threading { } class Timers (line 78) | public class Timers { } class Transactions (line 79) | public class Transactions { } class Uiautomationclientsideproviders (line 80) | public class Uiautomationclientsideproviders { } class Visualbasic (line 81) | public class Visualbasic { } class Visualc (line 82) | public class Visualc { } class Web (line 83) | public class Web { } class Win32 (line 84) | public class Win32 { } class Windows (line 85) | public class Windows { } class Workflow (line 86) | public class Workflow { } class Xaml (line 87) | public class Xaml { } class Xamlgeneratednamespace (line 88) | public class Xamlgeneratednamespace { } class Xml (line 89) | public class Xml { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/TypesShouldNotExtendOutdatedBaseTypes.cs class Foo1 (line 8) | class Foo1 : System.ApplicationException { } class Foo2 (line 11) | class Foo2 : XmlDocument { } class Foo2_Explicit (line 13) | class Foo2_Explicit : System.Xml.XmlDocument { } class Foo3 (line 15) | class Foo3 : System.Collections.CollectionBase { } class Foo4 (line 17) | class Foo4 : System.Collections.DictionaryBase { } class Foo5 (line 19) | class Foo5 : System.Collections.Queue { } class Foo6 (line 21) | class Foo6 : System.Collections.ReadOnlyCollectionBase { } class Foo7 (line 23) | class Foo7 : System.Collections.SortedList { } class Foo8 (line 25) | class Foo8 : System.Collections.Stack { } class Foo9 (line 27) | class Foo9 : Stack { } class Foo10 (line 29) | class Foo10 : System.Collections.ICollection method CopyTo (line 37) | public void CopyTo(Array array, int index) { throw new NotImplementedE... method GetEnumerator (line 39) | public IEnumerator GetEnumerator() { throw new NotImplementedException... class Foo11 (line 42) | class Foo11 : Dictionary { } class Foo12 (line 44) | class Foo12 { } class FooBase (line 46) | class FooBase : XmlDocument { } class FooDerived (line 48) | class FooDerived : FooBase { } class Foo13 (line 50) | class Foo13 : InvalidType{ } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnaryPrefixOperatorRepeated.Fixed.cs class UnaryPrefixOperatorRepeated (line 7) | class UnaryPrefixOperatorRepeated method NonComp (line 9) | static void NonComp(bool bbb) method Comp (line 23) | static void Comp() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnaryPrefixOperatorRepeated.Latest.cs class Noncompliant (line 4) | public class Noncompliant method NoncompliantExample (line 6) | public void NoncompliantExample(WeirdOperatorOverride woo) class WeirdOperatorOverride (line 12) | public class WeirdOperatorOverride : IBitwiseOperators new object(); class Tests (line 32) | class Tests method Seek (line 35) | public bool Seek(int[] input) method Test_AlreadyConst (line 49) | public bool Test_AlreadyConst() method Test_TwoAssignments (line 56) | public bool Test_TwoAssignments() method Test_PostIncrement (line 64) | public bool Test_PostIncrement() method Test_PreDecrement (line 72) | public bool Test_PreDecrement() method Test_Compare (line 80) | public bool Test_Compare() method Test_AssignOperators (line 92) | public bool Test_AssignOperators() method Test_MethodInvocation (line 105) | public bool Test_MethodInvocation() method Test_RefParameter (line 113) | public bool Test_RefParameter() method Test_OutParameter (line 121) | public bool Test_OutParameter() method Test_Lambda (line 129) | public bool Test_Lambda() method Test_InnerFunction (line 140) | public bool Test_InnerFunction() method Test_MultipleVariables (line 155) | public bool Test_MultipleVariables() type Colors (line 168) | enum Colors { Red, Blue, Green, Nice }; method Test_MultipleTypes (line 170) | public void Test_MultipleTypes(int arg) method Tests (line 237) | public Tests() method Test_FalseNegatives (line 243) | public void Test_FalseNegatives() class Repro_3271 (line 296) | public class Repro_3271 method GoGoGo (line 298) | public void GoGoGo() method UninitializedTuple (line 305) | public void UninitializedTuple() method ReadInTuple (line 312) | public void ReadInTuple() type StructWithImplicitOperator (line 319) | public struct StructWithImplicitOperator method ImplicitOperatorStruct (line 324) | public StructWithImplicitOperator ImplicitOperatorStruct() class ClassWithImplicitOperator (line 330) | public class ClassWithImplicitOperator method ImplicitOperatorClass (line 335) | public ClassWithImplicitOperator ImplicitOperatorClass() class NormalClass (line 341) | public class NormalClass { } method NormalClassSetToNull (line 343) | public NormalClass NormalClassSetToNull() class ShadowingTest (line 351) | class ShadowingTest method Tests (line 354) | public void Tests() class Repro_4015 (line 362) | public class Repro_4015 method Compliant_SimpleLambda (line 367) | public void Compliant_SimpleLambda() method Compliant_ParenthesizedLambda (line 373) | public void Compliant_ParenthesizedLambda() method Compliant_ParenthesizedExpression (line 379) | public void Compliant_ParenthesizedExpression() method Noncompliant_Func (line 385) | public void Noncompliant_Func() method Compliant_Assignment (line 391) | public void Compliant_Assignment() method Noncompliant_Assignment (line 414) | public void Noncompliant_Assignment() method WithExpressionArgument (line 432) | private void WithExpressionArgument(Expression> expression) method WithExpressionArgument (line 440) | private void WithExpressionArgument(Expression> e... method WithFuncArgument (line 448) | private void WithFuncArgument(Func expression) method UndefinedInvocationSymbol (line 453) | public void UndefinedInvocationSymbol() method IndexerIndexedByLambda_CrazyCoverage (line 460) | public void IndexerIndexedByLambda_CrazyCoverage() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnchangedLocalVariablesShouldBeConst.cshtml.ide.g.cs method __RazorDirectiveTokenHelpers__ (line 29) | private void __RazorDirectiveTokenHelpers__() { FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnconditionalJumpStatement.Latest.cs class StaticLocalFunctions (line 4) | public class StaticLocalFunctions method StaticLocalFunctionInLoop (line 6) | public void StaticLocalFunctionInLoop() class Repro7987 (line 19) | class Repro7987 method Test (line 21) | void Test(List items) class NullConditionalAssignment (line 38) | public class NullConditionalAssignment class Sample (line 40) | public class Sample method Test (line 45) | public void Test(Sample sample, int? value) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnconditionalJumpStatement.cs class Program (line 7) | class Program method Test1 (line 9) | public void Test1(string[] strings, int length) method Test2 (line 97) | public void Test2(string[] strings, bool stop) method Test3 (line 132) | public void Test3(string[] strings, bool stop) method Test4 (line 160) | public void Test4(string[] strings, int padding) method Test5 (line 187) | public void Test5(Action doSomething, Action logError) method Test7 (line 215) | public void Test7() method Foo (line 229) | public bool Foo() { return true; } method Test8 (line 231) | public void Test8() method Test9 (line 244) | public void Test9() method Test10 (line 257) | public void Test10() method Test11 (line 270) | public void Test11() method Test12 (line 282) | public void Test12() method Test13 (line 291) | public void Test13() method Test14 (line 301) | public void Test14() method Test15 (line 311) | public void Test15() method Test16 (line 324) | public void Test16() method Test17 (line 341) | public void Test17() method UtilFunc (line 361) | void UtilFunc(Action a) method TestWithRetry (line 365) | public bool TestWithRetry(Action doSomething) method TestWithRetry2 (line 386) | public bool TestWithRetry2() method TestWithRetry3 (line 406) | public bool TestWithRetry3(Func doSomething) method TestWithRetry4 (line 426) | public bool TestWithRetry4(Action doSomething, Action logEr... method TestWithRetry5 (line 446) | public async Task TestWithRetry5(Func> doSomething) method ResetRetryTimeout (line 466) | public void ResetRetryTimeout() { } method WaitRetryTimeout (line 467) | public bool WaitRetryTimeout() { return true; } method CreateLock (line 469) | protected virtual FileStream CreateLock(string lockFileName, bool retr... method foo (line 500) | public void foo() { } method bar (line 501) | public void bar() { } class ReproducerClass (line 504) | class ReproducerClass method MethodWithPropertyAccess (line 509) | int MethodWithPropertyAccess() method MethodWithMemberAccess (line 524) | int MethodWithMemberAccess() method MethodWithElementAccess (line 539) | int MethodWithElementAccess(int[] array) method MethodWithAssignmentInsideReturnStatement (line 553) | int MethodWithAssignmentInsideReturnStatement() class LocalFunctions (line 569) | public class LocalFunctions method LocalFunctionInLoop (line 571) | public void LocalFunctionInLoop() class ReproducerWithDelegate (line 584) | class ReproducerWithDelegate method myFunc (line 587) | void myFunc() method myFunc2 (line 595) | void myFunc2() method myFunc3 (line 603) | Func myFunc3() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UninvokedEventDeclaration.Latest.Partial.cs class PartialEvents (line 3) | public partial class PartialEvents FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UninvokedEventDeclaration.Latest.cs type EventInvocations (line 4) | public record EventInvocations type EventInvocationsPositionalDeclaration (line 40) | public record EventInvocationsPositionalDeclaration(string Value) class UninvokedEventDeclaration (line 55) | class UninvokedEventDeclaration type IMyInterface (line 57) | private interface IMyInterface class Nested (line 62) | private class Nested : IMyInterface method RegisterEventHandler (line 73) | public void RegisterEventHandler(Action handler) method RaiseEvent (line 79) | public void RaiseEvent() class PartialEvents (line 88) | public partial class PartialEvents method RaiseEvent (line 95) | public virtual void RaiseEvent() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UninvokedEventDeclaration.cs class UninvokedEventDeclaration (line 6) | class UninvokedEventDeclaration method RegisterEventHandler (line 17) | public void RegisterEventHandler(Action handler) class MyBase (line 25) | private abstract class MyBase type IMyInterface (line 30) | private interface IMyInterface class Nested (line 35) | private class Nested : MyBase, IMyInterface method RegisterEventHandler (line 46) | public void RegisterEventHandler(Action handler) method RaiseEvent (line 53) | public void RaiseEvent() class MyClass (line 64) | class MyClass class Nested (line 69) | class Nested method M (line 75) | public void M() class EventAccessor (line 97) | public class EventAccessor method OnEvent1 (line 107) | protected void OnEvent1() type StructTest (line 115) | struct StructTest method RegisterEventHandler (line 119) | public void RegisterEventHandler() method StructTest_Event1 (line 124) | private void StructTest_Event1(object arg1, EventArgs arg2) class EventInvocations (line 131) | public class EventInvocations method InvokeAll (line 147) | public void InvokeAll() class EventInvocationsFromInnerClass (line 166) | public class EventInvocationsFromInnerClass class Inner (line 182) | public class Inner method Inner (line 185) | public Inner(EventInvocationsFromInnerClass outer) method InvokeAll (line 190) | public void InvokeAll() class ReproForIssue3931 (line 211) | public class ReproForIssue3931 method SomeMethod (line 216) | public void SomeMethod() class EventTestBase (line 230) | public class EventTestBase method RunSomethingThatSendAnEvent (line 234) | public void RunSomethingThatSendAnEvent() => Logging(this, EventArgs.E... class EventChainingDirect (line 237) | public class EventChainingDirect method RunTest (line 241) | public void RunTest() class EventChainingLambda (line 249) | public class EventChainingLambda method RunTest (line 253) | public void RunTest() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryBitwiseOperation.Fixed.cs type Types (line 6) | public enum Types class UnnecessaryBitwiseOperation (line 14) | class UnnecessaryBitwiseOperation method Main (line 16) | static void Main(string[] args) method WithUnaryPrefix (line 53) | public static void WithUnaryPrefix() method UnaryOperators (line 67) | public void UnaryOperators() method returnLong (line 97) | private static long returnLong() method MyMethod (line 102) | private static void MyMethod(UInt64 u) { } class Repro_4399 (line 107) | public class Repro_4399 method BuildMask (line 109) | public void BuildMask(IEnumerable daysOfWeek) method Repro (line 118) | public void Repro(object[] args) method CheckArg (line 127) | private bool CheckArg(object arg) => false; method FindConstant_For_AssignedInsideLoop (line 129) | public void FindConstant_For_AssignedInsideLoop() method FindConstant_For_ReassignedToTheSameValue (line 140) | public void FindConstant_For_ReassignedToTheSameValue() method FindConstant_For (line 151) | public void FindConstant_For() method FindConstant_ForEach (line 164) | public void FindConstant_ForEach(int[] values) method FindConstant_While (line 178) | public void FindConstant_While(int[] values) method FindConstant_Do (line 195) | public void FindConstant_Do(int[] values) class LocalFields (line 212) | class LocalFields method UpdateStart (line 218) | public void UpdateStart(int val) => start = val; method GetHashCode (line 220) | public override int GetHashCode() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryBitwiseOperation.Latest.cs class CSharp8 (line 6) | public class CSharp8 method FindConstant_AwaitForEach (line 8) | public async Task FindConstant_AwaitForEach(IAsyncEnumerable values) method TupleAssignment (line 22) | public void TupleAssignment() method InterlockedMethods (line 29) | public void InterlockedMethods() method RefOrOut (line 66) | public void RefOrOut() method UnaryOperators (line 82) | public unsafe void UnaryOperators() class CSharp13 (line 115) | public class CSharp13 class TimerRemaining (line 117) | public class TimerRemaining class FieldKeyword (line 132) | public class FieldKeyword FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryBitwiseOperation.cs type Types (line 6) | public enum Types class UnnecessaryBitwiseOperation (line 14) | class UnnecessaryBitwiseOperation method Main (line 16) | static void Main(string[] args) method WithUnaryPrefix (line 58) | public static void WithUnaryPrefix() method UnaryOperators (line 72) | public void UnaryOperators() method returnLong (line 102) | private static long returnLong() method MyMethod (line 107) | private static void MyMethod(UInt64 u) { } class Repro_4399 (line 112) | public class Repro_4399 method BuildMask (line 114) | public void BuildMask(IEnumerable daysOfWeek) method Repro (line 123) | public void Repro(object[] args) method CheckArg (line 132) | private bool CheckArg(object arg) => false; method FindConstant_For_AssignedInsideLoop (line 134) | public void FindConstant_For_AssignedInsideLoop() method FindConstant_For_ReassignedToTheSameValue (line 145) | public void FindConstant_For_ReassignedToTheSameValue() method FindConstant_For (line 156) | public void FindConstant_For() method FindConstant_ForEach (line 169) | public void FindConstant_ForEach(int[] values) method FindConstant_While (line 183) | public void FindConstant_While(int[] values) method FindConstant_Do (line 200) | public void FindConstant_Do(int[] values) class LocalFields (line 217) | class LocalFields method UpdateStart (line 223) | public void UpdateStart(int val) => start = val; method GetHashCode (line 225) | public override int GetHashCode() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryMathematicalComparison.Latest.cs class UnnecessaryMathematicalComparison (line 9) | internal class UnnecessaryMathematicalComparison method IsPatterns (line 11) | public void IsPatterns() class FieldKeyword (line 27) | public class FieldKeyword FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryMathematicalComparison.cs class UnnecessaryMathematicalComparison (line 10) | internal class UnnecessaryMathematicalComparison method GetValue (line 12) | private T GetValue() => default(T); method Chars (line 14) | public void Chars() // Rule applies method SBytes (line 57) | public void SBytes() // CS0652 method Bytes (line 104) | public void Bytes() // CS0652 method Shorts (line 163) | public void Shorts() // CS0652 method UShorts (line 206) | public void UShorts() // CS0652 method Ints (line 257) | public void Ints() // CS0652 method UInts (line 298) | public void UInts() // CS0652 method Longs (line 341) | public void Longs() // Rule applies method ULongs (line 376) | public void ULongs() // Rule applies method Floats (line 411) | public void Floats() // Rule applies method ConstantInBothOperands (line 442) | public void ConstantInBothOperands() method Edgecases (line 457) | public void Edgecases() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryUsings.CSharp10.Consumer.cs class TestConsumingGlobalUsings (line 7) | class TestConsumingGlobalUsings method Main (line 9) | static void Main() { } method Size (line 10) | public double Size(IList list) => list.Count; method Write (line 11) | public void Write(string s) => Console.WriteLine(s); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryUsings.CSharp10.FileScopedNamespace.Fixed.cs class C (line 9) | class C method M (line 13) | void M(IEnumerable myEnumerable) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryUsings.CSharp10.FileScopedNamespace.cs class C (line 12) | class C method M (line 16) | void M(IEnumerable myEnumerable) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryUsings.CSharp12.cs class MyClass (line 12) | class MyClass method AliasType (line 14) | void AliasType() class AliasShadowing (line 25) | unsafe class AliasShadowing(IntPointer* y); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryUsings.CSharp9.cs type Record (line 7) | record Record FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryUsings.Fixed.Batch.cs class Ns0_0 (line 21) | class Ns0_0 { } class Ns1_0 (line 26) | class Ns1_0 { } class Ns2_0 (line 31) | class Ns2_0 class Ns2_1 (line 44) | class Ns2_1 class Ns2_2 (line 57) | class Ns2_2 method M (line 61) | void M(IEnumerable myEnumerable) class Ns2_3 (line 75) | class Ns2_3 class Ns3_0 (line 84) | class Ns3_0 { } class ClassWithDoc (line 93) | class ClassWithDoc { } class InnerClass (line 95) | class InnerClass method MethodWithDoc (line 98) | public void MethodWithDoc() { } method MethodWithGenericClassDoc (line 103) | public void MethodWithGenericClassDoc() { } method MethodWithoutXMLDoc (line 106) | public void MethodWithoutXMLDoc() { } class ExtensionHolder (line 113) | internal static class ExtensionHolder method GetAwaiter (line 115) | public static TaskAwaiter GetAwaiter(this Func function) class AwaitUser (line 127) | class AwaitUser method AsyncMethodUsingAwaitExtension (line 129) | async void AsyncMethodUsingAwaitExtension() class Usage (line 139) | class Usage method DoQuery (line 141) | public void DoQuery(List myList) method DoQuery (line 153) | public void DoQuery(List myList) method DoQuery (line 167) | public void DoQuery(List myList) method DoQuery (line 184) | public void DoQuery(List myList) method DoQuery (line 197) | public void DoQuery(List myList) class Usage (line 151) | class Usage method DoQuery (line 141) | public void DoQuery(List myList) method DoQuery (line 153) | public void DoQuery(List myList) method DoQuery (line 167) | public void DoQuery(List myList) method DoQuery (line 184) | public void DoQuery(List myList) method DoQuery (line 197) | public void DoQuery(List myList) class Usage (line 165) | class Usage method DoQuery (line 141) | public void DoQuery(List myList) method DoQuery (line 153) | public void DoQuery(List myList) method DoQuery (line 167) | public void DoQuery(List myList) method DoQuery (line 184) | public void DoQuery(List myList) method DoQuery (line 197) | public void DoQuery(List myList) class UnusedLinqImport (line 176) | class UnusedLinqImport { } class Usage (line 182) | class Usage method DoQuery (line 141) | public void DoQuery(List myList) method DoQuery (line 153) | public void DoQuery(List myList) method DoQuery (line 167) | public void DoQuery(List myList) method DoQuery (line 184) | public void DoQuery(List myList) method DoQuery (line 197) | public void DoQuery(List myList) class Usage (line 195) | class Usage method DoQuery (line 141) | public void DoQuery(List myList) method DoQuery (line 153) | public void DoQuery(List myList) method DoQuery (line 167) | public void DoQuery(List myList) method DoQuery (line 184) | public void DoQuery(List myList) method DoQuery (line 197) | public void DoQuery(List myList) class ListExtensions (line 206) | public static class ListExtensions method Add (line 208) | public static void Add(this List list, string firstName, strin... method Add (line 219) | public static void Add(this List list, string firstName, int n... method Add (line 230) | public static void Add(this List list, int number, string last... class ListExtensions (line 217) | public static class ListExtensions method Add (line 208) | public static void Add(this List list, string firstName, strin... method Add (line 219) | public static void Add(this List list, string firstName, int n... method Add (line 230) | public static void Add(this List list, int number, string last... class ListExtensions (line 228) | public static class ListExtensions method Add (line 208) | public static void Add(this List list, string firstName, strin... method Add (line 219) | public static void Add(this List list, string firstName, int n... method Add (line 230) | public static void Add(this List list, int number, string last... class Program (line 242) | internal static class Program method Main (line 244) | private static void Main(string[] args) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryUsings.Fixed.cs class Ns0_0 (line 21) | class Ns0_0 { } class Ns1_0 (line 26) | class Ns1_0 { } class Ns2_0 (line 31) | class Ns2_0 class Ns2_1 (line 44) | class Ns2_1 class Ns2_2 (line 57) | class Ns2_2 method M (line 61) | void M(IEnumerable myEnumerable) class Ns2_3 (line 75) | class Ns2_3 class Ns3_0 (line 84) | class Ns3_0 { } class ClassWithDoc (line 93) | class ClassWithDoc { } class InnerClass (line 95) | class InnerClass method MethodWithDoc (line 98) | public void MethodWithDoc() { } method MethodWithGenericClassDoc (line 103) | public void MethodWithGenericClassDoc() { } method MethodWithoutXMLDoc (line 106) | public void MethodWithoutXMLDoc() { } class ExtensionHolder (line 113) | internal static class ExtensionHolder method GetAwaiter (line 115) | public static TaskAwaiter GetAwaiter(this Func function) class AwaitUser (line 127) | class AwaitUser method AsyncMethodUsingAwaitExtension (line 129) | async void AsyncMethodUsingAwaitExtension() class Usage (line 139) | class Usage method DoQuery (line 141) | public void DoQuery(List myList) method DoQuery (line 153) | public void DoQuery(List myList) method DoQuery (line 167) | public void DoQuery(List myList) method DoQuery (line 184) | public void DoQuery(List myList) method DoQuery (line 197) | public void DoQuery(List myList) class Usage (line 151) | class Usage method DoQuery (line 141) | public void DoQuery(List myList) method DoQuery (line 153) | public void DoQuery(List myList) method DoQuery (line 167) | public void DoQuery(List myList) method DoQuery (line 184) | public void DoQuery(List myList) method DoQuery (line 197) | public void DoQuery(List myList) class Usage (line 165) | class Usage method DoQuery (line 141) | public void DoQuery(List myList) method DoQuery (line 153) | public void DoQuery(List myList) method DoQuery (line 167) | public void DoQuery(List myList) method DoQuery (line 184) | public void DoQuery(List myList) method DoQuery (line 197) | public void DoQuery(List myList) class UnusedLinqImport (line 176) | class UnusedLinqImport { } class Usage (line 182) | class Usage method DoQuery (line 141) | public void DoQuery(List myList) method DoQuery (line 153) | public void DoQuery(List myList) method DoQuery (line 167) | public void DoQuery(List myList) method DoQuery (line 184) | public void DoQuery(List myList) method DoQuery (line 197) | public void DoQuery(List myList) class Usage (line 195) | class Usage method DoQuery (line 141) | public void DoQuery(List myList) method DoQuery (line 153) | public void DoQuery(List myList) method DoQuery (line 167) | public void DoQuery(List myList) method DoQuery (line 184) | public void DoQuery(List myList) method DoQuery (line 197) | public void DoQuery(List myList) class ListExtensions (line 206) | public static class ListExtensions method Add (line 208) | public static void Add(this List list, string firstName, strin... method Add (line 219) | public static void Add(this List list, string firstName, int n... method Add (line 230) | public static void Add(this List list, int number, string last... class ListExtensions (line 217) | public static class ListExtensions method Add (line 208) | public static void Add(this List list, string firstName, strin... method Add (line 219) | public static void Add(this List list, string firstName, int n... method Add (line 230) | public static void Add(this List list, int number, string last... class ListExtensions (line 228) | public static class ListExtensions method Add (line 208) | public static void Add(this List list, string firstName, strin... method Add (line 219) | public static void Add(this List list, string firstName, int n... method Add (line 230) | public static void Add(this List list, int number, string last... class Program (line 242) | internal static class Program method Main (line 244) | private static void Main(string[] args) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryUsings.InheritedPropertyBase.cs class S1128Base (line 3) | public abstract class S1128Base FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryUsings.InheritedPropertyChild.cs class S1128Child (line 5) | public class S1128Child : S1128Base FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryUsings.InheritedPropertyUsage.cs class S1128 (line 7) | public static class S1128 method Method (line 9) | static void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryUsings.TupleDeconstruct.NetCore.cs class Repro3408 (line 8) | public class Repro3408 method Consumer (line 10) | public void Consumer() method Consumer (line 23) | public void Consumer() class Repro3408 (line 21) | public class Repro3408 method Consumer (line 10) | public void Consumer() method Consumer (line 23) | public void Consumer() class ServiceReturningTuples (line 34) | public static class ServiceReturningTuples method GetPair (line 36) | public static Tuple GetPair() => Tuple.Create("a", 1); class Repro (line 50) | public class Repro method Go (line 52) | public void Go(System.Tuple pair) method Go (line 65) | public void Go(System.Tuple pair) method Go (line 78) | public void Go(KeyValuePair pair) method Go (line 91) | public void Go(KeyValuePair pair) method Go (line 104) | public void Go(Dictionary dict) class Repro (line 63) | public class Repro method Go (line 52) | public void Go(System.Tuple pair) method Go (line 65) | public void Go(System.Tuple pair) method Go (line 78) | public void Go(KeyValuePair pair) method Go (line 91) | public void Go(KeyValuePair pair) method Go (line 104) | public void Go(Dictionary dict) class Repro (line 76) | public class Repro method Go (line 52) | public void Go(System.Tuple pair) method Go (line 65) | public void Go(System.Tuple pair) method Go (line 78) | public void Go(KeyValuePair pair) method Go (line 91) | public void Go(KeyValuePair pair) method Go (line 104) | public void Go(Dictionary dict) class Repro (line 89) | public class Repro method Go (line 52) | public void Go(System.Tuple pair) method Go (line 65) | public void Go(System.Tuple pair) method Go (line 78) | public void Go(KeyValuePair pair) method Go (line 91) | public void Go(KeyValuePair pair) method Go (line 104) | public void Go(Dictionary dict) class Repro (line 102) | public class Repro method Go (line 52) | public void Go(System.Tuple pair) method Go (line 65) | public void Go(System.Tuple pair) method Go (line 78) | public void Go(KeyValuePair pair) method Go (line 91) | public void Go(KeyValuePair pair) method Go (line 104) | public void Go(Dictionary dict) class DeconstructExtensions (line 115) | public static class DeconstructExtensions method Deconstruct (line 117) | public static void Deconstruct(this System.Tuple(this KeyValuePair GetPair() => Tuple.Create("a", 1); class Repro (line 50) | public class Repro method Go (line 52) | public void Go(System.Tuple pair) method Go (line 65) | public void Go(System.Tuple pair) method Go (line 78) | public void Go(KeyValuePair pair) method Go (line 91) | public void Go(KeyValuePair pair) method Go (line 104) | public void Go(Dictionary dict) class Repro (line 63) | public class Repro method Go (line 52) | public void Go(System.Tuple pair) method Go (line 65) | public void Go(System.Tuple pair) method Go (line 78) | public void Go(KeyValuePair pair) method Go (line 91) | public void Go(KeyValuePair pair) method Go (line 104) | public void Go(Dictionary dict) class Repro (line 76) | public class Repro method Go (line 52) | public void Go(System.Tuple pair) method Go (line 65) | public void Go(System.Tuple pair) method Go (line 78) | public void Go(KeyValuePair pair) method Go (line 91) | public void Go(KeyValuePair pair) method Go (line 104) | public void Go(Dictionary dict) class Repro (line 89) | public class Repro method Go (line 52) | public void Go(System.Tuple pair) method Go (line 65) | public void Go(System.Tuple pair) method Go (line 78) | public void Go(KeyValuePair pair) method Go (line 91) | public void Go(KeyValuePair pair) method Go (line 104) | public void Go(Dictionary dict) class Repro (line 102) | public class Repro method Go (line 52) | public void Go(System.Tuple pair) method Go (line 65) | public void Go(System.Tuple pair) method Go (line 78) | public void Go(KeyValuePair pair) method Go (line 91) | public void Go(KeyValuePair pair) method Go (line 104) | public void Go(Dictionary dict) class DeconstructExtensions (line 115) | public static class DeconstructExtensions method Deconstruct (line 117) | public static void Deconstruct(this System.Tuple(this KeyValuePair myEnumerable) class Ns2_3 (line 81) | class Ns2_3 class Ns3_0 (line 90) | class Ns3_0 { } class ClassWithDoc (line 99) | class ClassWithDoc { } class InnerClass (line 101) | class InnerClass method MethodWithDoc (line 104) | public void MethodWithDoc() { } method MethodWithGenericClassDoc (line 109) | public void MethodWithGenericClassDoc() { } method MethodWithoutXMLDoc (line 112) | public void MethodWithoutXMLDoc() { } class ExtensionHolder (line 119) | internal static class ExtensionHolder method GetAwaiter (line 121) | public static TaskAwaiter GetAwaiter(this Func function) class AwaitUser (line 133) | class AwaitUser method AsyncMethodUsingAwaitExtension (line 135) | async void AsyncMethodUsingAwaitExtension() class Usage (line 145) | class Usage method DoQuery (line 147) | public void DoQuery(List myList) method DoQuery (line 159) | public void DoQuery(List myList) method DoQuery (line 174) | public void DoQuery(List myList) method DoQuery (line 192) | public void DoQuery(List myList) method DoQuery (line 205) | public void DoQuery(List myList) class Usage (line 157) | class Usage method DoQuery (line 147) | public void DoQuery(List myList) method DoQuery (line 159) | public void DoQuery(List myList) method DoQuery (line 174) | public void DoQuery(List myList) method DoQuery (line 192) | public void DoQuery(List myList) method DoQuery (line 205) | public void DoQuery(List myList) class Usage (line 172) | class Usage method DoQuery (line 147) | public void DoQuery(List myList) method DoQuery (line 159) | public void DoQuery(List myList) method DoQuery (line 174) | public void DoQuery(List myList) method DoQuery (line 192) | public void DoQuery(List myList) method DoQuery (line 205) | public void DoQuery(List myList) class UnusedLinqImport (line 184) | class UnusedLinqImport { } class Usage (line 190) | class Usage method DoQuery (line 147) | public void DoQuery(List myList) method DoQuery (line 159) | public void DoQuery(List myList) method DoQuery (line 174) | public void DoQuery(List myList) method DoQuery (line 192) | public void DoQuery(List myList) method DoQuery (line 205) | public void DoQuery(List myList) class Usage (line 203) | class Usage method DoQuery (line 147) | public void DoQuery(List myList) method DoQuery (line 159) | public void DoQuery(List myList) method DoQuery (line 174) | public void DoQuery(List myList) method DoQuery (line 192) | public void DoQuery(List myList) method DoQuery (line 205) | public void DoQuery(List myList) class ListExtensions (line 214) | public static class ListExtensions method Add (line 216) | public static void Add(this List list, string firstName, strin... method Add (line 227) | public static void Add(this List list, string firstName, int n... method Add (line 238) | public static void Add(this List list, int number, string last... class ListExtensions (line 225) | public static class ListExtensions method Add (line 216) | public static void Add(this List list, string firstName, strin... method Add (line 227) | public static void Add(this List list, string firstName, int n... method Add (line 238) | public static void Add(this List list, int number, string last... class ListExtensions (line 236) | public static class ListExtensions method Add (line 216) | public static void Add(this List list, string firstName, strin... method Add (line 227) | public static void Add(this List list, string firstName, int n... method Add (line 238) | public static void Add(this List list, int number, string last... class Program (line 251) | internal static class Program method Main (line 253) | private static void Main(string[] args) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryUsings2.cs class Ns0_0 (line 20) | class Ns0_0 { } class Ns1_0 (line 25) | class Ns1_0 { } class Ns2_0 (line 30) | class Ns2_0 class Ns2_1 (line 46) | class Ns2_1 class Ns2_2 (line 59) | class Ns2_2 method M (line 63) | void M(IEnumerable myEnumerable) class Ns2_3 (line 78) | class Ns2_3 class Ns3_0 (line 87) | class Ns3_0 { } class ClassWithDoc (line 96) | class ClassWithDoc { } class InnerClass (line 98) | class InnerClass method MethodWithDoc (line 101) | public void MethodWithDoc() { } method MethodWithGenericClassDoc (line 106) | public void MethodWithGenericClassDoc() { } method MethodWithoutXMLDoc (line 109) | public void MethodWithoutXMLDoc() { } class ExtensionHolder (line 116) | internal static class ExtensionHolder method GetAwaiter (line 118) | public static TaskAwaiter GetAwaiter(this Func function) class AwaitUser (line 130) | class AwaitUser method AsyncMethodUsingAwaitExtension (line 132) | async void AsyncMethodUsingAwaitExtension() class Usage (line 142) | class Usage method DoQuery (line 144) | public void DoQuery(List myList) method DoQuery (line 156) | public void DoQuery(List myList) method DoQuery (line 171) | public void DoQuery(List myList) method DoQuery (line 190) | public void DoQuery(List myList) class Usage (line 154) | class Usage method DoQuery (line 144) | public void DoQuery(List myList) method DoQuery (line 156) | public void DoQuery(List myList) method DoQuery (line 171) | public void DoQuery(List myList) method DoQuery (line 190) | public void DoQuery(List myList) class Usage (line 169) | class Usage method DoQuery (line 144) | public void DoQuery(List myList) method DoQuery (line 156) | public void DoQuery(List myList) method DoQuery (line 171) | public void DoQuery(List myList) method DoQuery (line 190) | public void DoQuery(List myList) class UnusedLinqImport (line 181) | class UnusedLinqImport { } class Usage (line 188) | class Usage method DoQuery (line 144) | public void DoQuery(List myList) method DoQuery (line 156) | public void DoQuery(List myList) method DoQuery (line 171) | public void DoQuery(List myList) method DoQuery (line 190) | public void DoQuery(List myList) class ListExtensions (line 199) | public static class ListExtensions method Add (line 201) | public static void Add(this List list, string firstName, strin... method Add (line 212) | public static void Add(this List list, string firstName, int n... method Add (line 223) | public static void Add(this List list, int number, string last... class ListExtensions (line 210) | public static class ListExtensions method Add (line 201) | public static void Add(this List list, string firstName, strin... method Add (line 212) | public static void Add(this List list, string firstName, int n... method Add (line 223) | public static void Add(this List list, int number, string last... class ListExtensions (line 221) | public static class ListExtensions method Add (line 201) | public static void Add(this List list, string firstName, strin... method Add (line 212) | public static void Add(this List list, string firstName, int n... method Add (line 223) | public static void Add(this List list, int number, string last... class Program (line 236) | internal static class Program method Main2 (line 238) | private static void Main2(string[] args) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnnecessaryUsingsFNRepro.cs class Program (line 5) | class Program method Main (line 7) | static void Main(string[] args) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedPrivateMember.CalledFromGenerated.cs class MyClass (line 5) | public partial class MyClass method PrivateMethodOnlyCalledFromGenerated (line 7) | private void PrivateMethodOnlyCalledFromGenerated() method InternalMethodOnlyCalledFromGenerated (line 11) | internal void InternalMethodOnlyCalledFromGenerated() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedPrivateMember.Fixed.Batch.cs class MyAttribute (line 8) | public class MyAttribute : Attribute { } class UnusedPrivateMember (line 10) | class UnusedPrivateMember method Main (line 12) | public static void Main() { } class MyOtherClass (line 14) | private class MyOtherClass class MyClass (line 17) | private class MyClass method MyClass (line 19) | internal MyClass(int i) class Gen (line 27) | private class Gen : MyClass method Gen (line 29) | public Gen() : base(1) method UnusedPrivateMember (line 35) | public UnusedPrivateMember() method UnusedPrivateMember_MyUsedEvent (line 43) | private void UnusedPrivateMember_MyUsedEvent(object sender, EventArgs e) method UnusedPrivateMember_MyEvent (line 48) | private void UnusedPrivateMember_MyEvent() method PrivateMethodWithAttribute (line 60) | [MyAttribute] void PrivateMethodWithAttribute() { } method GetValue (line 62) | public int GetValue(int x, int y) => array[x][y]; method GetItem (line 64) | public int GetItem(int i) => used[i]; method GetDictionary (line 66) | private Dictionary GetDictionary() => null; method GetDictionaryItem (line 68) | public int GetDictionaryItem(int i) => GetDictionary()[i]; class Class1 (line 82) | [My] class Class2 (line 85) | private class Class2 method Class2 (line 87) | private Class2() // Compliant method Class2 (line 90) | private Class2(string i) type MyInterface (line 96) | private interface MyInterface method Method (line 98) | void Method(); method MethodUsingLocalMethod (line 102) | public void MethodUsingLocalMethod() class NewClass1 (line 112) | class NewClass1 method Main (line 115) | static async Task Main() // Compliant - valid main method since C# 7.1 class NewClass2 (line 121) | class NewClass2 method Main (line 123) | static async Task Main() // Compliant - valid main method since C... class NewClass3 (line 131) | class NewClass3 method Main (line 133) | static async Task Main(string[] args) // Compliant - valid main method... class NewClass4 (line 139) | class NewClass4 method Main (line 141) | static async Task Main(string[] args) // Compliant - valid main m... class NewClass5 (line 149) | class NewClass5 class MyExtension (line 153) | public static class MyExtension method MyMethod (line 155) | private static void MyMethod(this T self) { "".MyMethod(); } class NonExactMatch (line 158) | public class NonExactMatch method M (line 160) | private static void M(int i) { } method M (line 161) | private static void M(string i) { } method Call (line 163) | public static void Call(dynamic d) class EventHandlerSample (line 169) | public class EventHandlerSample method MyOnClick (line 171) | private void MyOnClick(object sender, EventArgs args) { } class EventHandlerSample1 (line 174) | public partial class EventHandlerSample1 method MyOnClick (line 176) | private void MyOnClick(object sender, EventArgs args) { } class PropertyAccess (line 179) | public class PropertyAccess method M (line 195) | public void M() class Indexer1 (line 211) | public class Indexer1 class Indexer2 (line 215) | public class Indexer2 class Indexer3 (line 219) | public class Indexer3 class Indexer4 (line 223) | public class Indexer4 class Indexer5 (line 227) | public class Indexer5 method Method (line 231) | public void Method() class Indexer6 (line 237) | public class Indexer6 method Method (line 241) | public void Method() class GoodException (line 247) | [Serializable] method GoodException (line 250) | public GoodException() method GoodException (line 253) | public GoodException(string message) method GoodException (line 257) | public GoodException(string message, Exception innerException) method GoodException (line 261) | private GoodException(SerializationInfo info, StreamingContext context... class FieldAccess (line 267) | public class FieldAccess method FieldAccess (line 273) | public FieldAccess() class TestsFormerS1450 (line 281) | public class TestsFormerS1450 method M1 (line 285) | public void M1() method M2 (line 292) | public void M2() method M6 (line 299) | public void M6(int F14) method M15 (line 316) | public void M15(int i) => F36 = i + 1; class OutAndRef (line 319) | public class OutAndRef method M37 (line 322) | public void M37() => int.TryParse("1", out F37); method M38 (line 325) | public void M38() => Modify(ref F38); method Modify (line 327) | public void Modify(ref int x) => x = 37; method M39 (line 328) | public void M39() class MyClass (line 335) | internal class MyClass method MyClass (line 337) | protected MyClass() // Compliant class MyClass2 (line 343) | internal class MyClass2 type IPublicInterface (line 347) | public interface IPublicInterface { } class PublicClass (line 348) | [Serializable] method PublicClass (line 353) | private PublicClass() class Repro_8342 (line 359) | class Repro_8342 method APublicMethod (line 361) | [Private1] public void APublicMethod() => APrivateMethodCalledByAPubli... method AnInternalMethod (line 362) | [Private2] internal void AnInternalMethod() { } method AProtectedMethod (line 363) | [Private3] protected void AProtectedMethod() { } method APrivateMethodCalledByAPublicMethod (line 364) | [Private4] private void APrivateMethodCalledByAPublicMethod() { } class Private1Attribute (line 366) | private class Private1Attribute : Attribute { } class Private2Attribute (line 367) | private class Private2Attribute : Attribute { } class Private3Attribute (line 368) | private class Private3Attribute : Attribute { } class Private4Attribute (line 369) | private class Private4Attribute : Attribute { } class Repro_8532 (line 373) | [Serializable] class Repro_9219 (line 381) | class Repro_9219 class OuterClass (line 414) | partial class OuterClass method MethodUsesNestedStruct (line 416) | public void MethodUsesNestedStruct() class NestedClass (line 421) | private static class NestedClass type NestedStruct (line 424) | [StructLayout(LayoutKind.Sequential)] class ChildEventArgs (line 436) | public class ChildEventArgs : EventArgs class InheritedEvent (line 441) | public class InheritedEvent : EventArgs class SenderObject (line 446) | public class SenderObject class Consumer (line 451) | public class Consumer method SenderObject_WithChildEvent (line 453) | static void SenderObject_WithChildEvent(SenderObject senderObject, Chi... method SenderObject_WithChildEvent (line 458) | static void SenderObject_WithChildEvent(SenderObject senderObject, Inh... method Comsumer_WithChildEvent (line 463) | static void Comsumer_WithChildEvent(object sender, ChildEventArgs e) /... class CollectionInitializerUsage (line 469) | public class CollectionInitializerUsage class Compliant (line 481) | private class Compliant : IEnumerable method Add (line 483) | internal void Add(int item) { } method GetEnumerator (line 484) | public IEnumerator GetEnumerator() => null; class AlsoCompliant (line 487) | private class AlsoCompliant : Compliant method Add (line 489) | internal void Add(int item) { } class NonCompliant (line 492) | private class NonCompliant : IEnumerable method GetEnumerator (line 494) | public IEnumerator GetEnumerator() => null; class CompliantDictionary (line 497) | private class CompliantDictionary : Dictionary method Add (line 499) | internal void Add(int key, int value) { } class NonCompliantDictionary (line 502) | private class NonCompliantDictionary : Dictionary method UseFields (line 506) | public void UseFields() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedPrivateMember.Fixed.cs class MyAttribute (line 8) | public class MyAttribute : Attribute { } class UnusedPrivateMember (line 10) | class UnusedPrivateMember method Main (line 12) | public static void Main() { } class MyOtherClass (line 14) | private class MyOtherClass class MyClass (line 17) | private class MyClass method MyClass (line 19) | internal MyClass(int i) class Gen (line 27) | private class Gen : MyClass method Gen (line 29) | public Gen() : base(1) method UnusedPrivateMember (line 35) | public UnusedPrivateMember() method UnusedPrivateMember_MyUsedEvent (line 43) | private void UnusedPrivateMember_MyUsedEvent(object sender, EventArgs e) method UnusedPrivateMember_MyEvent (line 48) | private void UnusedPrivateMember_MyEvent() method PrivateMethodWithAttribute (line 60) | [MyAttribute] void PrivateMethodWithAttribute() { } method GetValue (line 62) | public int GetValue(int x, int y) => array[x][y]; method GetItem (line 64) | public int GetItem(int i) => used[i]; method GetDictionary (line 66) | private Dictionary GetDictionary() => null; method GetDictionaryItem (line 68) | public int GetDictionaryItem(int i) => GetDictionary()[i]; class Class1 (line 82) | [My] method MethodUsingLocalMethod (line 86) | public void MethodUsingLocalMethod() class NewClass1 (line 96) | class NewClass1 method Main (line 99) | static async Task Main() // Compliant - valid main method since C# 7.1 class NewClass2 (line 105) | class NewClass2 method Main (line 107) | static async Task Main() // Compliant - valid main method since C... class NewClass3 (line 115) | class NewClass3 method Main (line 117) | static async Task Main(string[] args) // Compliant - valid main method... class NewClass4 (line 123) | class NewClass4 method Main (line 125) | static async Task Main(string[] args) // Compliant - valid main m... class NewClass5 (line 133) | class NewClass5 class MyExtension (line 137) | public static class MyExtension method MyMethod (line 139) | private static void MyMethod(this T self) { "".MyMethod(); } class NonExactMatch (line 142) | public class NonExactMatch method M (line 144) | private static void M(int i) { } method M (line 145) | private static void M(string i) { } method Call (line 147) | public static void Call(dynamic d) class EventHandlerSample (line 153) | public class EventHandlerSample method MyOnClick (line 155) | private void MyOnClick(object sender, EventArgs args) { } class EventHandlerSample1 (line 158) | public partial class EventHandlerSample1 method MyOnClick (line 160) | private void MyOnClick(object sender, EventArgs args) { } class PropertyAccess (line 163) | public class PropertyAccess method M (line 179) | public void M() class Indexer1 (line 195) | public class Indexer1 class Indexer2 (line 199) | public class Indexer2 class Indexer3 (line 203) | public class Indexer3 class Indexer4 (line 207) | public class Indexer4 class Indexer5 (line 211) | public class Indexer5 method Method (line 215) | public void Method() class Indexer6 (line 221) | public class Indexer6 method Method (line 225) | public void Method() class GoodException (line 231) | [Serializable] method GoodException (line 234) | public GoodException() method GoodException (line 237) | public GoodException(string message) method GoodException (line 241) | public GoodException(string message, Exception innerException) method GoodException (line 245) | private GoodException(SerializationInfo info, StreamingContext context... class FieldAccess (line 251) | public class FieldAccess method FieldAccess (line 257) | public FieldAccess() class TestsFormerS1450 (line 265) | public class TestsFormerS1450 method M1 (line 269) | public void M1() method M2 (line 276) | public void M2() method M6 (line 283) | public void M6(int F14) method M15 (line 300) | public void M15(int i) => F36 = i + 1; class OutAndRef (line 303) | public class OutAndRef method M37 (line 306) | public void M37() => int.TryParse("1", out F37); method M38 (line 309) | public void M38() => Modify(ref F38); method Modify (line 311) | public void Modify(ref int x) => x = 37; method M39 (line 312) | public void M39() class MyClass (line 319) | internal class MyClass method MyClass (line 321) | protected MyClass() // Compliant class MyClass2 (line 327) | internal class MyClass2 type IPublicInterface (line 331) | public interface IPublicInterface { } class PublicClass (line 332) | [Serializable] method PublicClass (line 337) | private PublicClass() class Repro_8342 (line 343) | class Repro_8342 method APublicMethod (line 345) | [Private1] public void APublicMethod() => APrivateMethodCalledByAPubli... method AnInternalMethod (line 346) | [Private2] internal void AnInternalMethod() { } method AProtectedMethod (line 347) | [Private3] protected void AProtectedMethod() { } method APrivateMethodCalledByAPublicMethod (line 348) | [Private4] private void APrivateMethodCalledByAPublicMethod() { } class Private1Attribute (line 350) | private class Private1Attribute : Attribute { } class Private2Attribute (line 351) | private class Private2Attribute : Attribute { } class Private3Attribute (line 352) | private class Private3Attribute : Attribute { } class Private4Attribute (line 353) | private class Private4Attribute : Attribute { } class Repro_8532 (line 357) | [Serializable] class Repro_9219 (line 365) | class Repro_9219 class OuterClass (line 398) | partial class OuterClass method MethodUsesNestedStruct (line 400) | public void MethodUsesNestedStruct() class NestedClass (line 405) | private static class NestedClass type NestedStruct (line 408) | [StructLayout(LayoutKind.Sequential)] class ChildEventArgs (line 420) | public class ChildEventArgs : EventArgs class InheritedEvent (line 425) | public class InheritedEvent : EventArgs class SenderObject (line 430) | public class SenderObject class Consumer (line 435) | public class Consumer method SenderObject_WithChildEvent (line 437) | static void SenderObject_WithChildEvent(SenderObject senderObject, Chi... method SenderObject_WithChildEvent (line 442) | static void SenderObject_WithChildEvent(SenderObject senderObject, Inh... method Comsumer_WithChildEvent (line 447) | static void Comsumer_WithChildEvent(object sender, ChildEventArgs e) /... class CollectionInitializerUsage (line 453) | public class CollectionInitializerUsage class Compliant (line 465) | private class Compliant : IEnumerable method Add (line 467) | internal void Add(int item) { } method GetEnumerator (line 468) | public IEnumerator GetEnumerator() => null; class AlsoCompliant (line 471) | private class AlsoCompliant : Compliant method Add (line 473) | internal void Add(int item) { } class NonCompliant (line 476) | private class NonCompliant : IEnumerable method GetEnumerator (line 478) | public IEnumerator GetEnumerator() => null; class CompliantDictionary (line 481) | private class CompliantDictionary : Dictionary method Add (line 483) | internal void Add(int key, int value) { } class NonCompliantDictionary (line 486) | private class NonCompliantDictionary : Dictionary method UseFields (line 490) | public void UseFields() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedPrivateMember.Generated.cs class MyClass (line 6) | public partial class MyClass method Foo (line 8) | public void Foo() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedPrivateMember.Latest.Partial.cs class PartialMethods (line 5) | public partial class PartialMethods method UnusedMethod (line 7) | partial void UnusedMethod(); class PartialProperty (line 14) | public partial class PartialProperty class PartialEvents (line 20) | public partial class PartialEvents FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedPrivateMember.Latest.cs class PartialProperty (line 13) | public partial class PartialProperty type Line (line 22) | public sealed record Line(decimal Field); class Repro (line 24) | public sealed class Repro method GetLines (line 26) | public Line[] GetLines() => CreateLines(); method CreateLines (line 28) | private static Line[] CreateLines() => [new(0)]; class Repro_9652 (line 32) | class Repro_9652 class Inner (line 34) | class Inner method Method (line 43) | public int Method() => _ = this[""]; class AnotherInner (line 46) | class AnotherInner method Method (line 49) | public int Method() => inner["a", "b"]; method Repro_9652 (line 54) | public Repro_9652() class UnusedPrivateMember (line 81) | class UnusedPrivateMember type MyInterface (line 83) | private interface MyInterface method Method (line 85) | static abstract void Method(); class Class1 (line 88) | private class Class1 : MyInterface // Noncompliant {{Remove the unused... method Method (line 90) | public static void Method() { var x = 42; } method Method1 (line 91) | public void Method1() { var x = Method2(); } method Method2 (line 92) | public static int Method2() { return 2; } type RecordStruct (line 98) | public record struct RecordStruct type PositionalRecord (line 171) | public record struct PositionalRecord(string Value) class ReproIssue2752 (line 181) | public class ReproIssue2752 type PrivateRecordStruct (line 183) | private record struct PrivateRecordStruct method ExternalMethod (line 190) | [DllImport("user32.dll")] type PrivateRecordRef (line 307) | private record PrivateRecordRef method ExternalMethod (line 312) | [DllImport("user32.dll")] type PrivateStructRef (line 823) | private struct PrivateStructRef class PrivateClassRef (line 828) | private class PrivateClassRef method ExternalMethodWithStruct (line 833) | [DllImport("user32.dll")] method ExternalMethodWithClass (line 836) | [DllImport("user32.dll")] type Record (line 197) | public record Record type PositionalRecord (line 268) | public record PositionalRecord(string Value) class TargetTypedNew (line 277) | public class TargetTypedNew method TargetTypedNew (line 279) | private TargetTypedNew(int arg) method TargetTypedNew (line 284) | private TargetTypedNew(string arg) // Noncom... method Create (line 289) | public static TargetTypedNew Create() method Foo (line 294) | public static void Foo() class PartialMethods (line 300) | public partial class PartialMethods class ReproIssue2752 (line 305) | public class ReproIssue2752 type PrivateRecordStruct (line 183) | private record struct PrivateRecordStruct method ExternalMethod (line 190) | [DllImport("user32.dll")] type PrivateRecordRef (line 307) | private record PrivateRecordRef method ExternalMethod (line 312) | [DllImport("user32.dll")] type PrivateStructRef (line 823) | private struct PrivateStructRef class PrivateClassRef (line 828) | private class PrivateClassRef method ExternalMethodWithStruct (line 833) | [DllImport("user32.dll")] method ExternalMethodWithClass (line 836) | [DllImport("user32.dll")] class Repro_7904 (line 319) | public class Repro_7904 type BaseRecord (line 321) | public record BaseRecord(int Value); type NoBaseRecord (line 323) | public record NoBaseRecord type HasBaseRecord (line 328) | public record HasBaseRecord() : BaseRecord(42) type SealedWithNoBaseRecord (line 333) | public sealed record SealedWithNoBaseRecord type SealedWithBaseRecord (line 338) | public sealed record SealedWithBaseRecord() : BaseRecord(42) type NonMatchingPrintMembers (line 343) | public sealed record NonMatchingPrintMembers class ClassWithPrintMembers (line 357) | public class ClassWithPrintMembers method PrintMembers (line 359) | private bool PrintMembers(StringBuilder builder) => true; class Repro_9379 (line 364) | public static class Repro_9379 method Method (line 366) | public static void Method() method CreateInstance (line 375) | public static T CreateInstance<[DynamicallyAccessedMembers(Dynamically... method CreateInstance (line 378) | public static object CreateInstance([DynamicallyAccessedMembers(Dynami... method InitValue (line 381) | public static void InitValue<[DynamicallyAccessedMembers(DynamicallyAc... class A (line 383) | private class A class ClassInstantiatedThroughReflection (line 388) | private class ClassInstantiatedThroughReflection method PrivateMethod (line 393) | private void PrivateMethod() { } method ClassInstantiatedThroughReflection (line 394) | private ClassInstantiatedThroughReflection() { } method ClassInstantiatedThroughReflection (line 397) | public ClassInstantiatedThroughReflection(int arg) class NestedType (line 401) | private class NestedType // Noncompliant ... class AnotherClassInstantiatedThroughReflection (line 407) | private class AnotherClassInstantiatedThroughReflection class TypeDecoratedWithDynamicallyAccessedMembers (line 412) | [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] method PrivateMethod (line 418) | private void PrivateMethod() { } method TypeDecoratedWithDynamicallyAccessedMembers (line 419) | public TypeDecoratedWithDynamicallyAccessedMembers() { } class NestedType (line 422) | private class NestedType method PrivateMethod (line 427) | private void PrivateMethod() { } method NestedType (line 428) | private NestedType() { } class MembersDecoratedWithAttribute (line 433) | private class MembersDecoratedWithAttribute ... method PrivateMethod (line 444) | private void PrivateMethod() { } method PrivateMethodWithAttribute (line 445) | [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.NonPublic... class NestedType (line 447) | private class NestedType { } class NestedTypeWithAttribute (line 448) | [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.NonPublic... method PrivateMethodWithReturn (line 450) | [return: DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.N... method PrivateMethodWithReturnCustomClass (line 453) | [return: DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.N... class PrivateClass (line 457) | private class PrivateClass { } class ArgumentsDecoratedWithAttribute (line 459) | private class ArgumentsDecoratedWithAttribute // Noncompliant method PublicMethod (line 461) | public void PublicMethod() => Method(null); method Method (line 463) | private void Method([DynamicallyAccessedMembers(DynamicallyAccessedM... class NestedType (line 465) | private class NestedType method NestedType (line 467) | private NestedType(int arg) { } type RecordWithAttribute (line 470) | public record RecordWithAttribute([DynamicallyAccessedMembers(Dynami... class DerivedFromTypeDecoratedWithDynamicallyAccessedMembers (line 473) | private class DerivedFromTypeDecoratedWithDynamicallyAccessedMembers :... class DynamicallyAccessedMembersOnlyForConstructors (line 478) | [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConst... class DynamicallyAccessedMembersAttribute (line 489) | public class DynamicallyAccessedMembersAttribute : Attribute { } class UnusedClassMarkedWithCustomAttribute (line 491) | [DynamicallyAccessedMembers] type MyInterface1 (line 500) | public interface MyInterface1 method Method1 (line 502) | public void Method1() { } class Class1 (line 505) | public class Class1 type MyInterface2 (line 507) | private interface MyInterface2 // Noncompliant method Method1 (line 509) | public void Method1() { } class ReproIssue3842 (line 514) | public class ReproIssue3842 method SomeMethod (line 516) | public void SomeMethod() class ForSwitchArm (line 530) | private sealed class ForSwitchArm method Deconstruct (line 532) | public void Deconstruct(out object a, out object b) { a = b = null; } class ForIsPattern (line 535) | private sealed class ForIsPattern method Deconstruct (line 537) | public void Deconstruct(out string a, out string b) { a = b = null; } class Repro_8342 (line 542) | public class Repro_8342 method APrivateProtectedMethod (line 544) | [Private1] private protected void APrivateProtectedMethod() { } method APublicMethodWithMultipleAttributes1 (line 545) | [Public1, Private2] public void APublicMethodWithMultipleAttributes1()... method APublicMethodWithMultipleAttributes2 (line 546) | [Public1][Private2] public void APublicMethodWithMultipleAttributes2()... class Private1Attribute (line 548) | private class Private1Attribute : Attribute { } class Private2Attribute (line 549) | private class Private2Attribute : Attribute { } class Private3Attribute (line 550) | private class Private3Attribute : Attribute { } class Public1Attribute (line 551) | public class Public1Attribute : Attribute { } type IMyService (line 559) | public interface IMyService { } type ISomeExternalDependency (line 560) | public interface ISomeExternalDependency { } class UIServiceCollectionExtensions (line 562) | public static class UIServiceCollectionExtensions method AddDefaultMyService (line 564) | public static IServiceCollection AddDefaultMyService(this IServiceColl... class MyServiceSingleton (line 573) | private class MyServiceSingleton : IMyService method MyServiceSingleton (line 577) | public MyServiceSingleton(ISomeExternalDependency dependency) => thi... class MyServiceScoped (line 580) | private class MyServiceScoped : IMyService method MyServiceScoped (line 584) | public MyServiceScoped(ISomeExternalDependency dependency) => this.d... class MyServiceTransient (line 587) | private class MyServiceTransient : IMyService method MyServiceTransient (line 591) | public MyServiceTransient(ISomeExternalDependency dependency) => thi... class UsingCoalescingAssignmentOperator (line 599) | public class UsingCoalescingAssignmentOperator method UsingCoalescingAssignmentOperator (line 629) | public UsingCoalescingAssignmentOperator(string sPar) { } method SomeMethod (line 633) | public void SomeMethod() method StaticMethod (line 654) | public static UsingCoalescingAssignmentOperator StaticMethod() => new ... method OtherMethod (line 656) | private string OtherMethod(string sPar) => null; class ExpressionBodyProperties (line 662) | public class ExpressionBodyProperties method Method (line 678) | public void Method() class ReproIssue2478 (line 688) | public class ReproIssue2478 method SomeMethod (line 690) | public void SomeMethod() method InternalMethod (line 709) | internal void InternalMethod(InternalDeconstruct bar) class PublicDeconstructWithInnerType (line 714) | private sealed class PublicDeconstructWithInnerType method Deconstruct (line 716) | public void Deconstruct(out object a, out InternalDeconstruct b) { a... method Deconstruct (line 718) | private void Deconstruct(out object a, out object b) { a = b = null; } class InternalDeconstruct (line 721) | internal sealed class InternalDeconstruct method Deconstruct (line 723) | internal void Deconstruct(out object a, out object b) { a = b = null; } method Deconstruct (line 725) | private void Deconstruct(out object a, out string b, out string c) {... class PublicDeconstruct (line 728) | private class PublicDeconstruct method Deconstruct (line 730) | public void Deconstruct(out object a, out object b, out object c) { ... method Deconstruct (line 732) | protected void Deconstruct(out string a, out string b, out string c)... method Deconstruct (line 733) | private void Deconstruct(out object a, out string b, out string c) {... class MultipleDeconstructors (line 736) | private sealed class MultipleDeconstructors method Deconstruct (line 738) | public void Deconstruct(out object a, out object b, out object c) { ... method Deconstruct (line 740) | public void Deconstruct(out object a, out object b) // Compliant, De... class ProtectedInternalDeconstruct (line 746) | private class ProtectedInternalDeconstruct method Deconstruct (line 748) | protected internal void Deconstruct(out object a, out object b) { a ... method Deconstruct (line 750) | protected internal void Deconstruct(out object a, out object b, out ... class Ambiguous (line 753) | private class Ambiguous method Deconstruct (line 755) | public void Deconstruct(out string a, out string b, out string c) { ... method Deconstruct (line 756) | public void Deconstruct(out object a, out object b, out object c) { ... class NotUsedDifferentArgumentCount (line 759) | private class NotUsedDifferentArgumentCount method Deconstruct (line 761) | public void Deconstruct(out string a, out string b, out string c) { ... method Deconstruct (line 762) | public void Deconstruct(out string a, out string b, out string c, ou... class NotUsedNotVisible (line 765) | private class NotUsedNotVisible method Deconstruct (line 767) | protected void Deconstruct(out object a, out object b) { a = b = nul... method Deconstruct (line 768) | private void Deconstruct(out string a, out string b) { a = b = null; } class InvalidDeconstruct (line 771) | public class InvalidDeconstruct method Deconstruct (line 773) | private void Deconstruct(object a, out object b, out object c) { b =... method Deconstruct (line 774) | private void Deconstruct() { } method Deconstruct (line 776) | private int Deconstruct(out object a, out object b, out object c) //... method ReturnFromMethod (line 783) | private ForMethod ReturnFromMethod() => null; class ForMethod (line 784) | private sealed class ForMethod method Deconstruct (line 786) | public void Deconstruct(out object a, out object b) { a = b = null; } class ReproIssue2333 (line 790) | public class ReproIssue2333 method Method (line 792) | public void Method() class PrivateNestedClass (line 799) | private class PrivateNestedClass class ReproIssue2752 (line 821) | public class ReproIssue2752 type PrivateRecordStruct (line 183) | private record struct PrivateRecordStruct method ExternalMethod (line 190) | [DllImport("user32.dll")] type PrivateRecordRef (line 307) | private record PrivateRecordRef method ExternalMethod (line 312) | [DllImport("user32.dll")] type PrivateStructRef (line 823) | private struct PrivateStructRef class PrivateClassRef (line 828) | private class PrivateClassRef method ExternalMethodWithStruct (line 833) | [DllImport("user32.dll")] method ExternalMethodWithClass (line 836) | [DllImport("user32.dll")] class EmptyCtor (line 840) | public class EmptyCtor class WithEnums (line 846) | public class WithEnums type X (line 848) | private enum X // Noncompliant method UseEnum (line 853) | public void UseEnum() type Y (line 858) | private enum Y class Repro_6724 (line 866) | public class Repro_6724 type RecordStruct (line 879) | internal readonly record struct RecordStruct type MyStruct (line 891) | internal struct MyStruct method MyStruct (line 895) | private MyStruct(string value) => Value = value; method Create (line 897) | public static void Create(string value, out MyStruct? result) type RecordClass (line 903) | internal record class RecordClass class MyClass (line 915) | internal class MyClass method MyClass (line 919) | private MyClass(string value) => Value = value; method Create (line 921) | public static void Create(string value, out MyClass? result) class Extensions (line 928) | public static class Extensions // Repro for https://sonarsource.atlassia... method extension (line 930) | extension(List strings) class NullConditionallAssignment (line 953) | public class NullConditionallAssignment class Sample (line 955) | public class Sample class FieldKeyword (line 969) | public class FieldKeyword class PartialEvents (line 974) | public partial class PartialEvents method Method (line 978) | public void Method() method UnusedPrivateMember_MyUsedEvent (line 984) | private void UnusedPrivateMember_MyUsedEvent(object sender, EventArgs ... class CommunityRepro_ExtensionBlockPublicMembers (line 988) | public static class CommunityRepro_ExtensionBlockPublicMembers // Repro ... method extension (line 990) | extension(object instance) class NET_2805Repro (line 999) | public class NET_2805Repro // https://sonarsource.atlassian.net/browse/N... method CallingMethod (line 1001) | public int CallingMethod(int value) => new WithDebugger(value)[3]; type WithDebugger (line 1002) | [DebuggerDisplay("{this[0]}, {this[1]}, {this[2]}, {this[3]}, {this[4]... method AlsoCallingMethod (line 1008) | public int AlsoCallingMethod(int value) => new WithoutDebugger(value)[3]; type WithoutDebugger (line 1009) | readonly record struct WithoutDebugger(int Value) method EverythingIsReferenced (line 1014) | public int EverythingIsReferenced() => new IndexerReferencedInternally... type IndexerReferencedInternally (line 1015) | [DebuggerDisplay("{this[0]}, {this[1]}, {this[2]}, {this[3]}, {this[4]... class Repro_3596_AD0001 (line 1023) | public class Repro_3596_AD0001 // https://sonarsource.atlassian.net/b... method Repro_3596_AD0001 (line 1026) | public Repro_3596_AD0001() => field = new(this); class Nullable (line 1028) | private class Nullable(Repro_3596_AD0001 outer) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedPrivateMember.Performance.cs class InitialCreate (line 17) | public class InitialCreate : Migration method Up (line 19) | protected override void Up(MigrationBuilder migrationBuilder) method Down (line 2665) | protected override void Down(MigrationBuilder migrationBuilder) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedPrivateMember.TopLevelStatements.cs type Product (line 11) | public record Product(string Name, int CategoryId); type Record (line 13) | public record Record class TargetTypedNew (line 67) | public class TargetTypedNew method TargetTypedNew (line 69) | private TargetTypedNew(int arg) method TargetTypedNew (line 74) | private TargetTypedNew(string arg) // Noncompliant - FP method Create (line 79) | public static TargetTypedNew Create() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedPrivateMember.cs class MyAttribute (line 8) | public class MyAttribute : Attribute { } class UnusedPrivateMember (line 10) | class UnusedPrivateMember method Main (line 12) | public static void Main() { } class MyOtherClass (line 14) | private class MyOtherClass class MyClass (line 17) | private class MyClass method MyClass (line 19) | internal MyClass(int i) class Gen (line 27) | private class Gen : MyClass method Gen (line 29) | public Gen() : base(1) method Gen (line 34) | public Gen(int i) : this() // Noncompliant {{Remove unused construct... method UnusedPrivateMember (line 40) | public UnusedPrivateMember() method UnusedPrivateMember_MyUsedEvent (line 48) | private void UnusedPrivateMember_MyUsedEvent(object sender, EventArgs e) method UnusedPrivateMember_MyEvent (line 53) | private void UnusedPrivateMember_MyEvent() method Method (line 69) | private void Method() { } class Class (line 71) | private class Class { } type Struct (line 73) | private struct Struct { } method PrivateMethodWithAttribute (line 83) | [MyAttribute] void PrivateMethodWithAttribute() { } method GetValue (line 85) | public int GetValue(int x, int y) => array[x][y]; method GetItem (line 87) | public int GetItem(int i) => used[i]; method GetDictionary (line 89) | private Dictionary GetDictionary() => null; method GetDictionaryItem (line 91) | public int GetDictionaryItem(int i) => GetDictionary()[i]; class Class1 (line 111) | [My] class Class2 (line 114) | private class Class2 method Class2 (line 116) | private Class2() // Compliant method Class2 (line 119) | private Class2(int i) // Noncompliant {{Remove the unused private co... method Class2 (line 123) | private Class2(string i) type MyInterface (line 130) | private interface MyInterface method Method (line 132) | void Method(); class Class3 (line 134) | private class Class3 : MyInterface // Noncompliant {{Remove the unused... method Method (line 136) | public void Method() { var x = this[20]; } method Method1 (line 137) | public void Method1() { var x = Method2(); } method Method2 (line 138) | public static int Method2() { return 2; } class Class4 (line 146) | internal class Class4 : MyInterface // Noncompliant {{Remove the unuse... method Method (line 148) | public void Method() { } method MethodUsingLocalMethod (line 152) | public void MethodUsingLocalMethod() class NewClass1 (line 166) | class NewClass1 method Main (line 169) | static async Task Main() // Compliant - valid main method since C# 7.1 class NewClass2 (line 175) | class NewClass2 method Main (line 177) | static async Task Main() // Compliant - valid main method since C... class NewClass3 (line 185) | class NewClass3 method Main (line 187) | static async Task Main(string[] args) // Compliant - valid main method... class NewClass4 (line 193) | class NewClass4 method Main (line 195) | static async Task Main(string[] args) // Compliant - valid main m... class NewClass5 (line 203) | class NewClass5 method Main (line 205) | static async Task Main(string[] args) // Noncompliant class MyExtension (line 213) | public static class MyExtension method MyMethod (line 215) | private static void MyMethod(this T self) { "".MyMethod(); } class NonExactMatch (line 218) | public class NonExactMatch method M (line 220) | private static void M(int i) { } method M (line 221) | private static void M(string i) { } method Call (line 223) | public static void Call(dynamic d) class EventHandlerSample (line 229) | public class EventHandlerSample method MyOnClick (line 231) | private void MyOnClick(object sender, EventArgs args) { } class EventHandlerSample1 (line 234) | public partial class EventHandlerSample1 method MyOnClick (line 236) | private void MyOnClick(object sender, EventArgs args) { } class PropertyAccess (line 239) | public class PropertyAccess method M (line 268) | public void M() class Indexer1 (line 284) | public class Indexer1 class Indexer2 (line 290) | public class Indexer2 class Indexer3 (line 295) | public class Indexer3 class Indexer4 (line 300) | public class Indexer4 class Indexer5 (line 306) | public class Indexer5 method Method (line 311) | public void Method() class Indexer6 (line 317) | public class Indexer6 method Method (line 322) | public void Method() class GoodException (line 328) | [Serializable] method GoodException (line 331) | public GoodException() method GoodException (line 334) | public GoodException(string message) method GoodException (line 338) | public GoodException(string message, Exception innerException) method GoodException (line 342) | private GoodException(SerializationInfo info, StreamingContext context... class FieldAccess (line 348) | public class FieldAccess method FieldAccess (line 354) | public FieldAccess() class TestsFormerS1450 (line 362) | public class TestsFormerS1450 method M1 (line 366) | public void M1() method M2 (line 373) | public void M2() method M6 (line 380) | public void M6(int F14) method M15 (line 397) | public void M15(int i) => F36 = i + 1; class OutAndRef (line 400) | public class OutAndRef method M37 (line 403) | public void M37() => int.TryParse("1", out F37); method M38 (line 406) | public void M38() => Modify(ref F38); method Modify (line 408) | public void Modify(ref int x) => x = 37; method M39 (line 411) | public void M39() class MyClass (line 418) | internal class MyClass method MyClass (line 420) | protected MyClass() // Compliant class MyClass2 (line 426) | internal class MyClass2 method MyClass2 (line 428) | private MyClass2() // Noncompliant {{Remove the unused private constru... type IPublicInterface (line 434) | public interface IPublicInterface { } class PublicClass (line 435) | [Serializable] method PublicClass (line 440) | private PublicClass() class Repro_8342 (line 446) | class Repro_8342 method APublicMethod (line 448) | [Private1] public void APublicMethod() => APrivateMethodCalledByAPubli... method AnInternalMethod (line 449) | [Private2] internal void AnInternalMethod() { } method AProtectedMethod (line 450) | [Private3] protected void AProtectedMethod() { } method APrivateMethodCalledByAPublicMethod (line 451) | [Private4] private void APrivateMethodCalledByAPublicMethod() { } class Private1Attribute (line 453) | private class Private1Attribute : Attribute { } class Private2Attribute (line 454) | private class Private2Attribute : Attribute { } class Private3Attribute (line 455) | private class Private3Attribute : Attribute { } class Private4Attribute (line 456) | private class Private4Attribute : Attribute { } class Repro_8532 (line 460) | [Serializable] class Repro_9219 (line 470) | class Repro_9219 class OuterClass (line 504) | partial class OuterClass method MethodUsesNestedStruct (line 506) | public void MethodUsesNestedStruct() class NestedClass (line 511) | private static class NestedClass type NestedStruct (line 514) | [StructLayout(LayoutKind.Sequential)] method Method (line 520) | public void Method() { } type UnusedNestedType (line 521) | public struct UnusedNestedType { } class ChildEventArgs (line 530) | public class ChildEventArgs : EventArgs class InheritedEvent (line 535) | public class InheritedEvent : EventArgs class SenderObject (line 540) | public class SenderObject class Consumer (line 545) | public class Consumer method SenderObject_WithChildEvent (line 547) | static void SenderObject_WithChildEvent(SenderObject senderObject, Chi... method SenderObject_WithChildEvent (line 552) | static void SenderObject_WithChildEvent(SenderObject senderObject, Inh... method Comsumer_WithChildEvent (line 557) | static void Comsumer_WithChildEvent(object sender, ChildEventArgs e) /... class CollectionInitializerUsage (line 563) | public class CollectionInitializerUsage class Compliant (line 575) | private class Compliant : IEnumerable method Add (line 577) | internal void Add(int item) { } method GetEnumerator (line 578) | public IEnumerator GetEnumerator() => null; class AlsoCompliant (line 581) | private class AlsoCompliant : Compliant method Add (line 583) | internal void Add(int item) { } class NonCompliant (line 586) | private class NonCompliant : IEnumerable method Add (line 588) | internal void Add(int item) { } method GetEnumerator (line 589) | public IEnumerator GetEnumerator() => null; class CompliantDictionary (line 592) | private class CompliantDictionary : Dictionary method Add (line 594) | internal void Add(int key, int value) { } class NonCompliantDictionary (line 597) | private class NonCompliantDictionary : Dictionary method Add (line 599) | internal void Add(int key, int value) { } method UseFields (line 602) | public void UseFields() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedPrivateMember.part1.cs class Partial (line 3) | public partial class Partial method DoWork (line 5) | void DoWork() // Noncompliant method Initialize (line 9) | partial void Initialize(); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedPrivateMember.part2.cs class Partial (line 3) | partial class Partial method Used (line 5) | void Used() { } method Initialize (line 7) | partial void Initialize() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedReturnValue.Latest.cs type InterfaceWithDefaultImplementation (line 5) | interface InterfaceWithDefaultImplementation method SomeMethod (line 7) | int SomeMethod() // Compliant, part of the interface class SomeClass (line 13) | class SomeClass : InterfaceWithDefaultImplementation method Test (line 15) | public void Test() class StaticLocalFunctions (line 21) | class StaticLocalFunctions method Test (line 23) | public void Test() method GetNumberStatic1 (line 31) | static int GetNumberStatic1() { return 42; } method GetNumberStatic2 (line 32) | static int GetNumberStatic2() { return 42; } method GetNumberStatic3 (line 33) | static int GetNumberStatic3() { return 42; } method GetNumberStatic4 (line 34) | static int GetNumberStatic4(int neverUsedVal) { return neverUsedVal; } method GetNumberStaticExpression (line 35) | static int GetNumberStaticExpression() => 42; class UnusedReturnValue (line 40) | public class UnusedReturnValue type If (line 42) | private interface If method MyMethodIf (line 44) | static abstract int MyMethodIf(); class Nested (line 47) | private class Nested : If method MyMethodIf (line 49) | public static int MyMethodIf() { return 5; } method Test (line 51) | public void Test() method MyMethod (line 57) | private static int MyMethod() { return 42; } method MyMethod1 (line 59) | private int MyMethod1() { return 42; } method MyMethod2 (line 60) | private int MyMethod2() { return 42; } method MyMethod3 (line 61) | private int MyMethod3() { return 42; } method MyMethod4 (line 62) | private void MyMethod4() { return; } method Test (line 64) | public void Test() method SomeGenericMethod (line 77) | private T SomeGenericMethod() where T : class { return null; } method SomeGenericMethod2 (line 78) | private T SomeGenericMethod2() where T : class { return null; } class Extensions (line 82) | public static class Extensions class Sample (line 84) | public class Sample method Test (line 86) | public void Test() method extension (line 93) | extension(Sample s) class FieldKeyword (line 100) | public class FieldKeyword method Compliant (line 102) | private int Compliant() => 42; class NullConditionalAssignment (line 110) | public class NullConditionalAssignment class Sample (line 112) | public class Sample method Compliant (line 115) | private int Compliant() => 42; method Test (line 117) | public void Test() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedReturnValue.Partial.cs class Partial (line 1) | public partial class Partial method CallGetValue1 (line 3) | void CallGetValue1() method CallGetValue2 (line 8) | void CallGetValue2() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedReturnValue.TopLevelStatements.cs type RecordStruct (line 36) | record struct RecordStruct type PositionalRecordStruct (line 53) | record struct PositionalRecordStruct(int SomeProperty) type Record (line 70) | record Record type PositionalRecord (line 87) | record PositionalRecord(int SomeProperty) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedReturnValue.cs class UnusedReturnValue (line 8) | public class UnusedReturnValue type If (line 10) | private interface If method MyMethodIf (line 12) | int MyMethodIf(); class Nested (line 15) | private class Nested : If method MyMethodIf (line 17) | int If.MyMethodIf() { return 5; } method Test (line 19) | public void Test() method MyMethod (line 25) | private int MyMethod() { return 42; } method MyMethod1 (line 27) | private int MyMethod1() { return 42; } method MyMethod2 (line 28) | private int MyMethod2() { return 42; } method MyMethod3 (line 29) | private int MyMethod3() { return 42; } method MyMethod4 (line 30) | private void MyMethod4() { return; } method MyMethod5 (line 31) | private int MyMethod5(int neverUsedVal) => neverUsedVal; method MyMethod6 (line 32) | private int MyMethod6(int neverUsedVal) // Noncompliant method MyAsyncMethod (line 37) | private async Task MyAsyncMethod() { return; } method Test (line 39) | public void Test() method SomeGenericMethod (line 55) | private T SomeGenericMethod() where T : class { return null; } method SomeGenericMethod2 (line 56) | private T SomeGenericMethod2() where T : class { return null; } type UnusedReturnValueInStruct (line 59) | public struct UnusedReturnValueInStruct method MyMethod (line 61) | private int MyMethod() { return 42; } method Test (line 62) | public void Test() class WithLocalFunctions (line 68) | public class WithLocalFunctions method Method (line 81) | public void Method(IEnumerable myEnumerable) class Repro7429 (line 103) | public class Repro7429 method Method (line 105) | void Method(AnInterface foo) method Method (line 113) | void Method() type AnInterface (line 122) | public interface AnInterface method DoSomething (line 124) | void DoSomething(Func method); class Partial (line 129) | public partial class Partial method GetValue1 (line 131) | private int GetValue1() method GetValue2 (line 136) | private int GetValue2() // Noncompliant class CallbackUser (line 141) | public class CallbackUser method CallbackUser (line 143) | public CallbackUser(Func getValue) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedStringBuilder.Latest.cs class MyClass (line 3) | public class MyClass method MyMethod (line 5) | public void MyMethod(StringBuilder builder) // Compliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UnusedStringBuilder.cs class Program (line 3) | public class Program method MyMethod (line 5) | public StringBuilder MyMethod(StringBuilder builder, string myString) ... method GetStringBuilder (line 82) | public StringBuilder GetStringBuilder() => // Compliant method ExternalMethod (line 85) | public void ExternalMethod(StringBuilder builder) { } method AnotherMethod (line 87) | public string AnotherMethod() method Interpolation_InAssignment (line 93) | public void Interpolation_InAssignment() method Scoping (line 99) | public void Scoping() method CompoundAdd (line 110) | public string CompoundAdd() class MyClass (line 132) | public class MyClass class StringBuilderExtensions (line 137) | public static class StringBuilderExtensions method ToStringAndFree (line 139) | public static string ToStringAndFree(this StringBuilder sb) => string.... class Repro_7324 (line 143) | public class Repro_7324 method Concat_Prefix (line 145) | public string Concat_Prefix() method Concat_Infix (line 153) | public string Concat_Infix() method Concat_Suffix (line 161) | public string Concat_Suffix() method Concat_OutsideDeclaration (line 169) | public string Concat_OutsideDeclaration() method Concat_InAssignment (line 179) | public void Concat_InAssignment() method Concat_MultipleIdentifiers_InAssignment (line 186) | public void Concat_MultipleIdentifiers_InAssignment() method Concat_InInvocation (line 195) | public void Concat_InInvocation(string value) class NullConditionalOperator (line 203) | public class NullConditionalOperator method Method (line 205) | public void Method() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UriShouldNotBeHardcoded.AspNet.cs class AspDotNetController (line 7) | public class AspDotNetController : Controller method Foo (line 9) | public ActionResult Foo() method Bar (line 47) | public void Bar() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UriShouldNotBeHardcoded.AspNetCore.cs class DotNetCoreController (line 8) | public class DotNetCoreController : Controller method Bar (line 10) | public IActionResult Bar(Microsoft.AspNetCore.Routing.IRouter router) method Foo (line 20) | public void Foo(IRouteBuilder routeBuilder) method Paths (line 26) | public void Paths() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UriShouldNotBeHardcoded.Exceptions.cs class RuleExceptions (line 3) | public class RuleExceptions method CreateNamespaceManager (line 6) | static XmlNamespaceManager CreateNamespaceManager() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UriShouldNotBeHardcoded.Latest.cs class PrimaryConstructor (line 5) | class PrimaryConstructor( method Method (line 9) | void Method( type PrimaryConstructorStruct (line 22) | struct PrimaryConstructorStruct( type PrimaryConstructorRecordClass (line 28) | record class PrimaryConstructorRecordClass( type PrimaryConstructorRecordStruct (line 34) | record struct PrimaryConstructorRecordStruct( class Repro_8146 (line 41) | class Repro_8146 method Method (line 43) | void Method() class TestCases (line 62) | public class TestCases method RawStrings (line 64) | public void RawStrings() method SpanMatch (line 80) | public void SpanMatch(Span span, ReadOnlySpan readonlySpan... method ListPattern (line 87) | public void ListPattern(string[] uris) method Utf8 (line 92) | public void Utf8() class CSharp13 (line 101) | public class CSharp13 method EschapeChar (line 103) | public void EschapeChar() class Extensions (line 120) | public static class Extensions FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UriShouldNotBeHardcoded.cs class Program (line 6) | class Program method InvalidCases (line 8) | void InvalidCases(string s1, string s2) method ValidCases (line 65) | void ValidCases(string s) class ReproFN_7815 (line 84) | class ReproFN_7815 class MyClass (line 86) | class MyClass method Method (line 91) | void Method() class Repro_8169 (line 116) | class Repro_8169 method Method (line 118) | void Method() class Properties (line 129) | public class Properties FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseAwaitableMethod.Latest.cs class C (line 5) | public class C method ReturnMethod (line 11) | C ReturnMethod() => null; method ReturnMethodAsync (line 12) | Task ReturnMethodAsync() => null; method OperatorPrecedence (line 14) | async Task OperatorPrecedence() // https://learn.microsoft.com/en-us/d... method LocalFunctions (line 24) | async Task LocalFunctions() method InLocalFunction (line 32) | async Task InLocalFunction() class Sample (line 45) | public class Sample method MethodInvocation (line 47) | async Task MethodInvocation(Sample sample) class Extensions (line 54) | public static class Extensions method extension (line 56) | extension(Sample s) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseAwaitableMethod.Moq.cs type IReproInterface (line 5) | public interface IReproInterface class Repro (line 11) | public class Repro method AsyncMethod (line 13) | public async Task AsyncMethod() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseAwaitableMethod.cs class C (line 8) | public class C method VoidMethod (line 14) | void VoidMethod() { } method VoidMethodAsync (line 15) | Task VoidMethodAsync() => Task.CompletedTask; method ReturnMethod (line 17) | C ReturnMethod() => null; method ReturnMethodAsync (line 18) | Task ReturnMethodAsync() => Task.FromResult(null); method BoolMethod (line 20) | bool BoolMethod() => true; method BoolMethodAsync (line 21) | Task BoolMethodAsync() => Task.FromResult(true); method GenericMethod (line 23) | T GenericMethod() => default(T); method GenericMethodAsync (line 24) | Task GenericMethodAsync() => Task.FromResult(default(T)); method MethodInvocations (line 35) | async Task MethodInvocations() method NonAsyncMethod_VoidReturning (line 64) | public void NonAsyncMethod_VoidReturning() method NonAsyncMethod_TaskReturning (line 69) | public Task NonAsyncMethod_TaskReturning() method OperatorPrecedence (line 75) | async Task OperatorPrecedence() // https://learn.microsoft.com/en-us/d... method ExtensionMethods (line 103) | async Task ExtensionMethods() class Extensions (line 109) | public static class Extensions method ExtVoidMethod (line 111) | public static void ExtVoidMethod(this C c) { } method ExtVoidMethodAsync (line 112) | public static Task ExtVoidMethodAsync(this C c) => Task.CompletedTask; class Overloads (line 115) | public class Overloads method ImplicitConversionsMethod (line 117) | public long ImplicitConversionsMethod(int i, IComparable j) => 0; method ImplicitConversionsMethodAsync (line 118) | public Task ImplicitConversionsMethodAsync(long otherName1, int o... method ImplicitConversionsMethodAsync (line 119) | public Task ImplicitConversionsMethodAsync(byte otherName1, byte... method TypeParameter (line 121) | public void TypeParameter(C c) { } method TypeParameter (line 122) | public Task TypeParameter(T t) where T : C => Task.CompletedTask; method Test (line 124) | public async Task Test(int i, byte j) class Inheritance (line 135) | public class Inheritance class Child (line 137) | class Child : Inheritance method OuterVoidMethod (line 139) | public void OuterVoidMethod() { } method InnerVoidMethod (line 140) | public void InnerVoidMethod() { } class GrandChild (line 143) | class GrandChild : Child method Test (line 147) | public async Task Test() method InnerVoidMethodAsync (line 161) | public Task InnerVoidMethodAsync() => Task.CompletedTask; method OuterVoidMethodAsync (line 164) | public Task OuterVoidMethodAsync() => Task.CompletedTask; method Test (line 166) | async Task Test() class AsynchronousLambdas (line 178) | class AsynchronousLambdas method CallAsyncLambda (line 180) | async Task CallAsyncLambda(StreamReader reader) method CreateActionAsync (line 199) | async Task CreateActionAsync(StreamReader reader) method Foo (line 208) | Task Foo() => null; class ObsoletedMethod (line 211) | class ObsoletedMethod method VoidMethod (line 213) | public void VoidMethod() { } method VoidMethodAsync (line 214) | [Obsolete] method Test (line 217) | async Task Test() class ExpressionTrees (line 223) | class ExpressionTrees method BoolMethod (line 225) | public bool BoolMethod() => true; method BoolMethodAsync (line 226) | public Task BoolMethodAsync() => Task.FromResult(true); method Test (line 228) | async Task Test() class WellKnownAsyncParameter (line 238) | class WellKnownAsyncParameter method VoidMethod (line 240) | void VoidMethod(int arg) { } method VoidMethodAsync (line 241) | Task VoidMethodAsync(int arg, CancellationToken token) => Task.Complet... method Test (line 243) | async Task Test() class ResolvesToSelf (line 249) | class ResolvesToSelf method Synchronous (line 251) | public void Synchronous() { } method SynchronousAsync (line 253) | public async Task SynchronousAsync() method Generic (line 258) | public void Generic() { } method GenericAsync (line 260) | public async Task GenericAsync() class XmlReaderException (line 266) | public class XmlReaderException method TestReader (line 268) | async Task TestReader(Stream stream) class TestLockClass (line 301) | public class TestLockClass method DoWorkAsync (line 305) | public async Task DoWorkAsync(CancellationToken cancellationToken) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseAwaitableMethod_DbDataReader.cs class DbDataReaderColumnReads (line 6) | public class DbDataReaderColumnReads method Read (line 8) | public async Task Read(DbDataReader reader, int ordinal) method ReadSync (line 26) | public async Task ReadSync(DbDataReader reader, int ordinal) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseAwaitableMethod_EF.cs class EntityFramework (line 9) | public class EntityFramework method Query (line 11) | public async Task Query() method NotIQueryable (line 42) | public async Task NotIQueryable(IEnumerable enumerable) method Context (line 49) | public async Task Context(DbContext dbContext) method DatabaseFacade (line 59) | public async Task DatabaseFacade(DatabaseFacade databaseFacade) class Repro_9590 (line 84) | public class Repro_9590 method DoSomeWork (line 86) | public async Task DoSomeWork(IDbContextFactory factory, ... class MyDbContextFactory (line 93) | public class MyDbContextFactory : IDbContextFactory method CreateDbContext (line 95) | public AppDbContext CreateDbContext() => throw new NotImplementedExc... method CreateDbContextAsync (line 97) | public Task CreateDbContextAsync() => throw new NotImp... class NotADbContextFactory (line 100) | public class NotADbContextFactory method CreateDbContext (line 102) | public AppDbContext CreateDbContext() => throw new NotImplementedExc... method CreateDbContextAsync (line 104) | public Task CreateDbContextAsync() => throw new NotImp... class AppDbContext (line 107) | public class AppDbContext : DbContext FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseAwaitableMethod_FluentValidation.cs class FluentValidationTests_IValidatorT (line 7) | public class FluentValidationTests_IValidatorT class IntAbstractValidator (line 9) | public class IntAbstractValidator : AbstractValidator { } class IntIValidatorT (line 11) | public class IntIValidatorT : IValidator method Validate (line 13) | public ValidationResult Validate(int instance) => null; method ValidateAsync (line 14) | public Task ValidateAsync(int instance, Cancellati... method Validate (line 16) | public ValidationResult Validate(IValidationContext context) => null; method ValidateAsync (line 17) | public Task ValidateAsync(IValidationContext conte... method CreateDescriptor (line 18) | public IValidatorDescriptor CreateDescriptor() => null; method CanValidateInstancesOfType (line 19) | public bool CanValidateInstancesOfType(Type type) => true; class ExplicitIntIValidatorT (line 22) | public class ExplicitIntIValidatorT : IValidator method Validate (line 24) | public ValidationResult Validate(int instance) => null; method Validate (line 25) | ValidationResult IValidator.Validate(int instance) => null; method ValidateAsync (line 26) | Task IValidator.ValidateAsync(int instance, C... method Validate (line 28) | ValidationResult IValidator.Validate(IValidationContext context) => ... method ValidateAsync (line 29) | Task IValidator.ValidateAsync(IValidationContext c... method CreateDescriptor (line 30) | IValidatorDescriptor IValidator.CreateDescriptor() => null; method CanValidateInstancesOfType (line 31) | bool IValidator.CanValidateInstancesOfType(Type type) => true; method Validate (line 34) | public async Task Validate() class FluentValidationTests_IValidator (line 49) | public class FluentValidationTests_IValidator class Validator (line 51) | public class Validator : IValidator method Validate (line 53) | public ValidationResult Validate(IValidationContext context) => null; method ValidateAsync (line 54) | public Task ValidateAsync(IValidationContext conte... method CreateDescriptor (line 55) | public IValidatorDescriptor CreateDescriptor() => null; method CanValidateInstancesOfType (line 56) | public bool CanValidateInstancesOfType(Type type) => true; class ExplicitIValidator (line 59) | public class ExplicitIValidator : IValidator method Validate (line 61) | public ValidationResult Validate(IValidationContext context) => null; method Validate (line 62) | ValidationResult IValidator.Validate(IValidationContext context) => ... method ValidateAsync (line 63) | Task IValidator.ValidateAsync(IValidationContext c... method CreateDescriptor (line 64) | IValidatorDescriptor IValidator.CreateDescriptor() => null; method CanValidateInstancesOfType (line 65) | bool IValidator.CanValidateInstancesOfType(Type type) => true; method Validate (line 68) | public async Task Validate() class FluentValidationTests_NotFluentValidation (line 79) | public class FluentValidationTests_NotFluentValidation method Validate (line 81) | public ValidationResult Validate(IValidationContext context) => null; method ValidateAsync (line 82) | public Task ValidateAsync(IValidationContext context... method Validate (line 84) | public ValidationResult Validate(T instance) => null; method ValidateAsync (line 85) | public Task ValidateAsync(T instance, Cancellatio... method Validate (line 87) | public async Task Validate() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseAwaitableMethod_MongoDBDriver.cs type Person (line 6) | public record Person(int Id, string Name); class MongoDBDriver (line 8) | public class MongoDBDriver method Query (line 10) | public async Task Query(IMongoCollection personCollection) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseAwaitableMethod_Sockets.cs class Sockets (line 9) | public class Sockets method Connect (line 11) | public async Task Connect() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseCharOverloadOfStringMethods.Fixed.cs class Issues (line 1) | class Issues method StartsWith (line 3) | bool StartsWith(string str) method EndsWith (line 7) | bool EndsWith(string str) method SwapEscape (line 11) | bool SwapEscape(string str) method Escaped (line 17) | bool Escaped(string str) method Chained (line 22) | void Chained(string str) class Unchanged (line 32) | class Unchanged method EndsWith (line 34) | public bool EndsWith(string str) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseCharOverloadOfStringMethods.Framework.cs class Testcases (line 6) | class Testcases method Simple (line 8) | void Simple() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseCharOverloadOfStringMethods.Latest.cs class CSharp13 (line 1) | class CSharp13 method StartsWithString (line 3) | bool StartsWithString(string str) method StartsWithChar (line 7) | bool StartsWithChar(string str) method EndsWithString (line 12) | bool EndsWithString(string str) method EndsWithChar (line 16) | bool EndsWithChar(string str) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseCharOverloadOfStringMethods.ToFix.cs class Issues (line 1) | class Issues method StartsWith (line 3) | bool StartsWith(string str) method EndsWith (line 7) | bool EndsWith(string str) method SwapEscape (line 11) | bool SwapEscape(string str) method Escaped (line 17) | bool Escaped(string str) method Chained (line 22) | void Chained(string str) class Unchanged (line 32) | class Unchanged method EndsWith (line 34) | public bool EndsWith(string str) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseCharOverloadOfStringMethods.cs class Testcases (line 6) | class Testcases method Simple (line 8) | void Simple() method Edgecases (line 52) | void Edgecases() method Chaining (line 61) | void Chaining() method GetString (line 90) | static string GetString() => "42"; method MutateString (line 91) | static string MutateString(string str) => "42"; method NotCalledOnString (line 93) | void NotCalledOnString() class FakeString (line 105) | class FakeString method StartsWith (line 107) | public bool StartsWith(string value) => true; method EndsWith (line 108) | public bool EndsWith(string value) => false; method StartsWith (line 110) | public bool StartsWith(char value) => true; method EndsWith (line 111) | public bool EndsWith(char value) => false; method StartsWith (line 113) | public bool StartsWith() => true; method EndsWith (line 114) | public bool EndsWith() => false; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseConstantLoggingTemplate.cs class Program (line 6) | public class Program method StringMethod (line 11) | private string StringMethod() => ""; method BasicScenarios (line 13) | public void BasicScenarios(ILogger logger, int arg) method NotLoggingMethod (line 60) | public void NotLoggingMethod(ILogger logger, int arg) method ImplementsILogger (line 65) | public void ImplementsILogger(NullLogger nullLogger, CustomLogger cust... method DoesNotImplementILogger (line 73) | public void DoesNotImplementILogger(NotILogger notILogger, int arg) method AliasedILogger (line 79) | public void AliasedILogger(AliasedLogger aliasedLogger, int arg) class CustomLogger (line 85) | public class CustomLogger : ILogger method BeginScope (line 87) | public IDisposable BeginScope(TState state) => null; method IsEnabled (line 89) | public bool IsEnabled(LogLevel logLevel) => false; method Log (line 91) | public void Log(LogLevel logLevel, EventId eventId, TState s... class NotILogger (line 96) | public class NotILogger method Log (line 98) | public void Log(LogLevel logLevel, string message, params object[] a... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseConstantsWhereAppropriate.CSharp11.cs class Program (line 5) | public class Program FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseConstantsWhereAppropriate.cs class Program (line 5) | public class Program method GetMyValue (line 48) | static int GetMyValue() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseCurlyBraces.CSharp7.cs class UseCurlyBraces (line 7) | public class UseCurlyBraces method UseCurlyBraces (line 9) | public UseCurlyBraces(object obj) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseCurlyBraces.cs class UseCurlyBraces (line 7) | public class UseCurlyBraces method UseCurlyBraces (line 9) | public UseCurlyBraces(object obj) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseDateTimeOffsetInsteadOfDateTime.cs class Program (line 5) | public class Program method Constructors (line 7) | void Constructors() method Fields (line 24) | void Fields() method StaticProperties (line 31) | void StaticProperties() method Methods (line 39) | void Methods(DateTime date) method EdgeCases (line 82) | void EdgeCases() class FakeDateTime (line 90) | public class FakeDateTime method MyMethod (line 92) | void MyMethod() => new DateTime(1); class DateTime (line 94) | public class DateTime method DateTime (line 96) | public DateTime(int ticks) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseFindSystemTimeZoneById.Net.cs class Program (line 4) | public class Program method Noncompliant (line 6) | public void Noncompliant() method Compliant (line 16) | public void Compliant() class OtherTZConverterUsage (line 24) | public class OtherTZConverterUsage class TZConvert (line 27) | private class TZConvert method IanaToWindows (line 29) | public static string IanaToWindows(string ianaTimeZoneName) method Compliant (line 35) | private void Compliant() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseFindSystemTimeZoneById.cs class Program (line 4) | public class Program method Compliant (line 6) | public void Compliant() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseGenericEventHandlerInstances.CSharp11.cs type IFoo (line 8) | interface IFoo class Foo (line 13) | public class Foo : IFoo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseGenericEventHandlerInstances.CSharp9.cs type WithEvents (line 5) | record WithEvents FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseGenericEventHandlerInstances.cs class Program (line 9) | class Program class SomeCommand (line 25) | class SomeCommand : ICommand method CanExecute (line 29) | public bool CanExecute(object parameter) method Execute (line 34) | public void Execute(object parameter) type IFoo (line 40) | interface IFoo class Foo (line 45) | public class Foo : IFoo class SubFoo (line 53) | public class SubFoo : Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseGenericWithRefParameters.cs class Foo (line 5) | public class Foo method Bar (line 7) | public void Bar(ref object o1, ref object o2) method Bar2 (line 14) | public void Bar2(ref T ref1, ref T ref2) method Bar3 (line 18) | public void Bar3(out object o1, FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseIFormatProviderForParsingDateAndTime.cs class Test (line 7) | class Test method DifferentSyntaxScenarios (line 11) | void DifferentSyntaxScenarios() method CallWithNullIFormatProvider (line 38) | void CallWithNullIFormatProvider() method CallWithFormatProvider (line 50) | void CallWithFormatProvider() method ParseMethodsOfNonTemporalTypes (line 59) | void ParseMethodsOfNonTemporalTypes() class CustomTypeCalledDateTime (line 66) | class CustomTypeCalledDateTime type DateTime (line 68) | public struct DateTime method Parse (line 70) | public static DateTime Parse(string s) => new DateTime(); method CustomTypeCalledDateTime (line 73) | CustomTypeCalledDateTime() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseIndexingInsteadOfLinqMethods.cs class Program (line 7) | static class Program method Main (line 9) | static void Main() { } method InterfaceCases (line 11) | static void InterfaceCases() method ListCases (line 27) | static void ListCases() method IListImplementation (line 61) | static void IListImplementation() method IReadonlyListImplementation (line 108) | static void IReadonlyListImplementation() method TrueNegatives (line 125) | static void TrueNegatives() class ImplementsIList (line 154) | class ImplementsIList : IList method Fluent (line 156) | public ImplementsIList Fluent() => this; method Add (line 162) | public void Add(T item) { } method Clear (line 163) | public void Clear() { } method Contains (line 164) | public bool Contains(T item) => false; method CopyTo (line 165) | public void CopyTo(T[] array, int arrayIndex) { } method IndexOf (line 166) | public int IndexOf(T item) => 42; method Insert (line 167) | public void Insert(int index, T item) { } method Remove (line 168) | public bool Remove(T item) => false; method RemoveAt (line 169) | public void RemoveAt(int index) { } method GetEnumerator (line 170) | public IEnumerator GetEnumerator() => null; method GetEnumerator (line 171) | IEnumerator IEnumerable.GetEnumerator() => null; class ImplementsIReadonlyList (line 174) | class ImplementsIReadonlyList : IReadOnlyList method GetEnumerator (line 178) | public IEnumerator GetEnumerator() => null; method GetEnumerator (line 179) | IEnumerator IEnumerable.GetEnumerator() => null; class DoesNotImplementIList (line 182) | class DoesNotImplementIList : IEnumerable method GetEnumerator (line 184) | public IEnumerator GetEnumerator() => null; method GetEnumerator (line 185) | IEnumerator IEnumerable.GetEnumerator() => null; class FakeList (line 188) | class FakeList { } class FakeListExtensions (line 190) | static class FakeListExtensions method First (line 192) | public static TSource First(this FakeList source) =>... method Last (line 193) | public static TSource Last(this FakeList source) => ... method ElementAt (line 194) | public static TSource ElementAt(this FakeList source... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseLambdaParameterInConcurrentDictionary.CSharp8.cs class Programs (line 6) | public class Programs method GetOrAdd (line 8) | void GetOrAdd(ConcurrentDictionary dictionary, int key) method AddOrUpdate (line 35) | void AddOrUpdate(ConcurrentDictionary dictionary, int key) method CompliantInvocations (line 69) | void CompliantInvocations(ConcurrentDictionary dictionary, H... method MyDictionary (line 76) | void MyDictionary(MyConcurrentDictionary dictionary, int key) method NameOf (line 81) | void NameOf(ConcurrentDictionary dictionary, string ke... class MyConcurrentDictionary (line 91) | class MyConcurrentDictionary : ConcurrentDictionary { } class HidesMethod (line 93) | class HidesMethod : ConcurrentDictionary method GetOrAdd (line 95) | public TValue GetOrAdd(TKey key, Func valueFactory) =>... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseNumericLiteralSeparator.cs class Program (line 5) | class Program method Invalid (line 7) | void Invalid() method Valid (line 15) | void Valid() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseParamsForVariableArguments.Latest.Partial.cs class PartialConstructor (line 4) | public partial class PartialConstructor method PartialConstructor (line 6) | public partial PartialConstructor(__arglist) // Noncompliant FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseParamsForVariableArguments.Latest.cs type IFoo (line 6) | public interface IFoo method Foo (line 8) | static abstract void Foo(__arglist); class BaseClass (line 11) | public class BaseClass : IFoo method Foo (line 13) | public static void Foo(__arglist) // Compliant - interface implementation method Do (line 17) | public virtual void Do(__arglist) // Noncompliant method Foo (line 26) | void Foo() class BaseClass (line 23) | public class BaseClass(__arglist) // Nomcompliant {{Use the 'params' key... method Foo (line 13) | public static void Foo(__arglist) // Compliant - interface implementation method Do (line 17) | public virtual void Do(__arglist) // Noncompliant method Foo (line 26) | void Foo() class Extensions (line 32) | public static class Extensions method StaticExtension (line 36) | public static string StaticExtension(__arglist) => "42"; class PartialConstructor (line 44) | public partial class PartialConstructor method PartialConstructor (line 46) | public partial PartialConstructor(__arglist); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseParamsForVariableArguments.cs type IFoo (line 6) | public interface IFoo method Foo (line 8) | void Foo(__arglist); class BaseClass (line 11) | public class BaseClass : IFoo method Foo (line 13) | public void Foo(__arglist) // Compliant - interface implementation method Do (line 17) | public virtual void Do(__arglist) // Noncompliant class Program (line 22) | public class Program : BaseClass method Program (line 24) | public Program(__arglist) { } method Bar (line 26) | public void Bar(__arglist) // Noncompliant {{Use the 'params' keyword ... method Bar2 (line 37) | protected void Bar2(__arglist) // Noncompliant method Bar3 (line 47) | public void Bar3(int val, string name, __arglist) // Noncompliant method Do (line 57) | public override void Do(__arglist) // Compliant - override method printf (line 61) | [DllImport("msvcrt40.dll")] method Bar4 (line 64) | public void Bar4() class FooBar (line 69) | private class FooBar method Bar4 (line 71) | public void Bar4(__arglist) // Compliant - private method FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UsePascalCaseForNamedPlaceHolders.Latest.cs class Repro_9545 (line 5) | public class Repro_9545 method Method (line 7) | public void Method(ILogger logger, int number) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UsePascalCaseForNamedPlaceHolders.cs class Program (line 4) | public class Program method Basics (line 6) | public void Basics(ILogger logger, int arg) method NamedArguments (line 52) | public void NamedArguments(ILogger logger, int arg) method IncorrectPlaceholderFormat (line 62) | public void IncorrectPlaceholderFormat(ILogger logger, int arg) method ClassImplementsILogger (line 72) | public void ClassImplementsILogger(CustomLogger logger, int arg) method ClassDoesNotImplementILogger (line 80) | public void ClassDoesNotImplementILogger(NotILogger notILogger, int arg) method Interpolation (line 86) | public void Interpolation(ILogger logger, int arg) class CustomLogger (line 98) | public class CustomLogger : ILogger method BeginScope (line 100) | public IDisposable BeginScope(TState state) => null; method IsEnabled (line 101) | public bool IsEnabled(LogLevel logLevel) => false; method Log (line 102) | public void Log(LogLevel logLevel, EventId eventId, TState s... class NotILogger (line 107) | public class NotILogger method LogCritical (line 109) | public void LogCritical(string message, params object[] args) { } method LogInformation (line 110) | public void LogInformation(string message, params object[] args) { } class NotILoggerExtensions (line 113) | public static class NotILoggerExtensions method LogCritical (line 115) | public static void LogCritical(NotILogger logger, string message, pa... class Repro_9545 (line 119) | public class Repro_9545 method Method (line 121) | public void Method(ILogger logger, int number) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseShortCircuitingOperator.Fixed.cs class UseShortCircuitingOperator (line 7) | public class UseShortCircuitingOperator method UseShortCircuitingOperator (line 12) | public UseShortCircuitingOperator() method ExtendedText (line 21) | public void ExtendedText(bool parameter) method ReturnSomeBool (line 34) | private bool ReturnSomeBool() => method Repro_8834 (line 37) | public void Repro_8834(bool a, bool b, bool c) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseShortCircuitingOperator.Latest.cs class FieldKeyword (line 5) | public class FieldKeyword class NullCondionalAssignment (line 20) | public class NullCondionalAssignment class Sample (line 22) | public class Sample FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseShortCircuitingOperator.cs class UseShortCircuitingOperator (line 7) | public class UseShortCircuitingOperator method UseShortCircuitingOperator (line 12) | public UseShortCircuitingOperator() method ExtendedText (line 22) | public void ExtendedText(bool parameter) method ReturnSomeBool (line 35) | private bool ReturnSomeBool() => method Repro_8834 (line 38) | public void Repro_8834(bool a, bool b, bool c) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseStringCreate.CSharp10.cs class Program (line 4) | class Program method Method (line 6) | void Method(string value, FormattableString formString) class ClassImplementingIFormattable (line 24) | class ClassImplementingIFormattable : IFormattable method ToString (line 26) | public string ToString(string? format, IFormatProvider? formatProvid... method CurrentCulture (line 27) | public string CurrentCulture(FormattableString formattable) => ""; method Invariant (line 28) | public string Invariant() => ""; class CustomFormattableString (line 32) | class CustomFormattableString class FormattableString (line 34) | static class FormattableString method CurrentCulture (line 36) | public static string CurrentCulture(string formattable) => ""; method Invariant (line 37) | public static string Invariant(string formattable) => ""; method Test (line 40) | void Test(string value) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseStringCreate.cs class Program (line 4) | public class Program method Method (line 6) | void Method(string value) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseStringIsNullOrEmpty.CSharp10.cs class UseStringIsNullOrEmpty (line 5) | class UseStringIsNullOrEmpty method Test (line 10) | public void Test(string value) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseStringIsNullOrEmpty.CSharp11.cs class UseStringIsNullOrEmpty (line 5) | class UseStringIsNullOrEmpty method Test (line 13) | public void Test(string value) method SpanMatch (line 26) | public void SpanMatch(Span span, ReadOnlySpan readonlySpan) method ListPattern (line 37) | public bool ListPattern(string[] uris) => FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseStringIsNullOrEmpty.cs class UseStringIsNullOrEmpty (line 5) | class UseStringIsNullOrEmpty method Test (line 10) | public void Test(string value, string otherValue) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseTestableTimeProvider.cs class DateTimeAsProvider (line 3) | public class DateTimeAsProvider method Noncompliant (line 5) | public void Noncompliant() method CompliantAre (line 17) | public void CompliantAre() class DateTime (line 31) | public class DateTime class DateTimeOffset (line 36) | public class DateTimeOffset FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseTrueForAll.Immutable.cs class ImmutableListTestcases (line 5) | class ImmutableListTestcases method Playground (line 7) | void Playground() class BuilderExtensions (line 44) | public static class BuilderExtensions method Fluent (line 46) | public static ImmutableList Fluent(this ImmutableList list) ... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseTrueForAll.cs class ListTestcases (line 5) | class ListTestcases method Playground (line 7) | void Playground() method All (line 64) | bool All(Func predicate) => true; method AcceptMethod (line 65) | void AcceptMethod(Func, bool> methodThatLooksLikeAll)... class GoodList (line 67) | class GoodList : List method Fluent (line 69) | public GoodList Fluent() => this; method CallAll (line 71) | void CallAll() => class BadList (line 75) | class BadList : List method All (line 77) | public bool All(Func predicate) => true; class ContainsAllMethod (line 80) | class ContainsAllMethod method All (line 82) | public bool All(Func predicate) => true; class ArrayTestcases (line 86) | class ArrayTestcases method Playground (line 88) | void Playground() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseUnixEpoch.Fixed.cs class Program (line 5) | public class Program method BasicCases (line 17) | void BasicCases(DateTime dateTime) method EdgeCases (line 36) | void EdgeCases() method DateTimeConstructors (line 46) | void DateTimeConstructors(int ticks, int year, int month, int day, int... method DateTimeOffsetConstructors (line 154) | void DateTimeOffsetConstructors(TimeSpan timeSpan, DateTime dateTime, ... class FakeDateTime (line 215) | public class FakeDateTime method MyMethod (line 217) | void MyMethod() class DateTime (line 223) | public class DateTime method DateTime (line 225) | public DateTime(int year, int month, int day) { } method DateTime (line 226) | public DateTime(string ticks) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseUnixEpoch.Framework.cs class Program (line 4) | public class Program FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseUnixEpoch.cs class Program (line 5) | public class Program method BasicCases (line 19) | void BasicCases(DateTime dateTime) method EdgeCases (line 38) | void EdgeCases() method DateTimeConstructors (line 48) | void DateTimeConstructors(int ticks, int year, int month, int day, int... method DateTimeOffsetConstructors (line 156) | void DateTimeOffsetConstructors(TimeSpan timeSpan, DateTime dateTime, ... class FakeDateTime (line 217) | public class FakeDateTime method MyMethod (line 219) | void MyMethod() class DateTime (line 225) | public class DateTime method DateTime (line 227) | public DateTime(int year, int month, int day) { } method DateTime (line 228) | public DateTime(string ticks) { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseUriInsteadOfString.Latest.Partial.cs class S3996 (line 5) | partial class S3996 FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseUriInsteadOfString.Latest.cs type S3994 (line 5) | public record S3994 type WithParams (line 15) | public record WithParams(string uri) // Noncompliant {{Change the 'uri' ... type WithTwoStringParams (line 21) | public record WithTwoStringParams(string uri, bool condition, string ano... type Foo (line 27) | public record struct Foo method Foo (line 53) | public Foo(string uri) { } method Foo (line 54) | public Foo(Uri uri) { } method Method (line 56) | public void Method(string uri) => Method(new Uri(uri)); method Method (line 57) | public void Method(Uri uri) { } method Test (line 59) | public void Test() type S3994 (line 36) | public record struct S3994 type WithParams (line 43) | public record struct WithParams(string uri) // Noncompliant {{Change the... class Foo (line 51) | public class Foo method Foo (line 53) | public Foo(string uri) { } method Foo (line 54) | public Foo(Uri uri) { } method Method (line 56) | public void Method(string uri) => Method(new Uri(uri)); method Method (line 57) | public void Method(Uri uri) { } method Test (line 59) | public void Test() class S3996 (line 80) | partial class S3996 FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseUriInsteadOfString.TopLevelStatements.cs type Foo (line 9) | public record Foo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseUriInsteadOfString.cs class S3996_Foo (line 6) | class S3996_Foo class S3996_Bar (line 12) | class S3996_Bar : S3996_Foo class S3996 (line 17) | class S3996 class S3995_Foo (line 64) | class S3995_Foo method Uri (line 66) | public virtual string Uri() => ""; class S3995_Bar (line 70) | class S3995_Bar : S3995_Foo method Uri (line 72) | public override string Uri() => ""; class S3995 (line 75) | class S3995 method AUrlMethod (line 78) | string AUrlMethod() => ""; method UrlMethod (line 79) | string UrlMethod() => ""; method ThisIsAnUrlMethod (line 80) | int ThisIsAnUrlMethod() => 1; method AUrnMethod (line 84) | string AUrnMethod() => ""; method UrnMethod (line 85) | string UrnMethod() => ""; method AUriMethod (line 89) | string AUriMethod() => ""; method UriMethod (line 90) | string UriMethod() => ""; method Pouring (line 94) | string Pouring() => ""; method Hurl (line 95) | string Hurl() => ""; class S3994 (line 101) | class S3994 method S3994 (line 103) | public S3994(string uri) { } method S3994 (line 104) | public S3994(Uri uri) { } method S3994 (line 106) | public S3994(string uri, bool blah) { } method S3994 (line 108) | private S3994(string uri, bool blah, bool foo) { } method OverloadedMethod (line 110) | public string OverloadedMethod(string url) => OverloadedMethod(new Uri... method OverloadedMethod (line 111) | public string OverloadedMethod(Uri url) => ""; method Method (line 113) | public string Method(Uri url) => ""; method MethodWithExtraParam (line 114) | public string MethodWithExtraParam(string url, bool somevalue) => ""; method Method2 (line 116) | public string Method2(Uri url) => ""; method Method2WithOptionalParam (line 117) | public string Method2WithOptionalParam(string url, bool foo = false) =... method Method3 (line 119) | public string Method3(string url) => ""; method Method3Generic (line 120) | public string Method3Generic(T url) => ""; method Method4Private (line 122) | public string Method4Private(string url) => Method4Private(new Uri(url)); method Method4Private (line 123) | private string Method4Private(Uri url) => ""; method ParamTest (line 125) | public string ParamTest(string uri) => ""; method ParamTest2 (line 127) | public string ParamTest2(int url) => ""; method ParamTestOverload (line 128) | public string ParamTestOverload(string uriParam) => ""; method ParamTestOverload (line 130) | public string ParamTestOverload(int uriParam) => ""; method MultipleParams (line 131) | public string MultipleParams(string uriParam, object urnParam, string ... class S3997 (line 139) | class S3997 method OverloadedMethod (line 141) | public string OverloadedMethod(Uri url) => ""; method OverloadedMethod (line 142) | public string OverloadedMethod(string url) => OverloadedMethod(new Uri... method OverloadedMethod2 (line 144) | public string OverloadedMethod2(Uri url) => ""; method OverloadedMethod2 (line 145) | public string OverloadedMethod2(string url) method OverloadedMethod3 (line 150) | public string OverloadedMethod3(Uri url) => ""; method OverloadedMethod3 (line 151) | public string OverloadedMethod3(string url) // Compliant method OverloadedMethod4 (line 157) | public string OverloadedMethod4(Uri url) => ""; method OverloadedMethod4 (line 158) | public string OverloadedMethod4(string url) // Noncompliant {{Refactor... method OverloadedMethod5 (line 163) | public string OverloadedMethod5(Uri url) => ""; method OverloadedMethod5 (line 164) | public string OverloadedMethod5(string url) => ""; class S4005 (line 169) | class S4005 method Main (line 171) | static void Main() class AllRules (line 196) | class AllRules method AllUrlWrong (line 198) | string AllUrlWrong(string url, string uri, string urn) => ""; method GetTheUrl (line 204) | string GetTheUrl(string url) => ""; method GetTheUrl (line 208) | string GetTheUrl(Uri url) => ""; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseValueParameter.Latest.Partial.cs class PartialProperty (line 4) | public partial class PartialProperty class PartialEvent (line 12) | public partial class PartialEvent FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseValueParameter.Latest.cs type IFoo (line 5) | interface IFoo class Foo (line 12) | public class Foo : IFoo type UseValueParameter (line 45) | record UseValueParameter class PartialProperty (line 90) | public partial class PartialProperty class FieldKeyword (line 99) | public class FieldKeyword class PartialEvent (line 106) | public partial class PartialEvent FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseValueParameter.cs type IDrawing (line 5) | public interface IDrawing class UseValueParameter (line 10) | class UseValueParameter : IDrawing type IFoo (line 74) | interface IFoo class Foo (line 81) | public class Foo : IFoo class Bar (line 102) | public class Bar : Foo class Baz (line 124) | public class Baz : IFoo class NewSyntax (line 141) | public class NewSyntax FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/UseWhereBeforeOrderBy.cs class Program (line 6) | static class Program method Main (line 9) | static void Main() { } method SimpleCase_OrderBy (line 11) | static void SimpleCase_OrderBy() method SimpleCase_OrderByDescending (line 30) | static void SimpleCase_OrderByDescending() method OrderWhereWhere (line 49) | static void OrderWhereWhere() method OrderWhereOrderWhere (line 68) | static void OrderWhereOrderWhere() method CompliantCases (line 85) | static void CompliantCases() method CustomImplementation (line 99) | static void CustomImplementation() class MyEnumerable (line 114) | public class MyEnumerable : IEnumerable method GetEnumerator (line 116) | public IEnumerator GetEnumerator() => null; method GetEnumerator (line 117) | IEnumerator IEnumerable.GetEnumerator() => null; class Fake (line 120) | public class Fake { } class SemiFake (line 122) | public class SemiFake : IEnumerable method GetEnumerator (line 124) | public IEnumerator GetEnumerator() => null; method GetEnumerator (line 125) | IEnumerator IEnumerable.GetEnumerator() => null; class FakeExtensions (line 128) | static class FakeExtensions method Where (line 130) | public static Fake Where(this Fake source, ... method OrderBy (line 131) | public static Fake OrderBy(this Fake ... method OrderBy (line 132) | public static SemiFake OrderBy(this SemiFake b1; class B (line 17) | class B(int b1) method B (line 21) | public B(int b1, int b2) : this(b1) method Method (line 25) | int Method() => b1; FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Utilities/SymbolReferenceAnalyzer/Property.FieldKeyword.cs class Sample (line 1) | public class Sample method Go (line 7) | public void Go() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Utilities/SymbolReferenceAnalyzer/Property.cs class Sample (line 1) | public class Sample method Go (line 7) | public void Go() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Utilities/SymbolReferenceAnalyzer/Property_Partial1.cs class Property_Partial (line 3) | public partial class Property_Partial method Reference1 (line 10) | public void Reference1() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Utilities/SymbolReferenceAnalyzer/Property_Partial2.cs class Property_Partial (line 3) | public partial class Property_Partial method Reference2 (line 7) | public void Reference2() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Utilities/SymbolReferenceAnalyzer/Razor.razor.cs class Razor (line 5) | public partial class Razor FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Utilities/SymbolReferenceAnalyzer/Setter.cs class Sample (line 1) | public class Sample FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Utilities/SymbolReferenceAnalyzer/ToDo.cs class ToDo (line 3) | public class ToDo FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Utilities/SymbolReferenceAnalyzer/TokenThreshold.cs class DictionaryInitialization (line 6) | public class DictionaryInitialization class FooCollection (line 8) | public class FooCollection : Dictionary : Dictionary { } FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Utilities/TokenTypeAnalyzer/Tokens.Latest.cs class Sample (line 3) | public class Sample method A (line 19) | public void A() class PrimaryConstructor (line 30) | class PrimaryConstructor(System.String p1, string p2 = "default value th... method Method (line 32) | void Method() class SubClass (line 40) | class SubClass() : PrimaryConstructor("something") method SubClass (line 42) | public SubClass(int p1) : this() { } class Extensions (line 45) | static class Extensions method extension (line 47) | extension(string s) class FieldKeyword (line 53) | public class FieldKeyword FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/Utilities/TokenTypeAnalyzer/Tokens.cs class Sample (line 1) | public class Sample FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ValueTypeShouldImplementIEquatable.CSharp10.cs type MyStruct (line 5) | record struct MyStruct // Compliant. Record struct implement IEquatable ... type MyCompliantStruct (line 9) | record struct MyCompliantStruct : IEquatable // Compl... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ValueTypeShouldImplementIEquatable.cs type MyStruct (line 4) | struct MyStruct // Noncompliant {{Implement 'IEquatable' in value typ... type MyCompliantStruct (line 9) | struct MyCompliantStruct : IEquatable // Compliant method Equals (line 11) | public bool Equals(MyCompliantStruct other) type ComparableStruct (line 17) | struct ComparableStruct : IComparable // Noncompliant method CompareTo (line 19) | public int CompareTo(ComparableStruct other) { return 0; } type Repro_3157 (line 23) | ref struct Repro_3157 // Compliant, ref structs can not implement interf... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/ValuesUselesslyIncremented.Latest.cs type S (line 4) | public struct S method S (line 6) | public S() method M1 (line 16) | public (int, int) M1(int i, int j) method M2 (line 22) | public (int, (int, int)) M2() method M3 (line 31) | public (int, (int, int)) M3(int i, int j, int k) => method M4 (line 34) | public (int, (int, int)) M4(int i, int j, int k) => class Noncompliant (line 39) | public class Noncompliant method ThisExampleIsNoncompliant (line 41) | public WeirdOperatorOverload ThisExampleIsNoncompliant(WeirdOperatorOv... class WeirdOperatorOverload (line 47) | public class WeirdOperatorOverload : IDecrementOperators i++; class Repro_2265 (line 49) | class Repro_2265 method Method (line 52) | int Method(int i) class Properties (line 59) | public class Properties method NoncompliantTest (line 68) | public int NoncompliantTest(Properties properties) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/VariableShadowsField.Latest.Partial.cs class VariableShadowsField (line 3) | public partial class VariableShadowsField method Method (line 5) | public void Method(object someParameter) class VariableShadowsFieldPrimaryConstructor (line 14) | public partial class VariableShadowsFieldPrimaryConstructor method Method (line 16) | void Method() class PartialProperty (line 23) | public partial class PartialProperty method DoSomething (line 28) | public void DoSomething() class PartialConstructor (line 35) | public partial class PartialConstructor method PartialConstructor (line 37) | public partial PartialConstructor() class PartialEvent (line 43) | public partial class PartialEvent method Shadow (line 50) | public void Shadow() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/VariableShadowsField.Latest.cs class CSharp8LocalFunctions (line 3) | public class CSharp8LocalFunctions method ShadowField (line 8) | public void ShadowField() method ShadowProperty (line 16) | public void ShadowProperty() method MethodWithLocalVar (line 24) | public void MethodWithLocalVar() class MyParentClass (line 40) | class MyParentClass(int parentClassParam) class MyClass (line 42) | class MyClass(int a, int b, int c, int d, int e, int f, int g, int h, ... class MyChildClass (line 52) | class MyChildClass(int childClassParam) { } method MyClass (line 54) | MyClass(int ctorParam, int f) : this(ctorParam, f, 1, 1, 1, 1, 1, 1,... method MyMethod (line 56) | void MyMethod() class Repro_8260 (line 75) | class Repro_8260(int primaryCtorParam) method StaticMethod (line 77) | public static void StaticMethod() method NonStaticMethod (line 82) | public void NonStaticMethod() class VariableShadowsField (line 88) | public partial class VariableShadowsField class VariableShadowsFieldPrimaryConstructor (line 94) | public partial class VariableShadowsFieldPrimaryConstructor(int a) { } class SomeClass (line 96) | public class SomeClass method SomeMethod (line 100) | public void SomeMethod(byte[] byteArray) type S (line 108) | public record struct S class PartialProperty (line 156) | public partial class PartialProperty class Extensions (line 161) | public static class Extensions class Sample (line 163) | public class Sample method extension (line 171) | extension(Sample s) class FieldKeyword (line 186) | public class FieldKeyword class PartialConstructor (line 192) | public partial class PartialConstructor method PartialConstructor (line 195) | public partial PartialConstructor(); class PartialEvent (line 198) | public partial class PartialEvent FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/VariableShadowsField.TopLevelStatements.cs type Rec (line 5) | record Rec FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/VariableShadowsField.cs class VariableShadowsField (line 7) | public class VariableShadowsField method doSomething (line 16) | public void doSomething(object someParameter) class X (line 58) | class X method doSomeUnsafe (line 63) | public unsafe void doSomeUnsafe() method doSomethingElse (line 75) | public void doSomethingElse(int MyField) // Compliant method VariableShadowsField (line 80) | public VariableShadowsField(int myField) method build (line 85) | public static VariableShadowsField build(int MyField) class WithLocalFunctions (line 91) | public class WithLocalFunctions method ShadowField (line 96) | public void ShadowField() method ShadowProperty (line 104) | public void ShadowProperty() class DeclarationExpressions (line 113) | public class DeclarationExpressions method OutDeclarationWithConcreteType (line 117) | public void OutDeclarationWithConcreteType() method OutDeclarationWithVar (line 122) | public void OutDeclarationWithVar() method OutReference (line 127) | public void OutReference() method OutParameter (line 132) | public void OutParameter(out object parameter) class Base (line 138) | public class Base method BaseStaticMethod (line 150) | public static void BaseStaticMethod() method BaseInstanceMethod (line 159) | public void BaseInstanceMethod() class Derived (line 169) | public class Derived : Base method DerivedStaticMethod (line 171) | public static void DerivedStaticMethod() method DerivedInstanceMethod (line 183) | public void DerivedInstanceMethod() class ClassicExtensions (line 193) | public static class ClassicExtensions class Sample (line 198) | public class Sample method ShadowContainerClass (line 203) | public static void ShadowContainerClass(this Sample sample) method ShadowExtendedClass (line 209) | public static void ShadowExtendedClass(this Sample sample) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/VariableUnused.Latest.cs type Record (line 7) | record Record class PrimaryConstructorParameterNotUsed (line 15) | class PrimaryConstructorParameterNotUsed(int someInt) { } class PrimaryConstructorParameterUsedInMethod (line 17) | class PrimaryConstructorParameterUsedInMethod(int someInt) // Compliant class StaticLocalFunctions (line 22) | public class StaticLocalFunctions method Method (line 24) | public void Method() class Repro_3137 (line 40) | public class Repro_3137 method GoGoGo (line 42) | public void GoGoGo(Logger log) class Logger (line 51) | public class Logger method BeginScope (line 53) | public IDisposable BeginScope(string scope) class RecursivePatterns (line 60) | public class RecursivePatterns method TestMethod (line 62) | public void TestMethod() class SomeClass (line 106) | public class SomeClass method SomeMethod (line 108) | public void SomeMethod(object[] byteArray) type S (line 115) | public record struct S class Sample (line 161) | public class Sample FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/VariableUnused.TopLevelStatements.cs type C (line 44) | record C(string Foo, string Bar); type Pair (line 46) | record Pair(C A, C B); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/VariableUnused.cs class VariableUnused (line 11) | public class VariableUnused method LinqRangeVariables (line 13) | void LinqRangeVariables() method F1 (line 120) | void F1() method DoSomething (line 165) | private object DoSomething(string foo, string p1) method F2 (line 170) | void F2(int a) method Bar (line 175) | void Bar(out string a) method F3 (line 180) | void F3() class Cl (line 189) | internal class Cl : List class Lambdas (line 193) | public class Lambdas method Foo (line 195) | public void Foo(List list) class WithLocalFunctions (line 207) | public class WithLocalFunctions method Method (line 209) | public void Method() class Tuples (line 224) | public class Tuples method M (line 226) | public static (int foo, int bar) M(string text) method UnusedTuple (line 232) | public void UnusedTuple() method UsedTuple (line 237) | public void UsedTuple() method Use (line 243) | private void Use((int, int) t) { } class CSharpSevenVariableDeclarations (line 246) | public class CSharpSevenVariableDeclarations method Foo (line 248) | public void Foo() method SwitchStatements (line 278) | public void SwitchStatements() class Shape (line 294) | public class Shape class Square (line 299) | public class Square : Shape class Circle (line 304) | public class Circle : Shape class Loops (line 310) | public class Loops method ForEach (line 312) | public void ForEach() method For (line 320) | public void For() method ForeachDeconstruction (line 328) | public void ForeachDeconstruction(IEnumerable<(int, int)> pairs) class Shadowing (line 343) | public class Shadowing method SequentialBlocks (line 345) | public void SequentialBlocks() method TwoLocalFunctions (line 351) | public void TwoLocalFunctions() class LocalConstants (line 361) | public class LocalConstants method Method (line 363) | public void Method() class MultipleDeclarations (line 371) | public class MultipleDeclarations method Method (line 373) | public void Method() class AnonymousMethods (line 380) | public class AnonymousMethods method Method (line 382) | public void Method() class NameofExpression (line 397) | public class NameofExpression method Method (line 399) | public void Method() class TestWithAmbiguous (line 407) | public class TestWithAmbiguous method SomeMethod (line 410) | public void SomeMethod() class Ambiguous (line 419) | public class Ambiguous class Ambiguous (line 425) | public class Ambiguous FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/VirtualEventField.Fixed.cs class VirtualEventField (line 6) | public class VirtualEventField FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/VirtualEventField.Latest.Fixed.cs type VirtualEventField (line 3) | public record VirtualEventField type IVirtualEvent (line 14) | public interface IVirtualEvent class PartialEvents (line 19) | public partial class PartialEvents FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/VirtualEventField.Latest.Partial.cs class PartialEvents (line 3) | public partial class PartialEvents FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/VirtualEventField.Latest.cs type VirtualEventField (line 3) | public record VirtualEventField type IVirtualEvent (line 15) | public interface IVirtualEvent class PartialEvents (line 20) | public partial class PartialEvents FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/VirtualEventField.cs class VirtualEventField (line 6) | public class VirtualEventField FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/WcfMissingContractAttribute.cs type IMyService1 (line 6) | [System.ServiceModel.ServiceContract] method MyServiceMethod (line 9) | [System.ServiceModel.OperationContract] method MyServiceMethod2 (line 11) | int MyServiceMethod2(); type IMyService2 (line 14) | [System.ServiceModel.ServiceContract] method MyServiceMethod (line 18) | int MyServiceMethod(); class IMyService3 (line 21) | class IMyService3 // Noncompliant {{Add the 'ServiceContract' attribute ... method MyServiceMethod (line 23) | [System.ServiceModel.OperationContract] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/WcfNonVoidOneWay.cs class MyAttribute (line 7) | public class MyAttribute : Attribute type IMyService1 (line 12) | [ServiceContract] method MyServiceMethod (line 15) | [OperationContract] method MyServiceMethod2 (line 18) | [OperationContract(IsOneWay = true)] method MyServiceMethod3 (line 22) | [OperationContract(IsOneWay = false)] method MyServiceMethod4 (line 25) | [OperationContract(IsTerminating = true)] method MyServiceMethod5 (line 29) | [OperationContract(IsOneWay = "mistake")] // Error [CS0029] - Cannot i... method BeginMyServiceMethod6 (line 32) | [OperationContract(IsOneWay = true, AsyncPattern = true)] FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/WeakSslTlsProtocols.CSharp12.cs class WeakSslTlsProtocols (line 3) | class WeakSslTlsProtocols(SecurityProtocolType classParam = SecurityProt... method SecurityProtocolTypeNonComplaint (line 5) | void SecurityProtocolTypeNonComplaint(SecurityProtocolType methodParam... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/WeakSslTlsProtocols.cs class WeakSslTlsProtocols (line 11) | public class WeakSslTlsProtocols method SecurityProtocolTypeNonComplaint (line 13) | public void SecurityProtocolTypeNonComplaint() method SslProtocolsNonComplaint (line 38) | public void SslProtocolsNonComplaint() class Dummy1 (line 124) | private class Dummy1 method Dummy1 (line 126) | public Dummy1() : this(SslProtocols.Default) // Noncompliant method Dummy1 (line 132) | public Dummy1(SslProtocols protocol) class Dummy2 (line 138) | private class Dummy2 : Dummy1 method Dummy2 (line 140) | public Dummy2() : base(SslProtocols.Default) // Noncompliant method SecurityProtocolTypeCompliant (line 147) | public void SecurityProtocolTypeCompliant() method SslProtocolsCompliant (line 157) | public void SslProtocolsCompliant() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XMLSignatureCheck.cs class XMLSignatures (line 6) | public class XMLSignatures method TestCases (line 8) | public void TestCases(RSACryptoServiceProvider rsaCryptoServiceProvider) class SignedXmlExtensions (line 28) | public static class SignedXmlExtensions method CheckSignature (line 30) | public static bool CheckSignature(this SignedXml signedXml, string oth... method CheckSignatureReturningKey (line 33) | public static bool CheckSignatureReturningKey(this SignedXml signedXml... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_AlwaysSafe.cs class AlwaysSafe (line 8) | class AlwaysSafe method XmlNodeReader_1 (line 11) | protected void XmlNodeReader_1() method ConfiguredWithSecureResolver (line 18) | protected void ConfiguredWithSecureResolver() method XElementTest (line 26) | protected void XElementTest() class IgnoredToAvoidNoise (line 36) | class IgnoredToAvoidNoise method XslCompiledTransform (line 39) | protected void XslCompiledTransform(StringWriter stringWriter) method XmlDictionaryReader (line 50) | protected void XmlDictionaryReader() method XDocumentTest (line 61) | protected void XDocumentTest() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XPathDocument_Net35.cs class XPathDocumentCases (line 7) | public class XPathDocumentCases method UnsafeByDefault (line 9) | public void UnsafeByDefault() method UnsafeXmlReader (line 14) | public void UnsafeXmlReader() method SafeXmlReader (line 21) | public void SafeXmlReader() method XmlReaderAsParameter (line 27) | public void XmlReaderAsParameter(XmlReader xmlReader) class VariousUsages (line 33) | public class VariousUsages method InsideTryCatch (line 37) | public void InsideTryCatch() method LocalFunction (line 48) | private void LocalFunction() method LambdaFunction (line 56) | private void LambdaFunction() method GetDocument (line 61) | private XPathDocument GetDocument() => new XPathDocument("uri"); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XPathDocument_Net4.cs class XPathDocumentCases (line 6) | public class XPathDocumentCases method UnsafeByDefault (line 8) | public void UnsafeByDefault() method UnsafeXmlReader (line 13) | public void UnsafeXmlReader() method SafeXmlReader (line 20) | public void SafeXmlReader() method XmlReaderAsParameter (line 26) | public void XmlReaderAsParameter(XmlReader xmlReader) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XPathDocument_Net452.cs class XPathDocumentCases (line 7) | public class XPathDocumentCases method SafeByDefault (line 9) | public void SafeByDefault() method UnsafeXmlReader (line 14) | public void UnsafeXmlReader() method SafeXmlReader (line 22) | public void SafeXmlReader() method XmlReaderAsParameter (line 28) | public void XmlReaderAsParameter(XmlReader xmlReader) class VariousUsages (line 34) | public class VariousUsages method InsideTryCatch (line 38) | public void InsideTryCatch() method LocalFunction (line 49) | private void LocalFunction() method LambdaFunction (line 57) | private void LambdaFunction() method GetDocument (line 62) | private XPathDocument GetDocument() => new XPathDocument("uri"); FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlDocument.cs class NoncompliantTests (line 18) | class NoncompliantTests method XmlDocumentTest (line 22) | protected void XmlDocumentTest(XmlUrlResolver xmlUrlResolver) method XmlDataDocumentTest (line 29) | protected void XmlDataDocumentTest() method ConfigXmlDocumentTest (line 36) | protected void ConfigXmlDocumentTest() method XmlFileInfoDocumentTest (line 43) | protected void XmlFileInfoDocumentTest() method XmlTransformableDocumentTest (line 50) | protected void XmlTransformableDocumentTest() class CompliantTests_After_Net_4_5_2 (line 57) | class CompliantTests_After_Net_4_5_2 method XmlDocument_WithSecureResolver (line 59) | protected void XmlDocument_WithSecureResolver(XmlSecureResolver xmlSec... method XmlDocument_WithNullResolver (line 65) | protected void XmlDocument_WithNullResolver(XmlSecureResolver xmlSecur... method XmlDataDocumentTest (line 71) | protected void XmlDataDocumentTest() method ConfigXmlDocumentTest (line 76) | protected void ConfigXmlDocumentTest() method XmlFileInfoDocumentTest (line 81) | protected void XmlFileInfoDocumentTest() method XmlTransformableDocumentTest (line 86) | protected void XmlTransformableDocumentTest() class VariousUnsafeCombinations (line 95) | class VariousUnsafeCombinations method InsideTryCatch (line 97) | public void InsideTryCatch() method InsideLoop (line 110) | public void InsideLoop() method LocalFunction (line 120) | private void LocalFunction() method LambdaFunction (line 132) | private void LambdaFunction() method SetUnsafeResolverFromMethod (line 139) | private void SetUnsafeResolverFromMethod() method GetUrlResolver (line 145) | private XmlUrlResolver GetUrlResolver() => new XmlUrlResolver(); method SetUnsafeResolverFromMethodWithTuple (line 147) | private void SetUnsafeResolverFromMethodWithTuple() method GetUrlResolverInTuple (line 154) | private (XmlUrlResolver resolver, int i) GetUrlResolverInTuple() => (n... method PropagateResolverValue (line 156) | private void PropagateResolverValue(ConfigXmlDocument doc) method VariousUnsafeCombinations (line 176) | public VariousUnsafeCombinations() method MultipleConstructorCallsForSameType (line 183) | public void MultipleConstructorCallsForSameType() method MultipleSetsLastSanitize (line 191) | public void MultipleSetsLastSanitize() method MultipleSetsLastMakeUnsafe (line 199) | public void MultipleSetsLastMakeUnsafe() method MultipleVulnerableApisInSameMethod (line 206) | public void MultipleVulnerableApisInSameMethod() method Caller (line 214) | public void Caller() method Callee (line 220) | public void Callee(ConfigXmlDocument doc) method WithInitializeInsideIf (line 225) | public void WithInitializeInsideIf() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlDocument_CSharp10.cs type RecordStruct (line 13) | public record struct RecordStruct FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlDocument_Net35.cs class Test (line 17) | class Test method XmlDocument_SetUnsafeProperty (line 21) | protected static void XmlDocument_SetUnsafeProperty(XmlUrlResolver xml... method XmlDocument_OnlyConstructor (line 27) | protected static void XmlDocument_OnlyConstructor() method XmlDocument_InsideIf_SanitizeInCondition (line 32) | protected void XmlDocument_InsideIf_SanitizeInCondition(bool foo) method XmlDocument_InsideIf_SanitizeOutsideCondition (line 41) | protected void XmlDocument_InsideIf_SanitizeOutsideCondition(bool foo) method WithInitializeInsideIf (line 51) | public void WithInitializeInsideIf(XmlUrlResolver xmlUrlResolver) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlDocument_Net4.cs class Test (line 17) | class Test method XmlDocument_MakeUnsafeWithProperty (line 21) | protected static void XmlDocument_MakeUnsafeWithProperty(XmlUrlResolve... method XmlDocument_2 (line 27) | protected static void XmlDocument_2() method XmlDocument_SanitizeInsideIf (line 32) | protected void XmlDocument_SanitizeInsideIf(bool foo) method XmlDocument_InsideIf_SanitizeAfterIf (line 41) | protected void XmlDocument_InsideIf_SanitizeAfterIf(bool foo) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlDocument_UnknownFrameworkVersion.cs class Test (line 17) | class Test method XmlDocument_MakeUnsafe (line 19) | protected static void XmlDocument_MakeUnsafe(XmlUrlResolver xmlUrlReso... method XmlDocument_OnlyConstructor (line 25) | protected static void XmlDocument_OnlyConstructor() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlReader_CSharp9.cs class Foo (line 29) | class Foo method Bar (line 31) | void Bar() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlReader_ExternalParameter.cs class XmlReaderExternalParameter (line 5) | public class XmlReaderExternalParameter method XmlReader_ExternalParameter (line 15) | public void XmlReader_ExternalParameter() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlReader_Net35.cs class XmlExternalEntityShouldNotBeParsed_XmlReader_Net35 (line 5) | public class XmlExternalEntityShouldNotBeParsed_XmlReader_Net35 method XmlReader_EnableProhibitDtdAndSetResolver (line 7) | public void XmlReader_EnableProhibitDtdAndSetResolver() method XmlReader_DisableProhibitDtd (line 18) | public void XmlReader_DisableProhibitDtd() method XmlReader_EnableProhibitDtd (line 24) | public void XmlReader_EnableProhibitDtd() method XmlReader_DisableProhibitDtdAndSetXmlResolverToNull (line 29) | public void XmlReader_DisableProhibitDtdAndSetXmlResolverToNull() method XmlReader_SecureXmlResolver (line 34) | public void XmlReader_SecureXmlResolver(XmlSecureResolver secureResolver) method XmlReader_SafeByDefault (line 39) | public void XmlReader_SafeByDefault() method XmlReader_NoSettings (line 44) | public void XmlReader_NoSettings() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlReader_Net4.cs class XmlReaderUnsafe (line 5) | public class XmlReaderUnsafe method XmlReader_NonCompliant_InlineInitialization (line 7) | public void XmlReader_NonCompliant_InlineInitialization() method XmlReader_NonCompliant_WithUnsafeSettings_Parse (line 13) | public void XmlReader_NonCompliant_WithUnsafeSettings_Parse() method XmlReader_NonCompliant_WithUnsafeSettings_ParseAndResolver (line 22) | public void XmlReader_NonCompliant_WithUnsafeSettings_ParseAndResolver() method XmlReader_NonCompliantAndCompliantMix (line 32) | public void XmlReader_NonCompliantAndCompliantMix() method XmlReader_NonCompliant_ObjectInitialization (line 47) | public void XmlReader_NonCompliant_ObjectInitialization() method XmlReader_NonCompliant_ResolverAsParameter (line 57) | public void XmlReader_NonCompliant_ResolverAsParameter(XmlUrlResolver ... class XmlReaderSafe (line 69) | public class XmlReaderSafe method XmlReader_NoSettings (line 71) | public void XmlReader_NoSettings() method XmlReader_DefaultSettings (line 76) | public void XmlReader_DefaultSettings() method XmlReader_DefaultDtdProcessing_NullResolver (line 84) | public void XmlReader_DefaultDtdProcessing_NullResolver() method XmlReader_DefaultDtdProcessing_SecureResolver (line 93) | public void XmlReader_DefaultDtdProcessing_SecureResolver(XmlSecureRes... method XmlReader_DefaultDtdProcessing_NullResolverDtoProcessingEnabled (line 102) | public void XmlReader_DefaultDtdProcessing_NullResolverDtoProcessingEn... method XmlReader_DefaultDtdProcessing_UnsecureResolver (line 112) | public void XmlReader_DefaultDtdProcessing_UnsecureResolver() method XmlReader_EnabledDtdProcessing_SecureResolver (line 121) | public void XmlReader_EnabledDtdProcessing_SecureResolver(XmlSecureRes... method XmlReader_DtdProcessingAsParameter (line 131) | public void XmlReader_DtdProcessingAsParameter(DtdProcessing processing) method XmlReader_SettingsAsParameter (line 142) | public void XmlReader_SettingsAsParameter(XmlReaderSettings settings) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlReader_Net452.cs class XmlReaderUnsafe (line 8) | public class XmlReaderUnsafe method XmlReader_NonCompliant_Inline_Settings (line 10) | public void XmlReader_NonCompliant_Inline_Settings() method XmlReader_NonCompliant_ConstructorInitializer (line 19) | public void XmlReader_NonCompliant_ConstructorInitializer() method XmlReader_NonCompliant_InvalidDtdProcessingAndXmlResolver (line 30) | public void XmlReader_NonCompliant_InvalidDtdProcessingAndXmlResolver() method XmlReader_NonCompliantAndCompliantMix (line 41) | public void XmlReader_NonCompliantAndCompliantMix() class XmlReaderSafe (line 57) | public class XmlReaderSafe method XmlReader_NoSettings (line 59) | public void XmlReader_NoSettings() method XmlReader_DefaultSettings (line 64) | public void XmlReader_DefaultSettings() method XmlReader_InlineSettings_NullResolver (line 69) | public void XmlReader_InlineSettings_NullResolver() method XmlReader_ConstructorInitializerOnlyParsing (line 75) | public void XmlReader_ConstructorInitializerOnlyParsing() method XmlReader_ConstructorInitializerOnlyXmlResolver (line 85) | public void XmlReader_ConstructorInitializerOnlyXmlResolver() method XmlReader_DefaultDtdProcessing_SecureResolver (line 95) | public void XmlReader_DefaultDtdProcessing_SecureResolver(XmlSecureRes... method XmlReader_DtdProcessingAsParameter (line 105) | public void XmlReader_DtdProcessingAsParameter(DtdProcessing processing) method XmlReader_SettingsAsParameter (line 116) | public void XmlReader_SettingsAsParameter(XmlReaderSettings settings) method processXml (line 121) | public void processXml(string xml) class XmlSafeResolver (line 134) | internal class XmlSafeResolver : XmlUrlResolver method GetEntity (line 136) | public override object GetEntity(Uri absoluteUri, string role, Type of... class VariousUsages (line 142) | internal class VariousUsages method CreateReader (line 151) | public XmlReader CreateReader(XmlReaderSettings settings) method CreateReader_AndUpdateSettings_Unsecure (line 156) | public XmlReader CreateReader_AndUpdateSettings_Unsecure(XmlReaderSett... method CreateReader_AndUpdateSettings_Secure (line 164) | public XmlReader CreateReader_AndUpdateSettings_Secure(XmlReaderSettin... method InsideTryCatch (line 172) | public void InsideTryCatch() method InsideLocalFunction (line 185) | private void InsideLocalFunction() method InsideLambda (line 196) | private void InsideLambda() method GetUrlResolver (line 206) | private XmlUrlResolver GetUrlResolver() => new XmlUrlResolver(); method SetUnsafeResolverFromMethod (line 208) | private void SetUnsafeResolverFromMethod() class ConcreteImplementations (line 219) | internal class ConcreteImplementations method XmlNodeReader_Default (line 221) | public void XmlNodeReader_Default() method XmlNodeReader_SecureSettings (line 226) | public void XmlNodeReader_SecureSettings() method XmlNodeReader_UnsecureSettings (line 233) | public void XmlNodeReader_UnsecureSettings() method XmlTextReader_Default (line 243) | public void XmlTextReader_Default() method XmlTextReader_SecureSettings (line 248) | public void XmlTextReader_SecureSettings() method XmlTextReader_UnsecureSettings (line 255) | public void XmlTextReader_UnsecureSettings() FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlReader_ParameterProvider.cs class XmlReaderParameterProvider (line 5) | public class XmlReaderParameterProvider FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlTextReader.cs class NoncompliantTests_After_Net_4_5_2 (line 10) | class NoncompliantTests_After_Net_4_5_2 method XmlTextReader_ParameterResolver (line 14) | protected void XmlTextReader_ParameterResolver(XmlUrlResolver parameter) method XmlTextReader_NewResolver (line 21) | protected void XmlTextReader_NewResolver(XmlNameTable table) method XmlTextReader_DifferentConstructorWithNewResolver (line 27) | protected void XmlTextReader_DifferentConstructorWithNewResolver(strin... method XmlTextReader_SetDtdProcessing (line 33) | protected void XmlTextReader_SetDtdProcessing(XmlNameTable table) method XmlTextReader_SetDtdProcessingWithNullResolver (line 39) | protected void XmlTextReader_SetDtdProcessingWithNullResolver() method XmlTextReader_SetNonNullResolverWithDtdProcessingProhibit (line 46) | protected void XmlTextReader_SetNonNullResolverWithDtdProcessingProhib... method XmlTextReader_WithoutConstructor (line 53) | protected void XmlTextReader_WithoutConstructor(XmlTextReader reader) class CompliantTests_After_Net_4_5_2 (line 59) | class CompliantTests_After_Net_4_5_2 method XmlTextReader_Constructor (line 62) | protected void XmlTextReader_Constructor(XmlNameTable table) method XmlTextReader_SafeResolver (line 67) | protected void XmlTextReader_SafeResolver(string xmlFragment, XmlNodeT... method XmlTextReader_SetProhibit (line 73) | protected void XmlTextReader_SetProhibit(XmlNameTable table) method XmlTextReader_SetIgnore (line 79) | protected void XmlTextReader_SetIgnore(XmlNameTable table) method XmlTextReader_SetIgnoreAndNullResolver (line 85) | protected void XmlTextReader_SetIgnoreAndNullResolver(XmlNameTable table) class VariousUnsafeCombinations (line 96) | class VariousUnsafeCombinations method LoopAndTry (line 98) | private void LoopAndTry() method InsideIf_MakeUnsafeInCondition_SanitizeAfter (line 115) | protected void InsideIf_MakeUnsafeInCondition_SanitizeAfter(bool foo) method InsideIf_SanitizeInsideCondition (line 125) | protected void InsideIf_SanitizeInsideCondition(bool foo) method InsideIf_MakeUnsafeInCondition (line 134) | protected void InsideIf_MakeUnsafeInCondition(bool foo) method MultipleVulnerableApisInSameMethod (line 143) | public void MultipleVulnerableApisInSameMethod() method LambdaFunction (line 152) | private void LambdaFunction() method PropagateValues_Parse (line 159) | protected void PropagateValues_Parse(XmlNameTable table) method PropagateValues_Null (line 166) | protected void PropagateValues_Null(XmlNameTable table) method WithUsingStatement (line 173) | public void WithUsingStatement() method WithUsingInsideUsingStatement (line 195) | public void WithUsingInsideUsingStatement(bool b) method WithUsingExpression (line 223) | public void WithUsingExpression() class OtherTests (line 234) | public class OtherTests method XmlTextReader_NoAssignmentToResolver (line 236) | protected void XmlTextReader_NoAssignmentToResolver(XmlUrlResolver par... FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlTextReader_CSharp10.cs type S (line 3) | public record struct S FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlTextReader_Net35.cs class XmlTextReaderTest (line 11) | class XmlTextReaderTest method XmlTextReader_Constructor (line 15) | protected static void XmlTextReader_Constructor() method XmlTextReader_ConstructorWithSanitize (line 20) | protected static void XmlTextReader_ConstructorWithSanitize() method XmlTextReader_SetOnObject (line 25) | protected static void XmlTextReader_SetOnObject(XmlTextReader reader) method XmlTextReader_Sanitize (line 30) | protected static void XmlTextReader_Sanitize() method XmlTextReader_ConstructorWithVulnerableSet (line 36) | protected static void XmlTextReader_ConstructorWithVulnerableSet() method XmlTextReader_InsideIf (line 42) | protected static void XmlTextReader_InsideIf(bool foo) method WithUsingStatement (line 51) | public void WithUsingStatement() method WithUsingInsideUsingStatement (line 73) | public void WithUsingInsideUsingStatement(bool b) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlTextReader_Net4.cs class XmlTextReaderTest (line 11) | class XmlTextReaderTest method XmlTextReader_Constructor (line 15) | protected static void XmlTextReader_Constructor() method XmlTextReader_ConstructorWithSetToNull (line 20) | protected void XmlTextReader_ConstructorWithSetToNull() method XmlTextReader_SetWithParameter (line 28) | protected static XmlTextReader XmlTextReader_SetWithParameter(XmlUrlRe... method XmlTextReader_ValidateWithDtdProcessing_Parse (line 35) | protected static void XmlTextReader_ValidateWithDtdProcessing_Parse() method XmlTextReader_ValidateWithDtdProcessing_Ignore (line 41) | protected static void XmlTextReader_ValidateWithDtdProcessing_Ignore() method XmlTextReader_ValidateAndSet (line 47) | protected static void XmlTextReader_ValidateAndSet() method XmlTextReader_InsideIf (line 54) | protected void XmlTextReader_InsideIf(bool foo) method XmlTextReader_InsideIf2 (line 63) | protected void XmlTextReader_InsideIf2(bool foo) method XmlTextReader_InsideIf3 (line 73) | protected void XmlTextReader_InsideIf3(bool foo) FILE: analyzers/tests/SonarAnalyzer.Test/TestCases/XmlExternalEntityShouldNotBeParsed_XmlTextReader_UnknownFrameworkVersion.cs class XmlTextReaderTest (line 8) | class XmlTextReaderTest method XmlTextReader_Constructor (line 12) | protected static void XmlTextReader_Constructor() method XmlTextReader_SanitizeWithNull (line 17) | protected void XmlTextReader_SanitizeWithNull() method XmlTextReader_SetUnsafeResolver (line 23) | protected void XmlTextReader_SetUnsafeResolver(XmlNameTable table) method XmlTextReader_SetUnsafeResolverFromParameter (line 29) | protected static XmlTextReader XmlTextReader_SetUnsafeResolverFromPara... method XmlTextReader_SanitizeWithProperty (line 36) | protected static void XmlTextReader_SanitizeWithProperty() method XmlTextReader_SanitizeWithProperty2 (line 42) | protected static void XmlTextReader_SanitizeWithProperty2() FILE: analyzers/tests/SonarAnalyzer.Test/TestSuiteInitialization.cs class TestSuiteInitialization (line 23) | [TestClass] method AssemblyInit (line 26) | [AssemblyInitialize] method ConfigureFluentValidation (line 41) | private static void ConfigureFluentValidation() FILE: analyzers/tests/SonarAnalyzer.Test/Trackers/ArgumentTrackerTest.cs class ArgumentTrackerTest (line 28) | [TestClass] method Method_SimpleArgument (line 31) | [TestMethod] method Method_SimpleArgument_VB (line 47) | [TestMethod] method Method_OmittedArgument_VB (line 64) | [TestMethod] method Method_Position (line 86) | [TestMethod] method Method_Position_VB (line 108) | [TestMethod] method Method_RefOut_True (line 131) | [TestMethod] method Method_RefOut_True_VB (line 148) | [TestMethod] method Method_RefOut_False (line 165) | [TestMethod] method Method_RefOut_Unspecified (line 188) | [TestMethod] method Method_RefIn (line 204) | [TestMethod] method Method_RefReadOnly (line 231) | [TestMethod] method Method_Inheritance_Interface (line 259) | [TestMethod] method Method_Inheritance_Interface_VB (line 302) | [TestMethod] method Method_Inheritance_BaseClasses_Generics (line 361) | [TestMethod] method Method_Inheritance_BaseClasses_Generics_VB (line 388) | [TestMethod] method Method_Inheritance_BaseClasses_Overrides (line 419) | [TestMethod] method Method_Inheritance_BaseClasses_Overrides_VB (line 443) | [TestMethod] method Method_ParamsArray (line 469) | [TestMethod] method Method_ParamsArray_VB (line 492) | [TestMethod] method Method_NamelessMethod (line 512) | [TestMethod] method Method_InvocationOnProperty (line 537) | [TestMethod] method Constructor_SimpleArgument (line 571) | [TestMethod] method Constructor_SimpleArgument_VB (line 599) | [TestMethod] method Constructor_TargetTyped (line 622) | [TestMethod] method Constructor_Generic (line 644) | [TestMethod] method Constructor_Generic_VB (line 670) | [TestMethod] method Constructor_BaseCall (line 695) | [TestMethod] method Constructor_BaseCall_VB (line 721) | [TestMethod] method Constructor_TypeAlias (line 748) | [TestMethod] method Constructor_TypeAlias_VB (line 770) | [TestMethod] method Constructor_CustomLogic (line 789) | [TestMethod] method Constructor_InitializerCalls_This (line 824) | [TestMethod] method Constructor_InitializerCalls_Base (line 846) | [TestMethod] method Constructor_InitializerCalls_Base_MyException (line 871) | [TestMethod] method Constructor_InitializerCalls_Base_MyException_VB (line 890) | [TestMethod] method Indexer_List_Get (line 911) | [TestMethod] method Indexer_List_Get_VB (line 930) | [TestMethod] method Indexer_List_Set (line 949) | [TestMethod] method Indexer_List_Set_VB (line 969) | [TestMethod] method Indexer_DictionaryGet (line 988) | [TestMethod] method Indexer_DictionaryGet_VB (line 1004) | [TestMethod] method Indexer_MultiDimensional (line 1018) | [TestMethod] method Indexer_MultiDimensional_VB (line 1054) | [TestMethod] method Indexer_ConditionalAccess_Collection (line 1092) | [TestMethod] method Indexer_ConditionalAccess_Dictionary (line 1121) | [TestMethod] method Indexer_ConditionalPosition (line 1146) | [TestMethod] method Indexer_WrongKnownType (line 1174) | [TestMethod] method Attribute_ConstructorParameter (line 1200) | [TestMethod] method Attribute_ConstructorParameter_VB (line 1224) | [TestMethod] method Attribute_ConstructorParameters (line 1249) | [TestMethod] method Attribute_ConstructorParameters_KnownType (line 1279) | [TestMethod] method Attribute_PropertySetter_WrongMethod (line 1304) | [TestMethod] method Attribute_ConstructorParameters_WrongMethod (line 1324) | [TestMethod] method Attribute_ConstructorParameters_VB (line 1341) | [TestMethod] method Attribute_PropertySetter (line 1362) | [TestMethod] method Attribute_PropertySetter_KnownType (line 1392) | [TestMethod] method Attribute_PropertySetter_VB (line 1422) | [TestMethod] method WrapInMethodCS (line 1452) | private static string WrapInMethodCS(string snippet) => method WrapInMethodVB (line 1464) | private static string WrapInMethodVB(string snippet) => method ArgumentContextCS (line 1474) | private static ArgumentContext ArgumentContextCS(string snippet) => method ArgumentContextVB (line 1477) | private static ArgumentContext ArgumentContextVB(string snippet) => method ArgumentContext (line 1480) | private static ArgumentContext ArgumentContext(string snippet, method MatchArgumentCS (line 1497) | private static bool MatchArgumentCS(ArgumentContext context, ArgumentD... method MatchArgumentVB (line 1500) | private static bool MatchArgumentVB(ArgumentContext context, ArgumentD... method MatchArgument (line 1503) | private static bool MatchArgument(ArgumentConte... FILE: analyzers/tests/SonarAnalyzer.Test/Trackers/BaseTypeTrackerTest.cs class BaseTypeTrackerTest (line 26) | [TestClass] method MatchSubclassesOf_CS (line 37) | [TestMethod] method MatchSubclassesOf_VB (line 53) | [TestMethod] method CreateContext (line 68) | private static BaseTypeContext CreateContext(string t... FILE: analyzers/tests/SonarAnalyzer.Test/Trackers/BuilderPatternConditionTest.cs class BuilderPatternConditionTest (line 30) | [TestClass] method Initialize (line 36) | [TestInitialize] method ConstructorIsSafe_CS (line 43) | [TestMethod] method ConstructorIsSafe_VB (line 53) | [TestMethod] method IsInvalidBuilderInitialization_CS (line 63) | [TestMethod] method IsInvalidBuilderInitialization_VB (line 99) | [TestMethod] method CreateContext_CS (line 135) | private static InvocationContext CreateContext_CS() method CreateContext_VB (line 164) | private static InvocationContext CreateContext_VB() method FindMethodInvocation_CS (line 205) | private static SyntaxNode FindMethodInvocation_CS(SyntaxTree tree, str... method FindMethodInvocation_VB (line 210) | private static SyntaxNode FindMethodInvocation_VB(SyntaxTree tree, str... FILE: analyzers/tests/SonarAnalyzer.Test/Trackers/BuilderPatternDescriptorTest.cs class BuilderPatternDescriptorTest (line 25) | [TestClass] method IsMatch (line 28) | [TestMethod] method IsValid_Literal (line 52) | [TestMethod] method IsValid_Lambda (line 66) | [TestMethod] method CreateContext (line 76) | private static InvocationContext CreateContext() FILE: analyzers/tests/SonarAnalyzer.Test/Trackers/ConstantValueFinderTest.cs class ConstantValueFinderTest (line 23) | [TestClass] method FieldDeclaredInAnotherSyntaxTree (line 26) | [TestMethod] method WrongCompilationBeingUsed (line 50) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Trackers/ElementAccessTrackerTest.cs class ElementAccessTrackerTest (line 26) | [TestClass] method ArgumentAtIndexIs_CS (line 71) | [TestMethod] method ArgumentAtIndexIs_VB (line 84) | [TestMethod] method ArgumentAtIndexEquals_CS (line 97) | [TestMethod] method ArgumentAtIndexEquals_VB (line 117) | [TestMethod] method CreateContext (line 140) | private static ElementAccessContext CreateContext(str... FILE: analyzers/tests/SonarAnalyzer.Test/Trackers/InvocationTrackerTest.cs class InvocationTrackerTest (line 26) | [TestClass] method ConstArgumentForParameter_CS (line 85) | [TestMethod] method ArgumentIsBoolConstant_CS (line 99) | [TestMethod] method ConstArgumentForParameter_VB (line 113) | [TestMethod] method ArgumentIsBoolConstant_VB (line 128) | [TestMethod] method ArgumentAtIndexIsStringConstant_CS (line 142) | [TestMethod] method ArgumentAtIndexIsStringConstant_VB (line 155) | [TestMethod] method ArgumentAtIndexIsAny_CS (line 172) | [TestMethod] method ArgumentAtIndexIsAny_VB (line 185) | [TestMethod] method InvocationConditionForUndefinedMethod (line 201) | [TestMethod] method IsIHeadersDictionary (line 213) | [TestMethod] method CreateContext (line 230) | private static InvocationContext CreateContext(string... FILE: analyzers/tests/SonarAnalyzer.Test/Trackers/MemberDescriptorTest.cs class MethodDescriptorTest (line 26) | [TestClass] method ClassInit (line 31) | [ClassInitialize] method IsMatch_WhenMethodNameIsNull_ReturnsFalse (line 52) | [TestMethod] method IsMatch_WhenTypeSymbolIsNull_ReturnsFalse (line 59) | [TestMethod] method IsMatch_WhenContainingTypeIsNull_ReturnsFalse (line 66) | [TestMethod] method MatchesAny_WhenMethodNameDoesNotMatch_ReturnsFalseDoesNotEvaluateSymbol (line 77) | [DataRow(null, StringComparison.InvariantCultureIgnoreCase)] method IsMatch_WhenMethodNameDoesNotMatch_ReturnsFalseDoesNotEvaluateSymbol (line 89) | [DataRow(null, StringComparison.InvariantCultureIgnoreCase)] method IsMatch_WhenTypeMatchesButNameIsDifferentCase_ReturnsFalse (line 101) | [TestMethod] method IsMatch_WhenMethodNameAndTypeMatch_ReturnsTrue (line 108) | [TestMethod] method ExactMatchOnly_OverridesAreNotMatched_CS (line 116) | [TestMethod] method ExactMatchOnly_OverridesAreNotMatched_VB (line 139) | [TestMethod] method ExactMatch_DoesNotMatchOverrides_CS (line 162) | [TestMethod] method ExactMatch_DoesNotMatchOverrides_VB (line 184) | [TestMethod] method MatchesAny_AndCheckingOverrides_DoesMatchOverrides_CS (line 203) | [TestMethod] method MatchesAny_MethodAndTypeCombination_FindsCorrectOne (line 225) | [TestMethod] method MatchesAny_AndCheckingOverrides_DoesMatchOverrides_VB (line 239) | [TestMethod] method CheckMatch_InterfaceMethods_CS (line 257) | [TestMethod] method CheckMatch_InterfaceMethods_VB (line 279) | [TestMethod] method CheckMatch_InterfaceMethods_NameMatchButNotOverride_CS (line 302) | [TestMethod] method CheckMatch_InterfaceMethods_NameMatchButNotOverride_VB (line 325) | [TestMethod] method CheckMatch_CaseInsensitivity (line 352) | [TestMethod] method CreateContextForMethod (line 389) | private static InvocationContext CreateContextForMethod(string typeAnd... method CheckExactMatchOnly_OverridesAreNotMatched (line 417) | private static void CheckExactMatchOnly_OverridesAreNotMatched(Snippet... method CheckExactMatch_DoesNotMatchOverrides (line 436) | private static void CheckExactMatch_DoesNotMatchOverrides(SnippetCompi... method CheckMatchesAny_AndCheckingOverrides_DoesMatchOverrides (line 453) | private static void CheckMatchesAny_AndCheckingOverrides_DoesMatchOver... method DoCheckMatch_InterfaceMethods (line 470) | private static void DoCheckMatch_InterfaceMethods(SnippetCompiler snip... method CheckExactMethod (line 480) | private static void CheckExactMethod(bool expectedOutcome, InvocationC... method CheckIsMethodOrDerived (line 483) | private static void CheckIsMethodOrDerived(bool expectedOutcome, Invoc... method CheckMatchesAny (line 486) | private static void CheckMatchesAny(bool checkDerived, bool expectedOu... FILE: analyzers/tests/SonarAnalyzer.Test/Trackers/MethodDeclarationTrackerTest.cs class MethodDeclarationTrackerTest (line 28) | [TestClass] method MatchMethodName (line 37) | [TestMethod] method Track_VerifyMethodIdentifierLocations_CS (line 48) | [TestMethod] method Track_VerifyMethodIdentifierLocations_VB (line 101) | [TestMethod] method CreateContext (line 164) | private static MethodDeclarationContext CreateContext(string testInput... class TestRule_CS (line 171) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method TestRule_CS (line 176) | public TestRule_CS() : base(AnalyzerConfiguration.AlwaysEnabled, "S1... method Initialize (line 178) | protected override void Initialize(TrackerInput input) => class TestRule_VB (line 182) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method TestRule_VB (line 187) | public TestRule_VB() : base(AnalyzerConfiguration.AlwaysEnabled, "S1... method Initialize (line 189) | protected override void Initialize(TrackerInput input) => FILE: analyzers/tests/SonarAnalyzer.Test/Trackers/ObjectCreationTrackerTest.cs class ObjectCreationTrackerTest (line 26) | [TestClass] method ConstArgumentForParameter_CS (line 29) | [TestMethod] method ImplicitConstArgumentForParameter_CS (line 54) | [TestMethod] method ConstArgumentForParameter_VB (line 79) | [TestMethod] method ObjectCreationConditionForUndefinedSymbol (line 103) | [TestMethod] method ObjectCreationConditionForNonconstructorSymbols (line 124) | [TestMethod] method ObjectCreationNoArgumentsSupplied (line 149) | [TestMethod] method AndCondition (line 166) | [TestMethod] method OrCondition (line 179) | [TestMethod] method CreateContext (line 195) | private static ObjectCreationContext CreateContext(st... FILE: analyzers/tests/SonarAnalyzer.Test/Trackers/PropertyAccessTrackerTest.cs class PropertyAccessTrackerTest (line 26) | [TestClass] method MatchesGetter_CS (line 49) | [TestMethod] method MatchesGetter_VB (line 59) | [TestMethod] method AndCondition (line 69) | [TestMethod] method OrCondition (line 82) | [TestMethod] method CreateContext (line 98) | private static PropertyAccessContext CreateContext(st... FILE: analyzers/tests/SonarAnalyzer.Test/Wrappers/INamedTypeSymbolExtensionsTests.cs class INamedTypeSymbolExtensionsTests (line 25) | [TestClass] method TypeArgumentNullableAnnotationsFromShimEqualsOriginal (line 28) | [TestMethod] method TypeArgumentNullableAnnotationsFromShimEqualsOriginal_MultipleTypeArguments (line 50) | [TestMethod] method TypeArgumentNullableAnnotationsFromShimEqualsOriginal_NoTypeArguments (line 69) | [TestMethod] method ValidateTypeArgumentNullableAnnotations (line 87) | private static void ValidateTypeArgumentNullableAnnotations(string cod... FILE: analyzers/tests/SonarAnalyzer.Test/Wrappers/IOperationWrapperSonarTest.cs class IOperationWrapperSonarTest (line 23) | [TestClass] method Null_Throws (line 26) | [TestMethod] method ValidateReflection (line 33) | [TestMethod] method GetHashCode_ReturnsOperationHash (line 48) | [TestMethod] method Equals_ComparesUnderlyingInstance (line 55) | [TestMethod] method Equals_NotEqual (line 63) | [TestMethod] method ToString_ReturnsInstanceToString (line 74) | [TestMethod] method CreateWrapper (line 81) | private static IOperationWrapperSonar CreateWrapper(out SemanticModel ... FILE: analyzers/tests/SonarAnalyzer.Test/Wrappers/IPropertySymbolExtensionTest.cs class IPropertySymbolExtensionTest (line 23) | [TestClass] method IsRequired (line 26) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Wrappers/ISymbolNullableExtensionsTest.cs class ISymbolNullableExtensionsTest (line 24) | [TestClass] method NullableAnnotation_SimpleAnnitations (line 27) | [TestMethod] method NullableAnnotation_Receiver (line 68) | [TestMethod] method NullableAnnotation_ReferenceTypeConstrain (line 92) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.Test/Wrappers/RegisterSymbolStartActionWrapperTest.cs class RegisterSymbolStartActionWrapperTest (line 24) | [TestClass] method RegisterSymbolStartAction_SymbolStartProperties (line 27) | [TestMethod] method RegisterSymbolStartAction_RegisterCodeBlockAction (line 51) | [TestMethod] method RegisterSymbolStartAction_RegisterCodeBlockAction_ConditionalRegistration (line 75) | [TestMethod] method RegisterSymbolStartAction_RegisterCodeBlockStartAction_CS (line 109) | [TestMethod] method RegisterSymbolStartAction_RegisterCodeBlockStartAction_VB (line 134) | [TestMethod] method RegisterSymbolStartAction_RegisterOperationAction (line 168) | [TestMethod] method RegisterSymbolStartAction_RegisterOperationBlockAction (line 195) | [TestMethod] method RegisterSymbolStartAction_RegisterOperationBlockStartAction (line 219) | [TestMethod] method RegisterSymbolStartAction_RegisterRegisterSymbolEndAction (line 244) | [TestMethod] method RegisterSymbolStartAction_RegisterSyntaxNodeAction_CS (line 268) | [TestMethod] method RegisterSymbolStartAction_RegisterSyntaxNodeAction_VB (line 292) | [TestMethod] class TestDiagnosticAnalyzer (line 321) | private sealed class TestDiagnosticAnalyzer : DiagnosticAnalyzer method TestDiagnosticAnalyzer (line 328) | public TestDiagnosticAnalyzer(Action class TestDuplicateLocationRuleCodeFix (line 60) | [ExportCodeFixProvider(LanguageNames.CSharp)] method RegisterCodeFixesAsync (line 65) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, Sona... FILE: analyzers/tests/SonarAnalyzer.TestFramework.Test/Verification/DiagnosticVerifierExceptionTest.cs class DiagnosticVerifierExceptionTest (line 22) | [TestClass] method Ctor_Empty_Throws (line 25) | [TestMethod] method Ctor_ShortMessageWithoutSpace_Throws (line 29) | [TestMethod] method Message_SerializesAllFullDescriptions (line 35) | [TestMethod] method StackTrace_SerializesShortDescriptions (line 53) | [TestMethod] method StackTrace_SeparatesMultipleFiles (line 74) | [TestMethod] method StackTrace_Ignore_NullShortDescription (line 101) | [TestMethod] method StackTrace_Ignore_NonexistentFiles (line 112) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.TestFramework.Test/Verification/DiagnosticVerifierTest.cs class DiagnosticVerifierTest (line 25) | [TestClass] method PrimaryIssueNotExpected (line 32) | [TestMethod] method SecondaryIssueNotExpected (line 49) | [TestMethod] method UnexpectedSecondaryIssue_WrongId (line 65) | [TestMethod] method UnexpectedSecondaryIssue_WrongIdWithWrongPrimaryMessageAndLocation (line 82) | [TestMethod] method UnexpectedSecondaryIssue_MissingExpectedId (line 100) | [TestMethod] method UnexpectedSecondaryIssue_MissingActualId (line 117) | [TestMethod] method UnexpectedSecondaryIssue_WrongIdWithMultipleIssues (line 134) | [TestMethod] method UnexpectedSecondaryIssue_WrongIdsWithWrongLocations (line 151) | [TestMethod] method SecondaryIssueUnexpectedMessage (line 171) | [TestMethod] method SecondaryIssueUnexpectedStartPosition (line 188) | [TestMethod] method SecondaryIssueUnexpectedLength (line 206) | [TestMethod] method ValidVerification (line 224) | [TestMethod] method BuildError_CS (line 238) | [TestMethod] method BuildError_VB (line 248) | [TestMethod] method UnexpectedRemainingOpeningCurlyBrace (line 259) | [TestMethod] method UnexpectedRemainingClosingCurlyBrace (line 276) | [TestMethod] method ExpectedIssuesNotRaised (line 293) | [TestMethod] method ExpectedIssuesNotRaised_WhileBeingRaisedOnceOnTheSameLine (line 311) | [TestMethod] method ExpectedIssuesNotRaised_MultipleFiles (line 328) | [TestMethod] method ProjectLevelIssues_CorrectLocation_WrongMessage (line 347) | [TestMethod] method ProjectLevelIssues_WrongLocation (line 362) | [TestMethod] method ProjectLevelIssues_HaveExpectedAnnotationWithPath (line 380) | [TestMethod] method ProjectLevelIssues_MultipleIssuesRaised (line 393) | [TestMethod] method DiagnosticsAndErrors_IgnoresLineContinuation_VB (line 407) | [TestMethod] method Verify_BuildErrors_AreSortedById (line 420) | [TestMethod] method Verify_ConcurrentFile_DuplicateIssues_Muted (line 432) | [TestMethod] method Verify_ConcurrentFile_IssuesOnlyInConcurrent_Reported (line 445) | [TestMethod] method VerifyThrows (line 457) | private void VerifyThrows(string snippet, string expectedMessage) => method CreateConcurrentBuilder (line 464) | private VerifierBuilder CreateConcurrentBuilder(string code) => FILE: analyzers/tests/SonarAnalyzer.TestFramework.Test/Verification/IssueValidation/CompilationIssuesTest.cs class CompilationIssuesTest (line 20) | [TestClass] method UniqueKeys (line 23) | [TestMethod] method UniqueKeys_IteratingIsResilientToRemoval (line 35) | [TestMethod] method Remove_NoMatch (line 45) | [TestMethod] method Remove_WhenPresent (line 54) | [TestMethod] method Remove_WhenPresent_ReturnsAllOccurances (line 63) | [TestMethod] method Dump (line 72) | [TestMethod] method CreateSut (line 94) | private static CompilationIssues CreateSut() => FILE: analyzers/tests/SonarAnalyzer.TestFramework.Test/Verification/IssueValidation/IssueLocationCollectorTest.ExpectedIssueLocations.cs class IssueLocationCollectorTest (line 22) | public partial class IssueLocationCollectorTest method ExpectedIssueLocations_No_Comments (line 24) | [TestMethod] method ExpectedIssueLocations_Locations_CS (line 39) | [TestMethod] method ExpectedIssueLocations_Locations_VB (line 59) | [TestMethod] method ExpectedIssueLocations_Locations_Xml (line 79) | [TestMethod] method ExpectedIssueLocations_Locations_Razor (line 103) | [TestMethod] method ExpectedIssueLocations_OnlyCommentedNoncompliant (line 120) | [TestMethod] method ExpectedIssueLocations_ExactLocations (line 139) | [TestMethod] method ExpectedIssueLocations_ExactColumns (line 164) | [TestMethod] method ExpectedIssueLocations_Redundant_Locations (line 185) | [TestMethod] method ExpectedIssueLocations_PrimaryIdWithAndBracketInMessage (line 204) | [TestMethod] method ExpectedIssueLocations_Multiple_PrimaryIds (line 222) | [TestMethod] method ExpectedIssueLocations_Invalid_Type_Format (line 239) | [TestMethod] method ExpectedIssueLocations_Invalid_Precise_Format (line 259) | [TestMethod] method ExpectedBuildErrors_ExpectedErrors (line 280) | [TestMethod] method ExpectedBuildErrors_Multiple_ExpectedErrors (line 300) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.TestFramework.Test/Verification/IssueValidation/IssueLocationCollectorTest.FindIssueLocations.cs class IssueLocationCollectorTest (line 20) | public partial class IssueLocationCollectorTest method FindIssueLocations_Noncompliant_With_Two_Flows (line 22) | [TestMethod] method FindIssueLocations_Noncompliant_With_Offset_Message_And_Flows (line 39) | [TestMethod] method FindIssueLocations_Noncompliant_With_Reversed_Message_And_Flows (line 56) | [TestMethod] method FindIssueLocations_Noncompliant_With_Offset (line 73) | [TestMethod] method FindIssueLocations_Noncompliant_With_Message_And_Flows (line 90) | [TestMethod] method FindIssueLocations_Noncompliant_With_Message (line 107) | [TestMethod] method FindIssueLocations_Noncompliant_With_Invalid_Offset (line 124) | [TestMethod] method FindIssueLocations_Noncompliant_InvalidNote (line 140) | [TestMethod] method FindIssueLocations_Noncompliant_With_Flow (line 163) | [TestMethod] method FindIssueLocations_Noncompliant (line 180) | [TestMethod] method FindIssueLocations_Flow_With_Offset_Message_And_Flows (line 197) | [TestMethod] method FindIssueLocations_NoComment (line 214) | [TestMethod] method FindIssueLocations_Noncompliant_ExactColumn (line 226) | [TestMethod] method FindIssueLocations_Secondary_ExactColumn_Ids (line 243) | [TestMethod] method FindIssueLocations_Noncompliant_Offset_ExactColumn_Message_Whitespaces (line 260) | [TestMethod] method FindIssueLocations_Noncompliant_Offset_ExactColumn_Message_NoWhitespace (line 280) | [TestMethod] method FindIssueLocations_Noncompliant_Offset_ExactColumn_Message_Whitespaces_Xml (line 300) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.TestFramework.Test/Verification/IssueValidation/IssueLocationCollectorTest.FindPreciseIssueLocations.cs class IssueLocationCollectorTest (line 20) | public partial class IssueLocationCollectorTest method FindPreciseIssueLocations_NoMessage_NoIds (line 22) | [TestMethod] method FindPreciseIssueLocations_With_Offset (line 40) | [TestMethod] method FindPreciseIssueLocations_NoMessage_NoIds_Secondary (line 58) | [TestMethod] method FindPreciseIssueLocations_Comment_Secondary (line 76) | [TestMethod] method FindPreciseIssueLocations_Secondary_With_Offset (line 94) | [TestMethod] method FindPreciseIssueLocations_IssueIds (line 112) | [TestMethod] method FindPreciseIssueLocations_IssueIds_Secondary (line 130) | [TestMethod] method FindPreciseIssueLocations_Message_And_IssueIds (line 148) | [TestMethod] method FindPreciseIssueLocations_Message_And_IssueIds_Secondary_CS (line 166) | [TestMethod] method FindPreciseIssueLocations_Message_And_IssueIds_Secondary_XML (line 184) | [TestMethod] method FindPreciseIssueLocations_Message (line 201) | [TestMethod] method FindPreciseIssueLocations_Message_Secondary (line 219) | [TestMethod] method FindPreciseIssueLocations_Full_Secondary (line 237) | [TestMethod] method FindPreciseIssueLocations_NoComment (line 256) | [TestMethod] method FindPreciseIssueLocations_NotStartOfLineIsOk (line 268) | [TestMethod] method FindPreciseIssueLocations_MultiplePatternsOnSameLine (line 285) | [TestMethod] method FindPreciseIssueLocations_Xml (line 304) | [TestMethod] method FindPreciseIssueLocations_RazorWithSpaces (line 334) | [TestMethod] method FindPreciseIssueLocations_RazorWithoutSpaces (line 346) | [TestMethod] method FindPreciseIssueLocations_RazorWithMultiline (line 358) | [TestMethod] method FindPreciseIssueLocations_Message_And_IssueIds_Secondary_Razor (line 371) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.TestFramework.Test/Verification/IssueValidation/IssueLocationCollectorTest.MergeLocations.cs class IssueLocationCollectorTest (line 20) | public partial class IssueLocationCollectorTest method MergeLocations_NoIssues (line 22) | [TestMethod] method MergeLocations_IssuesSameLine (line 26) | [TestMethod] method MergeLocations_DifferentIssues_SameSecondaryLocations (line 42) | [TestMethod] method MergeLocations_IssuesDifferentLines (line 58) | [TestMethod] method MergeLocations_MoreThanOnePreciseLocationForSameIssue (line 76) | [TestMethod] method MergeLocations_EmptyIssues_NonEmptyPreciseLocations (line 88) | [TestMethod] method MergeLocations_NonEmptyIssues_EmptyPreciseLocations (line 92) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.TestFramework.Test/Verification/IssueValidation/IssueLocationCollectorTest.cs class IssueLocationCollectorTest (line 22) | [TestClass] method Line (line 25) | private static TextLine Line(int lineNumber, string code) => method VerifyIssueLocations (line 28) | private static void VerifyIssueLocations(IEnumerable re... FILE: analyzers/tests/SonarAnalyzer.TestFramework.Test/Verification/IssueValidation/IssueLocationPairTest.cs class IssueLocationPairTest (line 20) | [TestClass] method CreateMessage_DifferentKeys (line 26) | [TestMethod] method CreateMessage_PerfectMatch (line 33) | [TestMethod] method CreateMessage_MissingIssue_NoMessage (line 37) | [TestMethod] method CreateMessage_MissingIssue_WithExpectedMessage (line 41) | [TestMethod] method CreateMessage_UnexpectedIssue (line 45) | [TestMethod] method CreateMessage_SecondaryText (line 49) | [TestMethod] method CreateMessage_WrongMessage (line 57) | [TestMethod] method CreateMessage_WrongStartLocation (line 65) | [TestMethod] method CreateMessage_WrongLength (line 75) | [TestMethod] method CreateMessage_WrongIssueId (line 83) | [TestMethod] method ValidateMessage (line 91) | private static void ValidateMessage(IssueLocation actualIssue, IssueLo... FILE: analyzers/tests/SonarAnalyzer.TestFramework.Test/Verification/IssueValidation/IssueLocationTest.cs class IssueLocationTest (line 20) | [TestClass] method IssueLocation_Ctor_NoSecondaryMessage_HasEmptyMessage (line 25) | [TestMethod] method IssueLocation_Ctor_Primary (line 29) | [TestMethod] method IssueLocation_Ctor_Error (line 38) | [TestMethod] method IssueLocation_Ctor_SecondaryLocation (line 47) | [TestMethod] method IssueLocation_Ctor_NoLocation_HasEmptyFilePath (line 55) | [TestMethod] method IssueLocation_GetHashCode_DependsOnlyOnKey (line 64) | [TestMethod] method IssueLocation_Equals_FullMatch (line 75) | [TestMethod] method IssueLocation_Equals_IgnoreNull_RuleId (line 98) | [TestMethod] method IssueLocation_Equals_IgnoreNull_Message (line 109) | [TestMethod] method IssueLocation_Equals_IgnoreNull_IssueId (line 115) | [TestMethod] method IssueLocation_Equals_IgnoreNull_Start (line 121) | [TestMethod] method IssueLocation__Equals_IgnoreNull_Length (line 127) | [TestMethod] method IssueLocationKey_CreatedFromIssue (line 133) | [TestMethod] method IssueLocationKey_IsMatch_MatchesSameKey (line 142) | [TestMethod] method IssueLocationKey_IsMatch_ProjectLevelMatchesAnyPath (line 146) | [TestMethod] method IssueLocationKey_IsMatch_DifferentFilePath (line 150) | [TestMethod] method IssueLocationKey_IsMatch_DifferentLineNumber (line 154) | [TestMethod] method IssueLocationKey_IsMatch_DifferentIsPrimary (line 158) | [TestMethod] method ValidateEqualsIgnoreNull (line 162) | private static void ValidateEqualsIgnoreNull(IssueLocation hasValue, I... FILE: analyzers/tests/SonarAnalyzer.TestFramework.Test/Verification/VerifierBuilderTest.cs class VerifierBuilderTest (line 24) | [TestClass] method AddAnalyzer_Concatenates_IsImmutable (line 29) | [TestMethod] method AddAnalyzer_Generic_AddAnalyzer (line 41) | [TestMethod] method AddPaths_Concatenates_IsImmutable (line 48) | [TestMethod] method AddReferences_Concatenates_IsImmutable (line 58) | [TestMethod] method AddSnippet_Appends_IsImmutable (line 68) | [TestMethod] method AddTestReference_Concatenates_IsImmutable (line 78) | [TestMethod] method WithWarningsAsErrors_Overwrites_IsImmutable (line 88) | [TestMethod] method WithAutogenerateConcurrentFiles_Overwrites_IsImmutable (line 98) | [TestMethod] method WithBasePath_Overwrites_IsImmutable (line 108) | [TestMethod] method WithCodeFix_Overwrites_IsImmutable (line 118) | [TestMethod] method WithCodeFixedPaths_Overwrites_IsImmutable (line 128) | [TestMethod] method WithConcurrentAnalysis_Overwrites_IsImmutable (line 145) | [TestMethod] method WithCodeFixTitle_Overwrites_IsImmutable (line 155) | [TestMethod] method WithErrorBehavior_Overwrites_IsImmutable (line 165) | [TestMethod] method WithLanguageVersion_Overwrites_IsImmutable_CS (line 175) | [TestMethod] method WithLanguageVersion_Overwrites_IsImmutable_VB (line 185) | [TestMethod] method WithOnlyDiagnostics_Overwrites_IsImmutable (line 195) | [TestMethod] method WithOptions_Overwrites_IsImmutable (line 208) | [TestMethod] method WithOutputKind_Overwrites_IsImmutable (line 218) | [TestMethod] method WithProtobufPath_Overwrites_IsImmutable (line 228) | [TestMethod] method WithSonarProjectConfig_Overwrites_IsImmutable (line 238) | [TestMethod] method WithTargetFramework_Overwrites_IsImmutable (line 250) | [TestMethod] method WithNetOnly (line 260) | [TestMethod] method WithNetFrameworkOnly (line 264) | [TestMethod] method WithTopLevelSupport_Overwrites_IsImmutable (line 268) | [TestMethod] method WithTopLevelSupport_PreservesParseOptions (line 278) | [TestMethod] method WithTopLevelSupport_ForVisualBasicOptions_NotSupported (line 286) | [TestMethod] method WithTopLevelSupport_ForOldCSharp_NotSupported (line 291) | [TestMethod] method Build_ReturnsVerifier (line 296) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.TestFramework.Test/Verification/VerifierTest.cs class VerifierTest (line 29) | [TestClass] method Constructor_Null_Throws (line 40) | [TestMethod] method Constructor_NoAnalyzers_Throws (line 44) | [TestMethod] method Constructor_NullAnalyzers_Throws (line 50) | [TestMethod] method Constructor_NoPaths_Throws (line 56) | [TestMethod] method Constructor_MixedLanguageAnalyzers_Throws (line 60) | [TestMethod] method Constructor_TargetFrameworksNone_Throws (line 66) | [TestMethod] method Constructor_MixedLanguagePaths_Throws (line 72) | [TestMethod] method Constructor_CodeFix_MissingCodeFixedPath_Throws (line 78) | [TestMethod] method Constructor_CodeFix_WrongCodeFixedPath_Throws (line 84) | [TestMethod] method Constructor_CodeFix_WrongCodeFixedPathBatch_Throws (line 90) | [TestMethod] method Constructor_CodeFix_MultipleAnalyzers_Throws (line 96) | [TestMethod] method Constructor_CodeFix_MultiplePaths_Throws (line 102) | [TestMethod] method Constructor_CodeFix_WithSnippets_Throws (line 108) | [TestMethod] method Constructor_CodeFix_WrongLanguage_Throws (line 114) | [TestMethod] method Constructor_CodeFix_FixableDiagnosticsNotSupported_Throws (line 120) | [TestMethod] method Constructor_CodeFix_MissingAttribute_Throws (line 126) | [TestMethod] method Constructor_ProtobufPath_MultipleAnalyzers_Throws (line 132) | [TestMethod] method Constructor_ProtobufPath_WrongAnalyzerType_Throws (line 138) | [TestMethod] method Constructor_NetFrameworkOnly_ThrowsInconclusive (line 144) | [TestMethod] method Verify_RazorWithAssociatedCS (line 154) | [TestMethod] method Verify_RazorWithUnrelatedCS (line 161) | [TestMethod] method Verify_RazorWithUnrelatedIssues (line 168) | [TestMethod] method Verify_RazorWithAdditionalLocation (line 183) | [TestMethod] method Verify_RazorWithAdditionalLocation_CSharp10 (line 192) | [TestMethod] method Verify_Razor (line 201) | [TestMethod] method Verify_RazorExpressions_Locations (line 209) | [TestMethod] method Verify_RazorExpressions_Locations_CSharp10 (line 219) | [TestMethod] method Verify_RazorAnalysisIsDisabled_DoesNotRaise (line 229) | [TestMethod] method Verify_RazorAnalysisInSLAndNugetContext (line 237) | [TestMethod] method Verify_NetOnly_NoException (line 245) | [TestMethod] method Compile_Razor_DefaultFramework (line 252) | [TestMethod] method Compile_Razor_AddReferences (line 271) | [TestMethod] method Compile_Razor_NoReferences (line 283) | [TestMethod] method Compile_Razor_Snippet (line 294) | [TestMethod] method Compile_Cshtml_Snippet (line 315) | [TestMethod] method Compile_Razor_Snippet_NoName (line 333) | [TestMethod] method Compile_Razor_Snippet_Name_CSharp (line 348) | [TestMethod] method Compile_Razor_Snippet_Name_Cshtml (line 363) | [TestMethod] method Compile_Razor_Snippet_MixedNames (line 378) | [TestMethod] method Verify_ThrowsWithCodeFixSet (line 401) | [TestMethod] method Verify_RaiseExpectedIssues_CS (line 411) | [TestMethod] method Verify_RaiseExpectedIssues_VB (line 422) | [TestMethod] method Verify_RaiseUnexpectedIssues_CS (line 432) | [TestMethod] method Verify_RaiseUnexpectedIssues_VB (line 450) | [TestMethod] method Verify_MissingExpectedIssues (line 467) | [TestMethod] method Verify_TwoAnalyzers (line 485) | [TestMethod] method Verify_TwoPaths (line 501) | [TestMethod] method Verify_AutogenerateConcurrentFiles (line 526) | [TestMethod] method Verify_TestProject (line 545) | [TestMethod] method Verify_ParseOptions (line 557) | [TestMethod] method Verify_WithWarningsAsErrors (line 576) | [TestMethod] method Verify_WithWarningsAsErrors_MissingAnnotation_Fails (line 591) | [TestMethod] method Verify_BasePath (line 607) | [TestMethod] method Verify_ErrorBehavior (line 615) | [TestMethod] method Verify_OnlyDiagnostics (line 652) | [TestMethod] method Verify_NonConcurrentAnalysis (line 674) | [TestMethod] method Verify_OutputKind (line 686) | [TestMethod] method Verify_Snippets (line 701) | [TestMethod] method VerifyCodeFix_NoCodeFix (line 715) | [TestMethod] method VerifyCodeFix_FixExpected_CS (line 719) | [TestMethod] method VerifyCodeFix_FixExpected_VB (line 741) | [TestMethod] method VerifyCodeFix_NotFixed_CS (line 761) | [TestMethod] method VerifyCodeFix_NotFixed_VB (line 781) | [TestMethod] method VerifyCodeFix_NoIssueRaised (line 800) | [TestMethod] method VerifyNoIssues_NoIssues_Succeeds (line 808) | [TestMethod] method VerifyNoIssues_WithIssues_Throws (line 812) | [TestMethod] method VerifyNoIssues_InvalidCode_Throws (line 821) | [TestMethod] method VerifyNoAD0001_AnalyzerException_Fail (line 825) | [TestMethod] method VerifyNoAD0001_NoAD0001_DoesNotFail (line 837) | [TestMethod] method VerifyNoIssuesIgnoreErrors_NoIssues_Succeeds (line 848) | [TestMethod] method VerifyNoIssuesIgnoreErrors_WithIssues_Throws (line 852) | [TestMethod] method VerifyNoIssuesIgnoreErrors_InvalidCode_Throws (line 861) | [TestMethod] method Verify_ConcurrentAnalysis_FileEndingWithComment_CS (line 865) | [TestMethod] method Verify_ConcurrentAnalysis_FileEndingWithComment_VB (line 869) | [TestMethod] method VerifyUtilityAnalyzerProducesEmptyProtobuf_EmptyFile (line 873) | [TestMethod] method VerifyUtilityAnalyzerProducesEmptyProtobuf_WithContent (line 882) | [TestMethod] method VerifyUtilityAnalyzer_CorrectProtobuf_CS (line 893) | [TestMethod] method VerifyUtilityAnalyzer_CorrectProtobuf_VB (line 908) | [TestMethod] method VerifyUtilityAnalyzer_VerifyProtobuf_PropagateFailedAssertion_CS (line 923) | [TestMethod] method VerifyUtilityAnalyzer_VerifyProtobuf_PropagateFailedAssertion_VB (line 933) | [TestMethod] method WithSnippetCS (line 943) | private VerifierBuilder WithSnippetCS(string code) => method WithSnippetVB (line 946) | private VerifierBuilder WithSnippetVB(string code) => method WriteFile (line 949) | private string WriteFile(string name, string content) => method ContainsSyntaxTreeWithName (line 952) | private static void ContainsSyntaxTreeWithName(CompilationData compila... FILE: analyzers/tests/SonarAnalyzer.TestFramework/Analyzers/DummyAnalyzer.cs class DummyAnalyzerCS (line 24) | [DiagnosticAnalyzer(LanguageNames.CSharp)] class DummyAnalyzerThatThrowsCS (line 30) | [DiagnosticAnalyzer(LanguageNames.CSharp)] class DummyAnalyzerVB (line 36) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] class DummyAnalyzer (line 42) | public abstract class DummyAnalyzer : SonarDiagnosticAnalyz... method Initialize (line 51) | protected sealed override void Initialize(SonarAnalysisContext context... class DummyAnalyzerThatThrows (line 55) | public abstract class DummyAnalyzerThatThrows : SonarDiagno... method Initialize (line 63) | protected sealed override void Initialize(SonarAnalysisContext context... FILE: analyzers/tests/SonarAnalyzer.TestFramework/Analyzers/DummyAnalyzerWithLocation.cs class DummyAnalyzerWithLocation (line 25) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method DummyAnalyzerWithLocation (line 32) | public DummyAnalyzerWithLocation() : this("DummyWithLocation", Diagnos... method DummyAnalyzerWithLocation (line 34) | public DummyAnalyzerWithLocation(string id, params string[] customTags... method Initialize (line 37) | protected override void Initialize(SonarAnalysisContext context) => method ReportIssue (line 40) | private void ReportIssue(SonarSyntaxNodeReportingContext context) FILE: analyzers/tests/SonarAnalyzer.TestFramework/Analyzers/DummyCodeFix.cs class DummyCodeFixCS (line 25) | [ExportCodeFixProvider(LanguageNames.CSharp)] method NewNode (line 28) | protected override SyntaxNode NewNode() => CS.SyntaxFactory.LiteralExp... class DummyCodeFixVB (line 31) | [ExportCodeFixProvider(LanguageNames.VisualBasic)] method NewNode (line 34) | protected override SyntaxNode NewNode() => VB.SyntaxFactory.NothingLit... class DummyCodeFix (line 37) | public abstract class DummyCodeFix : SonarCodeFix method NewNode (line 39) | protected abstract SyntaxNode NewNode(); method RegisterCodeFixesAsync (line 43) | protected override Task RegisterCodeFixesAsync(SyntaxNode root, SonarC... class DummyCodeFixNoAttribute (line 55) | internal class DummyCodeFixNoAttribute : DummyCodeFix method NewNode (line 57) | protected override SyntaxNode NewNode() => throw new NotSupportedExcep... FILE: analyzers/tests/SonarAnalyzer.TestFramework/Analyzers/DummyUtilityAnalyzer.cs class DummyUtilityAnalyzerCS (line 24) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method DummyUtilityAnalyzerCS (line 27) | public DummyUtilityAnalyzerCS(string protobufPath, IMessage message) :... class DummyUtilityAnalyzerVB (line 30) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method DummyUtilityAnalyzerVB (line 33) | public DummyUtilityAnalyzerVB(string protobufPath, IMessage message) :... class DummyUtilityAnalyzer (line 36) | internal abstract class DummyUtilityAnalyzer : UtilityAnalyzerBase method DummyUtilityAnalyzer (line 41) | protected DummyUtilityAnalyzer(string protobufPath, IMessage message) ... method Initialize (line 47) | protected sealed override void Initialize(SonarAnalysisContext context... FILE: analyzers/tests/SonarAnalyzer.TestFramework/Analyzers/TestAnalyzer.cs class TestAnalyzer (line 23) | public abstract class TestAnalyzer : SonarDiagnosticAnalyzer class TestAnalyzerCS (line 30) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method TestAnalyzerCS (line 37) | public TestAnalyzerCS(Action class TestAnalyzerVB (line 44) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method TestAnalyzerVB (line 51) | public TestAnalyzerVB(Action FILE: analyzers/tests/SonarAnalyzer.TestFramework/Analyzers/TestGeneratedCodeRecognizer.cs class TestGeneratedCodeRecognizer (line 24) | public sealed class TestGeneratedCodeRecognizer : GeneratedCodeRecognizer method IsTriviaComment (line 28) | protected override bool IsTriviaComment(SyntaxTrivia trivia) => method GetAttributeName (line 33) | protected override string GetAttributeName(SyntaxNode node) FILE: analyzers/tests/SonarAnalyzer.TestFramework/Build/LanguageOptions.cs class LanguageOptions (line 30) | public static class LanguageOptions method LanguageOptions (line 65) | static LanguageOptions() method OrDefault (line 108) | public static IEnumerable OrDefault(this IEnumerable Default(string language) => method Between (line 114) | public static ImmutableArray Between(CS.LanguageVersion ... method Between (line 120) | public static ImmutableArray Between(VB.LanguageVersion ... method Latest (line 126) | public static ImmutableArray Latest(AnalyzerLanguage lan... method FilterByEnvironment (line 134) | private static ImmutableArray FilterByEnvironment(this I... method CreateOptions (line 139) | private static IEnumerable CreateOptions(params CS.Langu... method CreateOptions (line 142) | private static IEnumerable CreateOptions(params VB.Langu... method Between (line 145) | private static T[] Between(T from, T to) where T : struct, Enum FILE: analyzers/tests/SonarAnalyzer.TestFramework/Build/ProjectBuilder.cs type ProjectBuilder (line 23) | public readonly struct ProjectBuilder method ProjectBuilder (line 32) | private ProjectBuilder(Project project) method GetCompilation (line 39) | public Compilation GetCompilation(ParseOptions parseOptions = null, Co... method FindDocument (line 46) | public Document FindDocument(string name) => method AddReferences (line 49) | public ProjectBuilder AddReferences(IEnumerable ref... method AddProjectReference (line 63) | public ProjectBuilder AddProjectReference(Func paths) => method AddAdditionalDocuments (line 69) | public ProjectBuilder AddAdditionalDocuments(IEnumerable paths... method AddDocument (line 72) | public ProjectBuilder AddDocument(string path) => method AddAdditionalDocument (line 75) | public ProjectBuilder AddAdditionalDocument(string path) => method AddSnippets (line 78) | public ProjectBuilder AddSnippets(params string[] snippets) => method AddSnippets (line 81) | public ProjectBuilder AddSnippets(IEnumerable snippets) => method AddSnippet (line 84) | public ProjectBuilder AddSnippet(string code, string fileName = null) method AddAnalyzerReferences (line 91) | public ProjectBuilder AddAnalyzerReferences(IEnumerable method GetTestCaseFileRelativePath (line 100) | private string GetTestCaseFileRelativePath(string path) method IsExtensionOfSupportedType (line 118) | private bool IsExtensionOfSupportedType(FileInfo fileInfo) => method AddDocument (line 123) | private static ProjectBuilder AddDocument(Project project, string file... method AddAdditionalDocument (line 126) | private static ProjectBuilder AddAdditionalDocument(Project project, s... method AddAnalyzerConfigDocument (line 129) | public ProjectBuilder AddAnalyzerConfigDocument(string editorConfigPat... type Snippet (line 133) | public record Snippet(string Content, string FileName); FILE: analyzers/tests/SonarAnalyzer.TestFramework/Build/SnippetCompiler.cs class SnippetCompiler (line 27) | public class SnippetCompiler method SnippetCompiler (line 33) | public SnippetCompiler(string code, params MetadataReference[] additio... method SnippetCompiler (line 35) | public SnippetCompiler(string code, IEnumerable add... method SnippetCompiler (line 37) | public SnippetCompiler(string code, bool ignoreErrors, AnalyzerLanguag... method IsCSharp (line 56) | public bool IsCSharp() => method Nodes (line 59) | public IEnumerable Nodes() where TSy... method Symbol (line 62) | public TSymbolType Symbol(SyntaxNode node) where TSymbolT... method MethodDeclaration (line 65) | public SyntaxNode MethodDeclaration(string typeDotMethodName) method NamespaceSymbol (line 85) | public INamespaceSymbol NamespaceSymbol(string name) method DeclaredSymbols (line 96) | public IEnumerable DeclaredSymbols() where T : ISymbol method DeclaredSymbol (line 105) | public ISymbol DeclaredSymbol(string name) => method DeclaredSymbol (line 108) | public T DeclaredSymbol(string name) where T : ISymbol => method MethodSymbol (line 111) | public IMethodSymbol MethodSymbol(string typeDotMethodName) method PropertySymbol (line 117) | public IPropertySymbol PropertySymbol(string typeDotPropertyName) method TypeByMetadataName (line 138) | public INamedTypeSymbol TypeByMetadataName(string metadataName) => method CreateAnalysisContext (line 141) | public SonarSyntaxNodeReportingContext CreateAnalysisContext(SyntaxNod... method EmitAssembly (line 147) | public Assembly EmitAssembly() method HasCompilationErrors (line 154) | private static bool HasCompilationErrors(Compilation compilation) => method IsCompilationError (line 157) | private static bool IsCompilationError(Diagnostic diagnostic) => method DumpCompilationErrors (line 160) | private static void DumpCompilationErrors(Compilation compilation) FILE: analyzers/tests/SonarAnalyzer.TestFramework/Build/SolutionBuilder.cs type SolutionBuilder (line 23) | public readonly struct SolutionBuilder method SolutionBuilder (line 41) | private SolutionBuilder(Solution solution) => method AddProject (line 44) | public ProjectBuilder AddProject(AnalyzerLanguage language, OutputKind... method Create (line 47) | public static SolutionBuilder Create() => method CreateSolutionFromPath (line 50) | public static SolutionBuilder CreateSolutionFromPath(string path, Outp... method FromSolution (line 57) | public static SolutionBuilder FromSolution(Solution solution) => method Compile (line 60) | public ImmutableArray Compile(params ParseOptions[] parse... method Compile (line 63) | private static IEnumerable Compile(Project project, Parse... method AddProject (line 66) | private ProjectBuilder AddProject(AnalyzerLanguage language, string pr... FILE: analyzers/tests/SonarAnalyzer.TestFramework/Common/AnalysisScaffolding.cs class AnalysisScaffolding (line 27) | public static class AnalysisScaffolding method CreateSonarAnalysisContext (line 29) | public static SonarAnalysisContext CreateSonarAnalysisContext() => method CreateOptions (line 32) | public static AnalyzerOptions CreateOptions() => method CreateOptions (line 35) | public static AnalyzerOptions CreateOptions(string relativePath) method CreateOptions (line 41) | public static AnalyzerOptions CreateOptions(string relativePath, Sourc... method CreateDescriptorMain (line 49) | public static DiagnosticDescriptor CreateDescriptorMain(string id = "S... method CreateDescriptor (line 52) | public static DiagnosticDescriptor CreateDescriptor(string id, params ... method CreateAnalysisConfig (line 55) | public static string CreateAnalysisConfig(TestContext context, IEnumer... method CreateAnalysisConfig (line 58) | public static string CreateAnalysisConfig(TestContext context, string ... method CreateSonarProjectConfigWithFilesToAnalyze (line 69) | public static string CreateSonarProjectConfigWithFilesToAnalyze(TestCo... method CreateSonarProjectConfigWithUnchangedFiles (line 76) | public static string CreateSonarProjectConfigWithUnchangedFiles(TestCo... method CreateSonarProjectConfig (line 79) | public static string CreateSonarProjectConfig(TestContext context, Pro... method CreateSonarLintXml (line 82) | public static string CreateSonarLintXml( method GenerateSonarLintXmlContent (line 97) | public static string GenerateSonarLintXmlContent( method CreateNodeReportingContext (line 124) | public static SonarSyntaxNodeReportingContext CreateNodeReportingConte... method CreateRules (line 132) | private static IEnumerable CreateRules(List method CreateKeyValuePair (line 153) | private static XElement CreateKeyValuePair(string containerName, strin... method ConcatenateStringArray (line 156) | private static string ConcatenateStringArray(string[] array) => method CreateSonarProjectConfig (line 159) | private static string CreateSonarProjectConfig(TestContext context, st... FILE: analyzers/tests/SonarAnalyzer.TestFramework/Common/AssertIgnoreScope.cs class AssertIgnoreScope (line 23) | public sealed class AssertIgnoreScope : IDisposable method AssertIgnoreScope (line 27) | public AssertIgnoreScope() method Dispose (line 33) | public void Dispose() => FILE: analyzers/tests/SonarAnalyzer.TestFramework/Common/CurrentCultureScope.cs class CurrentCultureScope (line 22) | public sealed class CurrentCultureScope : IDisposable method CurrentCultureScope (line 27) | public CurrentCultureScope() : this(CultureInfo.InvariantCulture) { } method CurrentCultureScope (line 29) | public CurrentCultureScope(CultureInfo culture) method Dispose (line 38) | public void Dispose() FILE: analyzers/tests/SonarAnalyzer.TestFramework/Common/EditorConfigGenerator.cs class EditorConfigGenerator (line 26) | public class EditorConfigGenerator method EditorConfigGenerator (line 30) | public EditorConfigGenerator(string rootPath) method Generate (line 39) | public string Generate(IEnumerable razorFiles) => method ToConfigLine (line 42) | private string ToConfigLine(string file) => FILE: analyzers/tests/SonarAnalyzer.TestFramework/Common/EnvironmentVariableScope.cs class EnvironmentVariableScope (line 24) | public sealed class EnvironmentVariableScope : IDisposable method SetVariable (line 35) | public void SetVariable(string name, string value) method Dispose (line 45) | public void Dispose() FILE: analyzers/tests/SonarAnalyzer.TestFramework/Common/FixAllDiagnosticProvider.cs class FixAllDiagnosticProvider (line 22) | public class FixAllDiagnosticProvider : FixAllContext.DiagnosticProvider method FixAllDiagnosticProvider (line 26) | public FixAllDiagnosticProvider(IEnumerable diagnostics) => method GetDocumentDiagnosticsAsync (line 29) | public override Task> GetDocumentDiagnosticsAs... method GetAllDiagnosticsAsync (line 32) | public override Task> GetAllDiagnosticsAsync(P... method GetProjectDiagnosticsAsync (line 35) | public override Task> GetProjectDiagnosticsAsy... FILE: analyzers/tests/SonarAnalyzer.TestFramework/Common/LogTester.cs class LogTester (line 20) | public sealed class LogTester : IDisposable method LogTester (line 29) | public LogTester() method AssertContain (line 37) | public void AssertContain(string value) => method AssertContainError (line 40) | public void AssertContainError(string value) => method Dispose (line 43) | public void Dispose() FILE: analyzers/tests/SonarAnalyzer.TestFramework/Common/Paths.cs class Paths (line 20) | public static class Paths method Paths (line 27) | static Paths() method CurrentTestCases (line 47) | public static string CurrentTestCases() method FindRoot (line 67) | private static string FindRoot(string expectedSubdirectory) FILE: analyzers/tests/SonarAnalyzer.TestFramework/Common/SdkPathProvider.cs class SdkPathProvider (line 22) | public static class SdkPathProvider method LatestSdkFolder (line 34) | public static string LatestSdkFolder() => method LatestAspNetCoreSdkFolder (line 37) | public static string LatestAspNetCoreSdkFolder() => method LatestWindowsDesktopSdkFolder (line 40) | public static string LatestWindowsDesktopSdkFolder() => method LatestFolder (line 43) | public static string LatestFolder(string path, string assemblyName) class AssemblyLoader (line 64) | private sealed class AssemblyLoader : IAnalyzerAssemblyLoader method AddDependencyLocation (line 66) | public void AddDependencyLocation(string fullPath) { } method LoadFromPath (line 68) | public Assembly LoadFromPath(string fullPath) => Assembly.LoadFrom(f... FILE: analyzers/tests/SonarAnalyzer.TestFramework/Common/TestCompiler.cs class TestCompiler (line 31) | public static class TestCompiler method CompileIgnoreErrorsCS (line 33) | public static (SyntaxTree Tree, SemanticModel Model) CompileIgnoreErro... method CompileIgnoreErrorsVB (line 36) | public static (SyntaxTree Tree, SemanticModel Model) CompileIgnoreErro... method CompileCS (line 39) | public static (SyntaxTree Tree, SemanticModel Model) CompileCS(string ... method CompileVB (line 42) | public static (SyntaxTree Tree, SemanticModel Model) CompileVB(string ... method Compile (line 45) | public static (SyntaxTree Tree, SemanticModel Model) Compile(string sn... method NodeBetweenMarkersCS (line 57) | public static NodeAndModel NodeBetweenMarkersCS(string snippet, ... method NodeBetweenMarkersCS (line 60) | public static NodeAndModel NodeBetweenMarkersCS(s... method NodeBetweenMarkersVB (line 64) | public static NodeAndModel NodeBetweenMarkersVB(string snippet, ... method NodeBetweenMarkersVB (line 67) | public static NodeAndModel NodeBetweenMarker... method TokenBetweenMarkersCS (line 71) | public static TokenAndModel TokenBetweenMarkersCS(string snippet, bool... method TokenBetweenMarkersVB (line 75) | public static TokenAndModel TokenBetweenMarkersVB(string snippet, bool... method CompileCfgBodyCS (line 78) | public static ControlFlowGraph CompileCfgBodyCS(string body = null, st... method CompileCfgBodyVB (line 89) | public static ControlFlowGraph CompileCfgBodyVB(string body = null) => method CompileCfgCS (line 98) | public static ControlFlowGraph CompileCfgCS(string snippet, bool ignor... method CompileCfg (line 101) | public static ControlFlowGraph CompileCfg(string snippet, method ProjectTypeReference (line 145) | public static IEnumerable ProjectTypeReference(Proj... method Serialize (line 150) | public static string Serialize(IOperationWrapperSonar operation) method NodeBetweenMarkers (line 156) | private static NodeAndModel NodeBetweenMarkers(string snippet, method TokenBetweenMarkers (line 170) | private static TokenAndModel TokenBetweenMarkers(string snippet, FILE: analyzers/tests/SonarAnalyzer.TestFramework/Common/TestConstants.cs class TestConstants (line 20) | public static class TestConstants FILE: analyzers/tests/SonarAnalyzer.TestFramework/Common/TestEnvironment.cs class TestEnvironment (line 20) | public static class TestEnvironment method BuildReason (line 28) | public static string BuildReason() => FILE: analyzers/tests/SonarAnalyzer.TestFramework/Common/TestFiles.cs class TestFiles (line 20) | public static class TestFiles method ToUnixLineEndings (line 22) | public static string ToUnixLineEndings(this string value) => method TestPath (line 25) | public static string TestPath(TestContext context, string fileName) method WriteFile (line 39) | public static string WriteFile(TestContext context, string fileName, s... method GetRelativePath (line 46) | public static string GetRelativePath(string relativeTo, string path) FILE: analyzers/tests/SonarAnalyzer.TestFramework/Extensions/CompilationExtensions.cs class CompilationExtensions (line 23) | internal static class CompilationExtensions method LanguageVersionString (line 25) | public static string LanguageVersionString(this Compilation compilatio... FILE: analyzers/tests/SonarAnalyzer.TestFramework/Extensions/DiagnosticDescriptorExtensions.cs class DiagnosticDescriptorExtensions (line 22) | public static class DiagnosticDescriptorExtensions method IsSecurityHotspot (line 24) | public static bool IsSecurityHotspot(this DiagnosticDescriptor diagnos... FILE: analyzers/tests/SonarAnalyzer.TestFramework/Extensions/StringAssertionsExtensions.cs class StringAssertionsExtensions (line 22) | public static class StringAssertionsExtensions method BeIgnoringLineEndings (line 24) | [CustomAssertion] method ContainIgnoringLineEndings (line 28) | [CustomAssertion] FILE: analyzers/tests/SonarAnalyzer.TestFramework/Extensions/SyntaxTreeExtensions.cs class SyntaxTreeExtensions (line 20) | public static class SyntaxTreeExtensions method First (line 22) | public static T First(this SyntaxTree tree) where T : SyntaxNode => method Single (line 25) | public static T Single(this SyntaxTree tree) where T : SyntaxNode => FILE: analyzers/tests/SonarAnalyzer.TestFramework/Extensions/TypeExtensions.cs class TypeExtensions (line 22) | public static class TypeExtensions method AnalyzerTargetLanguage (line 24) | public static AnalyzerLanguage AnalyzerTargetLanguage(this Type analyz... FILE: analyzers/tests/SonarAnalyzer.TestFramework/MetadataReferences/AspNetCoreMetadataReference.cs class AspNetCoreMetadataReference (line 24) | public static class AspNetCoreMetadataReference FILE: analyzers/tests/SonarAnalyzer.TestFramework/MetadataReferences/CoreMetadataReference.cs class CoreMetadataReference (line 24) | public static class CoreMetadataReference FILE: analyzers/tests/SonarAnalyzer.TestFramework/MetadataReferences/FrameworkMetadataReference.cs class FrameworkMetadataReference (line 25) | public static class FrameworkMetadataReference FILE: analyzers/tests/SonarAnalyzer.TestFramework/MetadataReferences/MetadataReferenceFacade.cs class MetadataReferenceFacade (line 24) | public static class MetadataReferenceFacade method SystemThreadingTasksExtensions (line 343) | public static References SystemThreadingTasksExtensions(string version... FILE: analyzers/tests/SonarAnalyzer.TestFramework/MetadataReferences/MetadataReferenceFactory.cs type Sdk (line 22) | public enum Sdk class MetadataReferenceFactory (line 31) | internal static class MetadataReferenceFactory method Create (line 35) | public static IEnumerable Create(string assemblyNam... method Create (line 38) | public static MetadataReference Create(Type type) => method CreateReference (line 43) | public static MetadataReference CreateReference(string assemblyName, S... method CreateReference (line 57) | public static MetadataReference CreateReference(string assemblyName) => method CreateReference (line 60) | public static MetadataReference CreateReference(string assemblyName, s... FILE: analyzers/tests/SonarAnalyzer.TestFramework/MetadataReferences/NuGetMetadataFactory.Package.cs class NuGetMetadataFactory (line 28) | internal static partial class NuGetMetadataFactory class Package (line 32) | private sealed class Package method Package (line 39) | public Package(string id, string version, string runtime) method EnsureInstalled (line 48) | public string EnsureInstalled() method InstallPackageAsync (line 61) | private async Task InstallPackageAsync(string packageDir) method NuGetRepository (line 81) | private static async Task NuGetRepository() method LatestVersion (line 102) | private async Task LatestVersion() FILE: analyzers/tests/SonarAnalyzer.TestFramework/MetadataReferences/NuGetMetadataFactory.cs class NuGetMetadataFactory (line 20) | internal static partial class NuGetMetadataFactory method NuGetMetadataFactory (line 53) | static NuGetMetadataFactory() method Create (line 61) | public static IEnumerable Create(string packageId, ... method Create (line 64) | public static IEnumerable Create(string packageId, ... method Create (line 68) | private static IEnumerable Create(Package package, ... method LogMessage (line 98) | private static void LogMessage(string message) => FILE: analyzers/tests/SonarAnalyzer.TestFramework/MetadataReferences/NuGetMetadataReference.cs class NuGetMetadataReference (line 24) | public static class NuGetMetadataReference method AzureCore (line 37) | public static References AzureCore(string packageVersion = TestConstan... method AzureIdentity (line 38) | public static References AzureIdentity(string packageVersion = TestCon... method AzureMessagingServiceBus (line 39) | public static References AzureMessagingServiceBus(string packageVersio... method AzureResourceManager (line 40) | public static References AzureResourceManager(string packageVersion = ... method AzureStorageCommon (line 41) | public static References AzureStorageCommon(string packageVersion = Te... method AzureStorageBlobs (line 42) | public static References AzureStorageBlobs(string packageVersion = Tes... method AzureStorageFilesDataLake (line 43) | public static References AzureStorageFilesDataLake(string packageVersi... method AzureStorageFilesShares (line 44) | public static References AzureStorageFilesShares(string packageVersion... method AzureStorageQueues (line 45) | public static References AzureStorageQueues(string packageVersion = Te... method BouncyCastle (line 46) | public static References BouncyCastle(string packageVersion = "1.8.5")... method BouncyCastleCryptography (line 47) | public static References BouncyCastleCryptography(string packageVersio... method CastleCore (line 48) | public static References CastleCore(string packageVersion = "5.1.1") =... method Dapper (line 49) | public static References Dapper(string packageVersion = "1.50.5") => C... method CommonLoggingCore (line 50) | public static References CommonLoggingCore(string packageVersion = Tes... method EntityFramework (line 51) | public static References EntityFramework(string packageVersion = "6.2.... method FluentAssertions (line 52) | public static References FluentAssertions(string packageVersion) => method FluentValidation (line 56) | public static References FluentValidation(string packageVersion = Test... method FakeItEasy (line 57) | public static References FakeItEasy(string packageVersion) => Create("... method FsCheckXunit (line 58) | public static References FsCheckXunit(string packageVersion = TestCons... method FsCheckNunit (line 64) | public static References FsCheckNunit(string packageVersion = TestCons... method JetBrainsDotMemoryUnit (line 70) | public static References JetBrainsDotMemoryUnit(string packageVersion)... method JustMock (line 71) | public static References JustMock(string packageVersion) => Create("Ju... method JWT (line 72) | public static References JWT(string packageVersion) => Create("JWT", p... method Log4Net (line 73) | public static References Log4Net(string packageVersion, string targetF... method MachineSpecifications (line 74) | public static References MachineSpecifications(string packageVersion) ... method MicrosoftAspNetCore (line 75) | public static References MicrosoftAspNetCore(string packageVersion) =>... method MicrosoftAspNetCoreComponents (line 76) | public static References MicrosoftAspNetCoreComponents(string packageV... method MicrosoftAspNetCoreComponentsWeb (line 77) | public static References MicrosoftAspNetCoreComponentsWeb(string packa... method MicrosoftAspNetCoreDiagnostics (line 78) | public static References MicrosoftAspNetCoreDiagnostics(string package... method MicrosoftAspNetCoreDiagnosticsEntityFrameworkCore (line 79) | public static References MicrosoftAspNetCoreDiagnosticsEntityFramework... method MicrosoftAspNetCoreHosting (line 80) | public static References MicrosoftAspNetCoreHosting(string packageVers... method MicrosoftAspNetCoreHostingAbstractions (line 81) | public static References MicrosoftAspNetCoreHostingAbstractions(string... method MicrosoftAspNetCoreHttpAbstractions (line 82) | public static References MicrosoftAspNetCoreHttpAbstractions(string pa... method MicrosoftAspNetCoreHttpFeatures (line 83) | public static References MicrosoftAspNetCoreHttpFeatures(string packag... method MicrosoftAspNetCoreMvcAbstractions (line 84) | public static References MicrosoftAspNetCoreMvcAbstractions(string pac... method MicrosoftAspNetCoreMvcCore (line 85) | public static References MicrosoftAspNetCoreMvcCore(string packageVers... method MicrosoftAspNetCoreMvcViewFeatures (line 86) | public static References MicrosoftAspNetCoreMvcViewFeatures(string pac... method MicrosoftAspNetCoreMvcWebApiCompatShim (line 87) | public static References MicrosoftAspNetCoreMvcWebApiCompatShim(string... method MicrosoftAspNetCoreRouting (line 88) | public static References MicrosoftAspNetCoreRouting(string packageVers... method MicrosoftAspNetCoreMvcRazorRuntime (line 89) | public static References MicrosoftAspNetCoreMvcRazorRuntime(string pac... method MicrosoftAspNetCoreRoutingAbstractions (line 90) | public static References MicrosoftAspNetCoreRoutingAbstractions(string... method MicrosoftAspNetIdentity (line 92) | public static References MicrosoftAspNetIdentity(string packageVersion... method MicrosoftAspNetMvc (line 93) | public static References MicrosoftAspNetMvc(string packageVersion) => ... method MicrosoftAspNetCoreAppRef (line 94) | public static References MicrosoftAspNetCoreAppRef(string packageVersi... method MicrosoftAspNetSignalRCore (line 95) | public static References MicrosoftAspNetSignalRCore(string packageVers... method MicrosoftAspNetWebApiCors (line 96) | public static References MicrosoftAspNetWebApiCors(string packageVersi... method MicrosoftAzureCosmos (line 97) | public static References MicrosoftAzureCosmos(string packageVersion = ... method MicrosoftAzureDocumentDB (line 98) | public static References MicrosoftAzureDocumentDB(string packageVersio... method MicrosoftAzureServiceBus (line 99) | public static References MicrosoftAzureServiceBus(string packageVersio... method MicrosoftAzureWebJobs (line 100) | public static References MicrosoftAzureWebJobs(string packageVersion =... method MicrosoftAzureWebJobsCore (line 101) | public static References MicrosoftAzureWebJobsCore(string packageVersi... method MicrosoftAzureWebJobsExtensionsDurableTask (line 102) | public static References MicrosoftAzureWebJobsExtensionsDurableTask(st... method MicrosoftAzureWebJobsExtensionsHttp (line 103) | public static References MicrosoftAzureWebJobsExtensionsHttp(string pa... method MicrosoftBuildNoTargets (line 104) | public static References MicrosoftBuildNoTargets(string packageVersion... method MicrosoftCodeAnalysisCSharp (line 105) | public static References MicrosoftCodeAnalysisCSharp(string packageVer... method MicrosoftCodeAnalysisCSharpSourceGeneratorsTesting (line 110) | public static References MicrosoftCodeAnalysisCSharpSourceGeneratorsTe... method MicrosoftCodeAnalysisAnalyzerTesting (line 115) | public static References MicrosoftCodeAnalysisAnalyzerTesting(string p... method MicrosoftDataSqlClient (line 120) | public static References MicrosoftDataSqlClient(string packageVersion ... method MicrosoftDataSqliteCore (line 121) | public static References MicrosoftDataSqliteCore(string packageVersion... method MicrosoftEntityFramework (line 122) | public static References MicrosoftEntityFramework(string packageVersio... method MicrosoftEntityFrameworkCore (line 123) | public static References MicrosoftEntityFrameworkCore(string packageVe... method MicrosoftEntityFrameworkCoreAbstractions (line 124) | public static References MicrosoftEntityFrameworkCoreAbstractions(stri... method MicrosoftEntityFrameworkCoreSqliteCore (line 125) | public static References MicrosoftEntityFrameworkCoreSqliteCore(string... method MicrosoftEntityFrameworkCoreSqlServer (line 126) | public static References MicrosoftEntityFrameworkCoreSqlServer(string ... method MicrosoftEntityFrameworkCoreRelational (line 127) | public static References MicrosoftEntityFrameworkCoreRelational(string... method MicrosoftExtensionsConfigurationAbstractions (line 128) | public static References MicrosoftExtensionsConfigurationAbstractions(... method MicrosoftExtensionsDependencyInjectionAbstractions (line 129) | public static References MicrosoftExtensionsDependencyInjectionAbstrac... method MicrosoftExtensionsHttp (line 130) | public static References MicrosoftExtensionsHttp(string packageVersion... method MicrosoftExtensionsLoggingPackages (line 131) | public static References MicrosoftExtensionsLoggingPackages(string pac... method MicrosoftExtensionsLoggingAbstractions (line 138) | public static References MicrosoftExtensionsLoggingAbstractions(string... method MicrosoftExtensionsOptions (line 139) | public static References MicrosoftExtensionsOptions(string packageVers... method MicrosoftExtensionsPrimitives (line 140) | public static References MicrosoftExtensionsPrimitives(string packageV... method MicrosoftIdentityModelTokens (line 141) | public static References MicrosoftIdentityModelTokens(string packageVe... method MicrosoftJSInterop (line 142) | public static References MicrosoftJSInterop(string packageVersion) => ... method MicrosoftNetHttpHeaders (line 143) | public static References MicrosoftNetHttpHeaders(string packageVersion... method MicrosoftNetSdkFunctions (line 144) | public static References MicrosoftNetSdkFunctions(string packageVersio... method MicrosoftNetWebApiCore (line 153) | public static References MicrosoftNetWebApiCore(string packageVersion)... method MicrosoftSqlServerCompact (line 154) | public static References MicrosoftSqlServerCompact(string packageVersi... method MicrosoftWebXdt (line 155) | public static References MicrosoftWebXdt(string packageVersion = "3.0.... method MongoDBDriver (line 156) | public static References MongoDBDriver(string packageVersion = TestCon... method MongoDBDriverCore (line 159) | public static References MongoDBDriverCore(string packageVersion = Tes... method MonoPosixNetStandard (line 160) | public static References MonoPosixNetStandard(string packageVersion = ... method MonoDataSqlite (line 161) | public static References MonoDataSqlite(string packageVersion = TestCo... method Moq (line 162) | public static References Moq(string packageVersion) => Create("Moq", p... method MoreLinq (line 163) | public static References MoreLinq(string packageVersion = TestConstant... method MSTestTestFramework (line 164) | public static References MSTestTestFramework(string packageVersion) =>... method MvvmLightLibs (line 165) | public static References MvvmLightLibs(string packageVersion) => Creat... method MySqlData (line 166) | public static References MySqlData(string packageVersion) => Create("M... method MySqlDataEntityFrameworkCore (line 167) | public static References MySqlDataEntityFrameworkCore(string packageVe... method Nancy (line 168) | public static References Nancy(string packageVersion = "2.0.0") => Cre... method NFluent (line 169) | public static References NFluent(string packageVersion) => Create("NFl... method NLog (line 170) | public static References NLog(string packageVersion = TestConstants.Nu... method NHibernate (line 171) | public static References NHibernate(string packageVersion = "5.2.2") =... method NpgsqlEntityFrameworkCorePostgreSQL (line 172) | public static References NpgsqlEntityFrameworkCorePostgreSQL(string pa... method NSubstitute (line 173) | public static References NSubstitute(string packageVersion) => Create(... method NewtonsoftJson (line 174) | public static References NewtonsoftJson(string packageVersion) => Crea... method NUnit (line 175) | public static References NUnit(string packageVersion) => Create("NUnit... method NUnitLite (line 176) | public static References NUnitLite(string packageVersion) => Create("N... method OracleEntityFrameworkCore (line 177) | public static References OracleEntityFrameworkCore(string packageVersi... method OracleManagedDataAccessCore (line 178) | public static References OracleManagedDataAccessCore(string packageVer... method PetaPocoCompiled (line 179) | public static References PetaPocoCompiled(string packageVersion = "6.0... method RhinoMocks (line 180) | public static References RhinoMocks(string packageVersion) => Create("... method Shouldly (line 181) | public static References Shouldly(string packageVersion) => Create("Sh... method Serilog (line 182) | public static References Serilog(string packageVersion = TestConstants... method SerilogSinksConsole (line 183) | public static References SerilogSinksConsole(string packageVersion) =>... method ServiceStackOrmLite (line 184) | public static References ServiceStackOrmLite(string packageVersion = "... method SpecFlow (line 185) | public static References SpecFlow(string packageVersion) => Create("Sp... method SystemCollectionsImmutable (line 186) | public static References SystemCollectionsImmutable(string packageVers... method SystemConfigurationConfigurationManager (line 187) | public static References SystemConfigurationConfigurationManager(strin... method SystemComponentModelAnnotations (line 188) | public static References SystemComponentModelAnnotations(string packag... method SystemComponentModelComposition (line 189) | public static References SystemComponentModelComposition(string packag... method SystemComponentModelTypeConverter (line 190) | public static References SystemComponentModelTypeConverter(string pack... method SystemCompositionAttributedModel (line 191) | public static References SystemCompositionAttributedModel(string packa... method SystemDataSqlServerCe (line 192) | public static References SystemDataSqlServerCe(string packageVersion) ... method SystemDataOdbc (line 193) | public static References SystemDataOdbc(string packageVersion = "4.5.0... method SystemDataSqlClient (line 194) | public static References SystemDataSqlClient(string packageVersion = "... method SystemDataSQLiteCore (line 195) | public static References SystemDataSQLiteCore(string packageVersion = ... method SystemDataOracleClient (line 196) | public static References SystemDataOracleClient(string packageVersion ... method SystemDDirectoryServices (line 197) | public static References SystemDDirectoryServices(string packageVersio... method SystemDrawingCommon (line 198) | public static References SystemDrawingCommon(string packageVersion = "... method SystemIdentityModelTokensJwt (line 199) | public static References SystemIdentityModelTokensJwt(string packageVe... method SystemMemory (line 200) | public static References SystemMemory(string packageVersion = TestCons... method SystemNetHttp (line 201) | public static References SystemNetHttp(string packageVersion = TestCon... method SystemSecurityCryptographyOpenSsl (line 202) | public static References SystemSecurityCryptographyOpenSsl(string pack... method SystemSecurityCryptographyXml (line 203) | public static References SystemSecurityCryptographyXml(string packageV... method SystemSecurityPermissions (line 204) | public static References SystemSecurityPermissions(string packageVersi... method SystemPrivateServiceModel (line 205) | public static References SystemPrivateServiceModel(string packageVersi... method SystemServiceModelPrimitives (line 206) | public static References SystemServiceModelPrimitives(string packageVe... method SystemTextEncodingsWeb (line 207) | public static References SystemTextEncodingsWeb(string packageVersion)... method SystemTextJson (line 208) | public static References SystemTextJson(string packageVersion) => Crea... method SystemTextRegularExpressions (line 209) | public static References SystemTextRegularExpressions(string packageVe... method SystemThreadingTasksExtensions (line 210) | public static References SystemThreadingTasksExtensions(string package... method SystemValueTuple (line 211) | public static References SystemValueTuple(string packageVersion) => Cr... method SwashbuckleAspNetCoreAnnotations (line 212) | public static References SwashbuckleAspNetCoreAnnotations(string packa... method SwashbuckleAspNetCoreSwagger (line 213) | public static References SwashbuckleAspNetCoreSwagger(string packageVe... method TimeZoneConverter (line 214) | public static References TimeZoneConverter(string packageVersion = Tes... method XunitFramework (line 215) | public static References XunitFramework(string packageVersion) => method XunitFrameworkV3 (line 217) | public static References XunitFrameworkV3(string packageVersion = Test... FILE: analyzers/tests/SonarAnalyzer.TestFramework/MetadataReferences/NugetPackageVersions.cs class NugetPackageVersions (line 20) | public static class NugetPackageVersions class FluentAssertionsVersions (line 24) | public static class FluentAssertionsVersions class MsTest (line 32) | public static class MsTest class NUnit (line 41) | public static class NUnit FILE: analyzers/tests/SonarAnalyzer.TestFramework/MetadataReferences/WindowsDesktopMetadataReference.cs class WindowsDesktopMetadataReference (line 24) | internal static class WindowsDesktopMetadataReference FILE: analyzers/tests/SonarAnalyzer.TestFramework/Packaging/RuleTypeMappingCS.cs class RuleTypeMappingCS (line 20) | public static class RuleTypeMappingCS FILE: analyzers/tests/SonarAnalyzer.TestFramework/Packaging/RuleTypeMappingVB.cs class RuleTypeMappingVB (line 20) | public static class RuleTypeMappingVB FILE: analyzers/tests/SonarAnalyzer.TestFramework/Verification/CodeFixVerifier.cs class CodeFixVerifier (line 24) | internal class CodeFixVerifier method CodeFixVerifier (line 33) | public CodeFixVerifier(DiagnosticAnalyzer analyzer, CodeFixProvider co... method VerifyWhileDocumentChanges (line 41) | public void VerifyWhileDocumentChanges(ParseOptions parseOptions, stri... method VerifyFixAllProvider (line 65) | public void VerifyFixAllProvider(FixAllProvider fixAllProvider, ParseO... method CodeFixTitle (line 80) | private string CodeFixTitle(CodeFixProvider codeFix, State state) => method ApplyCodeFix (line 83) | private static Document ApplyCodeFix(Document document, CodeAction cod... method ActionToApply (line 90) | private IEnumerable ActionToApply(CodeFixProvider codeFix,... class State (line 98) | private sealed class State method State (line 105) | public State(DiagnosticAnalyzer analyzer, Document document, ParseOp... method AssertExpected (line 115) | public void AssertExpected(string pathToExpected, string becauseMess... method ActualCodeWithReplacedComments (line 132) | private string ActualCodeWithReplacedComments() => method ReplaceNonCompliantComment (line 139) | private static string ReplaceNonCompliantComment(string line) FILE: analyzers/tests/SonarAnalyzer.TestFramework/Verification/DiagnosticVerifier.cs class DiagnosticVerifier (line 22) | public static class DiagnosticVerifier method Verify (line 28) | public static int Verify(Compilation compilation, method VerifyNoIssues (line 60) | public static void VerifyNoIssues(Compilation compilation, method VerifyNoIssuesIgnoreErrors (line 67) | public static void VerifyNoIssuesIgnoreErrors(Compilation compilation, method AnalyzerDiagnostics (line 77) | public static IEnumerable AnalyzerDiagnostics(Compilation ... method AnalyzerDiagnostics (line 80) | public static IEnumerable AnalyzerDiagnostics(Compilation ... method AnalyzerExceptions (line 83) | public static IEnumerable AnalyzerExceptions(Compilation c... method DiagnosticsAndErrors (line 86) | private static ImmutableArray DiagnosticsAndErrors(Compila... method Compare (line 121) | private static void Compare(string languageVersion, CompilationIssues ... method SerializePairs (line 145) | private static IEnumerable SerializePairs(string ... method ExceptRazorGeneratedFiles (line 174) | private static IEnumerable ExceptRazorGeneratedFiles(IEnum... method VerifyNoExceptionThrown (line 179) | private static IEnumerable VerifyNoExceptionThrown(IEnumer... method MatchPairs (line 182) | private static IEnumerable MatchPairs(CompilationIs... method MatchDifferences (line 195) | private static IEnumerable MatchDifferences(List message... FILE: analyzers/tests/SonarAnalyzer.TestFramework/Verification/IssueValidation/CompilationIssues.cs class CompilationIssues (line 22) | internal sealed class CompilationIssues : IEnumerable method CompilationIssues (line 26) | public CompilationIssues(IEnumerable files) method CompilationIssues (line 29) | public CompilationIssues(Diagnostic[] diagnostics) method CompilationIssues (line 32) | public CompilationIssues(IEnumerable issues) => method UniqueKeys (line 35) | public IssueLocationKey[] UniqueKeys() => method Remove (line 38) | public List Remove(IssueLocationKey key) method Dump (line 48) | public void Dump(string languageVersion) method ToIssueLocations (line 60) | private static IEnumerable ToIssueLocations(Diagnostic[... method GetEnumerator (line 76) | IEnumerator IEnumerable.GetEnumerator() => method GetEnumerator (line 79) | [ExcludeFromCodeCoverage] FILE: analyzers/tests/SonarAnalyzer.TestFramework/Verification/IssueValidation/FileContent.cs class FileContent (line 22) | internal sealed class FileContent method FileContent (line 27) | public FileContent(string fileName) : this(fileName, SourceText.From(S... method FileContent (line 29) | public FileContent(SyntaxTree tree) : this(tree.FilePath, tree.GetText... method FileContent (line 31) | private FileContent(string fileName, SourceText content) FILE: analyzers/tests/SonarAnalyzer.TestFramework/Verification/IssueValidation/IssueLocation.cs type IssueType (line 23) | internal enum IssueType class IssueLocation (line 31) | [DebuggerDisplay("ID:{RuleId} {Type} @{LineNumber} Start:{Start} Length:... method IssueLocation (line 46) | public IssueLocation(Diagnostic diagnostic) method IssueLocation (line 50) | public IssueLocation(IssueLocation primary, SecondaryLocation secondar... method IssueLocation (line 53) | public IssueLocation(IssueType type, string filePath, int lineNumber, ... method IssueLocation (line 65) | private IssueLocation(IssueType type, string ruleId, string message, L... method UpdatePrimaryIssueIdFrom (line 68) | public void UpdatePrimaryIssueIdFrom(IssueLocation expected) method GetHashCode (line 76) | public override int GetHashCode() => method Equals (line 79) | public override bool Equals(object obj) => method EqualOrNull (line 90) | private static bool EqualOrNull(string first, string second) => method EqualOrNull (line 93) | private static bool EqualOrNull(int? first, int? second) => type IssueLocationKey (line 97) | [DebuggerDisplay("{Type} @{LineNumber} {FilePath}")] FILE: analyzers/tests/SonarAnalyzer.TestFramework/Verification/IssueValidation/IssueLocationCollector.cs class IssueLocationCollector (line 26) | internal static class IssueLocationCollector method ExpectedIssueLocations (line 46) | public static IList ExpectedIssueLocations(string fileP... method MergeLocations (line 69) | internal static /* for testing */ IList MergeLocations(... method FindIssueLocations (line 93) | internal static /* for testing */ IEnumerable FindIssue... method FindPreciseIssueLocations (line 104) | internal static /* for testing */ IEnumerable FindPreci... method CreateIssueLocations (line 116) | private static IEnumerable CreateIssueLocations(Match m... method EnsureNoInvalidFormat (line 165) | private static void EnsureNoInvalidFormat(string filePath, TextLine line) method EnsureNoDuplicatedPrimaryIds (line 186) | private static IList EnsureNoDuplicatedPrimaryIds(IList... method ValidateNote (line 200) | private static void ValidateNote(string filePath, TextLine line, Match... method UnexpectedPreciseLocationCount (line 217) | private static Exception UnexpectedPreciseLocationCount(int count, int... method CreateRegex (line 225) | private static Regex CreateRegex(string pattern, RegexOptions options ... FILE: analyzers/tests/SonarAnalyzer.TestFramework/Verification/IssueValidation/IssueLocationPair.cs type IssueLocationPair (line 22) | internal sealed record IssueLocationPair(IssueLocation Actual, IssueLoca... FILE: analyzers/tests/SonarAnalyzer.TestFramework/Verification/IssueValidation/VerificationMessage.cs type VerificationMessage (line 20) | internal sealed record VerificationMessage(string ShortDescription, stri... FILE: analyzers/tests/SonarAnalyzer.TestFramework/Verification/SuppressionHandler.cs class SuppressionHandler (line 24) | public static class SuppressionHandler method HookSuppression (line 29) | public static void HookSuppression() method UnHookSuppression (line 38) | public static void UnHookSuppression() method IncrementReportCount (line 46) | public static void IncrementReportCount(string ruleId) => method ExtensionMethodsCalledForAllDiagnostics (line 49) | public static bool ExtensionMethodsCalledForAllDiagnostics(IEnumerable... method HandleShouldDiagnosticBeReported (line 56) | private static bool HandleShouldDiagnosticBeReported(SyntaxTree tree, ... method LoadProperties (line 65) | private static PropertyInfo[] LoadProperties() => FILE: analyzers/tests/SonarAnalyzer.TestFramework/Verification/Verifier.cs class Verifier (line 30) | internal class Verifier method Verifier (line 42) | public Verifier(VerifierBuilder builder) method Verify (line 105) | public void Verify() // This should never have any arguments method VerifyNoIssues (line 124) | public void VerifyNoIssues() // This should never have any arguments method VerifyNoAD0001 (line 135) | public void VerifyNoAD0001() // This should never have any arguments method VerifyNoIssuesIgnoreErrors (line 146) | public void VerifyNoIssuesIgnoreErrors() // This should never have ... method VerifyCodeFix (line 157) | public void VerifyCodeFix() // This should never have any arguments method VerifyUtilityAnalyzerProducesEmptyProtobuf (line 173) | public void VerifyUtilityAnalyzerProducesEmptyProtobuf() // This s... method VerifyUtilityAnalyzer (line 182) | public void VerifyUtilityAnalyzer(Action Compile(bool concurrentAnalysis) => method CreateProject (line 205) | private ProjectBuilder CreateProject(bool concurrentAnalysis) method CreateConcurrencyTest (line 238) | private IEnumerable CreateConcurrencyTest(IEnumerable ... method InsertConcurrentNamespace (line 249) | private string InsertConcurrentNamespace(string content) method TestCaseDirectory (line 262) | private string TestCaseDirectory() => method TestCasePath (line 265) | private string TestCasePath(string fileName) => method ValidateSingleAnalyzer (line 268) | private void ValidateSingleAnalyzer(string propertyName) method ValidateExtension (line 276) | private void ValidateExtension(string path) method ValidateCodeFix (line 284) | private void ValidateCodeFix() method IsRazorOrCshtml (line 318) | private static bool IsRazorOrCshtml(string path) => method ProcessTargetFramework (line 322) | private void ProcessTargetFramework() method ProcessLanguageVersions (line 341) | private void ProcessLanguageVersions() type CompilationData (line 375) | public sealed record CompilationData(Compilation Compilation, string[]... FILE: analyzers/tests/SonarAnalyzer.TestFramework/Verification/VerifierBuilder.cs type CompilationErrorBehavior (line 26) | [Obsolete("This will be removed. Use FailTest if you really have to prov... type TargetFrameworks (line 34) | [Flags] type VerifierBuilder (line 45) | public record VerifierBuilder type VerifierBuilder (line 213) | public record VerifierBuilder : VerifierBuilder FILE: analyzers/tests/SonarAnalyzer.VisualBasic.Core.Test/Extensions/ISymbolExtensionsTest.cs class ISymbolExtensionsTest (line 22) | [TestClass] method GetDescendantNodes_ForNullSourceTree_ReturnsEmpty (line 25) | [TestMethod] method GetDescendantNodes_ForDifferentSyntaxTrees_ReturnsEmpty (line 29) | [TestMethod] method GetDescendantNodes_ForMissingVariableDeclarator_ReturnsEmpty (line 39) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.VisualBasic.Core.Test/Facade/Implementation/VisualBasicSyntaxFacadeTest.cs class VisualBasicSyntaxFacadeTest (line 23) | [TestClass] method EnumMembers_Null_VB (line 28) | [TestMethod] method InvocationIdentifier_Null_VB (line 32) | [TestMethod] method ObjectCreationTypeIdentifier_Null_VB (line 36) | [TestMethod] method InvocationIdentifier_UnexpectedTypeThrows_VB (line 40) | [TestMethod] method ModifierKinds_Null_VB (line 44) | [TestMethod] method NodeExpression_Null_VB (line 48) | [TestMethod] method NodeExpression_UnexpectedTypeThrows_VB (line 52) | [TestMethod] method NodeIdentifier_Null_VB (line 56) | [TestMethod] method NodeIdentifier_Unexpected_Returns_Null_VB (line 60) | [TestMethod] method StringValue_UnexpectedType_VB (line 64) | [TestMethod] method StringValue_NodeIsNull_VB (line 68) | [TestMethod] method ArgumentNameColon_VB_SimpleNameWithNameColonEquals (line 72) | [TestMethod] method ArgumentNameColon_VB_SimpleNameWithoutNameColonEquals (line 80) | [TestMethod] method ArgumentNameColon_VB_OmittedArgument (line 88) | [TestMethod] method ArgumentNameColon_VB_RangeArgument (line 95) | [TestMethod] method ArgumentNameColon_VB_UnsupportedSyntaxKind (line 104) | [TestMethod] method ComparisonKind_BinaryExpression_VB (line 111) | [TestMethod] method ComparisonKind_NonBinaryExpression_VB (line 118) | [TestMethod] method ComparisonKind_Null_VB (line 122) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.VisualBasic.Core.Test/Facade/VisualBasicFacadeTest.cs class VisualBasicFacadeTest (line 20) | [TestClass] method MethodParameterLookup_ForInvocation (line 23) | [TestMethod] method MethodParameterLookup_SemanticModelOverload (line 42) | [TestMethod] method MethodParameterLookup_ForObjectCreation (line 57) | [TestMethod] method MethodParameterLookup_ForArgumentList (line 79) | [TestMethod] method MethodParameterLookup_UnsupportedSyntaxKind (line 98) | [TestMethod] method MethodParameterLookup_Null (line 117) | [TestMethod] method MethodParameterLookup_Null_SemanticModelOverload (line 135) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.VisualBasic.Core.Test/Syntax/Extensions/ExpressionSyntaxExtensionsTest.cs class ExpressionSyntaxExtensionsTest (line 20) | [TestClass] method LeftMostInMemberAccess (line 25) | [TestMethod] method RemoveParentheses (line 44) | [TestMethod] method IsLeftSideOfAssignment (line 54) | [TestMethod] method IsOnBase (line 62) | [TestMethod] method SelfOrTopParenthesizedExpression (line 77) | [TestMethod] method NameIs (line 87) | [TestMethod] method HasConstantValue_Literals (line 97) | [TestMethod] method HasConstantValue_NonConstant_Parameter (line 110) | [TestMethod] method HasConstantValue_NonConstant_MethodCall (line 117) | [TestMethod] method HasConstantValue_ConstantField (line 128) | [TestMethod] method RootConditionalAccessExpression (line 135) | [TestMethod] method Parse (line 142) | private static SyntaxNode[] Parse(string methodBody, string methodSign... method Compile (line 145) | private static (SyntaxTree Tree, SemanticModel Model) Compile(string m... method WrapInClass (line 148) | private static string WrapInClass(string methodBody, string methodSign... FILE: analyzers/tests/SonarAnalyzer.VisualBasic.Core.Test/Syntax/Extensions/InterpolatedStringExpressionSyntaxExtensionsTest.cs class InterpolatedStringExpressionSyntaxExtensionsTest (line 20) | [TestClass] method TryGetGetInterpolatedTextValue_UnsupportedSyntaxKinds_ReturnsFalse_VB (line 23) | [TestMethod] method TryGetGetInterpolatedTextValue_SupportedSyntaxKinds_ReturnsTrue_VB (line 35) | [TestMethod] method CompileVB (line 46) | private static (InterpolatedStringExpressionSyntax InterpolatedStringE... FILE: analyzers/tests/SonarAnalyzer.VisualBasic.Core.Test/Syntax/Extensions/InvocationExpressionSyntaxExtensionsTest.cs class InvocationExpressionSyntaxExtensionsTest (line 22) | [TestClass] method TryGetOperands_InvocationNode_ShouldReturnsTrue_VB (line 25) | [TestMethod] method TryGetOperands_InvocationNodeDoesNotContainMemberAccess_ShouldReturnsFalse_VB (line 50) | [TestMethod] method HasExactlyNArguments_Null_VB (line 71) | [TestMethod] method GetMethodCallIdentifier_Null_VB (line 75) | [TestMethod] method IsMemberAccessOnKnownType_NotMemberAccessExpression_ReturnsFalse (line 79) | [TestMethod] method NodeBetweenMarkers (line 95) | private static SyntaxNode NodeBetweenMarkers(string code, string langu... FILE: analyzers/tests/SonarAnalyzer.VisualBasic.Core.Test/Syntax/Extensions/ObjectCreationExpressionSyntaxExtensionsTest.cs class ObjectCreationExpressionSyntaxExtensionsTest (line 20) | [TestClass] method GetObjectCreationTypeIdentifier_Null_VB (line 23) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.VisualBasic.Core.Test/Syntax/Extensions/SyntaxNodeExtensionsVisualBasicTest.cs class SyntaxNodeExtensionsVisualBasicTest (line 20) | [TestClass] method GetName (line 33) | [TestMethod] method IsNothingLiteral_Null (line 51) | [TestMethod] method NameIs (line 55) | [TestMethod] method Parse (line 67) | private static SyntaxNode[] Parse(string source) => FILE: analyzers/tests/SonarAnalyzer.VisualBasic.Core.Test/Syntax/Extensions/SyntaxTokenExtensionsTest.cs class SyntaxTokenExtensionsTest (line 23) | [TestClass] method ToComparisonKind (line 26) | [TestMethod] FILE: analyzers/tests/SonarAnalyzer.VisualBasic.Core.Test/Syntax/Utilities/SafeVisualBasicSyntaxWalkerTest.cs class SafeVisualBasicSyntaxWalkerTest (line 20) | [TestClass] method GivenSyntaxNodeWithReasonableDepth_SafeVisit_ReturnsTrue (line 23) | [TestMethod] method GivenSyntaxNodeWithHighDepth_SafeVisit_ReturnsFalse (line 27) | [TestMethod] class Walker (line 42) | private class Walker : SafeVisualBasicSyntaxWalker { } FILE: analyzers/tests/SonarAnalyzer.VisualBasic.Core.Test/Trackers/FieldAccessTrackerTest.cs class FieldAccessTrackerTest (line 22) | [TestClass] method MatchSet_VB (line 25) | [TestMethod] method AssignedValueIsConstant_VB (line 36) | [TestMethod] method CreateContext (line 50) | private static FieldAccessContext CreateContext(string fieldName) FILE: scripts/rspec/rspec-templates/Rule.Base.cs class Base (line 20) | public abstract class $DiagnosticClassName$Base : SonarDiag... method Base (line 27) | protected $DiagnosticClassName$Base() : base(DiagnosticId) { } FILE: scripts/rspec/rspec-templates/Rule.CS.cs class DiagnosticClassName (line 20) | [DiagnosticAnalyzer(LanguageNames.CSharp)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: scripts/rspec/rspec-templates/Rule.VB.cs class DiagnosticClassName (line 20) | [DiagnosticAnalyzer(LanguageNames.VisualBasic)] method Initialize (line 30) | protected override void Initialize(SonarAnalysisContext context) => FILE: scripts/rspec/rspec-templates/Test.CS.cs class Test (line 22) | [TestClass] method DiagnosticClassName (line 27) | [TestMethod] FILE: scripts/rspec/rspec-templates/Test.VB.cs class Test (line 22) | [TestClass] method DiagnosticClassName (line 27) | [TestMethod] FILE: scripts/rspec/rspec-templates/TestCase.CS.cs class Program (line 3) | public class Program FILE: sonar-csharp-core/src/main/java/org/sonar/plugins/csharpenterprise/api/ProfileRegistrar.java type ProfileRegistrar (line 37) | @SonarLintSide method register (line 44) | void register(RegistrarContext registrarContext); type RegistrarContext (line 46) | interface RegistrarContext { method registerDefaultQualityProfileRules (line 51) | void registerDefaultQualityProfileRules(Collection ruleKeys); FILE: sonar-csharp-core/src/main/java/org/sonarsource/csharp/core/CSharpCoreExtensions.java class CSharpCoreExtensions (line 52) | public class CSharpCoreExtensions { method CSharpCoreExtensions (line 54) | private CSharpCoreExtensions() { method register (line 58) | public static void register(Plugin.Context context, PluginMetadata met... FILE: sonar-csharp-core/src/main/java/org/sonarsource/csharp/core/CSharpCorePluginMetadata.java class CSharpCorePluginMetadata (line 25) | public abstract class CSharpCorePluginMetadata implements PluginMetadata { method languageKey (line 27) | @Override method languageName (line 32) | @Override method repositoryKey (line 37) | @Override method fileSuffixesKey (line 42) | @Override method fileSuffixesDefaultValue (line 47) | @Override class CSharp (line 52) | public class CSharp extends AbstractLanguage { method CSharp (line 59) | public CSharp(Configuration configuration) { method getFileSuffixes (line 64) | @Override method equals (line 69) | @Override method hashCode (line 74) | @Override FILE: sonar-csharp-core/src/main/java/org/sonarsource/csharp/core/CSharpFileCacheSensor.java class CSharpFileCacheSensor (line 23) | public class CSharpFileCacheSensor extends AbstractFileCacheSensor { method CSharpFileCacheSensor (line 24) | public CSharpFileCacheSensor(PluginMetadata metadata, HashProvider has... method additionalSupportedExtensions (line 28) | @Override FILE: sonar-csharp-core/src/main/java/org/sonarsource/csharp/core/CSharpLanguageConfiguration.java class CSharpLanguageConfiguration (line 23) | public class CSharpLanguageConfiguration extends AbstractLanguageConfigu... method CSharpLanguageConfiguration (line 24) | public CSharpLanguageConfiguration(Configuration configuration, Plugin... method analyzeRazorCode (line 28) | public boolean analyzeRazorCode() { FILE: sonar-csharp-core/src/main/java/org/sonarsource/csharp/core/CSharpPropertyDefinitions.java class CSharpPropertyDefinitions (line 26) | public class CSharpPropertyDefinitions extends AbstractPropertyDefinitio... method CSharpPropertyDefinitions (line 28) | public CSharpPropertyDefinitions(PluginMetadata metadata) { method create (line 32) | @Override method getAnalyzeRazorCode (line 48) | public static String getAnalyzeRazorCode(String languageKey) { FILE: sonar-csharp-core/src/main/java/org/sonarsource/csharp/core/CSharpSonarWayProfile.java class CSharpSonarWayProfile (line 25) | public class CSharpSonarWayProfile extends AbstractSonarWayProfile { method CSharpSonarWayProfile (line 29) | public CSharpSonarWayProfile(PluginMetadata metadata, RoslynRules rosl... method CSharpSonarWayProfile (line 34) | public CSharpSonarWayProfile(PluginMetadata metadata, RoslynRules rosl... method registerRulesFromRegistrars (line 39) | @Override FILE: sonar-csharp-core/src/test/java/org/sonarsource/csharp/core/CSharpCoreExtensionsTest.java class CSharpCoreExtensionsTest (line 59) | class CSharpCoreExtensionsTest { method register_scanner (line 61) | @Test method register_sonarlint (line 112) | @Test FILE: sonar-csharp-core/src/test/java/org/sonarsource/csharp/core/CSharpCorePluginMetadataTest.java class CSharpCorePluginMetadataTest (line 23) | class CSharpCorePluginMetadataTest { method pluginProperties (line 25) | @Test FILE: sonar-csharp-core/src/test/java/org/sonarsource/csharp/core/CSharpFileCacheSensorTest.java class CSharpFileCacheSensorTest (line 40) | class CSharpFileCacheSensorTest { method execute_whenCacheIsEnabled_itAddsOnlyTheLanguageFiles (line 47) | @Test method AddFile (line 77) | private static void AddFile(SensorContextTester context, String basePa... FILE: sonar-csharp-core/src/test/java/org/sonarsource/csharp/core/CSharpLanguageConfigurationTest.java class CSharpLanguageConfigurationTest (line 27) | class CSharpLanguageConfigurationTest { method reads_correct_language (line 29) | @Test method whenSettingIsTrue_analyzeRazorCode_returnsTrue (line 39) | @Test method whenSettingIsFalse_analyzeRazorCode_returnsFalse (line 49) | @Test method whenSettingIsEmpty_analyzeRazorCode_returnsTrue (line 59) | @Test FILE: sonar-csharp-core/src/test/java/org/sonarsource/csharp/core/CSharpPropertyDefinitionsTest.java class CSharpPropertyDefinitionsTest (line 25) | class CSharpPropertyDefinitionsTest { method create (line 27) | @Test method create_containsScannerForDotNetProperties (line 36) | @Test method create_containsLegacyScannerForDotNetProperties (line 49) | @Test method getAnalyzeRazorCode (line 64) | @Test FILE: sonar-csharp-core/src/test/java/org/sonarsource/csharp/core/CSharpSonarWayProfileTest.java class CSharpSonarWayProfileTest (line 37) | class CSharpSonarWayProfileTest { method resourcesDirectory (line 43) | @Override method beforeAll (line 49) | @BeforeAll method profileRegistrars_registerRules (line 55) | @Test FILE: sonar-csharp-core/src/test/java/org/sonarsource/csharp/core/CSharpTest.java class CSharpTest (line 29) | class CSharpTest { method init (line 34) | @BeforeEach method shouldGetDefaultFileSuffixes (line 42) | @Test method shouldGetCustomFileSuffixes (line 47) | @Test method equals_and_hashCode_considers_configuration (line 53) | @Test class FakeCSharp (line 69) | private class FakeCSharp extends AbstractLanguage { method FakeCSharp (line 71) | public FakeCSharp() { method getFileSuffixes (line 75) | @Override FILE: sonar-csharp-core/src/test/java/org/sonarsource/csharp/core/TestCSharpMetadata.java class TestCSharpMetadata (line 19) | class TestCSharpMetadata extends CSharpCorePluginMetadata { method pluginKey (line 23) | @Override method analyzerProjectName (line 28) | @Override method resourcesDirectory (line 33) | @Override FILE: sonar-csharp-plugin/src/main/java/org/sonar/plugins/csharp/CSharpPlugin.java class CSharpPlugin (line 24) | public class CSharpPlugin implements Plugin { method define (line 29) | @Override class CSharpPluginMetadata (line 34) | private static class CSharpPluginMetadata extends CSharpCorePluginMeta... method pluginKey (line 36) | @Override method analyzerProjectName (line 41) | @Override method resourcesDirectory (line 46) | @Override FILE: sonar-csharp-plugin/src/test/java/org/sonar/plugins/csharp/CSharpPluginTest.java class CSharpPluginTest (line 29) | class CSharpPluginTest { method getExtensions (line 31) | @Test method pluginProperties (line 40) | @Test FILE: sonar-csharp-plugin/src/test/java/org/sonar/plugins/csharp/CSharpRulesDefinitionTest.java class CSharpRulesDefinitionTest (line 32) | class CSharpRulesDefinitionTest { method setupContext (line 40) | @BeforeAll method rules_areDefined (line 47) | @Test method symbolicExecutionRules_areNotDefined (line 55) | @Test method allRules_haveMetadata (line 61) | @Test method allRules_haveHtmlDescription (line 71) | @Test FILE: sonar-csharp-plugin/src/test/java/org/sonar/plugins/csharp/CSharpSonarWayProfileTest.java class CSharpSonarWayProfileTest (line 29) | class CSharpSonarWayProfileTest { method setup (line 35) | @BeforeAll method expected_rules_in_sonar_way (line 43) | @Test method hotspots_in_sonar_way (line 54) | @Test method symbolic_execution_not_in_sonar_way (line 68) | @Test FILE: sonar-csharp-plugin/src/test/resources/Program.cs class Program (line 23) | public class Program method Add (line 25) | public static int Add(int op1, int op2) method Main (line 40) | static void Main(string[] args) class IFoo (line 45) | class IFoo class IBar (line 49) | class IBar // NOSONAR class MoreMath (line 53) | [SuppressMessage("Maintainability", "S2326:Unused type parameters should... method Add (line 56) | public int Add(int a, int b) // Noncompliant; is ignored FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/FileService.java type FileService (line 21) | public interface FileService { method isSupportedAbsolute (line 26) | boolean isSupportedAbsolute(String absolutePath); method getAbsolutePath (line 36) | Optional getAbsolutePath(String deterministicBuildPath); FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/NUnitTestResults.java class NUnitTestResults (line 21) | public class NUnitTestResults extends UnitTestResults { method NUnitTestResults (line 23) | NUnitTestResults(String outcome, @Nullable String label, @Nullable Lon... FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/NUnitTestResultsParser.java class NUnitTestResultsParser (line 27) | @ScannerSide method parse (line 31) | @Override class Parser (line 44) | private static class Parser extends XmlTestReportParser { method Parser (line 48) | Parser(File file, Map unitTestResults, Map... method handleTestSuiteTag (line 52) | private void handleTestSuiteTag(XmlParserHelper xmlParserHelper) { method handleTestCaseTag (line 61) | private void handleTestCaseTag(XmlParserHelper xmlParserHelper) { method extractExecutionTime (line 72) | private static Long extractExecutionTime(XmlParserHelper xmlParserHe... method extractName (line 82) | private static String extractName(XmlParserHelper xmlParserHelper) { FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/ParseErrorException.java class ParseErrorException (line 19) | class ParseErrorException extends RuntimeException { method ParseErrorException (line 23) | ParseErrorException(String message) { FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/PathSuffixPredicate.java method apply (line 23) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/ScannerFileService.java class ScannerFileService (line 31) | @ScannerSide method ScannerFileService (line 38) | public ScannerFileService(String languageKey, FileSystem fileSystem) { method isSupportedAbsolute (line 43) | public boolean isSupportedAbsolute(String absolutePath) { method getAbsolutePath (line 51) | public Optional getAbsolutePath(String deterministicBuildPath) { FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/UnitTestResultParser.java type UnitTestResultParser (line 22) | interface UnitTestResultParser { method parse (line 23) | void parse(File file, Map unitTestResults, Ma... FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/UnitTestResults.java class UnitTestResults (line 22) | public class UnitTestResults { method add (line 30) | public void add(int tests, int skipped, int failures, int errors, @Nul... method add (line 44) | public void add(UnitTestResults unitTestResults) { method tests (line 57) | public int tests() { method skipped (line 61) | public int skipped() { method failures (line 65) | public int failures() { method errors (line 69) | public int errors() { method executionTime (line 73) | @CheckForNull FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/UnitTestResultsAggregator.java class UnitTestResultsAggregator (line 35) | @ScannerSide method UnitTestResultsAggregator (line 46) | public UnitTestResultsAggregator(UnitTestConfiguration unitTestConf, C... method UnitTestResultsAggregator (line 50) | UnitTestResultsAggregator( method hasUnitTestResultsProperty (line 63) | boolean hasUnitTestResultsProperty(Predicate hasKeyPredicate) { method hasUnitTestResultsProperty (line 69) | boolean hasUnitTestResultsProperty() { method aggregate (line 76) | Map aggregate(WildcardPatternFileProvider wil... method aggregate (line 91) | private static void aggregate( method hasVisualStudioTestResultsFile (line 110) | private boolean hasVisualStudioTestResultsFile(Predicate hasKe... method hasNUnitTestResultsFile (line 114) | private boolean hasNUnitTestResultsFile(Predicate hasKeyPredic... method hasXUnitTestResultsFile (line 118) | private boolean hasXUnitTestResultsFile(Predicate hasKeyPredic... method computeMethodFileMap (line 122) | private static HashMap computeMethodFileMap(Collection... FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/UnitTestResultsImportSensor.java class UnitTestResultsImportSensor (line 39) | public class UnitTestResultsImportSensor implements ProjectSensor { method UnitTestResultsImportSensor (line 51) | public UnitTestResultsImportSensor(MethodDeclarationsCollector collector, method describe (line 64) | @Override method execute (line 72) | @Override method addTestMetrics (line 86) | private void addTestMetrics(SensorContext context) { method addMeasures (line 92) | private void addMeasures(SensorContext context, Map void addMeasure(SensorContext ... FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/VisualStudioTestResultParser.java class VisualStudioTestResultParser (line 33) | @ScannerSide method parse (line 38) | @Override class Parser (line 51) | private static class Parser extends XmlTestReportParser { method Parser (line 57) | Parser(File file, Map unitTestResults, Map... method handleUnitTestResultTag (line 62) | private void handleUnitTestResultTag(XmlParserHelper xmlParserHelper) { method handleUnitTestTag (line 77) | private void handleUnitTestTag(XmlParserHelper xmlParserHelper) { method getRequiredDateAttribute (line 99) | private Date getRequiredDateAttribute(XmlParserHelper xmlParserHelpe... method keepOnlyMilliseconds (line 109) | private String keepOnlyMilliseconds(String value) { FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/VisualStudioTestResults.java class VisualStudioTestResults (line 19) | public class VisualStudioTestResults extends UnitTestResults { method VisualStudioTestResults (line 21) | VisualStudioTestResults(String outcome, Long executionTime) { FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/WildcardPatternFileProvider.java class WildcardPatternFileProvider (line 32) | public class WildcardPatternFileProvider { method WildcardPatternFileProvider (line 46) | public WildcardPatternFileProvider(File baseDir) { method listFiles (line 50) | public Set listFiles(String pattern) { method toPath (line 96) | private static String toPath(List elements) { method elementsTillFirstWildcard (line 100) | private static List elementsTillFirstWildcard(List ele... method checkNoCurrentOrParentFolderAccess (line 111) | private static void checkNoCurrentOrParentFolderAccess(List el... method containsWildcard (line 119) | private static boolean containsWildcard(String element) { method isCurrentOrParentFolder (line 125) | private static boolean isCurrentOrParentFolder(String element) { method listFiles (line 130) | private static Set listFiles(File dir) { method listFiles (line 136) | private static void listFiles(Set result, File dir) { method relativize (line 149) | private static String relativize(File parent, File file) { FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/XUnitTestResults.java class XUnitTestResults (line 21) | public class XUnitTestResults extends UnitTestResults { method XUnitTestResults (line 23) | XUnitTestResults(String outcome, @Nullable Long executionTime) { FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/XUnitTestResultsParser.java class XUnitTestResultsParser (line 27) | @ScannerSide method parse (line 31) | @Override class Parser (line 45) | private static class Parser extends XmlTestReportParser { method Parser (line 48) | Parser(File file, Map unitTestResults, Map... method handleAssemblyTag (line 52) | private void handleAssemblyTag(XmlParserHelper xmlParserHelper) { method handleTestTag (line 58) | private void handleTestTag(XmlParserHelper xmlParserHelper) { FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/XmlParserHelper.java class XmlParserHelper (line 36) | public class XmlParserHelper implements AutoCloseable { method XmlParserHelper (line 44) | public XmlParserHelper(File file) { method checkRootTag (line 55) | public void checkRootTag(String name) { method checkRootTags (line 63) | String checkRootTags(List names) { method nextStartTag (line 72) | @Nullable method checkRequiredAttribute (line 86) | public void checkRequiredAttribute(String name, int expectedValue) { method getRequiredAttribute (line 93) | public String getRequiredAttribute(String name) { method stream (line 102) | public XMLStreamReader stream() { method getRequiredIntAttribute (line 106) | public int getRequiredIntAttribute(String name) { method getAttribute (line 111) | @Nullable method parseError (line 122) | public ParseErrorException parseError(String message) { method close (line 126) | @Override method getNextValid (line 139) | private int getNextValid() throws XMLStreamException { method isSameLocation (line 157) | private static boolean isSameLocation(@Nullable Location loc1, @Nullab... method nextStartOrEndTag (line 169) | @Nullable method getIntAttributeOrZero (line 187) | public int getIntAttributeOrZero(String name) { method tagToIntValue (line 192) | int tagToIntValue(String name, String value) { method getDoubleAttribute (line 200) | @Nullable method createXmlStreamReader (line 215) | XMLStreamReader createXmlStreamReader() throws XMLStreamException { FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/XmlTestReportParser.java class XmlTestReportParser (line 27) | public abstract class XmlTestReportParser { method XmlTestReportParser (line 35) | XmlTestReportParser(File file, Map unitTestR... method parse (line 42) | public void parse(Map> tagHandlers) { method addTestResultToFile (line 56) | protected void addTestResultToFile(String methodFullName, UnitTestResu... method extractDllNameFromFilePath (line 72) | protected String extractDllNameFromFilePath(String filePath) { method getFullName (line 76) | protected String getFullName(String methodName, String dllName) { FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/coverage/BranchCoverage.java class BranchCoverage (line 22) | class BranchCoverage { method BranchCoverage (line 27) | BranchCoverage(int line, int conditions, int coveredConditions) { method getLine (line 33) | public int getLine() { method getConditions (line 37) | public int getConditions() { method getCoveredConditions (line 41) | int getCoveredConditions() { method add (line 45) | public void add(int conditions, int coveredConditions) { method equals (line 50) | @Override method hashCode (line 67) | @Override method toString (line 72) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/coverage/CoberturaReportParser.java class CoberturaReportParser (line 36) | public final class CoberturaReportParser implements CoverageParser { method CoberturaReportParser (line 42) | public CoberturaReportParser(FileService fileService) { method accept (line 46) | @Override class Parser (line 53) | private class Parser { method Parser (line 60) | private Parser(File file, Coverage coverage) { method parse (line 65) | void parse() { method dispatchTags (line 74) | private void dispatchTags(XmlParserHelper xmlParserHelper) { method handleSourceTag (line 87) | private void handleSourceTag(XmlParserHelper xmlParserHelper) { method handleClassTag (line 100) | private void handleClassTag(XmlParserHelper xmlParserHelper) { method handleLineTag (line 110) | private void handleLineTag(XmlParserHelper xmlParserHelper) { method handleConditions (line 142) | private List handleConditions(XmlParserHelper xmlPa... method addMergeableConditions (line 158) | private void addMergeableConditions(String filePath, int line, int c... method addUnmergeableConditions (line 185) | private void addUnmergeableConditions(String filePath, int line, int... method addSwitchConditions (line 192) | private void addSwitchConditions(String filePath, int line, int cove... method addJumpConditions (line 199) | private int addJumpConditions(String filePath, int line, ParsedCondi... method resolveFile (line 210) | private CoveredFile resolveFile(String filename) { method createCoveredFile (line 227) | private CoveredFile createCoveredFile(File fileToResolve) { method isIndexed (line 251) | boolean isIndexed() { method toString (line 255) | @Override method parseConditionCoverage (line 263) | @Nullable method parsePercentage (line 276) | private static int parsePercentage(String coverage) { FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/coverage/ConditionData.java class ConditionData (line 19) | class ConditionData { method ConditionData (line 33) | public ConditionData(String format, String filePath, int startLine, Lo... method getFormat (line 43) | public String getFormat() { method getStartLine (line 47) | public int getStartLine() { method getHits (line 51) | public int getHits() { method getLocationStart (line 55) | public int getLocationStart() { method getLocationEnd (line 59) | public int getLocationEnd() { method getPath (line 63) | public int getPath() { method getFilePath (line 67) | public String getFilePath() { method getCoverageIdentifier (line 71) | public String getCoverageIdentifier() { method getUniqueKey (line 75) | public String getUniqueKey() { FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/coverage/Coverage.java class Coverage (line 28) | public class Coverage { method addHits (line 37) | void addHits(String file, int line, int hits) { method add (line 63) | public void add(ConditionData condition){ method getConditionData (line 67) | List getConditionData() { method files (line 71) | public Set files() { method hits (line 75) | Map hits(String file) { method getBranchCoverage (line 91) | List getBranchCoverage(String file) { method mergeWith (line 100) | void mergeWith(Coverage otherCoverage) { method mergeLineHits (line 105) | private void mergeLineHits(Coverage otherCoverage){ method getBranchCoverageUnderreported (line 118) | boolean getBranchCoverageUnderreported() { method getBranchCoverage (line 122) | private BranchCoverage getBranchCoverage(int lineNumber, List hasKeyPredicate) { method hasNCover3ReportPaths (line 94) | private boolean hasNCover3ReportPaths(Predicate hasKeyPredicat... method hasOpenCoverReportPaths (line 98) | private boolean hasOpenCoverReportPaths(Predicate hasKeyPredic... method hasDotCoverReportPaths (line 102) | private boolean hasDotCoverReportPaths(Predicate hasKeyPredica... method hasVisualStudioCoverageXmlReportPaths (line 106) | private boolean hasVisualStudioCoverageXmlReportPaths(Predicate hasKeyPredic... method aggregate (line 114) | Coverage aggregate(WildcardPatternFileProvider wildcardPatternFileProv... method aggregate (line 138) | private void aggregate(WildcardPatternFileProvider wildcardPatternFile... method mergeParsedCoverageWithAggregatedCoverage (line 151) | private void mergeParsedCoverageWithAggregatedCoverage(Coverage aggreg... FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/coverage/CoverageCache.java class CoverageCache (line 25) | class CoverageCache { method readCoverageFromCacheOrParse (line 31) | Coverage readCoverageFromCacheOrParse(CoverageParser parser, File repo... FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/coverage/CoverageParser.java type CoverageParser (line 22) | @FunctionalInterface FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/coverage/CoverageReportImportSensor.java class CoverageReportImportSensor (line 38) | public class CoverageReportImportSensor implements ProjectSensor { method CoverageReportImportSensor (line 51) | public CoverageReportImportSensor(CoverageConfiguration coverageConf, ... method describe (line 59) | @Override method execute (line 66) | @Override method analyze (line 75) | void analyze(SensorContext context, Coverage coverage) { method analyzeCoverage (line 122) | private static void analyzeCoverage(SensorContext context, Coverage co... class FileCountStatistics (line 160) | private static class FileCountStatistics { method FileCountStatistics (line 169) | private FileCountStatistics(int total) { method toString (line 173) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/coverage/DotCoverReportParser.java class DotCoverReportParser (line 30) | public class DotCoverReportParser implements CoverageParser { method DotCoverReportParser (line 39) | public DotCoverReportParser(FileService fileService) { method accept (line 43) | @Override class Parser (line 49) | private class Parser { method Parser (line 54) | Parser(File file, Coverage coverage) { method parse (line 59) | public void parse() { method extractFileCanonicalPath (line 77) | @Nullable method collectCoverage (line 90) | private void collectCoverage(String fileCanonicalPath, String conten... method getIndexOf (line 104) | private int getIndexOf(String fileContent, String part, int startInd... FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/coverage/DotCoverReportsAggregator.java class DotCoverReportsAggregator (line 32) | public class DotCoverReportsAggregator implements CoverageParser { method DotCoverReportsAggregator (line 38) | DotCoverReportsAggregator(DotCoverReportParser parser) { method accept (line 42) | @Override method listReportFiles (line 67) | private static List listReportFiles(File folder) { method checkIsHtml (line 78) | private static void checkIsHtml(File file) { method extractFolderName (line 90) | private static String extractFolderName(File file) { method isExcluded (line 100) | private static boolean isExcluded(File file) { FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/coverage/NCover3ReportParser.java class NCover3ReportParser (line 34) | @Deprecated method NCover3ReportParser (line 42) | NCover3ReportParser(FileService fileService, AnalysisWarnings analysis... method accept (line 47) | @Override class Parser (line 54) | private class Parser { method Parser (line 60) | Parser(File file, Coverage coverage) { method parse (line 65) | public void parse() { method dispatchTags (line 79) | private void dispatchTags(XmlParserHelper xmlParserHelper) { method handleDocTag (line 90) | private void handleDocTag(XmlParserHelper xmlParserHelper) { method isExcludedId (line 112) | private boolean isExcludedId(String id) { method handleSegmentPointTag (line 116) | private void handleSegmentPointTag(XmlParserHelper xmlParserHelper) { method isExcludedLine (line 139) | private boolean isExcludedLine(Integer line) { method checkRootTag (line 143) | private void checkRootTag(XmlParserHelper xmlParserHelper) { FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/coverage/OpenCoverReportParser.java class OpenCoverReportParser (line 31) | public class OpenCoverReportParser implements CoverageParser { method OpenCoverReportParser (line 36) | OpenCoverReportParser(FileService fileService) { method accept (line 40) | @Override class Parser (line 47) | private class Parser { method Parser (line 59) | Parser(File file, Coverage coverage) { method parse (line 64) | public void parse() { method dispatchTags (line 73) | private void dispatchTags(XmlParserHelper xmlParserHelper) { method handleFileRef (line 88) | private void handleFileRef(XmlParserHelper xmlParserHelper) { method handleFileTag (line 92) | private void handleFileTag(XmlParserHelper xmlParserHelper) { method handleSequencePointTag (line 110) | private void handleSequencePointTag(XmlParserHelper xmlParserHelper) { method handleBranchPointTag (line 140) | private void handleBranchPointTag(XmlParserHelper xmlParserHelper) { method createCoveredFile (line 181) | private CoveredFile createCoveredFile(String canonicalPath, String u... class CoveredFile (line 197) | private static class CoveredFile { method CoveredFile (line 205) | CoveredFile(String uid, String originalPath, @Nullable String indexe... method isIndexed (line 216) | boolean isIndexed() { method toString (line 220) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/coverage/SequencePoint.java class SequencePoint (line 19) | public class SequencePoint { method SequencePoint (line 25) | SequencePoint(String filePath, int lineStart, int lineEnd, int hits) { method SequencePoint (line 30) | SequencePoint(int lineStart, int lineEnd, int hits){ method getFilePath (line 36) | public String getFilePath() { method getStartLine (line 40) | public int getStartLine() { method getLineEnd (line 44) | public int getLineEnd() { method getHits (line 48) | public int getHits() { FILE: sonar-dotnet-core/src/main/java/org/sonar/plugins/dotnet/tests/coverage/VisualStudioCoverageXmlReportParser.java class VisualStudioCoverageXmlReportParser (line 33) | public class VisualStudioCoverageXmlReportParser implements CoveragePars... method VisualStudioCoverageXmlReportParser (line 38) | public VisualStudioCoverageXmlReportParser(FileService fileService) { method accept (line 42) | @Override class Parser (line 49) | private class Parser { method Parser (line 56) | Parser(File file, Coverage coverage) { method parse (line 61) | public void parse() { method dispatchTags (line 70) | private void dispatchTags(XmlParserHelper xmlParserHelper) { method handleModuleTag (line 83) | private void handleModuleTag() { method handleRangeTag (line 88) | private void handleRangeTag(XmlParserHelper xmlParserHelper) { method handleSourceFileTag (line 105) | private void handleSourceFileTag(XmlParserHelper xmlParserHelper) { method checkRootTag (line 146) | private void checkRootTag(XmlParserHelper xmlParserHelper) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/CallableUtils.java class CallableUtils (line 21) | public final class CallableUtils { method CallableUtils (line 22) | private CallableUtils(){} method lazy (line 24) | public static Object lazy(Callable callable) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/LazyCallException.java class LazyCallException (line 19) | public class LazyCallException extends RuntimeException { method LazyCallException (line 20) | public LazyCallException(String errorMessage, Exception exception) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/PropertyUtils.java class PropertyUtils (line 25) | public class PropertyUtils { method PropertyUtils (line 26) | private PropertyUtils() { } method nonProperties (line 28) | public static Set nonProperties(List extensions) { method propertyKeys (line 34) | public static Set propertyKeys(List extensions) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/StringUtils.java class StringUtils (line 19) | public class StringUtils { method StringUtils (line 20) | private StringUtils() { method pluralize (line 24) | public static String pluralize(String value, long count) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/AbstractLanguageConfiguration.java class AbstractLanguageConfiguration (line 29) | @ScannerSide method AbstractLanguageConfiguration (line 37) | protected AbstractLanguageConfiguration(Configuration configuration, P... method ignoreThirdPartyIssues (line 42) | public boolean ignoreThirdPartyIssues() { method bugCategories (line 46) | public Set bugCategories() { method codeSmellCategories (line 50) | public Set codeSmellCategories() { method vulnerabilityCategories (line 54) | public Set vulnerabilityCategories() { method analyzeGeneratedCode (line 58) | public boolean analyzeGeneratedCode() { method outputDir (line 62) | public Optional outputDir() { method outputDir (line 71) | private static Path outputDir(String workingDirectory) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/AbstractPropertyDefinitions.java class AbstractPropertyDefinitions (line 29) | public abstract class AbstractPropertyDefinitions { method AbstractPropertyDefinitions (line 39) | protected AbstractPropertyDefinitions(PluginMetadata metadata) { method create (line 43) | public List create() { method ignoreHeaderCommentsProperty (line 176) | public static String ignoreHeaderCommentsProperty(String languageKey) { method analyzeGeneratedCode (line 180) | public static String analyzeGeneratedCode(String languageKey) { method fileSuffixProperty (line 184) | public static String fileSuffixProperty(String languageKey) { method roslynJsonReportPathProperty (line 188) | public static String roslynJsonReportPathProperty(String languageKey) { method telemetryJsonReportPathProperty (line 192) | public static String telemetryJsonReportPathProperty(String languageKe... method analyzerWorkDirProperty (line 196) | public static String analyzerWorkDirProperty(String languageKey) { method ignoreIssuesProperty (line 200) | public static String ignoreIssuesProperty(String languageKey) { method bugCategoriesProperty (line 204) | public static String bugCategoriesProperty(String languageKey) { method codeSmellCategoriesProperty (line 208) | public static String codeSmellCategoriesProperty(String languageKey) { method vulnerabilityCategoriesProperty (line 212) | public static String vulnerabilityCategoriesProperty(String languageKe... method pullRequestCacheBasePath (line 216) | public static String pullRequestCacheBasePath() { method pullRequestBase (line 220) | public static String pullRequestBase() { method pluginKeyScannerPropertyKey (line 224) | public static String pluginKeyScannerPropertyKey(String languageKey) { method pluginVersionScannerPropertyKey (line 228) | public static String pluginVersionScannerPropertyKey(String languageKe... method staticResourceNameScannerPropertyKey (line 232) | public static String staticResourceNameScannerPropertyKey(String langu... method scannerForDotNetProperty (line 236) | private static String scannerForDotNetProperty(String languageKey, Str... method pluginKeyLegacyScannerPropertyKey (line 240) | private static String pluginKeyLegacyScannerPropertyKey(String languag... method pluginVersionLegacyScannerPropertyKey (line 244) | private static String pluginVersionLegacyScannerPropertyKey(String lan... method staticResourceNameLegacyScannerPropertyKey (line 248) | private static String staticResourceNameLegacyScannerPropertyKey(Strin... method analyzerIdLegacyScannerPropertyKey (line 252) | private static String analyzerIdLegacyScannerPropertyKey(String langua... method ruleNamespaceLegacyScannerPropertyKey (line 256) | private static String ruleNamespaceLegacyScannerPropertyKey(String lan... method projectVersion (line 260) | static String projectVersion() { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/AbstractSonarWayProfile.java class AbstractSonarWayProfile (line 24) | public abstract class AbstractSonarWayProfile implements BuiltInQualityP... method AbstractSonarWayProfile (line 29) | protected AbstractSonarWayProfile(PluginMetadata metadata, RoslynRules... method define (line 34) | @Override method registerRulesFromRegistrars (line 48) | protected void registerRulesFromRegistrars(NewBuiltInQualityProfile pr... FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/CodeCoverageProvider.java class CodeCoverageProvider (line 33) | @ScannerSide method CodeCoverageProvider (line 42) | public CodeCoverageProvider(PluginMetadata pluginMetadata) { method extensions (line 55) | public List extensions() { class UnitTestCoverageAggregator (line 105) | public class UnitTestCoverageAggregator extends CoverageAggregator { method UnitTestCoverageAggregator (line 107) | public UnitTestCoverageAggregator(Configuration configuration, FileS... class UnitTestCoverageReportImportSensor (line 117) | public class UnitTestCoverageReportImportSensor extends CoverageReport... method UnitTestCoverageReportImportSensor (line 119) | public UnitTestCoverageReportImportSensor(UnitTestCoverageAggregator... FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/DotNetRulesDefinition.java class DotNetRulesDefinition (line 24) | public class DotNetRulesDefinition implements RulesDefinition { method DotNetRulesDefinition (line 31) | public DotNetRulesDefinition(PluginMetadata metadata, SonarRuntime son... method define (line 37) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/EncodingPerFile.java class EncodingPerFile (line 26) | @ScannerSide method EncodingPerFile (line 31) | public EncodingPerFile(GlobalProtobufFileProcessor globalReportProcess... method encodingMatch (line 35) | public boolean encodingMatch(InputFile inputFile) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/GlobalProtobufFileProcessor.java class GlobalProtobufFileProcessor (line 47) | @Phase(name = Name.POST) method GlobalProtobufFileProcessor (line 58) | public GlobalProtobufFileProcessor(PluginMetadata metadata) { method build (line 62) | @Override method processMetadataReportIfPresent (line 71) | private void processMetadataReportIfPresent(Path reportPath) { method getRoslynEncodingPerUri (line 90) | public Map getRoslynEncodingPerUri() { method isGenerated (line 97) | public boolean isGenerated(InputFile inputFile) { method protobufReportPaths (line 101) | private List protobufReportPaths(Map moduleProps) { method parseAsStringArray (line 110) | private String[] parseAsStringArray(@Nullable String value) { method removeStart (line 123) | private static String removeStart(String s, String start) { method removeEnd (line 127) | private static String removeEnd(String s, String end) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/HashProvider.java class HashProvider (line 27) | @ScannerSide method computeHash (line 29) | public byte[] computeHash(Path filePath) throws NoSuchAlgorithmExcepti... FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/MethodDeclarationsCollector.java class MethodDeclarationsCollector (line 28) | @ScannerSide method addDeclaration (line 32) | public void addDeclaration(SonarAnalyzer.MethodDeclarationsInfo method... method getMethodDeclarations (line 36) | public Collection getMethodDecla... FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/ModuleConfiguration.java class ModuleConfiguration (line 53) | @ScannerSide method ModuleConfiguration (line 64) | public ModuleConfiguration(Configuration configuration, PluginMetadata... method getAnalyzerReportDir (line 71) | static String getAnalyzerReportDir(String languageKey) { method protobufReportPaths (line 81) | public List protobufReportPaths() { method roslynReportPaths (line 96) | public List roslynReportPaths() { method telemetryJsonPaths (line 109) | public Collection telemetryJsonPaths() { method contextPaths (line 117) | public List contextPaths() { method validateOutputDir (line 124) | private boolean validateOutputDir(Path analyzerOutputDir) { method protoFileFilter (line 147) | private static DirectoryStream.Filter protoFileFilter() { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/PluginMetadata.java type PluginMetadata (line 24) | @ScannerSide method languageKey (line 30) | String languageKey(); method pluginKey (line 32) | String pluginKey(); method languageName (line 34) | String languageName(); method analyzerProjectName (line 36) | String analyzerProjectName(); method repositoryKey (line 38) | String repositoryKey(); method fileSuffixesKey (line 40) | String fileSuffixesKey(); method fileSuffixesDefaultValue (line 42) | String fileSuffixesDefaultValue(); method resourcesDirectory (line 44) | String resourcesDirectory(); FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/ProjectTypeCollector.java class ProjectTypeCollector (line 30) | @ScannerSide method addProjectInfo (line 44) | public void addProjectInfo(boolean hasMainFiles, boolean hasTestFiles) { method hasProjects (line 56) | public boolean hasProjects() { method getSummary (line 60) | public Optional getSummary(String languageName) { method countProjects (line 82) | private int countProjects() { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/ProtobufDataImporter.java class ProtobufDataImporter (line 45) | @ScannerSide method ProtobufDataImporter (line 61) | public ProtobufDataImporter(FileLinesContextFactory fileLinesContextFa... method importResults (line 66) | public void importResults(SensorContext context, List protobufRe... method countProtoFiles (line 91) | private static long countProtoFiles(Path dir) { method parseProtobuf (line 101) | public static void parseProtobuf(RawProtobufImporter importer, Path... FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/RealPathProvider.java class RealPathProvider (line 34) | @ScannerSide method apply (line 40) | @Override method getRealPath (line 45) | public String getRealPath(String path) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/ReportPathCollector.java class ReportPathCollector (line 25) | @ScannerSide method addProtobufDirs (line 30) | public void addProtobufDirs(List paths) { method protobufDirs (line 34) | public List protobufDirs() { method addRoslynReport (line 38) | public void addRoslynReport(List reports) { method roslynReports (line 42) | public List roslynReports() { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/RoslynDataImporter.java class RoslynDataImporter (line 35) | @ScannerSide method RoslynDataImporter (line 42) | public RoslynDataImporter(PluginMetadata metadata, AbstractLanguageCon... method importRoslynReports (line 47) | public void importRoslynReports(List reports, final Sen... method repoKeyByRoslynRuleKey (line 62) | private Map repoKeyByRoslynRuleKey(ActiveRules activeR... FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/RoslynReport.java class RoslynReport (line 23) | public class RoslynReport { method RoslynReport (line 28) | public RoslynReport(InputProject project, Path reportPath) { method getProject (line 33) | public InputProject getProject() { method getReportPath (line 37) | public Path getReportPath() { method equals (line 41) | @Override method hashCode (line 54) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/RoslynRules.java class RoslynRules (line 29) | @ServerSide method RoslynRules (line 37) | public RoslynRules(PluginMetadata metadata) { method rules (line 41) | public List rules() { method readResource (line 50) | private String readResource(String name) { method getResourceAsStream (line 63) | InputStream getResourceAsStream(String name) { class Rule (line 67) | public static final class Rule { method getId (line 71) | public String getId() { class RuleParameter (line 76) | public static final class RuleParameter { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/SarifParserCallbackImpl.java class SarifParserCallbackImpl (line 54) | public class SarifParserCallbackImpl implements SarifParserCallback { method SarifParserCallbackImpl (line 71) | public SarifParserCallbackImpl(SensorContext context, Map locations, New... method populateSecondaryLocations (line 244) | private void populateSecondaryLocations(Collection secondary... method createIssueLocation (line 258) | private static NewIssueLocation createIssueLocation(InputFile inputFil... method onRule (line 295) | @Override method mapImpactSeverity (line 316) | public /* for testing */ static org.sonar.api.issue.impact.Severity ma... method mapSoftwareQuality (line 329) | public /* for testing */ static SoftwareQuality mapSoftwareQuality(Rul... method shouldCreateExternalIssue (line 339) | private boolean shouldCreateExternalIssue(String ruleId) { method mapRuleType (line 343) | private RuleType mapRuleType(@Nullable String category, String default... method mapSeverity (line 359) | private static Severity mapSeverity(String defaultLevel) { method isSonarSourceRepository (line 367) | private static boolean isSonarSourceRepository(String repositoryKey) { method isLocationInsideRazorFile (line 371) | private static boolean isLocationInsideRazorFile(Location location) { method logIssue (line 378) | private void logIssue(String issueType, String ruleId, String location) { method logMissingInputFile (line 382) | private void logMissingInputFile(String ruleId, String filePath) { method Issue (line 390) | Issue(String ruleId, String path) { method Issue (line 394) | Issue(String ruleId, Location location) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/SensorContextUtils.java class SensorContextUtils (line 30) | public final class SensorContextUtils { method SensorContextUtils (line 31) | private SensorContextUtils() { method toInputFile (line 35) | @CheckForNull method hasFilesOfType (line 40) | public static boolean hasFilesOfType(FileSystem fs, Type fileType, Str... method hasFilesOfLanguage (line 45) | public static boolean hasFilesOfLanguage(FileSystem fs, String languag... method hasAnyMainFiles (line 50) | public static boolean hasAnyMainFiles(FileSystem fs) { method toTextRange (line 54) | public static Optional toTextRange(InputFile inputFile, Son... FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/TelemetryCollector.java class TelemetryCollector (line 30) | @ScannerSide method TelemetryCollector (line 34) | public TelemetryCollector() { method addTelemetry (line 38) | public void addTelemetry(SonarAnalyzer.Telemetry telemetry) { method getTelemetryMessages (line 42) | public Collection getTelemetryMessages() { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/UnitTestResultsProvider.java class UnitTestResultsProvider (line 30) | @ScannerSide method UnitTestResultsProvider (line 38) | public UnitTestResultsProvider(PluginMetadata pluginMetadata) { method propertyKey (line 43) | private String propertyKey(String testType) { method extensions (line 47) | public List extensions() { class DotNetUnitTestResultsAggregator (line 79) | public class DotNetUnitTestResultsAggregator extends UnitTestResultsAg... method DotNetUnitTestResultsAggregator (line 81) | public DotNetUnitTestResultsAggregator(Configuration configuration) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/filters/GeneratedFileFilter.java class GeneratedFileFilter (line 33) | public class GeneratedFileFilter implements InputFileFilter { method GeneratedFileFilter (line 39) | public GeneratedFileFilter(GlobalProtobufFileProcessor globalReportPro... method accept (line 49) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/filters/WrongEncodingFileFilter.java class WrongEncodingFileFilter (line 27) | public class WrongEncodingFileFilter implements InputFileFilter { method WrongEncodingFileFilter (line 31) | public WrongEncodingFileFilter(EncodingPerFile encodingPerFile) { method accept (line 35) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/protobuf/CPDTokensImporter.java class CPDTokensImporter (line 34) | public class CPDTokensImporter extends ProtobufImporter ... method consumeFor (line 45) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/protobuf/FileMetadataImporter.java class FileMetadataImporter (line 35) | public class FileMetadataImporter extends RawProtobufImporter parser) { method FileMetadataImporter (line 47) | public FileMetadataImporter() { method consume (line 51) | @Override method getEncodingPerUri (line 69) | public Map getEncodingPerUri() { method getGeneratedFileUris (line 73) | public Set getGeneratedFileUris() { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/protobuf/HighlightImporter.java class HighlightImporter (line 42) | public class HighlightImporter extends ProtobufImporter ... method consumeFor (line 53) | @Override method save (line 62) | @Override method doSave (line 86) | private static void doSave(String filename, NewHighlighting highlighti... method isProcessed (line 102) | @Override method toType (line 108) | @CheckForNull FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/protobuf/LogImporter.java class LogImporter (line 29) | public class LogImporter extends RawProtobufImporter { method LogImporter (line 34) | public LogImporter() { method consume (line 38) | @Override method save (line 43) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/protobuf/MethodDeclarationsImporter.java class MethodDeclarationsImporter (line 22) | public class MethodDeclarationsImporter extends RawProtobufImporter { method MetricsImporter (line 45) | public MetricsImporter(SensorContext context, FileLinesContextFactory ... method consumeFor (line 53) | @Override method saveMetric (line 87) | private static void saveMetric(SensorContext ... FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/protobuf/ProtobufImporter.java class ProtobufImporter (line 37) | public abstract class ProtobufImporter extends RawProtobufImporter { method ProtobufImporter (line 45) | ProtobufImporter(Parser parser, SensorContext context, Function { method RawProtobufImporter (line 35) | RawProtobufImporter(Parser parser) { method accept (line 39) | public void accept(Path protobuf) { method consume (line 53) | abstract void consume(T message); method save (line 55) | public void save() { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/protobuf/SymbolRefsImporter.java class SymbolRefsImporter (line 39) | public class SymbolRefsImporter extends ProtobufImporter... method addReferences (line 49) | private static void addReferences(InputFile file, SymbolReferenceInfo.... method validatedReference (line 60) | private static Optional validatedReference(InputFile file, ... method consumeFor (line 76) | @Override method save (line 85) | @Override method isProcessed (line 96) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/protobuf/TelemetryAggregator.java class TelemetryAggregator (line 31) | public class TelemetryAggregator { method TelemetryAggregator (line 34) | public TelemetryAggregator(String pluginKey, String language) { method kvp (line 42) | private static Map.Entry kvp(String key, V value) { method key (line 46) | private String key(String pattern, String... keys) { method sanitizeKeys (line 53) | private String[] sanitizeKeys(String[] keys) { method languageVersion (line 57) | private Stream> languageVersion(Stream> aggregate(Collection getFilePaths(Path outputDirectory) { method publishMessages (line 83) | private void publishMessages(Stream paths) { class Warning (line 96) | private static class Warning { method getText (line 99) | public String getText() { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/sensors/DotNetSensor.java class DotNetSensor (line 47) | public class DotNetSensor implements ProjectSensor { method DotNetSensor (line 60) | public DotNetSensor(PluginMetadata pluginMetadata, ReportPathCollector... method describe (line 70) | @Override method execute (line 76) | @Override method importResults (line 89) | private void importResults(FileSystem fs, SensorContext context) { method log (line 122) | private void log(boolean hasFilesOfLanguage, boolean hasProjects) { method warnThatProjectContainsOnlyTestCode (line 137) | private static void warnThatProjectContainsOnlyTestCode(FileSystem fs,... method logDebugNoFiles (line 154) | private static void logDebugNoFiles() { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/sensors/FileTypeSensor.java class FileTypeSensor (line 49) | @ScannerSide method FileTypeSensor (line 56) | public FileTypeSensor(ProjectTypeCollector projectTypeCollector, Plugi... method describe (line 61) | @Override method execute (line 69) | @Override method getAnalyzerWorkDir (line 92) | private Optional getAnalyzerWorkDir(Configuration configuratio... method getValueOrEmpty (line 101) | private static String getValueOrEmpty(Configuration configuration, Str... FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/sensors/LogSensor.java class LogSensor (line 30) | public class LogSensor implements Sensor { method LogSensor (line 34) | public LogSensor(PluginMetadata pluginMetadata, ModuleConfiguration co... method describe (line 39) | @Override method execute (line 46) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/sensors/MethodDeclarationsSensor.java class MethodDeclarationsSensor (line 37) | public class MethodDeclarationsSensor implements Sensor { method MethodDeclarationsSensor (line 43) | public MethodDeclarationsSensor(MethodDeclarationsCollector collector,... method describe (line 49) | @Override method execute (line 55) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/sensors/PropertiesSensor.java class PropertiesSensor (line 34) | public class PropertiesSensor implements Sensor { method PropertiesSensor (line 39) | public PropertiesSensor(ModuleConfiguration configuration, ReportPathC... method describe (line 46) | @Override method execute (line 53) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/sensors/TelemetryJsonProcessor.java class TelemetryJsonProcessor (line 46) | public class TelemetryJsonProcessor implements ProjectSensor { method TelemetryJsonProcessor (line 52) | public TelemetryJsonProcessor(TelemetryJsonCollector collector, Teleme... method describe (line 58) | @Override method execute (line 64) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/sensors/TelemetryJsonProjectCollector.java class TelemetryJsonProjectCollector (line 45) | @ScannerSide method TelemetryJsonProjectCollector (line 52) | public TelemetryJsonProjectCollector(TelemetryJsonCollector collector,... method execute (line 57) | public void execute() { method collectTelemetry (line 63) | private void collectTelemetry(Stream pathStream) { method markAsProcessed (line 83) | private static Optional markAsProcessed(Path file) { method getFilePaths (line 93) | private static Stream getFilePaths(Path outputDirectory) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/sensors/TelemetryJsonSensor.java class TelemetryJsonSensor (line 40) | public class TelemetryJsonSensor implements Sensor { method TelemetryJsonSensor (line 47) | public TelemetryJsonSensor(TelemetryJsonCollector collector, PluginMet... method describe (line 53) | @Override method execute (line 59) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/sensors/TelemetryProcessor.java class TelemetryProcessor (line 34) | public class TelemetryProcessor implements ProjectSensor { method TelemetryProcessor (line 39) | public TelemetryProcessor(TelemetryCollector collector, PluginMetadata... method describe (line 44) | @Override method execute (line 50) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/sensors/TelemetrySensor.java class TelemetrySensor (line 38) | public class TelemetrySensor implements Sensor { method TelemetrySensor (line 44) | public TelemetrySensor(TelemetryCollector collector, PluginMetadata pl... method describe (line 50) | @Override method execute (line 56) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/telemetryjson/TelemetryJsonAggregator.java class TelemetryJsonAggregator (line 23) | public class TelemetryJsonAggregator { method flatMapTelemetry (line 27) | public Stream> flatMapTelemetry(Stream telemetry) { method getTelemetry (line 40) | public Collection> getTelemetry() { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/telemetryjson/TelemetryJsonParser.java class TelemetryJsonParser (line 39) | public class TelemetryJsonParser { method parse (line 43) | public Stream> parse(Reader jsonReader) { method collectTelemetry (line 58) | private static void collectTelemetry(JsonStreamParser parser, ArrayLis... method getString (line 75) | private static String getString(JsonPrimitive entry) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/plugins/telemetryjson/TelemetryUtils.java class TelemetryUtils (line 19) | public class TelemetryUtils { method TelemetryUtils (line 21) | private TelemetryUtils() { method sanitizeKey (line 27) | public static String sanitizeKey(String x) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/sarif/Location.java class Location (line 21) | public class Location { method Location (line 29) | Location(String absolutePath, String message, int startLine, int start... method getAbsolutePath (line 38) | public String getAbsolutePath() { method getMessage (line 42) | @CheckForNull method getStartLine (line 47) | public int getStartLine() { method getStartColumn (line 51) | public int getStartColumn() { method getEndLine (line 55) | public int getEndLine() { method getEndColumn (line 59) | public int getEndColumn() { method equals (line 63) | @Override method hashCode (line 84) | @Override method toString (line 95) | @Override FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/sarif/SarifParser.java type SarifParser (line 21) | @FunctionalInterface FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/sarif/SarifParser01And04.java class SarifParser01And04 (line 30) | class SarifParser01And04 implements SarifParser { method SarifParser01And04 (line 36) | SarifParser01And04(InputProject inputProject, JsonObject root, UnaryOp... method accept (line 42) | @Override method handleIssues (line 59) | private void handleIssues(JsonArray issues, boolean offsetStartAtZero,... method handleIssue (line 66) | private void handleIssue(JsonObject issue, boolean offsetStartAtZero, ... method getSecondaryMessage (line 108) | @CheckForNull method getAnalysisTargetAt (line 123) | @CheckForNull method getLocation (line 135) | private static Location getLocation(boolean offsetStartAtZero, JsonObj... method isSuppressed (line 179) | private static boolean isSuppressed(JsonObject issue) { method uriToAbsolutePath (line 196) | private static String uriToAbsolutePath(String uri) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/sarif/SarifParser10.java class SarifParser10 (line 38) | class SarifParser10 implements SarifParser { method SarifParser10 (line 47) | SarifParser10(InputProject inputProject, JsonObject root, UnaryOperato... method accept (line 53) | @Override method handleRules (line 71) | private static void handleRules(JsonObject rules, SarifParserCallback ... method handleRule (line 78) | private static void handleRule(JsonObject ruleObj, SarifParserCallback... method handleIssues (line 93) | private void handleIssues(JsonArray results, SarifParserCallback callb... method handleIssue (line 100) | private void handleIssue(JsonObject resultObj, SarifParserCallback cal... method handleLocationsElement (line 118) | private boolean handleLocationsElement(JsonObject resultObj, String ru... method handleResultFileElement (line 149) | private boolean handleResultFileElement(String ruleId, @Nullable Strin... method handleLocation (line 184) | @CheckForNull method isSuppressed (line 229) | private static boolean isSuppressed(JsonObject resultObj) { method uriToPath (line 242) | private static String uriToPath(String uri) { FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/sarif/SarifParserCallback.java type SarifParserCallback (line 23) | public interface SarifParserCallback { method onProjectIssue (line 25) | void onProjectIssue(String ruleId, @Nullable String level, InputProjec... method onFileIssue (line 27) | void onFileIssue(String ruleId, @Nullable String level, String absolut... method onIssue (line 29) | void onIssue(String ruleId, @Nullable String level, Location primaryLo... method onRule (line 31) | void onRule(String ruleId, @Nullable String shortDescription, @Nullabl... FILE: sonar-dotnet-core/src/main/java/org/sonarsource/dotnet/shared/sarif/SarifParserFactory.java class SarifParserFactory (line 28) | public class SarifParserFactory { method SarifParserFactory (line 29) | private SarifParserFactory() { method create (line 33) | public static SarifParser create(RoslynReport report, UnaryOperator listFiles(String pattern) { method listFiles (line 255) | private static Set listFiles(String pattern, File baseDir) { FILE: sonar-dotnet-core/src/test/java/org/sonar/plugins/dotnet/tests/XUnitTestResultParserTest.java class XUnitTestResultParserTest (line 33) | public class XUnitTestResultParserTest { method before (line 38) | @Before method valid (line 43) | @Test method valid_no_execution_time (line 88) | @Test method valid_data_attribute (line 120) | @Test method valid_generic_method_csharp (line 150) | @Test method valid_generic_method_vbnet (line 195) | @Test method test_name_not_mapped (line 240) | @Test method invalid_root (line 252) | @Test method invalid_test_outcome (line 260) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonar/plugins/dotnet/tests/XmlParserHelperTest.java class XmlParserHelperTest (line 34) | public class XmlParserHelperTest { method invalid_prolog (line 39) | @Test method nextStartOrEndTag (line 47) | @Test method getDoubleAttribute (line 57) | @Test method no_next_valid_tag (line 70) | @Test method null_location (line 82) | @Test method createParserWithMockReader (line 94) | private static XmlParserHelper createParserWithMockReader(XMLStreamRea... method createLocation (line 103) | private static Location createLocation(int i) { method createAnswerWithCount (line 132) | private static Answer createAnswerWithCount(Function ... FILE: sonar-dotnet-core/src/test/java/org/sonar/plugins/dotnet/tests/coverage/BranchCoverageTest.java class BranchCoverageTest (line 24) | public class BranchCoverageTest { method givenSameObjectEqualsReturnsTrue (line 25) | @Test method givenNullEqualsReturnsFalse (line 31) | @Test method givenDifferentClassEqualsReturnsFalse (line 36) | @Test method givenDifferentLineEqualsReturnsFalse (line 41) | @Test method givenDifferentConditionsEqualsReturnsFalse (line 46) | @Test method givenDifferentCoveredConditionsEqualsReturnsFalse (line 51) | @Test method givenEqualBranchCoverageEqualsReturnsTrue (line 56) | @Test method givenLineConditionsAndCoveredConditionsHashCodeConsidersAll (line 61) | @Test method toStringTest (line 66) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonar/plugins/dotnet/tests/coverage/CoberturaReportParserTest.java class CoberturaReportParserTest (line 37) | public class CoberturaReportParserTest { method prepare (line 45) | @Before method invalid_root (line 56) | @Test method non_existing_file (line 63) | @Test method valid_empty (line 70) | @Test method absolute_path_no_sources_resolves_file (line 76) | @Test method absolute_path_with_sources_ignores_sources (line 83) | @Test method relative_path_with_sources_uses_first_matching_source (line 92) | @Test method relative_path_with_sources_no_match_skips_file (line 106) | @Test method relative_path_no_sources_skips_file (line 112) | @Test method multiple_classes_same_filename_resolved_once (line 118) | @Test method empty_source_tag_is_ignored (line 128) | @Test method should_not_fail_with_invalid_path (line 135) | @Test method source_with_nested_elements_does_not_fail (line 141) | @Test method deterministic_build_path_fallback (line 148) | @Test method line_coverage_adds_hits (line 159) | @Test method line_coverage_unresolved_file_skips_lines (line 176) | @Test method branch_jump_conditions_creates_two_condition_data_per_condition (line 183) | @Test method branch_switch_condition_creates_n_condition_data (line 211) | @Test method branch_no_conditions_creates_unmergeable_condition_data (line 233) | @Test method branch_mixed_jump_and_switch_conditions (line 255) | @Test method branch_malformed_condition_coverage_treats_as_zero_percent (line 300) | @Test method branch_missing_condition_coverage_attribute_skips_branch_data (line 311) | @Test method branch_unresolved_file_skips_condition_data (line 319) | @Test method parseCoverage (line 326) | private Coverage parseCoverage(String reportFileName) { method parseCoverage (line 330) | private Coverage parseCoverage(String reportFileName, FileService file... method getFilePath (line 336) | private String getFilePath(Coverage coverage, String className) { method getConditions (line 343) | private List getConditions(Coverage coverage, String fi... FILE: sonar-dotnet-core/src/test/java/org/sonar/plugins/dotnet/tests/coverage/ConditionDataTest.java class ConditionDataTest (line 23) | public class ConditionDataTest { method givenConditionData_getUniqueKey_containsFilePathStartLineAndLocations (line 24) | @Test method givenConditionData_getFormat_returnsFormat (line 29) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonar/plugins/dotnet/tests/coverage/CoverageAggregatorTest.java class CoverageAggregatorTest (line 49) | public class CoverageAggregatorTest { method hasCoverageProperty (line 57) | @Test method getCoverageAggregator (line 114) | private CoverageAggregator getCoverageAggregator(Configuration configu... method aggregate (line 120) | @Test method aggregate_logs_warning_on_exception (line 281) | @Test method aggregate_ncover_report_does_not_exist (line 302) | @Test method aggregate_opencover_report_does_not_exist (line 307) | @Test method aggregate_dotcover_report_does_not_exist (line 312) | @Test method aggregate_visualstudio_report_does_not_exist (line 317) | @Test method aggregate_cobertura_report_does_not_exist (line 322) | @Test method when_UnitTestCoverageAggregator_is_created_from_CodeCoverageProvider_calls_uses_properties (line 328) | @Test method createTestProvider (line 354) | private static CodeCoverageProvider createTestProvider() { method aggregate_report_does_not_exist (line 360) | private void aggregate_report_does_not_exist(String propertyName, Stri... FILE: sonar-dotnet-core/src/test/java/org/sonar/plugins/dotnet/tests/coverage/CoverageCacheTest.java class CoverageCacheTest (line 26) | public class CoverageCacheTest { method test (line 28) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonar/plugins/dotnet/tests/coverage/CoverageReportImportSensorTest.java class CoverageReportImportSensorTest (line 51) | public class CoverageReportImportSensorTest { method setUp (line 65) | @Before method describe_unit_test (line 72) | @Test method isProjectSensor (line 80) | @Test method describe_execute_only_when_key_present (line 85) | @Test method execute_no_coverage_property (line 104) | @Test method analyze (line 113) | @Test method execute_coverage_no_main_file (line 124) | @Test method execute_coverage_main_file_no_coverage_for_file (line 148) | @Test method execute_coverage_not_indexed_file (line 174) | @Test method computeCoverageLoggingOutOfRange (line 194) | @Test method computeCoverageMeasures (line 213) | private SensorContextTester computeCoverageMeasures() { method analyze_setsTelemetryFalse_whenNoBranchCoverageUnderreporting (line 243) | @Test method analyze_setsTelemetryTrue_whenBranchCoverageUnderreported (line 265) | @Test method createTempFolder (line 288) | private static TemporaryFolder createTempFolder() { FILE: sonar-dotnet-core/src/test/java/org/sonar/plugins/dotnet/tests/coverage/CoverageTest.java class CoverageTest (line 24) | public class CoverageTest { method test (line 26) | @Test method givenEmptyListOfConditionDatas_getBranchCoverage_returnsEmpty (line 69) | @Test method givenSingleConditionData_getBranchCoverage_returnsEmpty (line 76) | @Test method givenSingleConditionDataPerFile_getBranchCoverage_returnsEmpty (line 88) | @Test method givenSingleConditionDataPerLine_getBranchCoverage_returnsEmpty (line 104) | @Test method branchPointsMerging (line 116) | @Test method givenMultipleConditionDataPerLine_getBranchCoverage_returnsBranchCoverage (line 152) | @Test method givenMultipleConditionDataPerLineInDifferentFiles_getBranchCoverage_returnsBranchCoverage (line 201) | @Test method givenConditionDataFromFromDifferentReports_getBranchCoverage_returnsBranchCoverage (line 219) | @Test method givenTwoCoberturaReports_getBranchCoverage_mergesCorrectly (line 270) | @Test method givenTwoUnmergeableReports_getBranchCoverage_takesMaxAcrossFormats (line 290) | @Test method givenOpenCoverUnmergeableAndCobertura_getBranchCoverage_takesMaxAcrossFormats (line 312) | @Test method overlappingCoberturaReports_getBranchCoverageUnderreported_returnsTrue (line 341) | @Test method nonOverlappingReports_getBranchCoverageUnderreported_returnsFalse (line 356) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonar/plugins/dotnet/tests/coverage/DotCoverReportParserTest.java class DotCoverReportParserTest (line 34) | public class DotCoverReportParserTest { method prepare (line 42) | @Before method no_title (line 53) | @Test method no_title_end (line 63) | @Test method title_swapped_tags (line 73) | @Test method title_nested_tag (line 83) | @Test method no_script (line 96) | @Test method no_highlight (line 106) | @Test method valid (line 116) | @Test method valid_big (line 149) | @Test method valid_with_multiple_sequence_points_per_line (line 163) | @Test method predicate_false (line 192) | @Test method should_not_fail_with_invalid_path (line 206) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonar/plugins/dotnet/tests/coverage/DotCoverReportsAggregatorTest.java class DotCoverReportsAggregatorTest (line 33) | public class DotCoverReportsAggregatorTest { method before (line 41) | @Before method no_sources (line 46) | @Test method not_html (line 54) | @Test method no_extension (line 61) | @Test method empty_folder (line 68) | @Test method valid (line 75) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonar/plugins/dotnet/tests/coverage/NCover3ReportParserTest.java class NCover3ReportParserTest (line 37) | public class NCover3ReportParserTest { method prepare (line 47) | @Before method invalid_root (line 61) | @Test method wrong_version (line 68) | @Test method no_version (line 75) | @Test method non_existing_file (line 82) | @Test method valid (line 89) | @Test method log_unsupported_file_extension (line 128) | @Test method should_not_fail_with_invalid_path (line 157) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonar/plugins/dotnet/tests/coverage/OpenCoverReportParserTest.java class OpenCoverReportParserTest (line 36) | public class OpenCoverReportParserTest { method prepare (line 46) | @Before method invalid_root (line 57) | @Test method missing_start_line (line 63) | @Test method wrong_start_line (line 70) | @Test method non_existing_file (line 77) | @Test method valid (line 83) | @Test method valid_with_no_absolute_path_no_deterministic_build_path (line 128) | @Test method valid_with_no_absolute_path_deterministic_build_path_found (line 146) | @Test method valid_with_deterministic_source_path_returns_found_path (line 189) | @Test method branchCoverage (line 232) | @Test method branchCoverage_codeFile_analyzedByMultipleProjects (line 278) | @Test method branchCoverage_multipleCodePaths_analyzedByMultipleProjects (line 289) | @Test method branchCoverage_codeFile_unsupportedFile (line 310) | @Test method branchCoverage_invalidFileId (line 333) | @Test method branchCoverage_getter_setter_multiple_sequence_points_per_line (line 354) | @Test method log_unsupported_file_extension (line 389) | @Test method should_not_fail_with_invalid_path (line 409) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonar/plugins/dotnet/tests/coverage/VisualStudioCoverageXmlReportParserTest.java class VisualStudioCoverageXmlReportParserTest (line 35) | public class VisualStudioCoverageXmlReportParserTest { method prepare (line 45) | @Before method invalid_root (line 56) | @Test method non_existing_file (line 63) | @Test method wrong_covered (line 70) | @Test method valid_with_correct_file_language (line 79) | @Test method valid_with_getter_setter (line 116) | @Test method valid_with_multiple_getter_setter_per_line (line 140) | @Test method valid_with_complex_test_case (line 164) | @Test method valid_with_no_absolute_path_no_deterministic_build_path (line 209) | @Test method valid_with_no_absolute_path_deterministic_build_path_found (line 222) | @Test method valid_with_deterministic_source_path_returns_found_path (line 258) | @Test method should_not_fail_with_invalid_path (line 285) | @Test method should_not_fail_with_missing_range_information (line 294) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/CallableUtilsTests.java class CallableUtilsTests (line 25) | public class CallableUtilsTests { method lazy_null (line 27) | @Test method lazy_value (line 33) | @Test method lazy_throws (line 39) | @Test method throwingMethod (line 49) | private int throwingMethod(String message) { FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/AbstractLanguageConfigurationTest.java class AbstractLanguageConfigurationTest (line 27) | public class AbstractLanguageConfigurationTest { method ignoreExternalIssues_is_false_by_default (line 29) | @Test method ignoreExternalIssues_is_true_when_set (line 37) | @Test method bugCategories_reads_configuration (line 46) | @Test method codeSmellCategories_reads_configuration (line 55) | @Test method vulnerabilityCategories_reads_configuration (line 64) | @Test method whenSettingIsTrue_analyzeGeneratedCode_returnsTrue (line 73) | @Test method whenSettingIsFalse_analyzeGeneratedCode_returnsFalse (line 83) | @Test method whenSettingIsEmpty_analyzeGeneratedCode_returnsFalse (line 93) | @Test method createConfiguration (line 103) | private AbstractLanguageConfiguration createConfiguration(Configuratio... FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/AbstractPropertyDefinitionsTest.java class AbstractPropertyDefinitionsTest (line 33) | public class AbstractPropertyDefinitionsTest { method hidden_properties (line 35) | @Test method scoped_properties (line 55) | @Test method global_properties (line 63) | @Test method createProperties (line 80) | private List createProperties() { method metadata (line 92) | private static PluginMetadata metadata() { FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/AbstractSonarWayProfileTest.java class AbstractSonarWayProfileTest (line 29) | public class AbstractSonarWayProfileTest { method beforeAll (line 34) | @BeforeClass method define_createsProfile (line 48) | @Test method define_activateAdditionalRules (line 59) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/CodeCoverageProviderTest.java class CodeCoverageProviderTest (line 30) | public class CodeCoverageProviderTest { method vbnet (line 32) | @Test method csharp (line 49) | @Test method verify_UnitTestCoverageReportImportSensor_constructor_uses_arguments (line 66) | @Test method createTestProvider (line 84) | private static CodeCoverageProvider createTestProvider() { FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/DotNetRulesDefinitionTest.java class DotNetRulesDefinitionTest (line 38) | public class DotNetRulesDefinitionTest { method setupContext (line 56) | @BeforeClass method nonSonarWayRule_disabledByDefault (line 63) | @Test method rule_properties_are_loaded (line 70) | @Test method securityStandards_9_5_PCI_DSS_isSet (line 87) | @Test method securityStandards_9_9_ASVS_isSet (line 93) | @Test method securityStandards_10_10_STIG_isSet (line 99) | @Test method tags_areSet (line 105) | @Test method tags_areEmpty (line 111) | @Test method remediation_isSet (line 117) | @Test method noParams_paramsIsEmpty (line 128) | @Test method singleParam_isSet (line 134) | @Test method multipleParams_areSet (line 141) | @Test method securityHotspot_isActivatedByDefault (line 149) | @Test method securityHotspot_hasSecurityStandards (line 156) | @Test method vulnerability_hasSecurityStandards (line 171) | @Test method assertParam (line 186) | private static void assertParam(RulesDefinition.Param param, String ex... method getSecurityStandards (line 194) | private static Set getSecurityStandards(Version version, Strin... method mockMetadata (line 207) | private static PluginMetadata mockMetadata() { class TestRoslynRules (line 215) | private static class TestRoslynRules extends RoslynRules { method TestRoslynRules (line 217) | TestRoslynRules() { method getResourceAsStream (line 221) | @Override FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/EncodingPerFileTest.java class EncodingPerFileTest (line 36) | public class EncodingPerFileTest { method prepareTestFile (line 44) | @Before method should_treat_as_match_when_roslyn_entry_missing_for_file (line 49) | @Test method should_treat_as_match_and_warn_when_roslyn_encoding_missing (line 57) | @Test method should_treat_as_mismatch_when_roslyn_utf8_and_sq_utf16 (line 65) | @Test method should_treat_as_match_when_roslyn_utf16_and_sq_utf16le (line 73) | @Test method encoding_per_file_is_not_case_sensitive (line 81) | @Test method assertEncodingMatch (line 93) | private void assertEncodingMatch(Charset roslynCharset, URI fileUri, C... method newInputFile (line 103) | private InputFile newInputFile(URI uri, Charset charset) { FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/GeneratedFileFilterTest.java class GeneratedFileFilterTest (line 35) | public class GeneratedFileFilterTest { method setUp (line 42) | @Before method accept_returns_false_for_autogenerated_files (line 57) | @Test method accept_returns_true_for_nonautogenerated_files (line 72) | @Test method accept_returns_true_for_autogenerated_files_when_analyzeGeneratedCode_setting_true (line 85) | @Test method mockInputFile (line 101) | private InputFile mockInputFile(String path) { method createFilter (line 108) | private GeneratedFileFilter createFilter(InputFile generatedInputFile,... FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/GlobalProtobufFileProcessorTest.java class GlobalProtobufFileProcessorTest (line 50) | public class GlobalProtobufFileProcessorTest { method prepare (line 64) | @Before method do_nothing_if_no_properties (line 87) | @Test method process_generated (line 93) | @Test method process_generated_escaped_csv (line 107) | @Test method process_generated_is_not_case_sensitive (line 122) | @Test method process_encoding (line 132) | @Test method is_not_case_sensitive (line 141) | @Test method warn_about_casing_colission (line 159) | @Test method do_not_warn_about_casing_colission_for_same_encoding (line 172) | @Test method process_encoding_preserve_null_values (line 181) | @Test method ignore_missing_files (line 190) | @Test method mockGenerated (line 202) | private String mockGenerated(String path) throws IOException { method mockEncoding (line 216) | private String mockEncoding(@Nullable String encoding, String path) th... method toUriString (line 234) | private String toUriString(String path) { method mockInputFile (line 238) | private InputFile mockInputFile(String path) { FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/HashProviderTest.java class HashProviderTest (line 28) | public class HashProviderTest { method computeHash (line 31) | @Test method computeHash (line 44) | private static String computeHash(HashProvider sut, String fileName) t... method bytesToHex (line 48) | private static String bytesToHex(byte[] bytes) { FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/MethodDeclarationsSensorTest.java class MethodDeclarationsSensorTest (line 36) | public class MethodDeclarationsSensorTest { method prepare (line 49) | @Before method should_describe (line 61) | @Test method executeMethodDeclarationSensor (line 68) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/ModuleConfigurationTest.java class ModuleConfigurationTest (line 38) | public class ModuleConfigurationTest { method setUp (line 46) | @Before method traceObjectCreation (line 52) | @Test method onlyNewRoslynReportPresent (line 59) | @Test method giveWarningsWhenGettingProtobufPathAndNoPropertyAvailable (line 77) | @Test method noWarningsWhenGettingProtobufPathAndNoPropertyAvailable_TestProject (line 91) | @Test method giveWarningsWhenGettingProtobufPathAndNoFolderAvailable (line 103) | @Test method giveWarningsWhenGettingOldProtobufPathAndNoFolderAvailable (line 118) | @Test method whenProtobufReportsArePresent_informHowManyProtoFilesAreFound (line 130) | @Test method whenProtobufReportsArePresent_protobufReportPathsContainsCorrectElements (line 144) | @Test method giveWarningsWhenGettingProtobufPathAndFolderIsEmpty (line 165) | @Test method reads_correct_language (line 179) | @Test method telemetryJsonPathsAreFound (line 189) | @Test method contextPaths (line 204) | @Test method createProtobufOut (line 216) | private Path createProtobufOut(String name) throws IOException { method mockProtobufOutPaths (line 224) | private void mockProtobufOutPaths(Configuration configuration) throws ... method createEmptyMockConfiguration (line 230) | private Configuration createEmptyMockConfiguration() { method createModuleConfiguration (line 240) | private ModuleConfiguration createModuleConfiguration(Configuration co... FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/ProjectTypeCollectorTest.java class ProjectTypeCollectorTest (line 24) | public class ProjectTypeCollectorTest { method withNoProjects (line 27) | @Test method withNoFiles (line 34) | @Test method withOnlyMainFiles (line 44) | @Test method withOnlyTestFile (line 54) | @Test method withBothTypes (line 66) | @Test method mixedProjects_test_and_main (line 76) | @Test method mixedProjects_test_and_both (line 88) | @Test method mixedProjects_main_and_both (line 100) | @Test method mixedProjects_test_none (line 112) | @Test method mixedProjects_main_none (line 124) | @Test method mixedProjects_all_types (line 137) | @Test method mixedProjects_all_types_null_or_empty_language_name (line 149) | @Test method addProjectWithNoFiles (line 163) | private void addProjectWithNoFiles(ProjectTypeCollector projectTypeCol... method addTestProject (line 167) | private void addTestProject(ProjectTypeCollector projectTypeCollector) { method addMainProject (line 171) | private void addMainProject(ProjectTypeCollector projectTypeCollector) { method addProjectWithBothTypes (line 175) | private void addProjectWithBothTypes(ProjectTypeCollector projectTypeC... FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/ProtobufDataImporterTest.java class ProtobufDataImporterTest (line 45) | public class ProtobufDataImporterTest { method prepare (line 61) | @Before method should_import_existing_data (line 92) | @Test method warn_about_files_not_found (line 100) | @Test method warn_about_already_processed_files (line 111) | @Test method do_not_warn_about_unique_files (line 123) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/RealPathProviderTest.java class RealPathProviderTest (line 31) | public class RealPathProviderTest { method before (line 38) | @Before method when_relative_path_and_file_does_not_exist_returns_same_path (line 43) | @Test method when_relative_path_with_back_apostrophe_and_file_does_not_exist_returns_same_path (line 49) | @Test method when_relative_path_with_special_characters_and_file_does_not_exist_returns_same_path (line 55) | @Test method when_file_exists_fix_case (line 61) | @Test method cache_process_value_only_once (line 70) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/ReportPathCollectorTest.java class ReportPathCollectorTest (line 26) | public class ReportPathCollectorTest { method should_save_roslyn_report_paths (line 29) | @Test method should_save_proto_report_paths (line 39) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/RoslynDataImporterTest.java class RoslynDataImporterTest (line 50) | public class RoslynDataImporterTest { method setUp (line 63) | @Before method roslynReportIsProcessed (line 86) | @Test method roslynEmptyReportShouldNotFail (line 109) | @Test method failWithDuplicateRuleKey (line 119) | @Test method internalIssuesFromExternalRepositoriesWithInvalidLocationShouldNotFail (line 130) | @Test method internalIssuesFromCSharpRepositoryWithInvalidLocationShouldFail (line 164) | @Test method internalIssuesFromVBNetRepositoryWithInvalidLocationShouldFail (line 169) | @Test method assertInvalidLocationFail (line 178) | private void assertInvalidLocationFail(String repositoryName, RoslynDa... method addActiveRules (line 190) | private void addActiveRules() { method updateCodeFilePathsInReport (line 199) | private Path updateCodeFilePathsInReport(String reportFileName, boolea... method createRule (line 216) | private NewActiveRule createRule(String repositoryKey, String ruleKey) { method csPluginMetadata (line 222) | private static PluginMetadata csPluginMetadata() { FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/RoslynRulesTest.java class RoslynRulesTest (line 27) | public class RoslynRulesTest { method rules_loads_data (line 29) | @Test method test_missing_resource_throws (line 51) | @Test method assertParameter (line 59) | private void assertParameter(RoslynRules.RuleParameter parameter, Stri... method mockMetadata (line 66) | private static PluginMetadata mockMetadata(String resourcesDirectory) { FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/SensorContextUtilsTest.java class SensorContextUtilsTest (line 42) | public class SensorContextUtilsTest { method setUp (line 51) | @Before method toInputFile_should_return_file_if_exists (line 56) | @Test method toInputFile_should_return_null_if_file_nonexistent (line 66) | @Test method toInputFile_should_return_null_if_file_is_a_dir (line 71) | @Test method hasFilesOfType_whenNoFiles_returnsFalse (line 78) | @Test method hasFilesOfType_whenTypeIsCorrect_andLanguageIsDifferent_returnFalse (line 84) | @Test method hasFilesOfType_whenLanguageIsCorrect_andTypeIsDifferent_returnsFalse (line 90) | @Test method hasFilesOfType_whenLanguageAndTypeAreCorrect_returnsTrue (line 96) | @Test method hasMainFiles_whenNoFiles_returnsFalse (line 102) | @Test method hasMainFiles_whenOnlyTestFiles_returnsFalse (line 107) | @Test method hasMainFiles_whenOnlyMainFiles_returnsTrue (line 113) | @Test method hasMainFiles_whenBothTestAndMainFiles_returnsTrue (line 119) | @Test method hasFilesOfLanguage_whenOnlyThatLanguageExists_returnsTrue (line 126) | @Test method hasFilesOfLanguage_whenMultipleLanguagesExist_returnsTrue (line 133) | @Test method hasFilesOfLanguage_whenOnlyMainFilesOfThatLanguageExist_returnsTrue (line 142) | @Test method hasFilesOfLanguage_whenOnlyTestFilesOfThatLanguageExist_returnsTrue (line 148) | @Test method hasFilesOfLanguage_whenOnlyOtherLanguageExists_returnsFalse (line 154) | @Test method toTextRange_whenMultiLineRangeStartsAtEOL_doesNotFilterOut (line 161) | @Test method toTextRange_whenMultiLineRangeStartsBeyondEOL_trimsStartMovingToNextLine (line 177) | @Test method toTextRange_whenMultiLineRangeEndsBeyondEOL_trimsBasedOnEndLineLength (line 190) | @Test method toTextRange_whenSingleLineRangeStartsAtEOL_filtersOut (line 201) | @Test method toTextRange_whenSingleLineRangeStartsBeyondEOL_filtersOut (line 213) | @Test method toTextRange_whenSingleLineRangeEndsBeyondEOL_trimsBasedOnEndLineLength (line 225) | @Test method addFileToFileSystem (line 236) | private void addFileToFileSystem(String fileName, InputFile.Type fileT... method pbTextRangeOf (line 244) | private SonarAnalyzer.TextRange pbTextRangeOf(int startLine, int start... method assertTextRange (line 253) | private void assertTextRange(Optional textRange, int startL... FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/UnitTestResultsProviderTest.java class UnitTestResultsProviderTest (line 30) | public class UnitTestResultsProviderTest { method vbnet (line 32) | @Test method csharp (line 46) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/WrongEncodingFileFilterTest.java class WrongEncodingFileFilterTest (line 28) | public class WrongEncodingFileFilterTest { method setUp (line 32) | @Before method should_exclude_files_with_mismatching_encoding (line 38) | @Test method should_accept_files_with_matching_encoding (line 45) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/protobuf/CPDTokensImporterTest.java class CPDTokensImporterTest (line 39) | public class CPDTokensImporterTest { method before (line 53) | @Before method test_copy_paste_tokens_get_imported (line 59) | @Test method ignore_repeated_files (line 72) | @Test method checkExpectedData (line 88) | private void checkExpectedData(List lines) { FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/protobuf/FileMetadataImporterTest.java class FileMetadataImporterTest (line 44) | public class FileMetadataImporterTest { method getGeneratedFilePaths_returns_only_generated_uris (line 59) | @Test method getGeneratedFileUris_returns_empty_set_when_protobuf_is_empty (line 83) | @Test method regenerate_test_files (line 94) | @Ignore("this can be used to regenerate the files in case of a change ... method test_encoding_get_imported (line 106) | @Test method test_encoding_warns_for_invalid_encoding (line 120) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/protobuf/HighlightImporterTest.java class HighlightImporterTest (line 39) | public class HighlightImporterTest { method test_syntax_highlights_get_imported (line 49) | @Test method test_syntax_highlights_overlap (line 85) | @Test method test_syntax_highlights_empty (line 125) | @Test method test_syntax_highlights_outOfRange (line 147) | @Test method test_syntax_highlights_invalidRange (line 170) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/protobuf/LogImporterTest.java class LogImporterTest (line 28) | public class LogImporterTest { method before (line 36) | @Before method importLogMessages (line 41) | @Test method unknownLogReportedAsInfoWithWarning (line 53) | @Test method clearsInternalStateOnSave (line 65) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/protobuf/MethodDeclarationsImporterTest.java class MethodDeclarationsImporterTest (line 30) | public class MethodDeclarationsImporterTest { method importMethodDeclarationsFromSingleFile (line 31) | @Test method importMethodDeclarationsFromMultipleFile (line 79) | @Test method writeMethodDeclarationsToFile (line 131) | private static void writeMethodDeclarationsToFile(Path file, MethodDec... FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/protobuf/MetricsImporterTest.java class MetricsImporterTest (line 50) | public class MetricsImporterTest { method before (line 60) | @Before method test_metrics_get_imported (line 65) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/protobuf/RazorImporterTestBase.java class RazorImporterTestBase (line 36) | public class RazorImporterTestBase { method fileName (line 46) | protected static String fileName(String filePath) { method setUp (line 50) | @Before method addTestFileToContext (line 55) | protected DefaultInputFile addTestFileToContext(String testFilePath) t... FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/protobuf/RazorMetricsImporterTest.java class RazorMetricsImporterTest (line 44) | public class RazorMetricsImporterTest extends RazorImporterTestBase { method setUp (line 48) | @Before method roslyn_metrics_are_imported_before_4_10 (line 56) | @Test method roslyn_metrics_are_imported_starting_with_4_10 (line 87) | @Test method roslyn_metrics_out_of_range_with_4_10_debug_enabled (line 118) | @Test method roslyn_metrics_out_of_range_with_4_10_debug_disabled (line 129) | @Test method verifyMetrics (line 141) | private void verifyMetrics(FileLinesContext context, String key, int..... FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/protobuf/RazorSymbolRefsImporterTest.java class RazorSymbolRefsImporterTest (line 29) | public class RazorSymbolRefsImporterTest extends RazorImporterTestBase { method setUp (line 33) | @Override method test_symbol_refs_get_imported_cases_before_4_10 (line 40) | @Test method test_symbol_refs_get_imported_cases_after_4_10 (line 46) | @Test method test_symbol_refs_get_imported_overlapSymbolReferences_before_4_10 (line 51) | @Test method test_symbol_refs_get_imported_overlapSymbolReferences_after_4_10 (line 67) | @Test method verifySymbolRef (line 79) | private void verifySymbolRef(File protobuf) throws FileNotFoundExcepti... FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/protobuf/SymbolRefsImporterTest.java class SymbolRefsImporterTest (line 34) | public class SymbolRefsImporterTest { method setUp (line 45) | @Before method test_symbolrefs_get_imported (line 50) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/protobuf/TelemetryAggregatorLanguageVersionTest.java class TelemetryAggregatorLanguageVersionTest (line 31) | @RunWith(Parameterized.class) method languageVersionInputs (line 36) | @Parameters method TelemetryAggregatorLanguageVersionTest (line 49) | public TelemetryAggregatorLanguageVersionTest(String languageVersion, ... method languageVersions_sanitize (line 55) | @Test method languageVersions_empty (line 63) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/protobuf/TelemetryImporterTest.java class TelemetryImporterTest (line 29) | public class TelemetryImporterTest { method WriteTelemetryToFile (line 30) | private static void WriteTelemetryToFile(Path file, SonarAnalyzer.Tele... method importTelemetryMessagesFromSingleFile (line 38) | @Test method importTelemetryMessagesFromMultipleFile (line 68) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/AbstractFileCacheSensorTest.java class AbstractFileCacheSensorTest (line 45) | public class AbstractFileCacheSensorTest { method before (line 55) | @Before method should_describe (line 60) | @Test method execute_whenAnalyzingPullRequest_logsMessage (line 70) | @Test method execute_whenPullRequestCacheBasePathIsNotConfigured_logsWarning (line 82) | @Test method execute_whenCacheIsDisabled_logsWarning (line 93) | @Test method execute_whenCacheIsEnabled_itAddsTheFiles (line 105) | @Test method execute_whenHashingFails_itLogsAnError (line 123) | @Test method execute_basePathCaseMismatch_succeeds (line 145) | @Test method execute_basePathMismatch_doesNotAddKey (line 169) | @Test method CreateContextForCaching (line 189) | private SensorContext CreateContextForCaching() throws IOException { method CreateContextForCaching (line 196) | private SensorContext CreateContextForCaching(File basePath, MapSettin... method readBasePath (line 206) | private static URI readBasePath(SensorContext context) { class FileCacheSensor (line 210) | private static class FileCacheSensor extends AbstractFileCacheSensor { method FileCacheSensor (line 211) | public FileCacheSensor(HashProvider hashProvider) { method metadata (line 216) | private static PluginMetadata metadata() { FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/AnalysisWarningsSensorTest.java class AnalysisWarningsSensorTest (line 49) | public class AnalysisWarningsSensorTest { method before (line 67) | @Before method should_describe (line 85) | @Test method execute_noWorkingDir_doesNotCallAdd (line 95) | @Test method execute_workingDirWithoutSonarSuffix_doesNotCallAdd (line 103) | @Test method execute_missingWorkingDir_doesNotCallAdd (line 113) | @Test method execute_workingDirWithNoMatchingFiles_doesNotCallAdd (line 126) | @Test method execute_workingDirWithWithMatchingFile_addWarnings (line 140) | @Test method execute_workingDirWithWithMatchingFiles_addWarnings (line 157) | @Test method execute_errorWhenCallingService_addWarnings_logsError (line 177) | @Test method copyFile (line 193) | private void copyFile(String fileName) throws IOException { FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/DotNetSensorTest.java class DotNetSensorTest (line 58) | public class DotNetSensorTest { method prepare (line 86) | @Before method checkDescriptor (line 102) | @Test method isProjectSensor (line 110) | @Test method whenNoProtobufFiles_shouldNotFail (line 115) | @Test method whenNoRoslynReport_shouldNotFail (line 139) | @Test method whenReportsArePresent_thereAreNoWarnings (line 155) | @Test method whereThereIsNoSummary_doNoLogSummary (line 170) | @Test method whenThereAreBothMainAndTestFiles_doNotLog (line 181) | @Test method whenThereAreOnlyTestFilesInAnotherLanguage_logOnlySkipSensor (line 195) | @Test method whenThereAreOnlyMainFilesInAnotherLanguage_logOnlySkipSensor (line 205) | @Test method whenThereAreOnlyTestFilesInPluginLanguage_andNoMainFilesInAnyLanguage_resultsAreImportedAndLogsConsoleAndAnalysisWarnings (line 215) | @Test method whenThereAreOnlyTestFilesInPluginLanguage_andMainFilesInAnotherLanguage_resultsAreImportedWithWarningsOnlyInConsole (line 235) | @Test method whenThereAreNoFiles_logDebug (line 253) | @Test method whenThereAreMainFiles_andNoProjects_logToUseScannerForNet (line 262) | @Test method whenThereAreTestFiles_andNoProjects_logToUseScannerForNet (line 274) | @Test method whenThereAreMainAndTestFiles_andNoProjects_logToUseScannerForNet (line 286) | @Test method whenThereAreNoFiles_andNoProjects_logDebug (line 299) | @Test method addMainFileToFileSystem (line 310) | private void addMainFileToFileSystem() { method addTestFileToFileSystem (line 314) | private void addTestFileToFileSystem() { method addFileToFileSystem (line 318) | private void addFileToFileSystem(String fileName, Type fileType, Strin... method addRoslynReports (line 326) | private void addRoslynReports() { FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/FileTypeSensorTest.java class FileTypeSensorTest (line 44) | public class FileTypeSensorTest { method prepare (line 59) | @Before method should_describe (line 76) | @Test method whenProjectOutPaths_returnsNull_shouldNotAddProjectInfo_shouldNotLogOrCallOtherProperties (line 85) | @Test method whenProjectOutPaths_returnsEmpty_shouldNotAddProjectInfo_shouldNotLog (line 109) | @Test method whenProjectOutPaths_IsPresent_andLanguageKey_notPresent_shouldNotLog (line 119) | @Test method shouldLogTheCorrectAnalyzerWorkDir (line 130) | @Test method whenProjectOutPathsPresent_andHasNoFiles_shouldAddCorrectInfo (line 151) | @Test method whenProjectOutPathsPresent_andHasOnlyTestFiles_shouldAddCorrectInfo (line 163) | @Test method whenProjectOutPathsPresent_andHasOnlyMainFiles_shouldAddCorrectInfo (line 176) | @Test method whenProjectOutPathsPresent_andHasBothMainAndTestFiles_shouldAddCorrectInfo (line 187) | @Test method whenInvokedMultipleTimes_shouldAddInformationForEachInvocation (line 199) | @Test method whenGetStringArray_returnsMultiplePaths_shouldLogConcatenatedValues (line 219) | @Test method addFileToFileSystem (line 231) | private void addFileToFileSystem(String fileName, Type fileType) { method arrayOf (line 239) | private static String[] arrayOf(String input) { FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/LogSensorTest.java class LogSensorTest (line 36) | public class LogSensorTest { method prepare (line 51) | @Before method should_describe (line 63) | @Test method executeLogsMessages (line 71) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/PropertiesSensorTest.java class PropertiesSensorTest (line 39) | public class PropertiesSensorTest { method pluginMetadata (line 45) | private PluginMetadata pluginMetadata() { method should_collect_properties_from_multiple_modules (line 52) | @Test method should_describe (line 74) | @Test method should_continue_if_report_path_not_present (line 90) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/TelemetryJsonProcessorTest.java class TelemetryJsonProcessorTest (line 41) | public class TelemetryJsonProcessorTest { method prepare (line 55) | @Before method should_describe (line 68) | @Test method executeTelemetryProcessor_withNullCollector (line 76) | @Test method executeTelemetryProcessor (line 84) | @Test method executeTelemetryProcessorWithTelemetryJsonProjectCollector (line 105) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/TelemetryJsonProjectSensorTest.java class TelemetryJsonProjectSensorTest (line 48) | public class TelemetryJsonProjectSensorTest { method prepare (line 61) | @Before method executeTelemetrySensor (line 76) | @Test method executeTelemetrySensorNonExistingOutputDir_printsDebugMessage (line 90) | @Test method executeTelemetrySensorFileCanNotBeOpened (line 107) | @Test method executeTelemetrySensorRenamedFileCanNotBeOpened_printsDebugMessage (line 124) | @Test method executeTelemetrySensor_markedFilesAreIgnoredOnSecondRun (line 143) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/TelemetryJsonSensorTest.java class TelemetryJsonSensorTest (line 41) | public class TelemetryJsonSensorTest { method prepare (line 57) | @Before method should_describe (line 74) | @Test method execute_TelemetrySensor (line 82) | @Test method execute_TelemetrySensor_filesDontExist (line 103) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/TelemetryProcessorTest.java class TelemetryProcessorTest (line 41) | public class TelemetryProcessorTest { method prepare (line 56) | @Before method should_describe (line 68) | @Test method executeTelemetryProcessor_withNullCollector (line 76) | @Test method executeTelemetryProcessor (line 84) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/sensors/TelemetrySensorTest.java class TelemetrySensorTest (line 37) | public class TelemetrySensorTest { method prepare (line 53) | @Before method should_describe (line 68) | @Test method executeTelemetrySensor (line 76) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/telemetryjson/TelemetryJsonAggregatorTest.java class TelemetryJsonAggregatorTest (line 25) | public class TelemetryJsonAggregatorTest { method flatMapTelemetry_PassesThroughUnknownTelemetry (line 32) | @Test method flatMapTelemetry_AllSpecialKeysGetCounted (line 44) | @Test method flatMapTelemetry_MixedAggregatedAndPassThroughKeys (line 59) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/telemetryjson/TelemetryJsonCollectorTest.java class TelemetryJsonCollectorTest (line 25) | public class TelemetryJsonCollectorTest { method newTelemetryJsonCollectorIsEmpty (line 26) | @Test method addedTelemetryIsRetrievable (line 32) | @Test method duplicateKeysArePreserved (line 43) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/telemetryjson/TelemetryJsonParserTest.java class TelemetryJsonParserTest (line 29) | public class TelemetryJsonParserTest { method parseLineDelimitedKeyValuePairsWithDifferentTypes (line 33) | @Test method parsingArrayWritesDebug (line 58) | @Test method parsingComplexPropertyWritesDebug (line 70) | @Test method parsingMalformedJsonProperty (line 88) | @Test method parsingMalformedJson (line 104) | @Test method parsingEmptyJson (line 120) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/telemetryjson/TelemetryUtilsTest.java class TelemetryUtilsTest (line 26) | public class TelemetryUtilsTest { method sanitizeKey_returnsExpectedString (line 30) | @Test method sanitizeKey_nullInputThrows (line 37) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/testutils/AutoDeletingTempFile.java class AutoDeletingTempFile (line 24) | public class AutoDeletingTempFile implements AutoCloseable { method AutoDeletingTempFile (line 28) | public AutoDeletingTempFile() throws IOException { method getFile (line 32) | public Path getFile() { method close (line 36) | @Override FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/testutils/FileUtils.java class FileUtils (line 27) | public class FileUtils { method copyDirectory (line 30) | public static void copyDirectory(Path sourceDir, Path targetDir) throw... FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/plugins/testutils/ProtobufFilterTool.java class ProtobufFilterTool (line 42) | public class ProtobufFilterTool { method main (line 47) | public static void main(String[] args) throws IOException { method rewrite (line 64) | private static void rewrite(String filename, P... method readFirstMatching (line 69) | private static Optional readFirstMatching(Path path, Parser ... method save (line 86) | private static void save(Path path, T message) { FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/sarif/SarifParser01And04Test.java class SarifParser01And04Test (line 45) | public class SarifParser01And04Test { method getRoot (line 53) | private JsonObject getRoot(String fileName) throws IOException { method should_not_fail_ony_empty_report (line 57) | @Test method sarif_version_0_1 (line 70) | @Test method sarif_version_0_4 (line 88) | @Test method sarif_version_0_4_file_level (line 102) | @Test method sarif_version_0_4_secondary_locations (line 120) | @Test method sarif_version_0_4_secondary_locations_no_messages (line 135) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/sarif/SarifParser10Test.java class SarifParser10Test (line 52) | public class SarifParser10Test { method prepare (line 62) | @Before method getRoot (line 67) | private JsonObject getRoot(String fileName) throws IOException { method sarif_version_1_0 (line 74) | @Test method sarif_version_1_0_file_level (line 88) | @Test method sarif_version_1_0_suppressed (line 107) | @Test method sarif_version_1_0_file_name_with_illegal_char (line 120) | @Test method sarif_version_1_0_no_message (line 136) | @Test method sarif_version_1_0_no_location (line 152) | @Test method sarif_version_1_0_empty_location (line 163) | @Test method sarif_version_1_0_more_rules (line 174) | @Test method sarif_path_escaping (line 194) | @Test method dont_fail_on_empty_report (line 207) | @Test method sarif_version_1_0_secondary_locations (line 214) | @Test method sarif_version_1_0_secondary_locations_messages (line 236) | @Test method sarif_version_1_0_execution_flow (line 254) | @Test method sarif_version_1_0_execution_flow_invalid_value (line 272) | @Test method sarif_version_1_0_execution_flow_no_secondary_locations (line 289) | @Test method sarif_version_1_0_no_execution_flow (line 302) | @Test method sarif_version_1_0_file_issue_with_execution_flow (line 319) | @Test method sarif_version_1_0_relative_paths (line 328) | @Test method sarif_version_1_0_region_with_length (line 343) | @Test method sarif_version_1_0_same_start_end_location (line 355) | @Test FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/sarif/SarifParserCallbackImplTest.java class SarifParserCallbackImplTest (line 57) | public class SarifParserCallbackImplTest { method setUp (line 69) | @Before method should_add_project_issues (line 93) | @Test method should_add_file_issues_no_secondary_location (line 102) | @Test method should_add_file_issues_with_secondary_location (line 113) | @Test method should_create_external_file_issue_for_unknown_rule_key (line 134) | @Test method should_create_external_file_issue_with_secondary_location (line 154) | @Test method should_ignore_file_issue_with_unknown_file (line 177) | @Test method should_ignore_issue_with_unknown_file (line 184) | @Test method should_ignore_project_issue_with_unknown_rule_key (line 192) | @Test method should_add_issues (line 206) | @Test method should_add_execution_flow (line 219) | @Test method should_not_add_execution_flow_with_no_secondary_locations (line 238) | @Test method should_not_add_execution_flow_with_secondary_locations_invalid_file (line 247) | @Test method should_create_external_issue_for_unknown_rule_key (line 257) | @Test method should_create_external_issues_with_correct_impact_mapping (line 277) | @Test method should_create_external_issues_without_impact_cloud (line 300) | @Test method external_issue_with_invalid_precise_location_reports_on_line (line 322) | @Test method external_issue_with_invalid_line_location_reports_on_file (line 341) | @Test method external_issue_with_invalid_precise_location_reports_on_file (line 356) | @Test method should_add_issue_with_secondary_location (line 371) | @Test method should_add_issue_with_secondary_location_with_invalid_file (line 391) | @Test method should_ignore_repeated_module_issues (line 401) | @Test method should_ignore_repeated_file_issues (line 411) | @Test method should_ignore_repeated_issues (line 421) | @Test method should_register_adhoc_rule (line 431) | @Test method should_ignore_adhoc_rule_matching_sonar_key (line 441) | @Test method should_map_severity_name_and_description (line 462) | @Test method should_fallback_on_rule_severity (line 479) | @Test method should_fallback_on_major_severity (line 489) | @Test method should_map_rule_type (line 498) | @Test method issue_with_invalid_precise_location_forRazor_reports_on_line (line 519) | @Test method issue_with_invalid_precise_location_forCshtml_reports_on_line (line 524) | @Test method project_level_issues_for_different_projects (line 529) | @Test method impact_severity_mapping_is_correct (line 542) | @Test method impact_softwareQuality_mapping_is_correct (line 551) | @Test method assertIssueReportedOnLine (line 559) | private void assertIssueReportedOnLine(String fileName) { method createLocation (line 581) | private Location createLocation(String filePath, int line, int column) { method createLocation (line 585) | private Location createLocation(String filePath, int startLine, int st... method createAbsolutePath (line 589) | private String createAbsolutePath(String filePath) { FILE: sonar-dotnet-core/src/test/java/org/sonarsource/dotnet/shared/sarif/SarifParserFactoryTest.java class SarifParserFactoryTest (line 34) | public class SarifParserFactoryTest { method testNonExisting (line 41) | @Test method testUnknownVersion (line 49) | @Test method testAllJsonFiles (line 57) | @Test method testInvalidFormat (line 63) | @Test method testInvalidJson (line 72) | @Test method testCreate_v10 (line 83) | @Test method testCreate_v04 (line 89) | @Test method testCreate_v01 (line 96) | @Test FILE: sonar-dotnet-core/src/test/resources/HashProvider/CodeNoBom.cs class Sample (line 1) | public class Sample FILE: sonar-dotnet-core/src/test/resources/HashProvider/CodeWithBom.cs class Sample (line 1) | public class Sample FILE: sonar-dotnet-core/src/test/resources/MethodDeclarationsSensorTest/TestMethodImport/TestMethodImport.Tests/TestBase.cs class TestBase (line 3) | public abstract class TestBase method TestMethodInBaseClass (line 5) | [TestMethod] FILE: sonar-dotnet-core/src/test/resources/MethodDeclarationsSensorTest/TestMethodImport/TestMethodImport.Tests/TestClass.cs class TestClass (line 3) | [TestClass] method TestMethod (line 6) | [TestMethod] FILE: sonar-dotnet-core/src/test/resources/Program.cs class Program (line 23) | public class Program method Add (line 25) | public static int Add(int op1, int op2) method Main (line 40) | static void Main(string[] args) class IFoo (line 45) | class IFoo class IBar (line 49) | class IBar // NOSONAR class MoreMath (line 53) | [SuppressMessage("Maintainability", "S2326:Unused type parameters should... method Add (line 56) | public int Add(int a, int b) // Noncompliant; is ignored FILE: sonar-dotnet-core/src/test/resources/ProtobufImporterTest/Program.cs class Program (line 23) | public class Program method Add (line 25) | public static int Add(int op1, int op2) method Main (line 40) | static void Main(string[] args) class IFoo (line 45) | class IFoo class IBar (line 49) | class IBar // NOSONAR class MoreMath (line 53) | [SuppressMessage("Maintainability", "S2326:Unused type parameters should... method Add (line 56) | public int Add(int a, int b) // Noncompliant; is ignored FILE: sonar-dotnet-core/src/test/resources/RazorProtobufImporter/WebProject/Program.cs class Program (line 3) | public class Program method Main (line 5) | public static void Main() { } FILE: sonar-dotnet-core/src/test/resources/samples/csharp/Calculator/Calculator.MSTest/CalculatorTests.cs class CalculatorTests (line 3) | [TestClass] method TestMethod1 (line 6) | [TestMethod] method GenericMethod (line 14) | [TestMethod] class BaseClass (line 19) | [TestClass] method TestMethodInBaseClass (line 22) | [TestMethod] method VirtualMethodInBaseClass (line 26) | [TestMethod] class Derived (line 31) | [TestClass] method VirtualMethodInBaseClass (line 34) | [TestMethod] class GenericCalculatorTests (line 39) | [TestClass] method Method (line 42) | [TestMethod] method GenericMethod (line 46) | [TestMethod] method VirtualMethodInBaseClass (line 50) | [TestMethod] class GenericTests (line 55) | [TestClass] method GenericTestMethod (line 58) | [DataTestMethod] FILE: sonar-dotnet-core/src/test/resources/samples/csharp/Calculator/Calculator.NUnit3/CalculatorTests.cs class Tests (line 3) | [TestFixture] method TestMethod1 (line 6) | [Test] class BaseClass (line 15) | [TestFixture] method TestMethodInBaseClass (line 18) | [Test] method VirtualMethodInBaseClass (line 22) | [Test] class Derived (line 27) | [TestFixture] method VirtualMethodInBaseClass (line 30) | [Test] class GenericCalculatorTests (line 35) | [TestFixture] method Method (line 38) | [Test] method GenericMethod (line 42) | [Test] method VirtualMethodInBaseClass (line 46) | [Test] class GenericTests (line 51) | [TestFixture] method GenericTest (line 54) | [TestCase(42)] FILE: sonar-dotnet-core/src/test/resources/samples/csharp/Calculator/Calculator.NUnit4/CalculatorTests.cs class Tests (line 3) | [TestFixture] method TestMethod1 (line 6) | [Test] class BaseClass (line 15) | [TestFixture] method TestMethodInBaseClass (line 18) | [Test] method VirtualMethodInBaseClass (line 22) | [Test] class Derived (line 27) | [TestFixture] method VirtualMethodInBaseClass (line 30) | [Test] class GenericCalculatorTests (line 35) | [TestFixture] method Method (line 38) | [Test] method GenericMethod (line 42) | [Test] method VirtualMethodInBaseClass (line 46) | [Test] class GenericTests (line 51) | [TestFixture] method GenericTest (line 54) | [TestCase(42)] FILE: sonar-dotnet-core/src/test/resources/samples/csharp/Calculator/Calculator.xUnit/CalculatorTests.cs class Tests (line 3) | public class Tests method TestMethod1 (line 5) | [Fact] class BaseClass (line 14) | public abstract class BaseClass where T : class method TestMethodInBaseClass (line 16) | [Fact] method VirtualMethodInBaseClass (line 20) | [Fact] class Derived (line 25) | public sealed class Derived : BaseClass method VirtualMethodInBaseClass (line 27) | [Fact] class GenericTests (line 32) | public class GenericTests method GenericTestMethod (line 34) | [Theory] class GenericDerivedFromGenericClass (line 40) | public sealed class GenericDerivedFromGenericClass : BaseClass whe... method GenericDerivedFromGenericClass_PassMethod (line 42) | [Fact] FILE: sonar-dotnet-core/src/test/resources/samples/csharp/Calculator/Calculator/Calculator.cs class Calculator (line 3) | public class Calculator method Add (line 5) | public int Add(int a, int b, Predicate predicate) FILE: sonar-dotnet-core/src/test/resources/visualstudio_test_results/projects/TestReport/TestReport/Test1.cs class Test1 (line 3) | [TestClass] type Type (line 6) | public enum Type : byte method TestMethod1 (line 12) | [DataTestMethod] FILE: sonar-vbnet-core/src/main/java/org/sonar/plugins/vbnetenterprise/api/ProfileRegistrar.java type ProfileRegistrar (line 38) | @SonarLintSide method register (line 45) | void register(RegistrarContext registrarContext); type RegistrarContext (line 47) | interface RegistrarContext { method registerDefaultQualityProfileRules (line 52) | void registerDefaultQualityProfileRules(Collection ruleKeys); FILE: sonar-vbnet-core/src/main/java/org/sonarsource/vbnet/core/VbNetCoreExtensions.java class VbNetCoreExtensions (line 50) | public class VbNetCoreExtensions { method VbNetCoreExtensions (line 52) | private VbNetCoreExtensions() { method register (line 56) | public static void register(Context context, PluginMetadata metadata) { FILE: sonar-vbnet-core/src/main/java/org/sonarsource/vbnet/core/VbNetCorePluginMetadata.java class VbNetCorePluginMetadata (line 25) | public abstract class VbNetCorePluginMetadata implements PluginMetadata { method languageKey (line 27) | @Override method languageName (line 32) | @Override method repositoryKey (line 37) | @Override method fileSuffixesKey (line 42) | @Override method fileSuffixesDefaultValue (line 47) | @Override class VbNet (line 52) | public class VbNet extends AbstractLanguage { method VbNet (line 59) | public VbNet(Configuration configuration) { method getFileSuffixes (line 64) | @Override method equals (line 69) | @Override method hashCode (line 74) | @Override FILE: sonar-vbnet-core/src/main/java/org/sonarsource/vbnet/core/VbNetFileCacheSensor.java class VbNetFileCacheSensor (line 23) | public class VbNetFileCacheSensor extends AbstractFileCacheSensor { method VbNetFileCacheSensor (line 24) | public VbNetFileCacheSensor(PluginMetadata metadata, HashProvider hash... FILE: sonar-vbnet-core/src/main/java/org/sonarsource/vbnet/core/VbNetLanguageConfiguration.java class VbNetLanguageConfiguration (line 23) | public class VbNetLanguageConfiguration extends AbstractLanguageConfigur... method VbNetLanguageConfiguration (line 24) | public VbNetLanguageConfiguration(Configuration configuration, PluginM... FILE: sonar-vbnet-core/src/main/java/org/sonarsource/vbnet/core/VbNetPropertyDefinitions.java class VbNetPropertyDefinitions (line 22) | public class VbNetPropertyDefinitions extends AbstractPropertyDefinitions { method VbNetPropertyDefinitions (line 24) | public VbNetPropertyDefinitions(PluginMetadata metadata) { FILE: sonar-vbnet-core/src/main/java/org/sonarsource/vbnet/core/VbNetSonarWayProfile.java class VbNetSonarWayProfile (line 25) | public class VbNetSonarWayProfile extends AbstractSonarWayProfile { method VbNetSonarWayProfile (line 29) | public VbNetSonarWayProfile(PluginMetadata metadata, RoslynRules rosly... method VbNetSonarWayProfile (line 34) | public VbNetSonarWayProfile(PluginMetadata metadata, RoslynRules rosly... method registerRulesFromRegistrars (line 39) | @Override FILE: sonar-vbnet-core/src/test/java/org/sonarsource/vbnet/core/TestVbNetMetadata.java class TestVbNetMetadata (line 19) | class TestVbNetMetadata extends VbNetCorePluginMetadata { method pluginKey (line 23) | @Override method analyzerProjectName (line 28) | @Override method resourcesDirectory (line 33) | @Override FILE: sonar-vbnet-core/src/test/java/org/sonarsource/vbnet/core/VbNetCoreExtensionsTest.java class VbNetCoreExtensionsTest (line 58) | class VbNetCoreExtensionsTest { method register (line 59) | @Test FILE: sonar-vbnet-core/src/test/java/org/sonarsource/vbnet/core/VbNetCorePluginMetadataTest.java class VbNetCorePluginMetadataTest (line 23) | class VbNetCorePluginMetadataTest { method pluginProperties (line 25) | @Test FILE: sonar-vbnet-core/src/test/java/org/sonarsource/vbnet/core/VbNetFileCacheSensorTest.java class VbNetFileCacheSensorTest (line 40) | class VbNetFileCacheSensorTest { method execute_whenCacheIsEnabled_itAddsOnlyTheLanguageFiles (line 47) | @Test method AddFile (line 73) | private static void AddFile(SensorContextTester context, File basePath... FILE: sonar-vbnet-core/src/test/java/org/sonarsource/vbnet/core/VbNetLanguageConfigurationTest.java class VbNetLanguageConfigurationTest (line 26) | class VbNetLanguageConfigurationTest { method reads_correct_language (line 28) | @Test FILE: sonar-vbnet-core/src/test/java/org/sonarsource/vbnet/core/VbNetPropertyDefinitionsTest.java class VbNetPropertyDefinitionsTest (line 25) | class VbNetPropertyDefinitionsTest { method create (line 27) | @Test method create_containsScannerForDotNetProperties (line 35) | @Test method create_containsLegacyScannerForDotNetProperties (line 48) | @Test FILE: sonar-vbnet-core/src/test/java/org/sonarsource/vbnet/core/VbNetSonarWayProfileTest.java class VbNetSonarWayProfileTest (line 35) | class VbNetSonarWayProfileTest { method resourcesDirectory (line 38) | @Override method beforeAll (line 44) | @BeforeAll method does_not_throw (line 50) | @Test method sonar_way_can_be_define_with_no_profile_registrars_given (line 55) | @Test method profile_registrars_can_add_rules_to_sonar_way (line 63) | @Test FILE: sonar-vbnet-core/src/test/java/org/sonarsource/vbnet/core/VbNetTest.java class VbNetTest (line 30) | class VbNetTest { method init (line 35) | @BeforeEach method shouldGetDefaultFileSuffixes (line 43) | @Test method shouldGetCustomFileSuffixes (line 48) | @Test method equals_and_hashCode_considers_configuration (line 54) | @Test class FakeVbNet (line 70) | private class FakeVbNet extends AbstractLanguage { method FakeVbNet (line 72) | public FakeVbNet() { method getFileSuffixes (line 76) | @Override FILE: sonar-vbnet-plugin/src/main/java/org/sonar/plugins/vbnet/VbNetPlugin.java class VbNetPlugin (line 24) | public class VbNetPlugin implements Plugin { method define (line 29) | @Override class VbNetPluginMetadata (line 34) | private static class VbNetPluginMetadata extends VbNetCorePluginMetada... method pluginKey (line 36) | @Override method analyzerProjectName (line 41) | @Override method resourcesDirectory (line 46) | @Override FILE: sonar-vbnet-plugin/src/test/java/org/sonar/plugins/vbnet/VbNetPluginTest.java class VbNetPluginTest (line 29) | class VbNetPluginTest { method getExtensions (line 31) | @Test method pluginProperties (line 40) | @Test FILE: sonar-vbnet-plugin/src/test/java/org/sonar/plugins/vbnet/VbNetRulesDefinitionTest.java class VbNetRulesDefinitionTest (line 33) | class VbNetRulesDefinitionTest { method setupContext (line 41) | @BeforeAll method rules_areDefined (line 48) | @Test method symbolicExecutionRules_areNotDefined (line 56) | @Test method allRules_haveMetadata (line 62) | @Test method allRules_haveHtmlDescription (line 72) | @Test FILE: sonar-vbnet-plugin/src/test/java/org/sonar/plugins/vbnet/VbNetSonarWayProfileTest.java class VbNetSonarWayProfileTest (line 29) | class VbNetSonarWayProfileTest { method setup (line 35) | @BeforeAll method expected_rules_in_sonar_way (line 43) | @Test method hotspots_in_sonar_way (line 54) | @Test method symbolic_execution_not_in_sonar_way (line 65) | @Test FILE: sonar-vbnet-plugin/src/test/resources/Program.cs class Program (line 23) | public class Program method Add (line 25) | public static int Add(int op1, int op2) method Main (line 40) | static void Main(string[] args) class IFoo (line 45) | class IFoo class IBar (line 49) | class IBar // NOSONAR class MoreMath (line 53) | [SuppressMessage("Maintainability", "S2326:Unused type parameters should... method Add (line 56) | public int Add(int a, int b) // Noncompliant; is ignored