Skip to content

Instantly share code, notes, and snippets.

@mrkara
Last active May 24, 2020 00:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrkara/669eb6d7a3f7a8d3bcd3a00cd21c95be to your computer and use it in GitHub Desktop.
Save mrkara/669eb6d7a3f7a8d3bcd3a00cd21c95be to your computer and use it in GitHub Desktop.
[clang-format-diff] #clang #styling #dev

Runs clang-format on the last commit (only the changed lines):

git diff -U0 --no-color HEAD^ | /usr/share/clang/clang-format-diff.py -i -p1

clang-format the files listed:

for f in `cat /home/kara/Belgeler/clang-sc.txt`; do /opt/lo/bin/clang-format -i ${f}; done;

remove the given list of files from the blacklist:

grep -Fvxf ~/Belgeler/clang-sc.txt solenv/clang-format/blacklist > blacklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment