1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-26 03:16:35 +00:00
OpenMW/CI/check_file_names.sh
elsid d2ef0f6a9e
Check file names
File names should follow https://wiki.openmw.org/index.php?title=Naming_Conventions#Files.
Enforce this in CI. Add a list of exceptions for already present files.
2023-02-25 17:38:08 +01:00

8 lines
312 B
Bash
Executable File

#!/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