Scroll to navigation


NAME - manual page for 6.0-2

SYNOPSIS [options] [filename] ... < <output from include-what-you-use script>


OR -s [other options] <filename> ... reads the output from the include-what-you-use script on stdin -- run with --v=1 (default) verbose or above -- and, unless --sort_only or --dry_run is specified, modifies the files mentioned in the output, removing their old #include lines and replacing them with the lines given by the include_what_you_use script. It also sorts the #include and forward-declare lines.

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

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.


-h, --help
show this help message and exit
-b, --blank_lines
Put a blank line between primary header file and C/C++ system #includes, and another blank line between system #includes and google #includes [default]


Put comments after the #include lines


Do not remove unused #includes/fwd-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. Return code is 0 if no changes are needed, else min(the number of files that would be modified, 100)
--ignore_re=IGNORE_RE will skip editing any file whose name matches this regular expression.
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 #includes will be sorted with other non-system #includes.
Internal flag used by, It should be the command line used to invoke
-m, --keep_iwyu_namespace_format
Keep forward-declaration namespaces in IWYU format, eg. namespace n1 { namespace n2 { class c1; } }. Do not convert to "normalized" Google format: namespace n1 {\nnamespace n2 {\n class c1;\n}\n}.


September 2018 6.0-2