Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Commit

Permalink
grep "<replacement " for clang-format error (#2352)
Browse files Browse the repository at this point in the history
  • Loading branch information
yxlao authored and rkimballn1 committed Jan 21, 2019
1 parent 21ddd4a commit e8b1ece
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmake/Modules/style_check.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e8b1ece

Please sign in to comment.