forked from BgLUG/bglug.it
unwanted unicode
All checks were successful
Check for disallowed chars / unicode-check (pull_request) Successful in 1m59s
All checks were successful
Check for disallowed chars / unicode-check (pull_request) Successful in 1m59s
This commit is contained in:
parent
26baf86c87
commit
bc52c1a35e
6
.gitea/workflows/unwanted_unicode_patterns.grep
Normal file
6
.gitea/workflows/unwanted_unicode_patterns.grep
Normal file
@ -0,0 +1,6 @@
|
||||
—
|
||||
‘
|
||||
’
|
||||
“
|
||||
”
|
||||
…
|
23
.gitea/workflows/unwanted_unicode_pr.sh
Executable file
23
.gitea/workflows/unwanted_unicode_pr.sh
Executable file
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo
|
||||
echo "Initial commit: $1"
|
||||
echo "Final commit: $2"
|
||||
echo
|
||||
|
||||
# recupera ogni file modificato in questa PR (tra le 2 commit)
|
||||
# considera solo i file che terminano con .md
|
||||
# ogni file viene controllato con grep, con i pattern definiti
|
||||
# nel file di configurazione
|
||||
|
||||
EXIT=0
|
||||
|
||||
while read -r LINE; do
|
||||
if [ -r "$LINE" ] ; then
|
||||
echo
|
||||
echo "testing file: $LINE"
|
||||
grep --color -f .gitea/workflows/unwanted_unicode_patterns.grep "$LINE" && EXIT=1
|
||||
fi
|
||||
done < <(git diff --name-only "$1" "$2" content/ | grep \.md$)
|
||||
|
||||
exit ${EXIT}
|
Loading…
Reference in New Issue
Block a user