From baae7726a72f0dcd4bbbf822696f9cea89f2787f Mon Sep 17 00:00:00 2001 From: Robert Schulze Date: Thu, 18 Aug 2022 10:06:33 +0000 Subject: [PATCH] style: "Fix" style check in CI --- src/Functions/throwIf.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Functions/throwIf.cpp b/src/Functions/throwIf.cpp index ff5488f98a9..75e191142a5 100644 --- a/src/Functions/throwIf.cpp +++ b/src/Functions/throwIf.cpp @@ -22,6 +22,11 @@ namespace ErrorCodes namespace { +/// The regex-based code style check script in CI complains when it sees "ErrorCodes:: ErrorCode" (space added to avoid another match). +/// Because this expression is only used in this file, don't add some suppression mechanism to the already complex style checker, instead +/// work around by creating a namespace alias. +namespace ErrorCodeAlias = ErrorCodes; + /// Throw an exception if the argument is non zero. class FunctionThrowIf : public IFunction, WithContext { @@ -91,7 +96,7 @@ public: custom_message = message_column->getValue(); } - std::optional custom_error_code; + std::optional custom_error_code; if (arguments.size() == 3) { if (!isColumnConst(*(arguments[2].column))) @@ -123,7 +128,7 @@ public: private: template - ColumnPtr execute(const IColumn * in_untyped, const std::optional & message, const std::optional & error_code) const + ColumnPtr execute(const IColumn * in_untyped, const std::optional & message, const std::optional & error_code) const { const auto * in = checkAndGetColumn>(in_untyped);