summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcollin <collin+i@collinmcqueen.com>2021-02-09 14:53:49 -0500
committercollin <collin+i@collinmcqueen.com>2021-02-09 14:53:49 -0500
commit4f26b9bfee6b17c9a3335a417a96124cc5cd49bf (patch)
tree87f15d31faefb3aa86add3c701f7ee8f9c5567f9
parentccc746022c9f9c17b7b0e0272aecccbc867f35fd (diff)
downloadsdl_core-fix/python3.tar.gz
remove format_src.py, instead use check_style.shfix/python3
-rw-r--r--tools/infrastructure/format_src.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/tools/infrastructure/format_src.py b/tools/infrastructure/format_src.py
deleted file mode 100644
index b7927b2708..0000000000
--- a/tools/infrastructure/format_src.py
+++ /dev/null
@@ -1,37 +0,0 @@
-#!/usr/bin/env python
-# -*- coding: utf-8 -*-
-
-"""
-Format all sources with clang-format. All *.cc and *h in the src dir
-are affected. Excluded from formatting sources in the "3rd_party" and
-in the "3rd_party-static" dirs. For the formatting used ".clang-format"
-in the project root.
-"""
-
-import os
-from utils import setup_working_dir, walk_dir, run_cmd
-import re
-
-
-INCLUDE_PATTERNS = ['^.*\.cc$', '^.*\.h$', '^.*\.cpp$', '^.*\.hpp$']
-EXCLUDE_PATTERNS = ['^.*3rd_party.*$']
-FORMAT_CMD = 'clang-format -i -style=file {}'
-
-
-def main():
- ''' Main logic '''
- setup_working_dir()
- print 'Current working dir is {}'.format(os.getcwd())
-
- def action(file_path):
- if re.match('|'.join(INCLUDE_PATTERNS), file_path, re.M | re.I):
- if not re.match('|'.join(EXCLUDE_PATTERNS),
- file_path,
- re.M | re.I):
- print 'Formatting file {}'.format(file_path)
- run_cmd(FORMAT_CMD.format(file_path))
- walk_dir('src', action)
-
-
-if __name__ == '__main__':
- main()