[PATCH] D64695: [clang-format] Added new style rule: SortNetBSDIncludes
Manikishan Ghantasala via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 15 01:51:32 PDT 2019
Manikishan added inline comments.
Comment at: unittests/Format/SortIncludesTest.cpp:709
+ "#include \"pathnames.h\"\n",
+ sort("#include <sys/param.h>\n"
+ "#include <sys/types.h>\n"
> should you add a test which has groups defined already, I'm unclear as to how your algorithm works across groups?
The include groups in NetBSD files are made depending on the use, for example
Kernel headers, File systems headers, Network and protocol headers are grouped together.
My algorithm is to detect the include type by regex and assign a priority to them to sort. And to regroup I used IncludeCategories.
CHANGES SINCE LAST ACTION
More information about the cfe-commits