Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
SunBlack opened this issue Apr 4, 2025 · 1 comment
Open

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

SunBlack opened this issue Apr 4, 2025 · 1 comment

Comments

@SunBlack
Copy link

SunBlack commented Apr 4, 2025

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

@llvmbot
Copy link
Member

llvmbot commented Apr 4, 2025

@llvm/issue-subscribers-clang-format

Author: SunBlack (SunBlack)

Sometimes we waste some time thinking about whether a new check is relevant for us. For example, the [`AllowShortCaseExpressionOnASingleLine`](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants