CLANG-FORMAT

this utility inserts and removes whitespaces as needed, replaces tabs with spaces IOT make the output source file comply with the specified coding style. it supports the following coding styles by default: LLVM, GNU, Google, Chromium, Microsoft, Mozilla and WebKit. the coding style that closely conforms to the "Barr Embedded C Coding Standard" used in BSLE is "Microsoft" which was introduced in clang-format version 6.1. this is not a replacement for not following a programming style for BSLE.

root@dev:~$ sudo apt install clang-format

root@dev:~$ clang-format --style-file:/home/student/clang-format.txt fileName.h > formattedFileName.h
 ...

 * redirection of the output to a new filename is required as the program sends its output to STDOUT by default
 

Last updated