Files
MMKV/Script/formatCode.py
2018-11-08 17:34:10 +08:00

16 lines
564 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") or root.endswith("/tsl") or (root.find("/build/generated/") != -1):
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") or name.endswith(".java")):
localpath = root + '/' + name
print localpath
os.system("clang-format -i %s -style=File" %(localpath))