[clang] [llvm] [clang-format] Add CI check confirming ClangFormatStyleOptions.rst is up-to-date. (PR #111513)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 6 23:00:29 PST 2024
================
@@ -53,3 +53,10 @@ foreach (file IN LISTS files)
endforeach ()
add_custom_target(clang-format-check-format DEPENDS ${check_format_depends})
+
+add_custom_target(clang-format-style-options
+ COMMAND "${Python3_EXECUTABLE}" dump_format_style.py
+ WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../../docs/tools"
+ DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/../../include/clang/Format/Format.h"
+ "${CMAKE_CURRENT_SOURCE_DIR}/../../include/clang/Tooling/Inclusions/IncludeStyle.h")
----------------
owenca wrote:
Seems this would fix https://github.com/llvm/llvm-project/pull/111513/files#r1815884464:
```suggestion
set(style_options_depends ${CLANG_SOURCE_DIR}/docs/ClangFormatStyleOptions.rst)
add_custom_command(OUTPUT ${style_options_depends}
COMMAND ${Python3_EXECUTABLE} dump_format_style.py
WORKING_DIRECTORY ${CLANG_SOURCE_DIR}/docs/tools
DEPENDS ${CLANG_SOURCE_DIR}/include/clang/Format/Format.h
${CLANG_SOURCE_DIR}/include/clang/Tooling/Inclusions/IncludeStyle.h
)
add_custom_target(clang-format-style-options DEPENDS ${style_options_depends})
```
https://github.com/llvm/llvm-project/pull/111513
More information about the cfe-commits
mailing list