[embedder] Don't autoformat third-party repos.
Change-Id: I4480d9db8fb6e1136bf51a15b49eaacb72747c4f
diff --git a/README.md b/README.md
index af31325..23b9deb 100644
--- a/README.md
+++ b/README.md
@@ -10,9 +10,9 @@
## Requirements
-**If you're using WSL (Windows Subsystem for Linux), see
+If you're using WSL2 (Windows Subsystem for Linux), see
[SETUP_WINDOWS.md](https://fuchsia.googlesource.com/flutter-embedder/+/refs/heads/main/SETUP_WINDOWS.md)
-first.**
+first.
1. Set `$FUCHSIA_EMBEDDER_DIR` to your flutter-embedder.git checkout location,
for example `~/flutter-embedder`.
diff --git a/hooks/pre-commit b/hooks/pre-commit
index 9096de9..fcc899c 100755
--- a/hooks/pre-commit
+++ b/hooks/pre-commit
@@ -17,8 +17,9 @@
else
# Format any C++ code that is:
# 1. Being modified by the commit.
- # 2. Not from the engine repo, which has its own formatting rules.
- source_files="$(git diff --cached --name-only --diff-filter=ACM | grep -v "/engine/" | grep -E "\.(cc|h)$")"
+ # 2. Not copied from the engine repo, which has its own formatting rules.
+ # 3. Not in third_party repos, which have their own formatting rules.
+ source_files="$(git diff --cached --name-only --diff-filter=ACM | grep -v "/engine/" | grep -v "/third_party/" | grep -E "\.(cc|h)$")"
if [[ ! -z "$source_files" ]]
then
$clang_format -i $source_files
diff --git a/third_party/.clang-format b/third_party/.clang-format
new file mode 100644
index 0000000..a43d914
--- /dev/null
+++ b/third_party/.clang-format
@@ -0,0 +1,2 @@
+DisableFormat: true
+SortIncludes: false
\ No newline at end of file