Commit e8b1ece5 authored by Yixing Lao's avatar Yixing Lao Committed by Robert Kimball

grep "<replacement " for clang-format error (#2352)

parent 21ddd4a5
......@@ -19,11 +19,11 @@ find_program(CLANG_FORMAT ${CLANG_FORMAT_FILENAME} PATHS ENV PATH)
macro(STYLE_CHECK_FILE PATH)
execute_process(COMMAND ${CLANG_FORMAT} -style=file -output-replacements-xml ${PATH}
OUTPUT_VARIABLE STYLE_CHECK_RESULT)
list(LENGTH STYLE_CHECK_RESULT RESULT_LENGTH)
if (RESULT_LENGTH GREATER 1)
list(APPEND ERROR_LIST ${PATH})
endif()
OUTPUT_VARIABLE STYLE_CHECK_RESULT
)
if("${STYLE_CHECK_RESULT}" MATCHES ".*<replacement .*")
list(APPEND ERROR_LIST ${PATH})
endif()
endmacro()
set(DIRECTORIES_OF_INTEREST
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment