Skip to content
Snippets Groups Projects
Commit 9c671a71 authored by Bert Wesarg's avatar Bert Wesarg :keyboard:
Browse files

check: Use Git attributes to exclude files from the spell checker

parent f243568b
No related branches found
No related tags found
2 merge requests!1164Automated merge from preview to main,!1156Improve `git-diff` usage and fix monikers
*.webm filter=lfs diff=lfs merge=lfs -text *.webm filter=lfs diff=lfs merge=lfs -text
*.mp4 filter=lfs diff=lfs merge=lfs -text *.mp4 filter=lfs diff=lfs merge=lfs -text
/doc.zih.tu-dresden.de/docs/accessibility.md -check-spelling
/doc.zih.tu-dresden.de/docs/data_protection_declaration.md -check-spelling
/doc.zih.tu-dresden.de/docs/legal_notice.md -check-spelling
/doc.zih.tu-dresden.de/docs/access/key_fingerprints.md -check-spelling
...@@ -7,12 +7,6 @@ basedir=`dirname "${scriptpath}"` ...@@ -7,12 +7,6 @@ basedir=`dirname "${scriptpath}"`
basedir=`dirname "${basedir}"` basedir=`dirname "${basedir}"`
wordlistfile=$(realpath ${basedir}/wordlist.aspell) wordlistfile=$(realpath ${basedir}/wordlist.aspell)
branch="origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-preview}" branch="origin/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-preview}"
files_to_skip=(
doc.zih.tu-dresden.de/docs/accessibility.md
doc.zih.tu-dresden.de/docs/data_protection_declaration.md
doc.zih.tu-dresden.de/docs/legal_notice.md
doc.zih.tu-dresden.de/docs/access/key_fingerprints.md
)
aspellmode= aspellmode=
if aspell dump modes | grep -q markdown; then if aspell dump modes | grep -q markdown; then
aspellmode="--mode=markdown" aspellmode="--mode=markdown"
...@@ -46,7 +40,8 @@ function is_wordlist_sorted(){ ...@@ -46,7 +40,8 @@ function is_wordlist_sorted(){
} }
function should_skip_file(){ function should_skip_file(){
printf '%s\n' "${files_to_skip[@]}" | grep -xq $1 local result="$(git check-attr check-spelling -- "$1")"
test "${result#*: check-spelling: }" = "unset"
} }
function check_all_files(){ function check_all_files(){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment