Skip to content

Commit a4fa3b9

Browse files
Add coverage related comments
1 parent 92d66c6 commit a4fa3b9

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

StyleCop.Analyzers/StyleCop.Analyzers.Test/LayoutRules/SA1501UnitTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,9 @@ public void Bar(int i)
847847
[MemberData(nameof(TestStatements))]
848848
public async Task TestNoSA1503StatementWithBracesAsync(string statementText)
849849
{
850+
// TODO: The statement in this test code does not have braces! Change test name or the code?
851+
// There is uncovered code in SA1501 related to blocks when SA1503 is suppressed, so either
852+
// change this to do what the the name says or change the name and add another test.
850853
await new CSharpTest
851854
{
852855
TestCode = this.GenerateFixedTestStatement(statementText),

StyleCop.Analyzers/StyleCop.Analyzers/MaintainabilityRules/SA1400AccessModifierMustBeDeclared.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ private static void HandleEventDeclaration(SyntaxNodeAnalysisContext context)
9191

9292
if (syntax.Parent.IsKind(SyntaxKind.InterfaceDeclaration))
9393
{
94+
// NOTE: Events in interfaces seem to be reported as EventFieldDeclaration, so this should not happen.
95+
// Leaving it for consistency and possible future changes though.
9496
return;
9597
}
9698

0 commit comments

Comments
 (0)