CLANG-APPLY-REPLACEMENTS(1)

πŸ“¦
version 15.0.7 Β· 3 versions
, in ubuntu jammy

πŸ’– NAME πŸ’–

clang-apply-replacements β€” bestie, this is the manual page for clang-apply-replacements 15, and yes we are gonna get you through it 🫢


✨ DESCRIPTION ✨

Okay so boom, here's how you call it:

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

That's the whole vibe. You hand it a Search Root Directory, sprinkle in some options, and it goes and does its little replacement thing. Slay. πŸ’…

Fr fr though, <Search Root Directory> is doing a lot of heavy lifting here β€” it's literally where the tool goes looking. Don't skip it.

πŸŽ€ OPTIONS πŸŽ€

Not me listing every single one for you because I love you and I want you to know all of them. No skipping, periodt. ✨

🌸 Formatting Options 🌸

These are the ones that make your code look cute after it gets messed with.

  • --format β€” turns on formatting for any code that got changed by applying replacements. And like, if you wanna pick which formatting style, that's what -style is for. Obsessed with options having options. πŸ’–
  • --style=<string> β€” sets the coding style. And <string> can be one of these four things, so pay attention bestie:
    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 out of a .clang-format file sitting in one of the parent directories of the source file. (And for stdin, see --assume-filename, okay?) If there is no .clang-format file anywhere, it falls back to --fallback-style. Also important: --style=file is the default, so this is what you're getting unless you say otherwise. πŸ™ˆ
    3. 'file:<format_file_path>' β€” the way you explicitly point at the exact configuration file you want. No guessing, no vibes, just the path. 🎯
    4. "{key: value, ...}" β€” inline parameters, for when you're feeling specific. Example, literally this:
--style="{BasedOnStyle: llvm, IndentWidth: 8}"
  • --style-config=<string> β€” a path to a directory that contains a .clang-format file, and that file describes the formatting style to use for formatting code when you're running -style=file. It's giving "here's the folder, the file's in there." 🧚

🌈 Generic Options 🌈

The classics. The icons. The ones every self-respecting command has.

  • --help β€” shows you the available options. (And --help-hidden if you want more. Yes, there's more. There's always more. πŸ’€)
  • --help-list β€” shows the list of available options. (And --help-list-hidden for more of those too.)
  • --version β€” tells you which version of this program you're running. Main character energy, honestly.

πŸ’œ Replacement Options πŸ’œ

The actual replacement behavior. This is the good stuff.

  • --ignore-insert-conflict β€” ignores an insert conflict and keeps running so it can fix things. Lowkey a "we move" flag. 😭
  • --remove-change-desc-files β€” removes the change description files, and it does this regardless of whether the merging/replacing was successful. So yeah, heads up on that one. πŸ”₯

That's the whole page, bestie β€” nothing skipped, nothing hidden, every flag accounted for. Go forth and replace responsibly. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

Signing off from clang-apply-replacements version 15, dated July 2023 β€” catch you in the next man page, ily. πŸŒˆβ­πŸ‘‘

πŸ“¦ where this page comes from