Open
Description
I have this repo (dwmblocks-async) which generates a few errors when I run clang-tidy.
$ clang-tidy include/signal-handler.h
551 warnings generated.
/home/subaru/.local/src/dwmblocks/include/signal-handler.h:4:1: warning: included header signal.h is not used directly [misc-include-cleaner]
4 | #include <signal.h> // IWYU pragma: private; include <bits/types/sigset_t>
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 |
/home/subaru/.local/src/dwmblocks/include/signal-handler.h:9:9: warning: no header providing "sigset_t" is directly included [misc-include-cleaner]
4 | #include <signal.h> // IWYU pragma: private; include <bits/types/sigset_t>
5 |
6 | #include "block.h"
7 | #include "timer.h"
8 |
9 | typedef sigset_t signal_set;
| ^
Suppressed 550 warnings (549 in non-user code, 1 NOLINT).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
I tried doing adding the appropriate IWYU pragmas to signal-handler.h.
https://github.com/UtkarshVerma/dwmblocks-async/blob/main/include/signal-handler.h
#include <signal.h> // IWYU pragma: private; include <bits/types/sigset_t>
But this doesn't seem to work. Am I doing something wrong?