Compare commits

...

28 Commits

Author SHA1 Message Date
14c3034732
unwanted unicode
All checks were successful
Check for disallowed chars / unicode-check (pull_request) Successful in 1m37s
2024-08-10 13:49:10 +02:00
26baf86c87
test 23
All checks were successful
Check for disallowed chars / unicode-check (pull_request) Successful in 2m24s
2024-08-10 12:09:19 +02:00
261b1604a1
test 22
All checks were successful
Check for disallowed chars / unicode-check (pull_request) Successful in 8m13s
2024-08-10 11:49:08 +02:00
2d973212d8
test 21
Some checks failed
Check for disallowed chars / unicode-check (pull_request) Failing after 2m16s
2024-08-09 21:49:31 +02:00
d1de07df2f
test 20
Some checks failed
Check for disallowed chars / unicode-check (pull_request) Failing after 2m8s
2024-08-09 21:44:20 +02:00
2ed4bf56bf
test 19
Some checks failed
Check for disallowed chars / unicode-check (pull_request) Failing after 2m30s
2024-08-09 20:32:30 +02:00
7eeb1c726b
test 18
All checks were successful
Check for disallowed chars / unicode-check (pull_request) Successful in 2m12s
2024-08-08 19:46:17 +02:00
529cf0c0f6
test 17
All checks were successful
Check for disallowed chars / unicode-check (pull_request) Successful in 2m16s
2024-08-07 22:44:46 +02:00
ff713a1e82
test 16
Some checks failed
Check for disallowed chars / unicode-check (pull_request) Failing after 2m4s
2024-08-07 21:56:29 +02:00
a2f52db0e5
test15
All checks were successful
Check for disallowed chars / unicode-check (pull_request) Successful in 1m42s
2024-08-07 21:23:38 +02:00
b43ee99f65
test14
All checks were successful
Check for disallowed chars / unicode-check (pull_request) Successful in 1m50s
2024-08-07 21:15:41 +02:00
8e424fe5cf
test13
Some checks failed
Check for disallowed chars / unicode-check (pull_request) Failing after 2m3s
2024-08-05 22:07:32 +02:00
55ebacd78d
test12 2024-08-05 22:07:31 +02:00
f3211ec861
test11 2024-08-05 22:07:31 +02:00
c86193945b
test10 2024-08-05 22:07:31 +02:00
fd53425571
test9 2024-08-05 22:07:30 +02:00
53746f702a
test 8 2024-08-05 22:07:30 +02:00
0f5b6b0c9c
test 7 2024-08-05 22:07:29 +02:00
487ce7cf81
test 6 2024-08-05 22:07:29 +02:00
49a4d51863
test5 2024-08-05 22:07:28 +02:00
c2cb3c45ef
test 4a 2024-08-05 22:07:28 +02:00
4491cef86f
test4 2024-08-05 22:07:28 +02:00
aa43a0c777
test3 2024-08-05 22:07:27 +02:00
6aa4bb0eee
test2 2024-08-05 22:07:27 +02:00
212dd1e0d2
test1 2024-08-05 22:07:26 +02:00
c97d6dc4b7
test 2024-08-05 22:07:26 +02:00
bfb4325d92
added complete checkout 2024-08-05 22:07:25 +02:00
a628fde2ab
unicode check action 2024-08-05 22:07:25 +02:00
8 changed files with 128 additions and 0 deletions

View File

@ -0,0 +1,20 @@
#!/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 markdownlint, con la config comune
EXIT=0
while read -r LINE; do
echo
echo "testing file: $LINE"
markdownlint --config .markdownlint.yaml "$LINE" || EXIT=1
done < <(git diff --name-only "$1" "$2" content/ | grep \.md$)
exit ${EXIT}

View File

@ -0,0 +1,51 @@
---
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:
fetch-depth: 0
- name: vai
uses: docker://ghcr.io/igorshubovych/markdownlint-cli
with:
entrypoint: /bin/sh
args: -c 'apk -U add git bash ; bash .gitea/workflows/markdownlint_pr.sh ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}'
- name: check for unwanted unicode runes
run: |
bash .gitea/workflows/unwanted_unicode_pr.sh ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
# - name: Getting changed files
# id: file-lister
# shell: bash
# run: |
# echo "Initial commit: ${{ github.event.pull_request.base.sha }}"
# echo "Final commit: ${{ github.event.pull_request.head.sha }}"
# echo "File list:"
# while read LINE; do
# echo $LINE
# LINASDASDSAE=$(printf %q "$LINE")
# F="$F $(echo "${LINE}"|sed 's/\ /\\ /')"
# done < <(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} content/ | grep \.md$)
# echo "FILELIST=$F" >> "$GITHUB_OUTPUT"
# - name: Markdown Lint
# env:
# FILELIST: ${{ steps.file-lister.outputs.FILELIST }}
# uses: nosborn/github-action-markdown-cli@v3.3.0
# with:
# files: "${{ env.FILELIST }}"
# # entrypoint: /bin/sh
# # args: -c 'set'
# config_file: .markdownlint.yaml
# dot: false

View File

@ -0,0 +1,6 @@

View 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}

4
.markdownlint.yaml Normal file
View File

@ -0,0 +1,4 @@
# vedi: https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml
default: true
MD013: false

10
content/delme anche.mda Normal file
View File

@ -0,0 +1,10 @@
---
title: no
---
invalid char: ``
asdasd
asdaksjdlaj slkas jdlkajs ldkasj lkasj dlkasjdlk ajsldkajs dlkjasklsaj lkaj sldkj lkej lkeajf alsdkjf asldkfj
anche!!!

5
content/delme.mda Normal file
View File

@ -0,0 +1,5 @@
---
title: no
---
invalid char: ``

9
content/delme2.mda Normal file
View File

@ -0,0 +1,9 @@
---
title: no
---
invalid char: ``
asdasd
asdaksjdlaj slkas jdlkajs ldkasj lkasj dlkasjdlk ajsldkajs dlkjasklsaj lkaj sldkj lkej lkeajf alsdkjf asldkfj