Skip to content

clang-format: penalty for breaking double brackets for c++ attributes #189

Closed
@mdavis199

Description

@mdavis199

There should be a penalty setting that prevents breaking the double-brackets around c++ attributes.

Using the attached clang-format, the following code:

int PluginColumnModel::columnCount([[maybe_unused]] const QModelIndex& parent) const {}

is formated as

int PluginColumnModel::columnCount([
    [maybe_unused]] const QModelIndex& parent) const {}

clang-format.txt

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions