[PATCH] D141144: [clang-tidy][doc] Improve clang-tidy documentation

Carlos Galvez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 10 09:33:34 PST 2023


carlosgalvezp added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:34
 
+static StringRef TrimFirstChar(StringRef x) { return x.substr(1); }
+
----------------
njames93 wrote:
> This seems a bit of a needless change,  if you want to remove the newline, just in date the raw string literal and remove the empty line
I'm not sure I understand what you mean by "just in date the raw string", could you clarify?

In Diff 7 I fixed this without `TrimFirstChar`, but it leads to fairly inconsistent code, where the first `R"(` needs to be part of the first line of text:

```
R"(some text
some more text
)"
```

versus:

```
R"(
some text
some more text
)"
```

Let me know which option you prefer.


================
Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:82
     CheckOptions:
-      some-check.SomeOption: 'some value'
+      - key:    some-check.SomeOption
+        value: 'some value'
----------------
njames93 wrote:
> This change can be reverted.
Thanks, I didn't know it was another valid way to write it! Will fix


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141144



More information about the cfe-commits mailing list