Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional breaking without indentation #345

Closed
belav opened this issue Jul 11, 2021 · 2 comments · Fixed by #396
Closed

Conditional breaking without indentation #345

belav opened this issue Jul 11, 2021 · 2 comments · Fixed by #396
Assignees
Milestone

Comments

@belav
Copy link
Owner

belav commented Jul 11, 2021

The indentation of the && is probably already another ticket. This is more about the Ternary breaking.

Doc statementSeparator = node.Parent is AccessorDeclarationSyntax
&& node.Statements.Count <= 1 ? Doc.Line : Doc.HardLine;

// should be something like

Doc statementSeparator = 
    node.Parent is AccessorDeclarationSyntax
        && node.Statements.Count <= 1 
    ? Doc.Line
    : Doc.HardLine;
@belav belav added type:bug Something isn't working area:formatting labels Jul 11, 2021
@belav
Copy link
Owner Author

belav commented Jul 12, 2021

See also

        public AccessTokenNotAvailableException(
            NavigationManager navigation,
            AccessTokenResult tokenResult,
            IEnumerable<string> scopes
        ) : base(
            message: "Unable to provision an access token for the requested scopes: " + scopes
            != null ? $"'{string.Join(", ", scopes ?? Array.Empty<string>())}'" : "(default scopes)"
        ) { }

@belav
Copy link
Owner Author

belav commented Jul 12, 2021

Add

            fixed (
                byte* pbHeapAllocatedPasswordBuffer = (
                    cbPasswordBuffer
                    > Constants.MAX_STACKALLOC_BYTES
                ) ? new byte[cbPasswordBuffer] : null
            ) { }

@belav belav changed the title Ternary breaking Conditional breaking without indentation Aug 7, 2021
@belav belav self-assigned this Aug 7, 2021
@belav belav added this to the 0.9.9 milestone Aug 7, 2021
belav added a commit that referenced this issue Aug 8, 2021
shocklateboy92 added a commit that referenced this issue Aug 9, 2021
closes #345

This was mostly about formatting for conditionals, but ended up involving changing the logic for how assignments and variables get formatted.

Co-authored-by: Lasath Fernando <devel@lasath.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant