草庐IT

uncrustify

全部标签

java - 如何在使用 uncrustify 格式化程序的 java lambda 表达式后正确缩进?

我正在使用带有atom-beautify和uncrustify的atom来格式化我的java文件。我希望lambda表达式的缩进仅在左大括号()->{之后缩进一层。我试过调整indent_continue属性,但是当我将它设置为零时它变得很疯狂。(使用4个空格进行缩进)当indent_continue=0时,会发生这种情况:publicclassTest{publicstaticvoidrunTest(Runnablecode){code.run();}publicstaticvoidmain(String[]args){runTest(()->{System.out.println(

c++ - Uncrustify 和/或 Universal Indent GUI 可以拆分字符串文字吗?

我正在为我的C++项目使用UniversalIndentGUI和Uncrustify。代码宽度设置为80个字符,代码格式几乎令人满意。这似乎适用于常规代码,但字符串文字不会拆分,我也希望这种情况发生。下面的例子演示了我正在努力实现......原文:LoggermyLog;myLog美化(align_left_shift=true):LoggermyLog;myLog首选:LoggermyLog;myLog这是否可以通过提到的辅助工具实现?提前致谢... 最佳答案 myLog 关于c++-

c++ - Uncrustify 在 Class::method 处破坏代码

我正在尝试使用Uncrustify,但在xcode中工作时所有配置都破坏了我的代码std::vectora;成为std::vectora;有没有办法防止这种情况发生,使::保持在一起 最佳答案 此错误的原因是Uncrustify参数中的语言设置错误。将-lOC更改为-lCPP解决了问题 关于c++-Uncrustify在Class::method处破坏代码,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.co

c++ - Uncrustify:初始化列表:以逗号开头

我想通过Uncrustify自动归档以下代码结构:Class(intaArg1,intaArg2,intaArg3):BaseClass(aArg1),iMember1(aArg1),iMember2(aArg2){}我试过Uncrustify版本:0.63:pos_constr_comma=lead_force但它不起作用。我应该设置什么来获得上面的代码? 最佳答案 刚遇到同样的问题。尝试添加这个:nl_constr_init_args=add对我有用。 关于c++-Uncrustif

c++ - Uncrustify 拆分函数调用参数

我想像这样格式化代码:a)线宽最大120b)-如果调用函数的长度>120,则函数调用参数每行一个,缩进else函数调用在一行中c)-如果函数调用在if、for、while等中......参数的格式应如b)我有代码(这只是一个虚构的):voida_function(){if(verify_if_the_conditions_are_meet(first_parameter,second_parameter,third_parameter,fourth_parameter,fifth_parameter,sixth_parameter)){call_a_function_with_many

c++ - 使用 Uncrustify 完全拆分长函数定义,不仅在逗号处

我正在使用Uncrustifyv0.60来格式化我的C++源代码。为了配置Uncrustify,我使用了UniversalIndentGUIv1.2.0rev.1070。在UniversalIndentGUI的LineSplittingoptions部分,我将CodeWidth设置为120。假设我有以下示例代码:namespaceMyNameSpace{classMyClass{public:std::map*ConstructMyOtherClassMap(std::vector*allNames,intarg0,doublearg1,chararg2);}}该方法声明以大于120的

ios - Xcode 与 uncrustify : how to align function declaration to colons?

我有以下代码:@interfaceTRYoutubeManager:AFHTTPRequestOperationManager-(void)getVideosForDefaultChannelsWithSuccess:(void(^)(NSArray*youtubeVideosArray))successBlockfailure:(void(^)(NSError*error))failureBlock;@end所以我想保留120个字符的行限制。并在冒号上对齐声明,如下所示:@interfaceTRYoutubeManager:AFHTTPRequestOperationManager-

ios - Uncrustify:嵌套 block 索引错误

我有这个代码:dispatch_async(dispatch_get_main_queue(),^{if(self.adAppearBlockIsAnimated){[UIViewanimateWithDuration:kAnimationTimeanimations:^{self.adAppearBlock();}];}});不幸的是,Uncrustify让它看起来像:dispatch_async(dispatch_get_main_queue(),^{if(self.adAppearBlockIsAnimated){[UIViewanimateWithDuration:kAnima

ios - 如何为 Swift iOS 编程配置 Uncrustify for Allman 风格?

我正在尝试获取UncrustifyX的配置,该配置将使用Allman样式与Swift一起工作。我在Xcode中使用BBUncrustifyPlugin。这是我到目前为止所拥有的:#indentusingtabsinput_tab_size=8output_tab_size=4indent_columns=output_tab_sizeindent_with_tabs=1#indentcaseindent_switch_case=indent_columnsindent_case_brace=0#indentclassbodyindent_class=True#newlinesnl_af