.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.2. .TH FIX_INCLUDE "1" "November 2013" "fix_include 3.3" "User Commands" .SH NAME fix_include \- Update the source code with iwyu output .SH SYNOPSIS .B fix_include [\fIoptions\fR] [\fIfilename\fR] ... \fI< \fR OR .B fix_include \fB\-s\fR [other options] ... .SH DESCRIPTION .PP fix_include reads the output from the include\-what\-you\-use script on stdin \fB\-\-\fR run with \fB\-\-v\fR=\fI1\fR (default) verbose or above \fB\-\-\fR and, unless \fB\-\-sort_only\fR or \fB\-\-dry_run\fR 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. .PP Only writable files (those opened for p4 edit) are modified (unless \fB\-\-checkout_command\fR is specified). 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. .PP The exit code is the number of files that were modified (or that would be modified if \fB\-\-dry_run\fR was specified) unless that number exceeds 100, in which case 100 is returned. .SH OPTIONS .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-b\fR, \fB\-\-blank_lines\fR Put a blank line between primary header file and C/C++ system #includes, and another blank line between system #includes and google #includes [default] .HP \fB\-\-noblank_lines\fR .TP \fB\-\-comments\fR Put comments after the #include lines .HP \fB\-\-nocomments\fR .TP \fB\-\-safe_headers\fR Do not remove unused #includes/fwd\-declares from header files; just add new ones [default] .HP \fB\-\-nosafe_headers\fR .TP \fB\-s\fR, \fB\-\-sort_only\fR Just sort #includes of files listed on cmdline; do not add or remove any #includes .TP \fB\-n\fR, \fB\-\-dry_run\fR 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) .TP \fB\-\-ignore_re\fR=\fIIGNORE_RE\fR fix_includes.py will skip editing any file whose name matches this regular expression. .TP \fB\-\-checkout_command\fR=\fICHECKOUT_COMMAND\fR A command, such as "p4 edit", to run on all the nonwriteable files before modifying them. The filenames will be appended to the command after a space. The command will not be run on any file that does not need to change. .TP \fB\-\-create_cl_if_possible\fR If \fB\-\-checkout_command\fR is "p4|g4|v4 edit" and all files to be modified needed to be checked out, then create a CL containing those files. .HP \fB\-\-nocreate_cl_if_possible\fR .TP \fB\-\-append_to_cl\fR=\fIAPPEND_TO_CL\fR If provided, with a checkout_command, add files that need fixing to the specified existing CL. .TP \fB\-\-separate_project_includes\fR=\fISEPARATE_PROJECT_INCLUDES\fR Sort #includes for current project separately from all other #includes. This flag specifies the root directory of the current project. If the value is "", #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. .TP \fB\-\-invoking_command_line\fR=\fIINVOKING_COMMAND_LINE\fR Internal flag used by iwyu.py, It should be the command line used to invoke iwyu.py .TP \fB\-m\fR, \fB\-\-keep_iwyu_namespace_format\fR Keep forward\-declaration namespaces in IWYU format, eg. namespace n1 { namespace n2 { class c1; } }. Do not convert to "normalized" Google format: namespace n1 {\ennamespace n2 {\en class c1;\en}\en}. .HP \fB\-\-nokeep_iwyu_namespace_format\fR