Skip to content
Snippets Groups Projects

Added a pre-commit hook template and explanation in README.md.

Merged Jan Frenzel requested to merge add-pre-commit-hook into preview
All threads resolved!
1 file
+ 4
0
Compare changes
  • Side-by-side
  • Inline
@@ -30,6 +30,7 @@ do
@@ -30,6 +30,7 @@ do
filepattern=${BASH_REMATCH[1]}
filepattern=${BASH_REMATCH[1]}
#lint
#lint
 
echo "Checking linter"
docker run --name=hpc-compendium --rm -w /docs --mount src="$(pwd)"/doc.zih.tu-dresden.de,target=/docs,type=bind hpc-compendium markdownlint $filepattern
docker run --name=hpc-compendium --rm -w /docs --mount src="$(pwd)"/doc.zih.tu-dresden.de,target=/docs,type=bind hpc-compendium markdownlint $filepattern
if [ $? -ne 0 ]
if [ $? -ne 0 ]
then
then
@@ -37,6 +38,7 @@ do
@@ -37,6 +38,7 @@ do
fi
fi
#link-check
#link-check
 
echo "Checking links..."
docker run --name=hpc-compendium --rm -w /docs --mount src="$(pwd)"/doc.zih.tu-dresden.de,target=/docs,type=bind hpc-compendium markdown-link-check $filepattern
docker run --name=hpc-compendium --rm -w /docs --mount src="$(pwd)"/doc.zih.tu-dresden.de,target=/docs,type=bind hpc-compendium markdown-link-check $filepattern
if [ $? -ne 0 ]
if [ $? -ne 0 ]
then
then
@@ -46,6 +48,7 @@ do
@@ -46,6 +48,7 @@ do
done
done
#spell-check
#spell-check
 
echo "Spell-checking..."
docker run --name=hpc-compendium --rm -w /docs --mount src="$(pwd)",target=/docs,type=bind hpc-compendium ./doc.zih.tu-dresden.de/util/check-spelling.sh
docker run --name=hpc-compendium --rm -w /docs --mount src="$(pwd)",target=/docs,type=bind hpc-compendium ./doc.zih.tu-dresden.de/util/check-spelling.sh
if [ $? -ne 0 ]
if [ $? -ne 0 ]
then
then
@@ -53,6 +56,7 @@ then
@@ -53,6 +56,7 @@ then
fi
fi
#forbidden words checking
#forbidden words checking
 
echo "Forbidden words checking..."
docker run --name=hpc-compendium --rm -w /docs --mount src="$(pwd)",target=/docs,type=bind hpc-compendium ./doc.zih.tu-dresden.de/util/grep-forbidden-words.sh
docker run --name=hpc-compendium --rm -w /docs --mount src="$(pwd)",target=/docs,type=bind hpc-compendium ./doc.zih.tu-dresden.de/util/grep-forbidden-words.sh
if [ $? -ne 0 ]
if [ $? -ne 0 ]
then
then
Loading