Merge pull request #749 from dave-tucker/clang-format

.github: Add clang-format
reviewable/pr756/r1
Dave Tucker 1 year ago committed by GitHub
commit 8ce1c00ad8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,6 +30,9 @@ jobs:
with: with:
tool: cargo-hack,taplo-cli 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 - run: taplo fmt --check
- name: Check formatting - name: Check formatting

@ -1,11 +1,11 @@
#include <asm-generic/socket.h>
#include <linux/bpf.h> #include <linux/bpf.h>
#include <linux/btf.h> #include <linux/btf.h>
#include <linux/perf_event.h>
#include <linux/if_link.h> #include <linux/if_link.h>
#include <linux/rtnetlink.h> #include <linux/perf_event.h>
#include <asm-generic/socket.h>
#include <linux/pkt_sched.h>
#include <linux/pkt_cls.h> #include <linux/pkt_cls.h>
#include <linux/pkt_sched.h>
#include <linux/rtnetlink.h>
/* workaround the fact that bindgen can't parse the IOC macros */ /* workaround the fact that bindgen can't parse the IOC macros */
int AYA_PERF_EVENT_IOC_ENABLE = PERF_EVENT_IOC_ENABLE; int AYA_PERF_EVENT_IOC_ENABLE = PERF_EVENT_IOC_ENABLE;

@ -3,9 +3,9 @@
// https://elixir.bootlin.com/linux/v5.13/source/include/uapi/linux/types.h // https://elixir.bootlin.com/linux/v5.13/source/include/uapi/linux/types.h
typedef __u32 __bitwise __wsum; typedef __u32 __bitwise __wsum;
#include "bpf_helpers.h"
#include <linux/bpf.h> #include <linux/bpf.h>
#include <linux/ptrace.h>
#include <sys/socket.h>
// needed for TC_ACT_* // needed for TC_ACT_*
#include <linux/pkt_cls.h> #include <linux/pkt_cls.h>
#include "bpf_helpers.h" #include <linux/ptrace.h>
#include <sys/socket.h>

Loading…
Cancel
Save