]> git.ipfire.org Git - thirdparty/systemd.git/commit
bpf: suppress false-positive clang-tidy/clangd diagnostics under src/bpf
authorDaan De Meyer <daan@amutable.com>
Tue, 21 Apr 2026 20:31:34 +0000 (20:31 +0000)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Wed, 22 Apr 2026 14:49:36 +0000 (16:49 +0200)
commite9afaaeaacdba5bab2ddda4293106a0278d13f80
tree4a8d0321fd974570b1a56914c4864a3c1d5ce1e9
parentb779c52d4c26dc3d241458106495ca844de7fa96
bpf: suppress false-positive clang-tidy/clangd diagnostics under src/bpf

clang-tidy's misc-use-internal-linkage fires on BPF map declarations
(they have the SEC(".maps") attribute and must retain external linkage
so bpftool gen skeleton can resolve them as ELF symbols), and its
misc-include-cleaner flags errno.h as unused even where a /* IWYU
pragma: keep */ is present. clangd's own unused-includes analysis
emits the equivalent diagnostic independently of clang-tidy.

Add src/bpf/.clang-tidy and src/bpf/.clangd that inherit the parent
configs and scope these suppressions to BPF sources only.
src/bpf/.clang-tidy [new file with mode: 0644]
src/bpf/.clangd [new file with mode: 0644]