From f4be784403e83db4ec0f8fd079627b40519e9430 Mon Sep 17 00:00:00 2001 From: Robert Vollmer Date: Thu, 1 Aug 2024 00:45:36 +0200 Subject: [PATCH] Disable formatter in `src/lib/*` (#138) Otherwise VS Code reformats the whole file while working on submodules (if "Format on save" is activated). The submodules aren't prepared for this yet (no "format all files" commit) and should include their own definitions anyway, especially since they could be third-party with different ideas of code style. The solution was taken from https://stackoverflow.com/a/57272592/25601664 I also tried creating a `.clang-format-ignore` file with content `src/lib/*`, but couldn't get it working. --- src/lib/.clang-format | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 src/lib/.clang-format diff --git a/src/lib/.clang-format b/src/lib/.clang-format new file mode 100644 index 00000000..47a38a93 --- /dev/null +++ b/src/lib/.clang-format @@ -0,0 +1,2 @@ +DisableFormat: true +SortIncludes: Never