Skip to content

Commit acadd8c

Browse files
authored
[Tool] Fix check-format.sh script missing files in be/test directory (StarRocks#24978)
Signed-off-by: sduzh <[email protected]>
1 parent 8618ad4 commit acadd8c

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

be/test/block_cache/block_cache_test.cpp

+2-6
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,9 @@ static const size_t block_size = 1024 * 1024;
2828

2929
class BlockCacheTest : public ::testing::Test {
3030
protected:
31-
static void SetUpTestCase() {
32-
ASSERT_TRUE(fs::create_directories("./ut_dir/block_disk_cache").ok());
33-
}
31+
static void SetUpTestCase() { ASSERT_TRUE(fs::create_directories("./ut_dir/block_disk_cache").ok()); }
3432

35-
static void TearDownTestCase() {
36-
ASSERT_TRUE(fs::remove_all("./ut_dir").ok());
37-
}
33+
static void TearDownTestCase() { ASSERT_TRUE(fs::remove_all("./ut_dir").ok()); }
3834

3935
void SetUp() override {}
4036
void TearDown() override {}

build-support/check-format.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,8 @@ export STARROCKS_HOME=`cd "${ROOT}/.."; pwd`
3030

3131
CLANG_FORMAT=${CLANG_FORMAT_BINARY:=$(which clang-format)}
3232

33-
python3 ${STARROCKS_HOME}/build-support/run_clang_format.py --clang_format_binary="${CLANG_FORMAT}" --source_dirs="${STARROCKS_HOME}/be/src,${STARROCKS_HOME}/be/test" --quiet
33+
python3 ${STARROCKS_HOME}/build-support/run_clang_format.py --clang_format_binary="${CLANG_FORMAT}" \
34+
--source_dirs="${STARROCKS_HOME}/be/src","${STARROCKS_HOME}/be/test" \
35+
--exclude_globs="${STARROCKS_HOME}/build-support/excludes" --quiet
36+
3437

build-support/run_clang_format.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ def _check_dir(arguments, source_dir, exclude_globs):
8181
# if any clang-format reported a parse error, bubble it
8282
returncode, stdout, stderr = res
8383
if returncode != 0:
84-
print(stderr)
8584
sys.exit(returncode)
8685
checker_args.append((filename, stdout))
8786

@@ -105,7 +104,8 @@ def _check_dir(arguments, source_dir, exclude_globs):
105104
finally:
106105
pool.terminate()
107106
pool.join()
108-
sys.exit(1 if error else 0)
107+
if error:
108+
sys.exit(1)
109109

110110

111111
if __name__ == "__main__":

0 commit comments

Comments
 (0)