Definition at line 60 of file add_copyright.py.
61 root, f = os.path.split(path)
62 if f
in [
'.clang-tidy',
'.clang-format']:
63 print(
"Skipping file: {}".
format(path))
66 with open(path,
'r', encoding=
'utf-8')
as fd:
68 _, extension = os.path.splitext(f)
70 if extension
in [
'.cpp',
'.h',
'.hpp',
'.inl',
'.cl',
'.in',
'.cs']:
71 if not content.startswith(
'/*'):
73 elif extension ==
'.py' or f
in [
'SConstruct',
'SConscript']:
74 if not content.startswith(
'# Copyright'):
76 elif f ==
'CMakeLists.txt':
77 if not content.startswith(
'# Copyright'):
80 raise Exception(
"Unhandled file: {}".
format(path))
References add_cpp_copyright(), add_python_copyright(), and update_supported_ops.format.