Skip to content

[clang-format]: Feature Request: AlignConsecutiveDeclarations option to ignore function prototypes #74320

Closed
@bradh352

Description

@bradh352

We recently started using clang-format in the c-ares project: https://github.com/c-ares/c-ares/blob/main/.clang-format

We have "AlignConsecutiveDeclarations" enabled, which yields nicely formatted variable declarations. However, since we have a coding style requirement of 80 columns, function prototype alignment actually appears to cause more harm than good from a readability standpoint. Due to the line limit restrictions, the formatting is inconsistent at best, aligning some parameter members and not others.

Our feature request would be a flag to disable function prototypes from this alignment option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-formatenhancementImproving things as opposed to bug fixing, e.g. new or missing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions