From 65fa9e69c283e7e8b786eb13f460d71fdcc0d83e Mon Sep 17 00:00:00 2001 From: Martin Schroschk <martin.schroschk@tu-dresden.de> Date: Thu, 26 Aug 2021 10:04:10 +0200 Subject: [PATCH] Let spell check skip files with german stuff. --- .../docs/archive/load_leveler.md | 12 ++--- .../util/check-spelling-changes.sh | 53 +++++++++++-------- doc.zih.tu-dresden.de/wordlist.aspell | 3 ++ 3 files changed, 38 insertions(+), 30 deletions(-) diff --git a/doc.zih.tu-dresden.de/docs/archive/load_leveler.md b/doc.zih.tu-dresden.de/docs/archive/load_leveler.md index 2aa089247..07daea3db 100644 --- a/doc.zih.tu-dresden.de/docs/archive/load_leveler.md +++ b/doc.zih.tu-dresden.de/docs/archive/load_leveler.md @@ -146,12 +146,10 @@ description of keywords\]\]. Submission of a job without a job file can be done by the command: `llsub [llsub_options] <command>` -This command is not part of the IBM Loadleveler software but was -developed at ZIH. +This command is not part of the IBM LoadLeveler software but was developed at ZIH. -The job file will be created in background by means of the command line -options. Afterwards, the job file will be passed to the command -`llsubmit` which submit the job to LoadLeveler (see above). +The job file will be created in background by means of the command line options. Afterwards, the job +file will be passed to the command `llsubmit` which submit the job to LoadLeveler (see above). Important options are: @@ -185,9 +183,9 @@ Interactive Jobs can be submitted by the command: llsub -I -q <interactive> <command> ``` -### Loadleveler Runtime Environment Variables +### LoadLeveler Runtime Environment Variables -Loadleveler Runtime Variables give you some information within the job +LoadLeveler runtime variables give you some information within the job script, for example: ```Bash diff --git a/doc.zih.tu-dresden.de/util/check-spelling-changes.sh b/doc.zih.tu-dresden.de/util/check-spelling-changes.sh index b44a3fd6a..670e687ce 100755 --- a/doc.zih.tu-dresden.de/util/check-spelling-changes.sh +++ b/doc.zih.tu-dresden.de/util/check-spelling-changes.sh @@ -13,7 +13,7 @@ function getNumberOfAspellOutputLines(){ branch="preview" if [ -n "$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" ]; then - branch="origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" + branch="origin/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME" fi any_fails=false @@ -25,30 +25,37 @@ files=`git diff $source_hash | sed -n 's/^[-+]\{3,3\} //p'` #echo "-------------------------" #Assume that we have pairs of lines (starting with --- and +++). while read oldfile; do - read newfile - if [ "${newfile: -3}" == ".md" ]; then - if [ "$oldfile" == "/dev/null" ]; then - #Added files should not introduce new spelling mistakes - previous_count=0 - else - previous_count=`git show "$source_hash:${oldfile:2}" | getNumberOfAspellOutputLines` - fi - if [ "$newfile" == "/dev/null" ]; then - #Deleted files do not contain any spelling mistakes - current_count=0 - else - #Remove the prefix "b/" - newfile=${newfile:2} - current_count=`cat "$newfile" | getNumberOfAspellOutputLines` - fi - if [ $current_count -gt $previous_count ]; then - echo "-- File $newfile" - echo "Change increases spelling mistake count (from $previous_count to $current_count)" - any_fails=true - fi + read newfile + if [ "${newfile: -3}" == ".md" ]; then + if [[ $newfile == *"accessibility.md"* || + $newfile == *"data_protection_declaration.md"* || + $newfile == *"legal_notice.md"* ]]; then + echo "Skip $newfile" + else + echo "Check $newfile" + if [ "$oldfile" == "/dev/null" ]; then + #Added files should not introduce new spelling mistakes + previous_count=0 + else + previous_count=`git show "$source_hash:${oldfile:2}" | getNumberOfAspellOutputLines` + fi + if [ "$newfile" == "/dev/null" ]; then + #Deleted files do not contain any spelling mistakes + current_count=0 + else + #Remove the prefix "b/" + newfile=${newfile:2} + current_count=`cat "$newfile" | getNumberOfAspellOutputLines` + fi + if [ $current_count -gt $previous_count ]; then + echo "-- File $newfile" + echo "Change increases spelling mistake count (from $previous_count to $current_count)" + any_fails=true + fi fi + fi done <<< "$files" if [ "$any_fails" == true ]; then - exit 1 + exit 1 fi diff --git a/doc.zih.tu-dresden.de/wordlist.aspell b/doc.zih.tu-dresden.de/wordlist.aspell index 01487c58c..3acfcf421 100644 --- a/doc.zih.tu-dresden.de/wordlist.aspell +++ b/doc.zih.tu-dresden.de/wordlist.aspell @@ -92,3 +92,6 @@ gnuplot RSA SHA pipelining +stdout +stderr +multithreaded -- GitLab