FIX_INCLUDE(1)

NAME
fix_include - Apply changed proposed by Include-what-you-use

SYNOPSIS
fix_include [options] [filename] ... < include-what-you-use.output
or
fix_include -s [options] filename ...

DESCRIPTION
fix_include(1) reads the output from include-what-you-use(1) on stdin -- run with --verbose=1 (default) or above --. Unless --sort_only or --dry_run is specified, it modifies the files mentioned in the output, removing their old #include lines and replacing them with the lines given by include-what-you-use(1). It also sorts the #include and forward-declare lines.

All files mentioned in by include-what-you-use(1) are modified, unless filenames are specified on the commandline, in which case only those files are modified.

OPTIONS

-h, --help
    Show help message and exit.

-b, --blank_lines, --noblank_lines
    (Do not) put a blank line between primary header file and C/C++ system #includes, and another blank line between system #includes and Google #includes [default].

--comments, --nocomments
    Put (no) comments after the #include lines.

--safe_headers, --nosafe_headers
    Do (not) remove unused #includes/forward-declares from header files; just add new ones [default].

-s, --sort_only
    Just sort #includes of files listed on cmdline; do not add or remove any #includes.

-n, --dry_run
    Do not actually edit any files; just print diffs and return the number of files as the exit code.

--ignore_re=PATTERN
    fix_include(1) Will skip editing any file whose name matches this regular expression.

--separate_project_includes=DIRECTORY
    Sort #includes for current project separately from all other #includes. This flag specifies the root directory of the current project. If the value is "<tld>", #includes that share the same top-level directory are assumed to be in the same project. If not specified, project #includeđPs will be sorted with other non-system #includes.

--invoking_command_line=COMMAND
    Internal flag used by iwyu(1), It should be the command line used to invoke iwyu(1).

-m, --keep_iwyu_namespace_format, --nokeep_iwyu_namespace_format
    (Do not) keep forward-declaration namespaces in IWYU format, eg.
        namespace n1 { namespace n2 { class c1; } }
    Do not convert to "normalized" Google format:
        namespace n1 {
        	namespace n2 {
        		class c1;
        	}
        }

EXIT STATUS
The exit code is the number of files that were modified (or that would be modified if --dry_run was specified) unless that number exceeds 100, in which case 100 is returned.

SEEL ALSO
include-what-you-use(1).