Install `clang-format`
The snippet can be accessed without any authentication.
Authored by
STEVAN Antoine
Edited
> :exclamation: **Important**
>
> it is very bad practice to pipe the output of `curl` directly into a shell like Bash, who knows what's being downloaded and executed... :scream:
>
> you're strongly adviced to take a look at the script before running it !!
to install `clang-format` from the official download page of Clang to `~/.local/bin/`, please run the following
```bash
curl https://gitlab.isae-supaero.fr/-/snippets/5/raw/main/install.sh | bash
```
> :bulb: **Note**
>
> don't forget to `source ~/.bashrc` or restart Bash
## example usage
- format the whole current directory
```bash
format-c .
```
- format specific subdirectories
```bash
format-c foo/
```
- format specific files
```bash
format-c foo/bar.c
```
Please register or sign in to comment