@@ -570,6 +571,74 @@ static int dumpConfig(bool IsSTDIN) {
return 0;
}
+// Check whether `FilePath` is ignored according to the nearest
+// .clang-format-ignore file based on the rules below:
+// - A blank line is skipped.
+// - Leading and trailing spaces of a line are trim
@@ -570,6 +571,74 @@ static int dumpConfig(bool IsSTDIN) {
return 0;
}
+// Check whether `FilePath` is ignored according to the nearest
+// .clang-format-ignore file based on the rules below:
+// - A blank line is skipped.
+// - Leading and trailing spaces of a line are trim
HazardyKnusperkeks wrote:
In the description (and the commit messages?) you wrote `clang-format.ignore`
instead of `clang-format-ignore`.
https://github.com/llvm/llvm-project/pull/76327
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://l
@@ -570,6 +571,74 @@ static int dumpConfig(bool IsSTDIN) {
return 0;
}
+// Check whether `FilePath` is ignored according to the nearest
+// .clang-format-ignore file based on the rules below:
+// - A blank line is skipped.
+// - Leading and trailing spaces of a line are trim
@@ -570,6 +571,74 @@ static int dumpConfig(bool IsSTDIN) {
return 0;
}
+// Check whether `FilePath` is ignored according to the nearest
+// .clang-format-ignore file based on the rules below:
+// - A blank line is skipped.
+// - Leading and trailing spaces of a line are trim
@@ -570,6 +571,74 @@ static int dumpConfig(bool IsSTDIN) {
return 0;
}
+// Check whether `FilePath` is ignored according to the nearest
+// .clang-format-ignore file based on the rules below:
+// - A blank line is skipped.
+// - Leading and trailing spaces of a line are trim
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76327
>From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 24 Dec 2023 01:18:55 -0800
Subject: [PATCH 1/6] [clang-format] Add .clang-format.ignore for ignoring
files
Closes
@@ -570,6 +571,74 @@ static int dumpConfig(bool IsSTDIN) {
return 0;
}
+// Check whether `FilePath` is ignored according to the nearest
+// .clang-format-ignore file based on the rules below:
+// - A blank line is skipped.
+// - Leading and trailing spaces of a line are trim
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76327
>From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 24 Dec 2023 01:18:55 -0800
Subject: [PATCH 1/5] [clang-format] Add .clang-format.ignore for ignoring
files
Closes
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76327
>From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 24 Dec 2023 01:18:55 -0800
Subject: [PATCH 1/4] [clang-format] Add .clang-format.ignore for ignoring
files
Closes
@@ -0,0 +1,31 @@
+// RUN: rm -rf %t.dir
+// RUN: mkdir -p %t.dir/level1/level2
+
+// RUN: cd %t.dir
+// RUN: printf "%%s\n" "\*" "level*/*.c*" "*/*2/foo.*" > .clang-format-ignore
owenca wrote:
```suggestion
// RUN: echo "*" > .clang-format-ignore
// RUN: echo "le
@@ -0,0 +1,31 @@
+// RUN: rm -rf %t.dir
+// RUN: mkdir -p %t.dir/level1/level2
+
+// RUN: cd %t.dir
+// RUN: printf "%%s\n" "\*" "level*/*.c*" "*/*2/foo.*" > .clang-format-ignore
+// RUN: touch foo.cc
+// RUN: clang-format -verbose .clang-format-ignore foo.cc 2> %t.stderr
+// RUN:
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76327
>From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 24 Dec 2023 01:18:55 -0800
Subject: [PATCH 1/3] [clang-format] Add .clang-format.ignore for ignoring
files
Closes
https://github.com/owenca updated
https://github.com/llvm/llvm-project/pull/76327
>From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 24 Dec 2023 01:18:55 -0800
Subject: [PATCH 1/2] [clang-format] Add .clang-format.ignore for ignoring
files
Closes
@@ -131,6 +131,24 @@ An easy way to create the ``.clang-format`` file is:
Available style options are described in :doc:`ClangFormatStyleOptions`.
+You can create ``.clang-format-ignore`` files to make ``clang-format`` ignore
+certain files. A ``.clang-format-ignore`` file co
llvmbot wrote:
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-clang-format
Author: Owen Pan (owenca)
Changes
Closes #52975.
---
Full diff: https://github.com/llvm/llvm-project/pull/76327.diff
3 Files Affected:
- (modified) clang/docs/ClangFormat.rst (+18)
- (added) clang/test/Format/
https://github.com/owenca created
https://github.com/llvm/llvm-project/pull/76327
Closes #52975.
>From 4afd12db61528b40d842a7fbee9af37c2235822c Mon Sep 17 00:00:00 2001
From: Owen Pan
Date: Sun, 24 Dec 2023 01:18:55 -0800
Subject: [PATCH] [clang-format] Add .clang-format.ignore for ignoring fi
17 matches
Mail list logo