简体   繁体   English

取消固定:在大括号之前修剪换行符

[英]Uncrustify: Trim linebreaks before braces

What is the right config for uncrustify so that it removes empty lines before curly braces so that: 什么是正确的配置以进行不生锈,以便在花括号前删除空行,因此:

        }

    }
    else
    {
        // foo
    }
    [bar tend];

}

becomes: 变为:

        }
    }
    else
    {
        // foo
    }
    [bar tend];
}

I scourged the docs but couldn't find the right setting, maybe it has an unusual name. 我搜索了文档,但找不到正确的设置,也许它的名字不寻常。

Found it. 找到了。 The following will take care of spurious blank lines. 下面将处理虚假的空行。

eat_blanks_after_open_brace   = TRUE
eat_blanks_before_close_brace = TRUE
nl_max = 2

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM