From 02124002c88d7a89d6c9afd89857c4c301e09801 Mon Sep 17 00:00:00 2001 From: Dave Tucker Date: Fri, 11 Aug 2023 10:28:46 +0100 Subject: [PATCH] .github: Add clang-format Signed-off-by: Dave Tucker --- .github/workflows/ci.yml | 3 +++ aya-obj/include/linux_wrapper.h | 8 ++++---- bpf/aya-bpf-bindings/include/bindings.h | 6 +++--- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e9eece29..1ff70200 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,9 @@ jobs: with: tool: cargo-hack,taplo-cli + - name: Check C formatting + run: git ls-files -- '*.c' '*.h' | xargs clang-format --dry-run --Werror + - run: taplo fmt --check - name: Check formatting diff --git a/aya-obj/include/linux_wrapper.h b/aya-obj/include/linux_wrapper.h index 58ffa680..8be2459a 100644 --- a/aya-obj/include/linux_wrapper.h +++ b/aya-obj/include/linux_wrapper.h @@ -1,11 +1,11 @@ +#include #include #include -#include #include -#include -#include -#include +#include #include +#include +#include /* workaround the fact that bindgen can't parse the IOC macros */ int AYA_PERF_EVENT_IOC_ENABLE = PERF_EVENT_IOC_ENABLE; diff --git a/bpf/aya-bpf-bindings/include/bindings.h b/bpf/aya-bpf-bindings/include/bindings.h index b2f3b072..05344214 100644 --- a/bpf/aya-bpf-bindings/include/bindings.h +++ b/bpf/aya-bpf-bindings/include/bindings.h @@ -3,9 +3,9 @@ // https://elixir.bootlin.com/linux/v5.13/source/include/uapi/linux/types.h typedef __u32 __bitwise __wsum; +#include "bpf_helpers.h" #include -#include -#include // needed for TC_ACT_* #include -#include "bpf_helpers.h" \ No newline at end of file +#include +#include