Skip to content

Commit

Permalink
Update copyright and clang-format scripts for new structure
Browse files Browse the repository at this point in the history
  • Loading branch information
daljit46 committed Oct 30, 2024
1 parent 9e05a54 commit 99b27e6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions clang-format-all
Original file line number Diff line number Diff line change
Expand Up @@ -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('"'):
Expand Down
5 changes: 2 additions & 3 deletions update_copyright
Original file line number Diff line number Diff line change
Expand Up @@ -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'], []),
Expand Down

0 comments on commit 99b27e6

Please sign in to comment.