CLANG-APPLY-REPLACEMENTS(1)

πŸ“¦
version 19.1.7 Β· 5 versions
, in debian bookworm, debian trixie

πŸ’– clang-apply-replacements β€” NAME ✨

okay bestie, so this is the manual page for clang-apply-replacements 19 and honestly? it's giving "quiet little tool that does SO much". let's get into it 🫢


🌸 DESCRIPTION 🌸

here's the whole vibe, exactly as it comes:

USAGE: clang-apply-replacements [options] <Search Root Directory>

that <Search Root Directory>? yeah, that's the main character. it's where she goes looking for stuff to fix. and [options] is all the lil knobs and switches you get to play with πŸ‘‘


✨ OPTIONS ✨

πŸŽ€ Formatting Options

  • --format β€” turns ON formatting for code that got changed by applying replacements. so if you want your freshly-replaced code to also be pretty, this is your girl. heads up though: use -style to actually choose which formatting style you want πŸ’…
  • --style=<string> β€” sets the coding style. and <string> can be one of these four things, no cap:
    1. a preset, and the presets are: LLVM, GNU, Google, Chromium, Microsoft, Mozilla, WebKit. pick your fighter ✨
    2. 'file' β€” this one loads the style config from a .clang-format file sitting in one of the parent directories of the source file (and for stdin, see --assume-filename). if it can't find a .clang-format file at all, it falls back to --fallback-style. also FYI, --style=file is the default, so if you don't say anything, that's what you get πŸ¦‹
    3. 'file:<format_file_path>' β€” when you wanna be extra specific and point directly at the config file yourself.
    4. "{key: value, ...}" β€” for setting specific parameters inline, like literally this:
--style="{BasedOnStyle: llvm, IndentWidth: 8}"

custom everything, we love to see it πŸ’œ

  • --style-config=<string> β€” path to a directory that contains a .clang-format file, which describes a formatting style to use when you're formatting code and you've got -style=file going. think of it as "where do I even find the vibe file" 🧚

🌈 Generic Options

  • --help β€” displays the available options. and if you want even MORE (greedy, iconic), there's --help-hidden πŸ‘‘
  • --help-list β€” displays a list of the available options. and yes, there's a --help-list-hidden for more, because of course there is πŸ’€
  • --version β€” displays the version of this program. short, sweet, does exactly what it says on the tin ⭐

πŸ“ Replacement Options

  • --ignore-insert-conflict β€” ignores an insert conflict and just keeps running so it can fix. she does NOT have time for drama, she's moving on πŸ’…
  • --remove-change-desc-files β€” removes the change description files, and it does this regardless of successful merging/replacing. so yeah, no matter how the merge or replace went, those files are GONE. periodt πŸ”₯

okay a lil gentle reminder bestie: that --remove-change-desc-files one means what it means β€” it doesn't care if the merging or replacing actually worked out. files get removed either way, so don't come for me later πŸ™ˆ

and that's the whole page, you ate it πŸ’– this was clang-apply-replacements 19, dated June 2025, from the User Commands corner of the world. go forth and replace some things, bestie πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from