Skip to content

Conversation

FrediKats
Copy link
Contributor

Option "only_validate_first_type" now works more like "only_validate_first_node".

foreach (var node in root.DescendantNodesAndSelf(descendIntoChildren: node => !IsTypeDeclaration(node)))

This block of code returns CompilationUnit and if (node.SpanStart < symbolNode.SpanStart) always works as if (0 < symbolNode.SpanStart).

PR contains:

  • test to confirm this problem (namespace before type).
  • fix with comparing only with other type declarations (skip nodes that is not type declaration)

@meziantou meziantou merged commit 7e57a0b into meziantou:main Feb 9, 2025
17 of 18 checks passed
@meziantou
Copy link
Owner

Thanks for your contribution 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants