ReSharper 2020.3 Help

Order of #includes

ReSharper | Options | Code Editing | C++ | Order of #includes

On this page, you can configure the #include ordering settings.

Sort include directives

Enable inspection 'Order of #include directives does not match code style settings'Select this option to highlight any #include directives that violate the sorting order.
Preserve existing #include groups during a sortThis option lets you configure whether the default sorting action should regroup all directives or sort each group separately.
Case-sensitive sortSelect this option to sort all include directives of the same category as follows: place includes starting with uppercase letters before those starting with lowercase letters.
Group headers by directorySelect this option to create groups of headers based on their file path.
Sort orderCustomize the sorting rules: order precompiled headers, the main header for the current file, add blank lines to separate your groups and find the place for all #include directives with names that match a regular expression pattern.

Main source file suffix

Regular expression for main source file suffixSpecify a regular expression pattern to determine the main header for the current file.
Consider only quoted includes as potential main headersSelect this option to improve main header detection.
Last modified: 05 April 2021