跳转至

AlignConsecutiveAssignments

AlignConsecutiveAssignments (AlignConsecutiveStyle)

Info

clang-format 3.8

对齐连续赋值的样式。

Consecutive 会产生如下格式:

int a            = 1;
int somelongname = 2;
double c         = 3;

可能的值:

ACS_None: 不要在连续的行上对齐赋值。

ACS_Consecutive: 对齐连续行上的赋值。这将导致类似的格式:

int a            = 1;
int somelongname = 2;
double c         = 3;

int d = 3;
/* A comment. */
double e = 4;

ACS_AcrossEmptyLines: 与 ACS_Consecutive 相同,但也跨空行,例如:

int a            = 1;
int somelongname = 2;
double c         = 3;

int d            = 3;
/* A comment. */
double e = 4;

ACS_AcrossComments: 与 ACS_Consecutive 相同,但也可以跨越仅包含注释的行,例如:

int a            = 1;
int somelongname = 2;
double c         = 3;

int d    = 3;
/* A comment. */
double e = 4;

ACS_AcrossEmptyLinesAndComments: 与 ACS_Consecutive 相同,但也可以跨行,只包含注释和空行,例如:

int a            = 1;
int somelongname = 2;
double c         = 3;

int d            = 3;
/* A comment. */
double e         = 4;

最后更新: 2022-10-31