CLANG-INCLUDE-FIXER(1)

πŸ“¦
version 18.1.8 Β· 5 versions
, in debian trixie, ubuntu questing

πŸ’– NAME πŸ’–

okay bestie, gather round β€” this is the manual page for clang-include-fixer version 18. she's a User Command, she lives in section 1, and she is literally here to fix your includes for you. iconic behaviour, no cap. 🫢


✨ DESCRIPTION ✨

🌸 USAGE 🌸

like, here's how you call her:

clang-include-fixer [options] <source0> [... <sourceN>]

so you give her some <source0> … <sourceN> files, plus whatever [options] you're feeling, and she goes to work. πŸ’…

πŸŽ€ OPTIONS πŸŽ€

⭐ Generic Options ⭐

the boring-but-necessary ones, bestie. everyone needs a little infrastructure:

  • --help β€” shows you all the available options. and if you're extra curious, --help-hidden shows even more. πŸ™ˆ
  • --help-list β€” prints a list of the available options. and yes, --help-list-hidden exists too for the deep lore. πŸ‘‘
  • --version β€” tells you which version of this program you're running. vibe check your install, periodt.

πŸ¦‹ Tool options πŸ¦‹

okay THIS is the main character section. the way these flags ate:

  • --db=<value> β€” sets the input format. she's giving choices, and here they are:
    • =fixed β€” a hard-coded mapping. set in stone, zero chill. πŸ’€
    • =yaml β€” a YAML database, made by find-all-symbols. the classic. ✨
    • =fuzzyYaml β€” a YAML database, but the names are fuzzy-matched. lowkey mysterious, highkey useful.
  • --extra-arg=<string> β€” one extra argument to append to the compiler command line. tack it on the end, bestie. πŸ“
  • --extra-arg-before=<string> β€” one extra argument to prepend to the compiler command line. this one goes at the FRONT. very "me first" energy. πŸ’…
  • --input=<string> β€” a string to initialize the database with.
  • --insert-header=<string> β€” insert one specific header. and listen: this one should run with STDIN mode. the result gets written to stdout. right now it's used for editor integration. it supports YAML/JSON format, like so:
-insert-header="{
  FilePath: "/path/to/foo.cc",
  QuerySymbolInfos: [
    {RawIdentifier: foo,
     Range: {Offset: 0, Length: 3}}
  ],
  HeaderInfos: [ {Headers: "\"foo_a.h\"",
                  QualifiedName: "a::foo"} ]}"
  • --minimize-paths β€” whether to minimize the include paths that get added. do less, slay more. 🌈
  • --output-headers β€” prints the symbol you're querying and all its relevant headers, in JSON format, to stdout. it's giving:
{
  "FilePath": "/path/to/foo.cc",
  "QuerySymbolInfos": [
    {"RawIdentifier": "foo",
     "Range": {"Offset": 0, "Length": 3}}
  ],
  "HeaderInfos": [ {"Header": "\"foo_a.h\"",
                    "QualifiedName": "a::foo"} ]
}
  • -p <string> β€” the build path.
  • -q β€” reduces terminal output. quiet mode, for when you simply cannot with the noise. 🀫
  • --query-symbol=<string> β€” query a given symbol (like "a::b::foo") directly in the database, without parsing the file at all. skipping the line, straight to the answer. πŸ”₯
  • --stdin β€” overrides the source file's content (in the overlaying virtual file system) with input from <stdin>, then runs the tool on that new content using the compilation options of the source file. this mode is currently used for editor integration. 🧚
  • --style=<string> β€” the fallback style used for reformatting after new headers get inserted, for when there's no clang-format config file to be found. she's got a backup fit ready, always. πŸ’œ

okay real talk bestie: keep --insert-header and --stdin in their intended editor-integration lanes, fr fr. that's literally what the page says they're for. 🫢

and that's the whole page, no skips, no summaries, every flag accounted for. πŸŽ€ this was clang-include-fixer 18, dated June 2025, from the User Commands section β€” mwah, go fix those includes, bestie. πŸ’…βœ¨

πŸ“¦ where this page comes from