Skip to content

Conversation

@vbvictor
Copy link
Contributor

@vbvictor vbvictor commented Jul 10, 2025

Formatted config to column format, which is more readable.
Placed checks in alphabetical order.

Copy link
Contributor

@carlosgalvezp carlosgalvezp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Worth noting is that the YAML list format is only supported since a few releases back, so it can break for users with older clang-tidy.

@vbvictor
Copy link
Contributor Author

vbvictor commented Jul 10, 2025

LGTM. Worth noting is that the YAML list format is only supported since a few releases back, so it can break for users with older clang-tidy.

Thank you for noticing this, YAML list format is only 2 years old and LLVM promises backwards compatibility for 3 years of compilers. However, in CI we use clang-format-20.1.5 so a user who formats code with clang-format-19 could receive an invalid formatting error due to some bug that was fixed in clang-format-20.

Do we wish to support older versions of clang-tidy (that can't handle new config) or just stick to the latest one, WDYT?

My opinion is that as LLVM developers, we should use the latest version of our tools (that will run in CI), so having a config with new format would not be a big deal. People who use LLVM as a library and don't run clang-tidy over LLVM code, or do they?

@vbvictor
Copy link
Contributor Author

With this config, It's not a big deal. I will use format like in this one.
But generally speaking, should LLVM-based tools used in development have the same policy as compilers or not?

@EugeneZelenko
Copy link
Contributor

Do we wish to support older versions of clang-tidy (that can't handle new config) or just stick to the latest one, WDYT?

I think it's reasonable to run Clang-Tidy after first stage (or subsequent stages) build with newly built executable, so it's always latest and greatest.

Particular Clang-Tidy version is important to other projects which stick to some set of supported LLVM versions.

@vbvictor vbvictor changed the title format root clang-tidy config (NFC) Format root clang-tidy config (NFC) Jul 10, 2025
@carlosgalvezp
Copy link
Contributor

Yep I think it's reasonable to use a fairly new version for our own project, so I'm fine with using the list format. Just threw it up in the air in case there was some use case I wasn't aware of :)

@vbvictor
Copy link
Contributor Author

I think it's reasonable to use "old" format because it adds backwards compatibility with no readability drawbacks.

@EugeneZelenko
Copy link
Contributor

I think it's reasonable to use "old" format because it adds backwards compatibility with no readability drawbacks.

From other side Clang-Tidy has a lot of fixes in existing checks, so it's not very reasonable to run too old versions.

@vbvictor vbvictor merged commit b6b64f4 into llvm:main Jul 11, 2025
9 checks passed
@vbvictor vbvictor deleted the format-root-clang-tidy-config branch July 11, 2025 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants