[clang] [clang-format] Add FilesBeforeFolders option to SortIncludes (PR #208954)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 3 13:58:38 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 56405 tests passed
* 1551 tests skipped
* 1 test failed
## Failed Tests
(click on a test name to see its output)
### Clang
<details>
<summary>Clang.Format/docs_updated.test</summary>
```
Exit Code: 1
Command Output (stdout):
--
# RUN: at line 1
"C:\Python312\python.exe" C:\_work\llvm-project\llvm-project\clang\test\Format/../../docs/tools/dump_format_style.py -o C:\_work\llvm-project\llvm-project\build\tools\clang\test\Format\Output\docs_updated.test.tmp.style
# executed command: 'C:\Python312\python.exe' 'C:\_work\llvm-project\llvm-project\clang\test\Format/../../docs/tools/dump_format_style.py' -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Format\Output\docs_updated.test.tmp.style'
# note: command had no output on stdout or stderr
# RUN: at line 2
diff --strip-trailing-cr C:\_work\llvm-project\llvm-project\build\tools\clang\test\Format\Output\docs_updated.test.tmp.style C:\_work\llvm-project\llvm-project\clang\test\Format/../../docs/ClangFormatStyleOptions.md
# executed command: diff --strip-trailing-cr 'C:\_work\llvm-project\llvm-project\build\tools\clang\test\Format\Output\docs_updated.test.tmp.style' 'C:\_work\llvm-project\llvm-project\clang\test\Format/../../docs/ClangFormatStyleOptions.md'
# .---command stdout------------
# | *** C:\_work\llvm-project\llvm-project\build\tools\clang\test\Format\Output\docs_updated.test.tmp.style
# | --- C:\_work\llvm-project\llvm-project\clang\test\Format/../../docs/ClangFormatStyleOptions.md
# | ***************
# | *** 7006,7012 ****
# | #include "A10.h" #include "A2.h"
# | ```
# |
# | ! - `bool 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.
# | --- 7006,7012 ----
# | #include "A10.h" #include "A2.h"
# | ```
# |
# | ! - ``bool 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.
# | ***************
# | *** 7027,7034 ****
# | #include "bar/alpha/f.h" #include "x.h"
# | #include "bar/beta/d.h" #include "y.h"
# | #include "foo/a.h" #include "z.h"
# | ! ```
# | !
# |
# | (sortjavastaticimport)=
# |
# | --- 7027,7033 ----
# | #include "bar/alpha/f.h" #include "x.h"
# | #include "bar/beta/d.h" #include "y.h"
# | #include "foo/a.h" #include "z.h"
# | ! ``
# |
# | (sortjavastaticimport)=
# |
# `-----------------------------
# error: command failed with exit status: 1
--
```
</details>
If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.
https://github.com/llvm/llvm-project/pull/208954
More information about the cfe-commits
mailing list