Skip to content

Commit 68ecbac

Browse files
authored
chore: clean up (#1419)
1 parent c45ed8c commit 68ecbac

File tree

7 files changed

+15
-72
lines changed

7 files changed

+15
-72
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ env:
1515
GOFUMPT_VERSION: v0.4.0
1616
# renovate: datasource=go depName=github.com/golangci/golangci-lint
1717
GOLANGCI_LINT_VERSION: v1.51.2
18+
# renovate: datasource=go depName=github.com/florianl/bluebox
19+
BLUEBOX_VERSION: v0.0.1
1820

1921
jobs:
2022
skip-check:
@@ -38,10 +40,10 @@ jobs:
3840
".go-version",
3941
"3rdparty",
4042
"Makefile",
41-
"bpf/",
42-
"kerneltest/",
43+
"bpf/**",
4344
"go.mod",
44-
"go.sum"
45+
"go.sum",
46+
"kerneltest/**"
4547
]
4648
skip_after_successful_duplicate: false
4749

@@ -126,7 +128,7 @@ jobs:
126128

127129
- name: Build initramfs
128130
run: |
129-
go install github.com/florianl/bluebox@v0.0.1
131+
go install "github.com/florianl/bluebox@${BLUEBOX_VERSION}"
130132
make initramfs
131133
132134
- name: Upload initramfs

.github/workflows/container.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
"3rdparty",
4141
"Dockerfile*",
4242
"Makefile",
43-
"bpf/Makefile",
43+
"bpf/**",
4444
"deploy/**",
4545
"e2e/**",
4646
"go.mod",

.pre-commit-config.yaml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
11
repos:
2-
- repo: local
3-
hooks:
4-
# We use custom step instead of https://github.com/golangci/golangci-lint,
5-
# because we need to pass additional parameters to for CGO builds.
6-
- id: go-lint
7-
name: go-lint
8-
entry: make go/lint
9-
language: system
10-
types: [go]
11-
pass_filenames: false
12-
132
- repo: https://github.com/pre-commit/pre-commit-hooks
143
rev: v4.4.0
154
hooks:
@@ -38,6 +27,11 @@ repos:
3827
- --fuzzy-match-generates-todo
3928
types: [shell]
4029
exclude: ^internal/(?:go|pprof)/
30+
- repo: https://github.com/golangci/golangci-lint
31+
rev: v1.51.2
32+
hooks:
33+
- id: golangci-lint
34+
entry: make go/lint-fix
4135
- repo: https://github.com/hadolint/hadolint
4236
rev: v2.12.1-beta
4337
hooks:

3rdparty/include/stdarg.h

Lines changed: 0 additions & 52 deletions
This file was deleted.

Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,12 @@ check-license:
188188

189189
.PHONY: go/lint
190190
go/lint:
191+
touch $(OUT_BPF)
191192
$(GO_ENV) $(CGO_ENV) golangci-lint run
192193

193194
.PHONY: go/lint-fix
194195
go/lint-fix:
196+
touch $(OUT_BPF)
195197
$(GO_ENV) $(CGO_ENV) golangci-lint run --fix
196198

197199
.PHONY: bpf/lint-fix

bpf/Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,7 @@ OUT_BPF := $(OUT_BPF_DIR)/cpu.bpf.o
4343
BPF_BUNDLE := $(OUT_DIR)/parca-agent.bpf.tar.gz
4444

4545
# input:
46-
BPF_HEADERS := ../3rdparty/include
4746
LIBBPF_HEADERS := $(OUT_DIR)/libbpf/$(ARCH)/usr/include
48-
LIBBPF_OBJ := $(OUT_DIR)/libbpf/$(ARCH)/libbpf.a
4947

5048
VMLINUX := cpu/vmlinux.h
5149
BPF_SRC := cpu/cpu.bpf.c
@@ -60,7 +58,7 @@ $(BPF_BUNDLE): $(BPF_SRC) $(LIBBPF_HEADERS)/bpf $(BPF_HEADERS)
6058
mkdir -p $(bpf_bundle_dir)
6159
cp $$(find $^ -type f) $(bpf_bundle_dir)
6260

63-
$(OUT_BPF): $(BPF_SRC) $(LIBBPF_HEADERS) $(LIBBPF_OBJ) $(BPF_HEADERS) | $(OUT_DIR)
61+
$(OUT_BPF): $(BPF_SRC) $(LIBBPF_HEADERS) $(BPF_HEADERS) | $(OUT_DIR)
6462
mkdir -p $(OUT_BPF_DIR)
6563
$(CMD_CC) -S \
6664
-D__BPF_TRACING__ \

pkg/profiler/cpu/bpf_metrics.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ package cpu
1717
import (
1818
"bufio"
1919
"bytes"
20-
_ "embed"
2120
"fmt"
2221
"io"
2322
"os"

0 commit comments

Comments
 (0)