unicode check action
Some checks failed
Check for disallowed chars / unicode-check (pull_request) Failing after 1m36s

This commit is contained in:
Paolo Asperti 2024-08-04 10:27:38 +02:00
parent e6b8c7af5b
commit 687a6f349f
Signed by: paspo
GPG Key ID: 06D46905D19D5182

View File

@ -0,0 +1,22 @@
---
name: Check for disallowed chars
on:
pull_request:
jobs:
unicode-check:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- uses: actions/checkout@v4
with:
submodules: false
- name: Check for disallowed chars
run: |
set -x
modifiche=$(git diff --unified=0 ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep -E "^[+]" | grep -Ev '^(--- a/|\+\+\+ b/)')
num=$(echo $modifiche | grep -c -e '[\u2014]' -e '[\u2018]' -e '[\u2019]' -e '[\u201C]' -e '[\u201D]' -e '[\u2026]' )
if [ $num -gt 0 ] ; then exit 1 ; done