Skip to content

Commit

Permalink
add "make fix-format" command to format code automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
liuyuecai committed Nov 16, 2024
1 parent 27c8f0a commit 150ca0f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,13 @@ ADD_CUSTOM_TARGET(check-format
--source_dirs ${FORMAT_DIRS}
)

ADD_CUSTOM_TARGET(fix-format
COMMAND ${BUILD_SUPPORT_DIR}/run_clang_format.py
${CLANG_FORMAT_BIN}
${BUILD_SUPPORT_DIR}/clang_format_exclusions.txt
--source_dirs ${FORMAT_DIRS} --fix
)

ADD_CUSTOM_TARGET(clang-tidy
COMMAND ${BUILD_SUPPORT_DIR}/run_clang_tidy.py
-clang-tidy-binary ${CLANG_TIDY_BIN}
Expand Down

0 comments on commit 150ca0f

Please sign in to comment.