Closed brian-reichle closed 1 year ago
I believe this would either require Roslyn >= 4.0, or bringing back "FutureSyntaxKinds".
I'm ok with FutureSyntaxKinds
, at least until we drop support for VS2019. Though the tests themselves would need to be updated to 4.0 and that would require #209 to be fixed.
WTG1006 reports a diagnostic if a top-level class has the
internal
visibility, it identifies a class as top-level by checking if the parent SyntaxNode is a compilation unit or namespace, but doesn't check for C#9's file scoped namespaces. As a result, WTG1006 fails to report a diagnostic for internal classes when using file scoped namespaces.the fix should be as simple as adding
FileScopedNamespace
to the switch inVisibilityAnalyzer.IsTopLevel
.WI00600526