This fixes the regex in ClangFormatStyleOptions for IncludeCategories to match anything starting with < or starting with | AND followed by (gtest|gmock|isl|json) then /.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM, but just to be clear: current regex matches everything starting with < or starting with " and followed by gtest|gmock|isl|json and followed by /. Please update the description when landing.
Yes, the regex tester you used needs escaping the slash as it uses sed-like expressions. But clang-format doesn't need escaping it.
just to be clear: current regex matches everything starting with < or starting with " and followed by gtest|gmock|isl|json and followed by /.
Sorry, when I mean "current", I meant the current main branch. The main branch matches everything starting with < or " (which is everything).
My patch matches everything starting with < or " and followed by gtest|gmock|isl|json and followed by /.
I did understand it this way. I just wanted to underline that, before this patch, it matched:
- < followed by anything,
or
- " followed by (gtest|gmock|isl|json)/
So it didn't match just " with whatever after.
Anyway, just nitpicking.
Your patch is good. Thanks!
The change has to be done in the Format.h and then run dump_format_style.py, not directly in the rst.
Also please provide the context in the diff.
Sorry, I'm not sure why I'm getting "Context not available." I'm just copying raw output from git diff --staged
clang/docs/ClangFormatStyleOptions.rst | ||
---|---|---|
3239 | Why is there a trailing whitespace? Did you run dump_format_style.py to generate this file? |
clang/docs/ClangFormatStyleOptions.rst | ||
---|---|---|
3239 | Yeah, I ran dump_format_style.py and didn't touch anything in the generated output. Someone must have added it on accident. |
What are the name and email address you want use for the author of the patch? See here.
Why is there a trailing whitespace? Did you run dump_format_style.py to generate this file?