Skip to content

Commit

Permalink
[FIX] Make ABORT_COMMIT respect global options
Browse files Browse the repository at this point in the history
  • Loading branch information
janstrohbeck committed Feb 25, 2019
1 parent a463aec commit b6d63ef
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ function(create_git_hook)
if(NOT DEFINED GCF_IGNORE_DIRS)
set(GCF_IGNORE_DIRS "")
endif()
if(NOT ${GCF_ABORT_COMMIT})
unset(GCF_ABORT_COMMIT)
endif()

# clang-format style
GCF_CHECK_OPTION_OR_DEFAULT("CLANG_FORMAT_STYLE" "file")
Expand All @@ -39,7 +42,7 @@ function(create_git_hook)
# Comma-separated list of tools to run
GCF_CHECK_OPTION_OR_DEFAULT("MODES" "format,lint")
# Abort commit if files would be formatted
GCF_CHECK_OPTION_OR_DEFAULT("ABORT_COMMIT" 0)
GCF_CHECK_OPTION_OR_DEFAULT("ABORT_COMMIT" FALSE)

# Comma-separated lists of formatters/linters for specific file types
GCF_CHECK_OPTION_OR_DEFAULT("cpp_FORMATTERS" "clang-format")
Expand Down

0 comments on commit b6d63ef

Please sign in to comment.