diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index be4b18ca89..3d4a3ee193 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -132,6 +132,7 @@ Clang_Format: before_script: - CI/install_debian_deps.sh openmw-clang-format script: + - CI/check_file_names.sh - CI/check_clang_format.sh Teal: diff --git a/CI/check_file_names.sh b/CI/check_file_names.sh new file mode 100755 index 0000000000..b04416659e --- /dev/null +++ b/CI/check_file_names.sh @@ -0,0 +1,7 @@ +#!/bin/bash -ex + +git ls-files -- ':(exclude)extern/' '*.cpp' '*.hpp' '*.h' | + grep -vP '/[a-z0-9]+\.(cpp|hpp|h)$' | + grep -vFf CI/file_name_exceptions.txt && + ( echo 'File names do not follow the naming convention, see https://wiki.openmw.org/index.php?title=Naming_Conventions#Files'; exit -1 ) +exit 0 diff --git a/CI/file_name_exceptions.txt b/CI/file_name_exceptions.txt new file mode 100644 index 0000000000..5035d73f27 --- /dev/null +++ b/CI/file_name_exceptions.txt @@ -0,0 +1,48 @@ +apps/openmw/android_main.cpp +apps/openmw/mwsound/efx-presets.h +apps/openmw/mwsound/ffmpeg_decoder.cpp +apps/openmw/mwsound/ffmpeg_decoder.hpp +apps/openmw/mwsound/openal_output.cpp +apps/openmw/mwsound/openal_output.hpp +apps/openmw/mwsound/sound_buffer.cpp +apps/openmw/mwsound/sound_buffer.hpp +apps/openmw/mwsound/sound_decoder.hpp +apps/openmw/mwsound/sound_output.hpp +apps/openmw_test_suite/esm/test_fixed_string.cpp +apps/openmw_test_suite/files/conversion_tests.cpp +apps/openmw_test_suite/lua/test_async.cpp +apps/openmw_test_suite/lua/test_configuration.cpp +apps/openmw_test_suite/lua/test_l10n.cpp +apps/openmw_test_suite/lua/test_lua.cpp +apps/openmw_test_suite/lua/test_scriptscontainer.cpp +apps/openmw_test_suite/lua/test_serialization.cpp +apps/openmw_test_suite/lua/test_storage.cpp +apps/openmw_test_suite/lua/test_ui_content.cpp +apps/openmw_test_suite/lua/test_utilpackage.cpp +apps/openmw_test_suite/misc/test_endianness.cpp +apps/openmw_test_suite/misc/test_resourcehelpers.cpp +apps/openmw_test_suite/misc/test_stringops.cpp +apps/openmw_test_suite/mwdialogue/test_keywordsearch.cpp +apps/openmw_test_suite/mwscript/test_scripts.cpp +apps/openmw_test_suite/mwscript/test_utils.hpp +apps/openmw_test_suite/mwworld/test_store.cpp +apps/openmw_test_suite/openmw_test_suite.cpp +apps/openmw_test_suite/testing_util.hpp +components/bsa/bsa_file.cpp +components/bsa/bsa_file.hpp +components/crashcatcher/windows_crashcatcher.cpp +components/crashcatcher/windows_crashcatcher.hpp +components/crashcatcher/windows_crashmonitor.cpp +components/crashcatcher/windows_crashmonitor.hpp +components/crashcatcher/windows_crashshm.hpp +components/fx/lexer_types.hpp +components/fx/parse_constants.hpp +components/platform/file.posix.cpp +components/platform/file.stdio.cpp +components/platform/file.win32.cpp +components/sdlutil/gl4es_init.cpp +components/sdlutil/gl4es_init.h +components/to_utf8/gen_iconv.cpp +components/to_utf8/tables_gen.hpp +components/to_utf8/to_utf8.cpp +components/to_utf8/to_utf8.hpp