Skip to content

Commit

Permalink
Ensure absence of img tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Johennes committed May 16, 2024
1 parent b548e49 commit 3ad1d70
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,24 @@ jobs:
exit $rc
- name: Verify absence of <img> tags
run: |
function err {
>&2 echo -e "\033[0;31m$@\033[0m"
}
rc=0
while read -r file; do
echo "Checking $file"
if grep -q "<img" "$file"; then
err "$file contains forbidden <img> tags. Use AsciiDoc image macros instead."
fi
done < <(find . -type f -name "*.adoc")
exit $rc
drawio:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -105,7 +123,7 @@ jobs:
echo "Checking $file"
if grep -qE "^@startuml\s+." "$file"; then
err "$file contains illegal output name in @startuml"
err "$file contains forbidden output name in @startuml"
rc=1
fi
done < <(find . -name "*.puml")
Expand Down

0 comments on commit 3ad1d70

Please sign in to comment.