CLANG-APPLY-REPLACEMENTS(1)

πŸ“¦ version 12.0.1, in ubuntu jammy

πŸ’– CLANG-APPLY-REPLACEMENTS(1) πŸ’–

okay bestie, welcome to the manual page for clang-apply-replacements, version 12 ✨ this is a User Commands kinda situation and honestly? it's giving tool-that-applies-your-replacements-and-then-formats-the-glow-up. let's get into it 🫢


🌸 DESCRIPTION 🌸

so here's the vibe β€” the usage is literally:

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

that's it, that's the whole entrance exam πŸ’… you hand it a Search Root Directory and some options and it does its thing.


✨ OPTIONS ✨

πŸŽ€ Formatting Options

  • --format β€” turns on formatting of the code that got changed by applying replacements. if you want to pick how it formats, use -style. slay.
  • --style=<string> β€” the coding style, and currently the ones it supports are: LLVM, GNU, Google, Chromium, Microsoft, Mozilla, WebKit. pick your fighter πŸ‘‘

use -style=file and it'll load the style config from a .clang-format file sitting in one of the parent directories of the source file (or the current directory, if you're doing stdin). and if you wanna set specific parameters, do -style="{key: value, ...}", like for example:

-style="{BasedOnStyle: llvm, IndentWidth: 8}"

periodt πŸ’…

  • --style-config=<string> β€” 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 in -style=file mode. lowkey essential if you're being picky about your style file's location πŸ¦‹

🌈 Generic Options

  • --help β€” displays all the available options (and if you want even more, there's --help-hidden for that πŸ‘€)
  • --help-list β€” displays a list of the available options (again, --help-list-hidden exists if you're nosy)
  • --version β€” displays the version of this program. iconique ⭐

πŸ’œ Replacement Options

  • --remove-change-desc-files β€” removes the change description files, no matter whether the merging/replacing actually succeeded. no cap, it does not care how it went β€” the files are gone 🫣

okay quick reminder bestie: that last one removes the files regardless of successful merging/replacing, so don't come crying to me if you wanted those change description files back πŸ’€

and that's the whole page! this was the manual for clang-apply-replacements 12, dated February 2022, and it lives at CLANG-APPLY-REPLACEMENTS(1). go format something gorgeous, you main character πŸ§šπŸ’–

πŸ“¦ where this page comes from