【问题标题】:uncrustify, c, align struct init memberuncrustify,c,对齐结构初始化成员
【发布时间】:2017-11-24 11:35:09
【问题描述】:

我正在寻找对齐初始化的参数。
之前:

V_Zyle[Z1]=(Zylinder){&AP31[0], &AP31[1], &XP12_22_1, &XP12_22_2, 0, 0, ZY_PL}; // Z1 Drehzylinder Vereinzelung
V_Zyle[Z2]=(Zylinder){&AP31[2], &AP31[3], NULL, NULL, 0, 0, ZY_GR};             // Z2 Blasluft Topf Gehäuse
V_Zyle[Z3]=(Zylinder){&AP31[4], &AP31[5], NULL, NULL, 0, 0, ZY_GR};             // Z3 Blasluft Zuführung Gehäuse

之后:

V_Zyle[Z1]=(Zylinder){&AP31[0], &AP31[1], &XP12_22_1, &XP12_22_2, 0, 0, ZY_PL}; // Z1 Drehzylinder Vereinzelung
V_Zyle[Z2]=(Zylinder){&AP31[2], &AP31[3], NULL,       NULL,       0, 0, ZY_GR}; // Z2 Blasluft Topf Gehäuse
V_Zyle[Z3]=(Zylinder){&AP31[4], &AP31[5], NULL,       NULL,       0, 0, ZY_GR}; // Z3 Blasluft Zuführung Gehäuse

希望有办法做到这一点。

【问题讨论】:

    标签: c uncrustify


    【解决方案1】:

    目前没有这个选项,但是有:

    对齐同名的单行函数中的参数。 函数名称必须已经相互对齐。

    align_same_func_call_params     = true     # false/true
    

    对函数调用参数进行类似的对齐。 如果你很快需要这个,你可以在此基础上编写一个新选项。或者,您可以在 github 存储库中提交功能请求。


    对这个问题投反对票是怎么回事?对我来说似乎很合理。

    【讨论】:

    • 感谢您的回答。
    猜你喜欢
    • 1970-01-01
    • 2020-12-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多