[PATCH] D150872: [clang-tidy] Add support for new TODO style to google-readability-todo

Nathan James via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 18 09:39:47 PDT 2023


njames93 added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/google/TodoCommentCheck.cpp:97
     : ClangTidyCheck(Name, Context),
+      UseV2Style(Options.getLocalOrGlobal("UseV2Style", false)),
       Handler(std::make_unique<TodoCommentHandler>(
----------------
Given this check is part of the google module, doesn't it make sense to have the default as what google now recommends.


================
Comment at: clang-tools-extra/docs/clang-tidy/checks/google/readability-todo.rst:6
 
 Finds TODO comments without a username or bug number.
 
----------------
Maybe update this line to something along with lines of
`Finds TODO comments not conforming to googles style guidelines`


================
Comment at: clang-tools-extra/docs/clang-tidy/checks/google/readability-todo.rst:16-18
+.. option:: User
+
+   The username to use when suggesting an edit to a TODO comment. Only relevant to V1 style.
----------------
This shouldn't appear in the options, as it isn't read from the `CheckOptions`


================
Comment at: clang-tools-extra/docs/clang-tidy/checks/google/readability-todo.rst:22
+
+   Whether to check TODO comments against the new TODO style, specifically:
+   ```
----------------
It would be good to specify the default value of this option(or just the default behaviour of the check)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150872



More information about the cfe-commits mailing list