Includes sorting options.
More...
#include "clang/Format/Format.h"
|
| bool | Enabled |
| | If true, includes are sorted based on the other suboptions below.
|
| bool | IgnoreCase |
| | Whether or not includes are sorted in a case-insensitive fashion.
|
| bool | IgnoreExtension |
| | When sorting includes in each block, only take file extensions into account if two includes compare equal otherwise.
|
| bool | Natural |
| | Whether or not includes are sorted by natural ordering i.e., whether embedded runs of digits are compared as numbers rather than sequences of characters.
|
| bool | FilesBeforeFolders |
| | When true, sort includes so that files in a directory appear before subdirectories at each level, recursively.
|
Includes sorting options.
Definition at line 5087 of file Format.h.
◆ operator!=()
◆ operator==()
◆ Enabled
| bool clang::format::FormatStyle::SortIncludesOptions::Enabled |
If true, includes are sorted based on the other suboptions below.
(Never is deprecated by Enabled: false.)
Definition at line 5090 of file Format.h.
◆ FilesBeforeFolders
| bool clang::format::FormatStyle::SortIncludesOptions::FilesBeforeFolders |
When true, sort includes so that files in a directory appear before subdirectories at each level, recursively.
Within a level, files and folders are each sorted alphabetically. When false (default), sorts includes purely alphabetically.
This option is a secondary sort key within each Priority group defined by IncludeCategories. Includes in different Priority groups are still separated by that primary ordering.
true: false (default):
#include "x.h" vs. #include "bar/alpha/e.h"
#include "y.h" #include "bar/alpha/f.h"
#include "z.h" #include "bar/beta/d.h"
#include "bar/g.h" #include "bar/g.h"
#include "bar/h.h" #include "bar/h.h"
#include "bar/i.h" #include "bar/i.h"
#include "bar/alpha/e.h" #include "foo/a.h"
#include "bar/alpha/f.h" #include "x.h"
#include "bar/beta/d.h" #include "y.h"
#include "foo/a.h" #include "z.h"
Definition at line 5142 of file Format.h.
◆ IgnoreCase
| bool clang::format::FormatStyle::SortIncludesOptions::IgnoreCase |
Whether or not includes are sorted in a case-insensitive fashion.
(CaseSensitive and CaseInsensitive are deprecated by IgnoreCase: false and IgnoreCase: true, respectively.)
true: false:
#include "A/B.h" vs. #include "A/B.h"
#include "A/b.h" #include "A/b.h"
#include "a/b.h" #include "B/A.h"
#include "B/A.h" #include "B/a.h"
#include "B/a.h" #include "a/b.h"
Definition at line 5102 of file Format.h.
◆ IgnoreExtension
| bool clang::format::FormatStyle::SortIncludesOptions::IgnoreExtension |
When sorting includes in each block, only take file extensions into account if two includes compare equal otherwise.
true: false:
# include "A.h" vs. # include "A-util.h"
# include "A.inc" # include "A.h"
# include "A-util.h" # include "A.inc"
Definition at line 5111 of file Format.h.
◆ Natural
| bool clang::format::FormatStyle::SortIncludesOptions::Natural |
Whether or not includes are sorted by natural ordering i.e., whether embedded runs of digits are compared as numbers rather than sequences of characters.
true: false:
#include "A2.h" vs. #include "A10.h"
#include "A10.h" #include "A2.h"
Definition at line 5120 of file Format.h.
The documentation for this struct was generated from the following file: