diff --git a/.typos.toml b/.typos.toml index 039da29235..6ed99410d9 100644 --- a/.typos.toml +++ b/.typos.toml @@ -1,8 +1,6 @@ [default.extend-words] eles = "eles" packageid = "packageid" -oce = "oce" - [files] extend-exclude = ["scripts/t8indent", "thirdparty/", "t8code_logo.png", "cmake/FindOpenCASCADE.cmake"] diff --git a/cmake/FindOpenCASCADE.cmake b/cmake/FindOpenCASCADE.cmake index 6eb5c10c22..0704e68239 100644 --- a/cmake/FindOpenCASCADE.cmake +++ b/cmake/FindOpenCASCADE.cmake @@ -11,6 +11,8 @@ # OpenCASCADE_LIBRARIES - names of OCC libraries # OpenCASCADE_LINK_DIRECTORY - location of OCC libraries +# test + # ${OpenCASCADE_FOUND} is cached, so once OCC is found this block shouldn't have to run again IF( NOT OpenCASCADE_FOUND ) diff --git a/scripts/pre-commit b/scripts/pre-commit index 4365a7fccf..63430b9282 100755 --- a/scripts/pre-commit +++ b/scripts/pre-commit @@ -35,6 +35,7 @@ CHECK_INDENT=./scripts/check_if_file_indented.scp TYPOS=`which typos 2> /dev/null` +TYPOS_CONFIG_FILE=./.typos.toml if [ -z "$TYPOS" ] then @@ -68,7 +69,11 @@ do continue fi - status=`$TYPOS $file` + # Calling the typos script + # We use a config file to exclude certain spellings and specific files. + # Excluding specific files in the config files does only work when used together + # with --force-exclude + status=`$TYPOS --force-exclude --config $TYPOS_CONFIG_FILE $file` if ! [ -z "$status" ]; then echo "File $file contains typos." nocontinue=1