Add pre-commit hook for codespell

- Adds a pre-commit config to enable codespell
- Adds a codespell config
- Enables a CI job to run the pre-commit hooks
This commit is contained in:
Julius Künzel
2025-09-20 15:15:57 +02:00
parent 0088cb2b84
commit 33ca145117
3 changed files with 18 additions and 0 deletions

9
.codespellrc Normal file
View File

@@ -0,0 +1,9 @@
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: CC0-1.0
[codespell]
# We have to exclude all file types that have translations in them and third-party files
skip = *.po,po/*,*.svg,*.pgm,*.notifyrc,*.knsrc,data/org.kde.kdenlive.xml,data/org.kde.kdenlive.appdata.xml,src/lib/external/kiss_fft/*,fuzzer/fakeit_standalone.hpp,tests/fakeit.hpp,tests/catch.hpp
count =
quiet-level = 3
ignore-words-list = aBitrate,abl,aCount,aFile,aLine,alls,buildin,filterIn,indx,inOut,nIn,originalY,partH,Shotcut,splitted,wHeight,lightening

View File

@@ -7,6 +7,7 @@ include:
# Linting # Linting
- /gitlab-templates/reuse-lint.yml - /gitlab-templates/reuse-lint.yml
- /gitlab-templates/xml-lint.yml - /gitlab-templates/xml-lint.yml
- /gitlab-templates/pre-commit.yml
# CI Qt6 # CI Qt6
- /gitlab-templates/linux-qt6.yml - /gitlab-templates/linux-qt6.yml
- /gitlab-templates/linux-qt6-next.yml - /gitlab-templates/linux-qt6-next.yml

8
.pre-commit-config.yaml Normal file
View File

@@ -0,0 +1,8 @@
# SPDX-FileCopyrightText: none
# SPDX-License-Identifier: CC0-1.0
repos:
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell