IWYU-FILTER(1) General Commands Manual IWYU-FILTER(1)

iwyu-filterfilter include-what-you-use output

iwyu-filter [-q] [-a ignore] [-d ignore] [-D macro] [-I path] file ...

The iwyu-filter utility invokes include-what-you-use and filters its output, allowing proposed additions and removals of header includes to be ignored.

The options are as follows:

Quiet mode, suppress warnings regarding unused filter arguments.
ignore
Ignore proposed addition of including a header, ignore must be one of the following:
header-path
Unconditionally ignore proposal to include the header identified by header-path which is interpreted as a fnmatch(3) pattern.
path:header-path
Only ignore proposal to include the header identified by header-path in the source file located at path. Both header-path and path are interpreted as fnmatch(3) patterns.
ignore
Ignore proposed removal of including header, see interpretation of ignore above.
macro
Preprocessor argument passed as is to include-what-you-use.
path
Preprocessor argument passed as is to include-what-you-use.

Ignore proposed removal of including sys/types.h in main.c.

iwyu-filter -d main.c:sys/types.h -- *.c

The iwyu-filter utility exits 0 on success, and >0 if an error occurs.

Anton Lindqvist <anton@basename.se>

OpenBSD 7.8 June 26, 2024 IWYU-FILTER(1)