codecadwallader / codemaid

CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
http://www.codemaid.net
GNU Lesser General Public License v3.0
1.88k stars 352 forks source link

[[unlikely]] or [[likely]] after if statements break the formatting #1040

Open UnlegitSenpaii opened 4 months ago

UnlegitSenpaii commented 4 months ago

Environment

Description

if (false) [[unlikely]]
{
    bool something = true;
    if (true) [[likely]]
    {
        bool somethingelse = false;
    }
}

gets formatted into

if (false) [[unlikely]]
    {
        bool something = true;
        if (true) [[likely]]
            {
                bool somethingelse = false;
            }
    }

Current behavior

Its formatting wrong.

Expected behavior

It should format correctly.