1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/geekneo-X64Dbg

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
ClangFormat 820
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
GeekNeo Отправлено 28.06.2021 11:58 e03c2ff
#! /usr/bin/python
import os
import subprocess
clang_format = os.getenv('CLANG_FORMAT')
if not clang_format:
print('Please set CLANG_FORMAT enviroment to the clang-format full path.')
sys.exit(-1)
def paths(path):
path_collection = []
for dirpath, dirnames, filenames in os.walk(path):
for file in filenames:
fullpath = os.path.join(dirpath, file)
path_collection.append(fullpath)
return path_collection
for p in paths('./'):
if p.endswith('.c') or \
p.endswith('cpp') or \
p.endswith('.cc') or \
p.endswith('.h') or \
p.endswith('.hpp') or \
p.endswith('.m') or \
p.endswith('.mm'):
print('Formating "%s" ...' % (p))
subprocess.Popen([clang_format, '-i', '-style=Google', p]).wait()

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/geekneo-X64Dbg.git
git@api.gitlife.ru:oschina-mirror/geekneo-X64Dbg.git
oschina-mirror
geekneo-X64Dbg
geekneo-X64Dbg
master