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

BraceStyle AlwaysNewLine for extern blocks #4450

Merged
merged 1 commit into from
Oct 3, 2020
Merged

BraceStyle AlwaysNewLine for extern blocks #4450

merged 1 commit into from
Oct 3, 2020

Conversation

blesson3
Copy link
Contributor

@blesson3 blesson3 commented Oct 2, 2020

  • extern blocks can now get an opening brace on a new line

  • add test case for extern blocks

I also made sure that there are no trailing spaces for the extern "C" line after formatted.

fixes issue #4428

* extern blocks can now get an opening brace on a new line

* add test case for extern blocks
@blesson3
Copy link
Contributor Author

blesson3 commented Oct 2, 2020

Example extern formatting for brace_style: AlwaysNextLine:

Before formatting (source):

extern "Rust" {
    fn foo(x: i32);
}

extern "cdecl" {}

extern "fastcall" {/* f*/}

After formatting (target):

extern "Rust" 
{
    fn foo(x: i32);
}

extern "cdecl" {}

extern "fastcall"
{
    /* f*/
}

Copy link
Member

@calebcartwright calebcartwright left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

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

Successfully merging this pull request may close these issues.

3 participants