From 99b27e65749236052ab4d829abeab76b930c55fc Mon Sep 17 00:00:00 2001 From: Daljit Singh Date: Wed, 30 Oct 2024 11:12:34 +0000 Subject: [PATCH] Update copyright and clang-format scripts for new structure --- clang-format-all | 4 ++-- update_copyright | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/clang-format-all b/clang-format-all index c8b855676b..3ed85526e0 100755 --- a/clang-format-all +++ b/clang-format-all @@ -36,8 +36,8 @@ args = parser.parse_args() clang_format = args.executable paths = ['cpp', 'testing'] extensions = ['.h', '.cpp'] -exclusion_list = ['cpp/lib/src/gui/gl_core_3_3.h', - 'cpp/lib/src/gui/gl_core_3_3.cpp'] +exclusion_list = ['cpp/gui/opengl/gl_core_3_3.h', + 'cpp/gui/opengl/gl_core_3_3.cpp'] # if clang-format path contains spaces, wrap it in quotes if ' ' in clang_format and not clang_format.startswith('"'): diff --git a/update_copyright b/update_copyright index 1a2d0bc1aa..ff230e1e3e 100755 --- a/update_copyright +++ b/update_copyright @@ -43,19 +43,18 @@ SearchPath = namedtuple('SearchPath', 'dirname recursive need_shebang comment ex ProcessFile = namedtuple('ProcessFile', 'path keep_shebang comment') MRTRIX_ROOT = os.path.abspath(os.path.dirname(__file__)) -APP_CPP_PATH = os.path.join(MRTRIX_ROOT, 'cpp', 'lib', 'core', 'app.cpp') +APP_CPP_PATH = os.path.join(MRTRIX_ROOT, 'cpp', 'core', 'app.cpp') APP_CPP_STRING = 'std::string COPYRIGHT =' APP_PY_PATH = os.path.join(MRTRIX_ROOT, 'python', 'mrtrix3', 'app.py') APP_PY_STRING = '_DEFAULT_COPYRIGHT =' SEARCH_PATHS = [ SearchPath('.', False, True, '#', [], ['mrtrix-mrview.desktop']), - SearchPath(os.path.join('cpp', 'cmd'), False, False, '*', ['.cpp'], []), + SearchPath(os.path.join('cpp'), True, False, '*', ['.cpp', '.h'], []), SearchPath('docs', False, True, '#', [], []), SearchPath('matlab', True, False, '%', ['.m'], []), SearchPath('python', True, False, '#', ['.py'], [os.path.join('mrtrix3', 'version.py.in'), os.path.join('mrtrix3', 'commands', '__init__.py.in')]), SearchPath(os.path.join('share', 'mrtrix3'), True, False, '#', ['.txt'], []), - SearchPath(os.path.join('cpp', 'lib'), True, False, '*', ['.cpp', '.h'], []), SearchPath(os.path.join('testing', 'tools'), False, False, '*', ['.cpp'], []), SearchPath(os.path.join('testing', 'unit_tests'), False, False, '*', ['.cpp'], []), SearchPath(os.path.join('testing', 'lib'), False, False, '*', ['.h'], []),