First, I love this bot:) It makes LLVM's "pushing to master" practise less awful:)
Now the main topic...
clang-tidy: fail. Please fix clang-tidy findings.
For example, on ⚙ D72103 [Sema] Avoid using an invalid InsertPos ,
merge_guards_bot reports clang-tidy findings of existing code, not just
the modified code.
I think https://github.com/google/llvm-premerge-checks should use
--line-filter= as clang-tidy/tool/clang-tidy-diff.py does.
clang-format: fail. Please format your changes with clang-format by running git-clang-format HEAD^ or applying this patch.
Similarly, clang-format should use --lines to filter out untouched code.
I second Fangrui's findings and add:
- clang-format should only run on "source" files. For one, it runs on
non-C/C++ files right now with the results you can imagine. Even if it
is a C/C++ test we do not always want to format it.
- it would be perfect if the linter would not report issues that are
present in the surrounding code, e.g., if the naming scheme is kept
consistent with the surrounding code it should not report it as
problematic. For example, since the functions in ADT/SetOperations.h
are all flagged as problematic which means if you add one in the same
style it is flagged as well.
I already file a bug report to request not to format the tests .
Mark de Wever
I’m glad you like the tool!
We got a bunch of issues reported around clang-tidy, so Mikhail disabled it today. Since the thread has a few other points, I created a separate issue  for it.
The linter script  is already using clang-tidy-diff on the git diff. So it should only look into changed lines…