Files
MMKV/Script/formatCode.py
T
2018-10-08 11:16:19 +08:00

16 lines
501 B
Python

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import os.path
path = os.getcwd()
for root, dirs, files in os.walk(path):
if root.endswith("/aes") or root.endswith("/openssl"):
continue
for name in files:
if (name.endswith(".h") or name.endswith(".m") or name.endswith(".mm") or name.endswith(".hpp") or name.endswith(".cpp")):
localpath = root + '/' + name
print localpath
os.system("clang-format -i %s -style=File" %(localpath))