Skip to content

Commit

Permalink
style: format bpf c code using kernel checkpatch.pl (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwinger233 authored Mar 15, 2024
1 parent 49f576e commit d31d880
Show file tree
Hide file tree
Showing 4 changed files with 9,108 additions and 1,240 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Lint

on:
pull_request:
paths:
- "**/*.c"
- "**/*.h"
- ".github/workflows/lint.yml"

jobs:

test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4

- name: Set up Perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: "5.38"

- name: Run lint
run: make ebpf-lint
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,7 @@ ebpf: submodule clean-ebpf
go generate ./control/control.go && \
go generate ./trace/trace.go && echo trace > $(BUILD_TAGS_FILE) || echo > $(BUILD_TAGS_FILE)

ebpf-lint:
./scripts/checkpatch.pl --no-tree --strict --no-summary --show-types --color=always control/kern/tproxy.c --ignore COMMIT_COMMENT_SYMBOL,NOT_UNIFIED_DIFF,COMMIT_LOG_LONG_LINE,LONG_LINE_COMMENT,VOLATILE,ASSIGN_IN_IF,PREFER_DEFINED_ATTRIBUTE_MACRO,CAMELCASE,LEADING_SPACE

## End Ebpf
Loading

0 comments on commit d31d880

Please sign in to comment.