From 5ec3db20cd2d037dc1834d7ca786e0bb0754f19d Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Fri, 23 Nov 2018 21:55:43 +0300 Subject: [PATCH] More style checks [#CLICKHOUSE-2] --- utils/check-style/check-style | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/check-style/check-style b/utils/check-style/check-style index 6248f9f4ad..a79d24568d 100755 --- a/utils/check-style/check-style +++ b/utils/check-style/check-style @@ -16,5 +16,5 @@ ROOT_PATH=$(git rev-parse --show-toplevel) find $ROOT_PATH/dbms -name '*.h' -or -name '*.cpp' | grep -vP 'Compiler|build' | - xargs grep $@ -P '((class|struct|namespace|enum|if|for|while|else|throw|switch).*|\)(\s*const)?(\s*override)?\s*)\{$|\s$|\t|^ {1,3}[^\* ]\S|\t|^\s*(if|else if|for|while|catch|switch)\(' + xargs grep $@ -P '((class|struct|namespace|enum|if|for|while|else|throw|switch).*|\)(\s*const)?(\s*override)?\s*)\{$|\s$|\t|^ {1,3}[^\* ]\S|\t|^\s*(if|else if|if constexpr|else if constexpr|for|while|catch|switch)\(' # a curly brace not in a new line, but not for the case of C++11 init or agg. initialization | trailing whitespace | number of ws not a multiple of 4, but not in the case of comment continuation | a tab character | missing whitespace after for/if/while... before opening brace