[PATCH] D40671: [clang-tidy] Support specific categories for NOLINT directive

Jonas Toth via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 30 23:20:17 PST 2017


JonasToth added a comment.

Could you please explain what category means? Could i disable all of `cppcoreguidelines` with something like `// NOLINT (cppcoreguidelines-*)`?



================
Comment at: clang-tidy/ClangTidyDiagnosticConsumer.cpp:297
+  if (NolintIndex != StringRef::npos) {
+    auto BracketIndex = NolintIndex + NolintMacro.size();
+    if (BracketIndex < Line.size() && Line[BracketIndex] == '(') {
----------------
Maybe some comments whats happening might be helpfull. It would simplify later modifications.


================
Comment at: test/clang-tidy/nolintnextline.cpp:14
+
+// NOLINTNEXTLINE(not-closed-bracket-is-treated-as-skip-all
+class C2 { C2(int i); };
----------------
missing `)`


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D40671





More information about the cfe-commits mailing list