Skip to content

Commit 3401b98

Browse files
committed
update
Signed-off-by: lec-bit <glfhmzmy@126.com>
1 parent 3045fbd commit 3401b98

File tree

3 files changed

+29
-11
lines changed

3 files changed

+29
-11
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ jobs:
4545
run: |
4646
echo "PKG_CONFIG_PATH=$GITHUB_WORKSPACE/mk" >> $GITHUB_ENV
4747
48+
# Some files such as sockops_bpfel.go require some preprocessing
49+
- name: golangci-lint prepare
50+
run: |
51+
./hack/golangci-lint-prepare.sh
52+
4853
# Since requiring code generated by the Proto compilation, execute go lint after building.
4954
- name: golangci-lint
5055
uses: golangci/golangci-lint-action@v6.0.0

common/config/.golangci.yaml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,6 @@ issues:
8181
- ".*_bpfeb\\.go"
8282
- ".*_bpfel\\.go$"
8383
- ".*bpfeb\\.go"
84-
- ".*bpfel\\.go$"
85-
- ".*/bpf/kmesh/bpf2go/kernelnative/enhanced/kmeshsockops_bpfel\\.go"
86-
- "bpf/kmesh/bpf2go/kernelnative/enhanced/kmeshsockops_bpfel\\.go"
87-
- ".*kmeshsockops_bpfel\\.go"
88-
- bpf/kmesh/bpf2go/kernelnative/enhanced/kmeshsockops_bpfel.go
89-
exclude-dirs:
90-
- bpf/kmesh/bpf2go/dualengine
91-
- bpf/kmesh/bpf2go/kernelnative/enhanced
9284
exclude-rules:
9385
# Exclude some linters from running on test files.
9486
- path: _test\.go$|^tests/|^samples/
@@ -98,9 +90,6 @@ issues:
9890
- path: _test\.go$
9991
text: "dot-imports: should not use dot imports"
10092
# We need to use the deprecated module since the jsonpb replacement is not backwards compatible.
101-
- path: kmeshsockops_bpfel\.go$
102-
linters:
103-
- errcheck
10493
- linters:
10594
- staticcheck
10695
text: "SA1019: package github.com/golang/protobuf/jsonpb"

hack/golangci-lint-prepare.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
ROOT_DIR=$(git rev-parse --show-toplevel)
3+
4+
TARGET_DIR="$ROOT_DIR/bpf/kmesh/bpf2go/kernelnative/enhanced"
5+
6+
FILES=(
7+
"kmeshsockops_bpfel.o"
8+
"kmeshsockops_bpfeb.o"
9+
"kmeshsockopscompat_bpfeb.o"
10+
"kmeshsockopscompat_bpfel.o"
11+
"kmeshtracepoint_bpfeb.o"
12+
"kmeshtracepoint_bpfel.o"
13+
"kmeshtracepointcompat_bpfeb.o"
14+
"kmeshtracepointcompat_bpfel.o"
15+
)
16+
17+
mkdir -p "$TARGET_DIR"
18+
19+
for FILE in "${FILES[@]}"; do
20+
touch "$TARGET_DIR/$FILE"
21+
done
22+
23+
echo "All files have been created in $TARGET_DIR."
24+

0 commit comments

Comments
 (0)