Fix a null reference in BaseFormattingRule...
... that was introduced with PR #4644 Method `SomeParentHasMissingCloseBrace` expects a fully formed node that has a compilation unit, which a roslyn document would have, but this code is also in a formatter public api path, that can possibly `an arbitrary` syntax node that may not be associated with a syntaxtree or a compilation unit. The fix is simple, it adds a missing null check to this method.
Showing
想要评论请 注册 或 登录