tldr/pages/common/clang-format.md
Vítor Henrique 278384d3cf
pages*: use " " instead of "=" to separate the options from their arguments (#11952)
* pages*: remove = from GNU-style long options

* 7z: readd needed =

* 7za: add missing =

* 7zr: fix argument and option separation

* astyle: readd missing =

* aws-ecr: readd missing =

* az-devops: readd missing =

* csslint: readd missing =

* cs-fetch: readd missing =

* bzgrep: readd missing =

* chromium: readd missing =

* docker-commit: remove unnecessary =

* docker-system: remove unnecessary =

* docker-ps: remove unnecessary =

* dockerd: remove unnecessary =

* 7za: readd missing =

* 7zr: readd missing =

* chromium.de: readd missing =

* chromium.de: readd missing =

* bundletool: remove additional space

Co-authored-by: Nicolas Kosinski <nicokosi@users.noreply.github.com>

---------

Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
Co-authored-by: Nicolas Kosinski <nicokosi@users.noreply.github.com>
2024-04-18 15:38:25 -03:00

25 lines
744 B
Markdown

# clang-format
> Auto-format C/C++/Java/JavaScript/Objective-C/Protobuf/C# code.
> More information: <https://clang.llvm.org/docs/ClangFormat.html>.
- Format a file and print the result to `stdout`:
`clang-format {{path/to/file}}`
- Format a file in-place:
`clang-format -i {{path/to/file}}`
- Format a file using a predefined coding style:
`clang-format --style {{LLVM|GNU|Google|Chromium|Microsoft|Mozilla|WebKit}} {{path/to/file}}`
- Format a file using the `.clang-format` file in one of the parent directories of the source file:
`clang-format --style=file {{path/to/file}}`
- Generate a custom `.clang-format` file:
`clang-format --style {{LLVM|GNU|Google|Chromium|Microsoft|Mozilla|WebKit}} --dump-config > {{.clang-format}}`