Files
bun.sh/cmake/analysis/RunClangFormat.cmake
Claude Bot e84b4b4847 refactor: rename src/bun.js/ to src/buntime/
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>
2025-12-31 08:53:12 +00:00

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
)