Skip to content

[clang-format] Add target language & standard to the documentation #134390

Open
@SunBlack

Description

@SunBlack

Sometimes we waste some time thinking about whether a new check is relevant for us. For example, the AllowShortCaseExpressionOnASingleLine option was added in Clang-Format 19. As a C++ developer, I was not familiar with the syntax, so I first looked to see if it was a language construct from a newer standard that I was not yet familiar with (e.g. C++26). It wasn't until I took a look at the source code, or the PR for it (#91112), that I saw that this option is apparently Java-specific and therefore not relevant for us.

It would therefore be practical if the languages were included in the documentation, e.g. via:
Image
In case it is for all languages it could be Languages: all (I think there should be a badge even in this case, so it is clear, that no one missed to document this).

In case of specific required versions of the standard, it could look like this:

Image

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