Created
May 10, 2018 06:11
-
-
Save RyanKung/44c4d7b6ce2a8b745316fb10ebe08a4e to your computer and use it in GitHub Desktop.
C/Cpp code refiner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def refine(args, path, filenames): | |
for filename in filenames: | |
if filename.split('.')[-1] in ['c', 'h', 'cpp', 'hpp']: | |
target = "%s/%s" % (path, filename) | |
print('fefine %s' % target) | |
os.system('clang-format -i -style=LLVM %s' % target) | |
os.path.walk('./', refine, ()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment