mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
Step 1 of source reorganization - rename the JavaScript runtime directory from bun.js to buntime for better discoverability. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
48 lines
880 B
CMake
48 lines
880 B
CMake
# https://clang.llvm.org/docs/ClangFormat.html
|
|
|
|
file(GLOB BUN_H_SOURCES LIST_DIRECTORIES false ${CONFIGURE_DEPENDS}
|
|
${CWD}/src/buntime/bindings/*.h
|
|
${CWD}/src/buntime/modules/*.h
|
|
)
|
|
|
|
set(CLANG_FORMAT_SOURCES ${BUN_C_SOURCES} ${BUN_CXX_SOURCES} ${BUN_H_SOURCES})
|
|
|
|
register_command(
|
|
TARGET
|
|
clang-format-check
|
|
COMMENT
|
|
"Running clang-format"
|
|
COMMAND
|
|
${CLANG_FORMAT_PROGRAM}
|
|
-Werror
|
|
--dry-run
|
|
--verbose
|
|
${CLANG_FORMAT_SOURCES}
|
|
ALWAYS_RUN
|
|
)
|
|
|
|
register_command(
|
|
TARGET
|
|
clang-format
|
|
COMMENT
|
|
"Fixing clang-format"
|
|
COMMAND
|
|
${CLANG_FORMAT_PROGRAM}
|
|
-i # edits files in-place
|
|
--verbose
|
|
${CLANG_FORMAT_SOURCES}
|
|
ALWAYS_RUN
|
|
)
|
|
|
|
register_command(
|
|
TARGET
|
|
clang-format-diff
|
|
COMMENT
|
|
"Running clang-format on changed files"
|
|
COMMAND
|
|
${CLANG_FORMAT_DIFF_COMMAND}
|
|
CWD
|
|
${BUILD_PATH}
|
|
ALWAYS_RUN
|
|
)
|