[llvm-dev] clang-tidy makes review a pain

Michael Kruse via llvm-dev llvm-dev at lists.llvm.org
Mon Apr 19 11:50:32 PDT 2021


Am Mo., 19. Apr. 2021 um 10:51 Uhr schrieb Maxim Kazantsev via
llvm-dev <llvm-dev at lists.llvm.org>:
> Putting comments like "you have bad formatting" is off course important. But when I'm reviewing the patches, I'm much more focused on correctness of the logic and its efficiency. And this part is getting much harder because code is flooded with these formatting comments that cannot be disabled.

I see this the different way around. Incorrectly formatted code shows
me that the author has not invested the time to clean up their patch
to make it readable for the reviewer. The formatting standard is to
make the code easier to read which is as important when reviewing as
when looking at the code once committed. As a reviewer, I will remark
anything that seems off, including formatting. And since reformatting
is easy for the author, I think a reviewer can expect these
automatically found items to be addressed before looking at it.

Personally, I add a [style] tag to my reviewer remarks for things that
violate the source formatting style. I.e it's not something that would
block the patch, but should be uncontroversial (e.g. mandated by the
coding standard) and addressed before pushing the patch even if I
accepted the patch already.

Michael


More information about the llvm-dev mailing list