Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix analyzer [RCS1229](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1229) ([PR](https://github.com/dotnet/roslynator/pull/1618))
- Fix analyzer [RCS1174](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1174) ([PR](https://github.com/dotnet/roslynator/pull/1619))
- Fix analyzer [RCS0010](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0010) ([PR](https://github.com/dotnet/roslynator/pull/1620))
- Fix analyzer [RCS0005](https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0005) ([PR](https://github.com/dotnet/roslynator/pull/1621))

### Added

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ static bool IsPrecededWithEmptyLineOrRegionDirective(EndRegionDirectiveTriviaSyn
SyntaxKind.EndOfLineTrivia,
SyntaxKind.RegionDirectiveTrivia,
SyntaxKind.EndRegionDirectiveTrivia,
SyntaxKind.PragmaWarningDirectiveTrivia);
SyntaxKind.PragmaWarningDirectiveTrivia,
SyntaxKind.EndIfDirectiveTrivia);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,4 +251,23 @@ class C
}
}");
}

[Fact, Trait(Traits.Analyzer, DiagnosticIdentifiers.AddBlankLineBeforeEndRegionDirective)]
public async Task TestNoDiagnostic_IfDirectiveInsideRegion()
{
await VerifyNoDiagnosticAsync("""
namespace N
{
#region Some region

#if DEBUG
// Some code
#else
// Some code
#endif

#endregion Some region
}
""");
}
}
Loading