[clang] fee77a2 - Disable clang-format entirely for test directories
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 8 04:36:31 PDT 2022
Author: Aaron Ballman
Date: 2022-07-08T07:34:18-04:00
New Revision: fee77a20732cb629629c52123643fa5928ebfc1c
URL: https://github.com/llvm/llvm-project/commit/fee77a20732cb629629c52123643fa5928ebfc1c
DIFF: https://github.com/llvm/llvm-project/commit/fee77a20732cb629629c52123643fa5928ebfc1c.diff
LOG: Disable clang-format entirely for test directories
See discussion here:
https://github.com/llvm/llvm-project/issues/55982
And the RFC here:
https://discourse.llvm.org/t/rfc-disable-clang-format-in-the-clang-test-tree/63498/2
We don't generally expect test files to be formatted according to the
style guide. Indeed, some tests may require specific formatting for the
purposes of the test.
When tests intentionally do not conform to the "correct" formatting,
this causes errors in the CI, which can drown out real errors and causes
people to stop trusting the CI over time.
>From the history of the clang/test/.clang-format file, it looks as if
there have been attempts to make clang-format do a subset of formatting
that would be useful for tests. However, it looks as if it's hard to
make clang-format do exactly the right thing -- see the back-and-forth
between
13316a7
and
7b5bddf.
These changes disable the .clang-format file for clang/test, llvm/test,
and clang-tools-extra/test.
Fixes #55982
Differential Revision: https://reviews.llvm.org/D128706
Added:
Modified:
clang-tools-extra/test/.clang-format
clang/test/.clang-format
llvm/test/.clang-format
Removed:
################################################################################
diff --git a/clang-tools-extra/test/.clang-format b/clang-tools-extra/test/.clang-format
index 4799b66f3e9a6..e3845288a2aec 100644
--- a/clang-tools-extra/test/.clang-format
+++ b/clang-tools-extra/test/.clang-format
@@ -1,2 +1 @@
-BasedOnStyle: LLVM
-ColumnLimit: 0
+DisableFormat: true
diff --git a/clang/test/.clang-format b/clang/test/.clang-format
index f7fb083d1055d..e3845288a2aec 100644
--- a/clang/test/.clang-format
+++ b/clang/test/.clang-format
@@ -1,3 +1 @@
-BasedOnStyle: LLVM
-ColumnLimit: 0
-AlwaysBreakTemplateDeclarations: No
+DisableFormat: true
diff --git a/llvm/test/.clang-format b/llvm/test/.clang-format
index 4799b66f3e9a6..e3845288a2aec 100644
--- a/llvm/test/.clang-format
+++ b/llvm/test/.clang-format
@@ -1,2 +1 @@
-BasedOnStyle: LLVM
-ColumnLimit: 0
+DisableFormat: true
More information about the cfe-commits
mailing list