llvm/llvm-project

Aligning consecutive assignments in enum blocks only

Open

#52,983 opened on Jan 4, 2022

View on GitHub
 (13 comments) (13 reactions) (0 assignees)C++ (10,782 forks)batch import
clang-formatenhancementgood first issue

Repository metrics

Stars
 (26,378 stars)
PR merge metrics
 (Avg merge 1d 2h) (1,000 merged PRs in 30d)

Description

Could it be possible to have an option to align assignments in enum blocks?

For instance:

enum nntp_code {
    NNTP_INFO_HELP         = 100,
    NNTP_INFO_CAPABILITIES = 101,
    NNTP_INFO_DATE         = 111,
    NNTP_OK_BANNER_POST    = 200,
    NNTP_OK_BANNER_NOPOST  = 201,
    NNTP_OK_QUIT           = 205,
    NNTP_OK_COMPRESS       = 206,
    NNTP_OK_GROUP          = 211,
    NNTP_OK_LIST           = 215,
    NNTP_OK_ARTICLE        = 220,
    NNTP_OK_HEAD           = 221,
    NNTP_OK_BODY           = 222,
}

Contributor guide