FIX_INCLUDES.PY(1)
β¨ NAME β¨
okay so this is fix_includes.py β the manual page for fix_includes.py 6.0-2, bestie. She's a User Command, she's a whole vibe, and she's about to reorganize your #include lines whether you're ready or not. π
π SYNOPSIS π
fix_includes.py [options] [filename] ... < <output from include-what-you-use script>
πΈ DESCRIPTION πΈ
OR fix_includes.py -s [other options] <filename> ...
okay so here's the tea π: fix_includes.py reads the output from the include-what-you-use script on stdin β and you gotta run that with --v=1 (that's the default) verbose or above, no cap β and then, unless --sort_only or --dry_run is specified, it goes in and modifies the files mentioned in that output. It removes their old #include lines and replaces them with the lines the include_what_you_use script handed over. She also sorts the #include and forward-declare lines, because she's an organizer and organizing is her main character energy. π
Every single file mentioned in the include-what-you-use script gets modified β unless you named filenames on the commandline, in which case only those files get touched. Boundaries, bestie. π«Ά
And the exit code? It's the number of files that were modified (or that would be modified if --dry_run was specified) β unless that number goes over 100, in which case 100 is what you get. Capped. Slay.
π OPTIONS π
-h,--helpβ show this help message and exit. iconic, she explains herself. β¨-b,--blank_linesβ put a blank line between the primary header file and C/C++ system#includes, and another blank line between system#includesand google#includes. [default] β yes bestie, this is the default, breathe it in π--noblank_linesβ the original gives no description here, it just... exists. no thoughts, head empty π--commentsβ put comments after the#includelines. little notes, little gossip, love that for you π¬--nocommentsβ again, no description in the original, she's just the quiet one π--safe_headersβ do not remove unused#includes/fwd-declares from header files; just add new ones. [default] β protective queen behavior, obsessed π--nosafe_headersβ no description given, it's just vibing there, unnamed π¦-s,--sort_onlyβ just sort the#includesof the files listed on the cmdline; do not add or remove any#includes. sorting only, no editing, we respect the source πΈ-n,--dry_runβ do not actually edit any files; just print diffs. return code is0if no changes are needed, elsemin(the number of files that would be modified, 100). look but don't touch, bestie π--ignore_re=IGNORE_REβfix_includes.pywill skip editing any file whose name matches this regular expression. not invited to the party, blocked, no hard feelings π«--separate_project_includes=SEPARATE_PROJECT_INCLUDESβ sort#includesfor the current project separately from all other#includes. this flag specifies the root directory of the current project. if the value is"<tld>",#includesthat share the same top-level directory are assumed to be in the same project. if not specified, project#includeswill be sorted with other non-system#includes. keeping your people with your people π--invoking_command_line=INVOKING_COMMAND_LINEβ internal flag used byiwyu.py. it should be the command line used to invokeiwyu.py. it's giving behind-the-scenes, don't worry about it π§-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}. leave her format alone, she likes it π--nokeep_iwyu_namespace_formatβ no description in the original, she's a mystery, and honestly? respect π
quick reminder babe: she'll rewrite your files. --dry_run is right there if you need a lil peek first. safety first, slay second. π«Ά
and that's the whole page!! this was fix_includes.py 6.0-2, dated September 2018, and it's genuinely so iconic that a manpage this old still runs your whole include situation. bye bestie, go sort something πβ¨π
π¦ where this page comes from
- debian bookworm: iwyu 8.18-2 Β· U-OF-I-BSD-LIKE
- debian trixie: iwyu 8.23-1 Β· U-OF-I-BSD-LIKE
- ubuntu jammy: iwyu 8.17-1 Β· U-OF-I-BSD-LIKE
- ubuntu noble: iwyu 8.21-1build2 Β· U-OF-I-BSD-LIKE
- ubuntu questing: iwyu 8.23-1
- ubuntu resolute: iwyu 8.23-1build1 Β· U-OF-I-BSD-LIKE
- ubuntu stonking: iwyu 8.23-1build1 Β· U-OF-I-BSD-LIKE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms