From 9743a42714db30acfd01de28a3d0da8d151159f1 Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Tue, 2 Mar 2021 15:23:11 +0100
Subject: [PATCH] [ci] Added codespell check to pre-commit.

---
 .codespellexclude       | 13 +++++++++++++
 .codespellrc            |  4 ++++
 .pre-commit-config.yaml |  9 +++++++--
 3 files changed, 24 insertions(+), 2 deletions(-)
 create mode 100644 .codespellexclude
 create mode 100644 .codespellrc

diff --git a/.codespellexclude b/.codespellexclude
new file mode 100644
index 00000000000..ebd3d082939
--- /dev/null
+++ b/.codespellexclude
@@ -0,0 +1,13 @@
+* De Nevers N. Physical and chemical equilibrium for chemical engineers[M].
+        "\tthe command must be run with its full path.\n\n"
+        COO = 10,
+              var dateA = new Date(a.created_at);
+              var dateB = new Date(b.created_at);
+              return dateB - dateA;
+Malcom, M.A.M.(2018).Analysis of underground excavations in argillaceous hard
+    auto Ket = local_K.template block<temperature_size, temperature_size>(
+        Ket.noalias() +=
+        title: '{Entwicklung mathematisch-mechanischer Modelle zur Beschreibung des
+            Stoffverhaltens von Salzgestein in Abh{\"a}ngigkeit von der Zeit und der
+            Temperatur auf der Grundlage von Laborversuchen mit begleitenden kontinuumsmechanischen
+            Berechnungen nach der Methode der finiten Elemente}'
diff --git a/.codespellrc b/.codespellrc
new file mode 100644
index 00000000000..9aef80a4265
--- /dev/null
+++ b/.codespellrc
@@ -0,0 +1,4 @@
+[codespell]
+skip = ./.git,./Tests/Data,./ThirdParty,*.yml,*.bib,./web/content/imprint.md,./GeoLib/IO/XmlIO/OpenGeoSysSTN.xsd,./Applications/FileIO/Legacy/OGSIOVer4.cpp
+ignore-words-list = Theis,nd,theis,strat
+exclude-file = .codespellexclude
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 6067a511064..6c98e0c7198 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -4,13 +4,13 @@ repos:
     hooks:
     -   id: trailing-whitespace
         args: [--markdown-linebreak-ext=md, --markdown-linebreak-ext=pandoc]
-        exclude: 'ThirdParty/*|Tests/Data/*|web/static/images/xsd'
+        exclude: '^ThirdParty/.*|^Tests/Data/.*|^web/static/images/xsd'
     -   id: check-added-large-files
         args: [--maxkb 1024]
     -   id: check-merge-conflict
     -   id: check-xml
     -   id: check-yaml
-        exclude: 'scripts/ci/*'
+        exclude: '^scripts/ci/.*'
     -   id: check-toml
 -   repo: local
     hooks:
@@ -37,3 +37,8 @@ repos:
     hooks:
     - id: black
       exclude: 'ThirdParty|LinearMFront/generate_ref.py'
+-   repo: https://github.com/codespell-project/codespell
+    rev: v2.0.0
+    hooks:
+    -   id: codespell
+        exclude: 'ThirdParty/.*|Tests/Data/.*|.*\.ya?ml|.*\.bib|^web/content/imprint.md|^GeoLib/IO/XmlIO/OpenGeoSysSTN.xsd|^Applications/FileIO/Legacy/OGSIOVer4.cpp'
-- 
GitLab