pmemfile icon indicating copy to clipboard operation
pmemfile copied to clipboard

Replace clang-format with a more appropriate tool

Open GBuella opened this issue 7 years ago • 0 comments

The clang-format tool is meant to format code, and not for checking the style of existing code. Such errors are rather annoying:

Style check using /usr/bin/clang-format for file /home/tej/code/pmemfile/tests/posix/stat/stat.cpp failed
@@ -164,9 +164,9 @@

 TEST_F(stat_test, stat_big_file)
 {
-	PMEMfile *f = pmemfile_open(pfp, "/file1", PMEMFILE_O_CREAT |
-					    PMEMFILE_O_EXCL | PMEMFILE_O_WRONLY,
-				    0644);
+	PMEMfile *f = pmemfile_open(
+		pfp, "/file1",
+		PMEMFILE_O_CREAT | PMEMFILE_O_EXCL | PMEMFILE_O_WRONLY, 0644);
 	ASSERT_NE(f, nullptr) << strerror(errno);

This seems to be because clang-format 4.0 differs somewhat from clang-format 3.8

GBuella avatar May 01 '17 17:05 GBuella