[PATCH] D157390: [clang-tidy][include-cleaner] Add option to control deduplication of findings per symbol

Viktoriia Bakalova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 8 06:26:23 PDT 2023


VitaNuo accepted this revision.
VitaNuo added a comment.
This revision is now accepted and ready to land.

Thanks.



================
Comment at: clang-tools-extra/clang-tidy/misc/IncludeCleanerCheck.h:48
+  // Whether emit only one finding per usage of a symbol.
+  const bool EmitOnce;
   llvm::SmallVector<llvm::Regex> IgnoreHeadersRegex;
----------------
Nit: let's name this similar or same to the option, i.e., `const bool DeduplicateFindings`. It might be easier to digest.


================
Comment at: clang-tools-extra/unittests/clang-tidy/IncludeCleanerTest.cpp:150
+              "no header providing \"bar\" is directly included");
+    EXPECT_EQ(Errors.back().Message.Message,
+              "no header providing \"bar\" is directly included");
----------------
Nit: check that these are actually different findings (i.e., stemming from different symbol refs).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D157390/new/

https://reviews.llvm.org/D157390



More information about the cfe-commits mailing list