From 277830bc3c14dd8d9fe09ac86980a2abcaf336bb Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Tue, 8 Oct 2024 12:19:44 -0400 Subject: [PATCH] format: Sort includes. Yes, please. --- .clang-format | 2 +- src/httpd.js.c | 2 +- src/mem.c | 3 +-- src/serialize.c | 2 +- src/ssb.connections.c | 2 +- src/ssb.js.c | 2 +- src/ssb.rpc.c | 2 +- src/task.c | 4 ++-- src/taskstub.js.c | 2 +- src/tests.c | 2 +- src/tlscontext.js.c | 2 +- 11 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.clang-format b/.clang-format index a2465b3f..a565874d 100644 --- a/.clang-format +++ b/.clang-format @@ -14,7 +14,7 @@ IndentWidth: 4 MaxEmptyLinesToKeep: 1 ObjCBlockIndentWidth: 4 ObjCBreakBeforeNestedBlockParam: false -SortIncludes: false +SortIncludes: true TabWidth: 4 UseTab: Always ... diff --git a/src/httpd.js.c b/src/httpd.js.c index 7316601d..6a8a1678 100644 --- a/src/httpd.js.c +++ b/src/httpd.js.c @@ -4,8 +4,8 @@ #include "http.h" #include "log.h" #include "mem.h" -#include "ssb.h" #include "ssb.db.h" +#include "ssb.h" #include "task.h" #include "tlscontext.js.h" #include "trace.h" diff --git a/src/mem.c b/src/mem.c index 031a2b1a..456e8299 100644 --- a/src/mem.c +++ b/src/mem.c @@ -2,15 +2,14 @@ #include "util.js.h" -#include "uv.h" #include "quickjs.h" #include "sqlite3.h" #include "uv.h" #include -#include #include +#include typedef struct _tf_mem_node_t tf_mem_node_t; diff --git a/src/serialize.c b/src/serialize.c index faec3527..ce6078cc 100644 --- a/src/serialize.c +++ b/src/serialize.c @@ -6,9 +6,9 @@ #include "trace.h" #include "util.js.h" +#include #include #include -#include #include diff --git a/src/ssb.connections.c b/src/ssb.connections.c index 4aba7bc5..1e99f97f 100644 --- a/src/ssb.connections.c +++ b/src/ssb.connections.c @@ -4,8 +4,8 @@ #include "mem.h" #include "ssb.h" -#include "uv.h" #include "sqlite3.h" +#include "uv.h" #include diff --git a/src/ssb.js.c b/src/ssb.js.c index 3d187962..8f037eef 100644 --- a/src/ssb.js.c +++ b/src/ssb.js.c @@ -13,8 +13,8 @@ #include "sodium/crypto_secretbox.h" #include "sodium/crypto_sign.h" #include "sodium/randombytes.h" -#include "string.h" #include "sqlite3.h" +#include "string.h" #include "uv.h" #include diff --git a/src/ssb.rpc.c b/src/ssb.rpc.c index 4c389750..7927e2a0 100644 --- a/src/ssb.rpc.c +++ b/src/ssb.rpc.c @@ -2,8 +2,8 @@ #include "log.h" #include "mem.h" -#include "ssb.h" #include "ssb.db.h" +#include "ssb.h" #include "util.js.h" #include "sqlite3.h" diff --git a/src/task.c b/src/task.c index 04b802e1..4a09fa39 100644 --- a/src/task.c +++ b/src/task.c @@ -27,12 +27,12 @@ #include #include -#include #include +#include #if !defined(_WIN32) -#include #include +#include #endif #if defined(_WIN32) diff --git a/src/taskstub.js.c b/src/taskstub.js.c index 80c38df2..e7901d6c 100644 --- a/src/taskstub.js.c +++ b/src/taskstub.js.c @@ -7,8 +7,8 @@ #include "task.h" #include "util.js.h" -#include #include +#include #ifdef _WIN32 #include diff --git a/src/tests.c b/src/tests.c index e34ac4b3..818f97c3 100644 --- a/src/tests.c +++ b/src/tests.c @@ -9,8 +9,8 @@ #include #include -#include #include +#include #include #include diff --git a/src/tlscontext.js.c b/src/tlscontext.js.c index eacaec14..5e47f77f 100644 --- a/src/tlscontext.js.c +++ b/src/tlscontext.js.c @@ -5,8 +5,8 @@ #include "task.h" #include "tls.h" -#include #include +#include static JSClassID _classId; static int _count;