diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 4f7e8b27270..c88c11c4bd5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -40,3 +40,5 @@ jobs:
           version: "0.19"
           args: --check lua
 
+      - name: doc-comments
+        run: ./scripts/doc-comments.sh
diff --git a/scripts/doc-comments.sh b/scripts/doc-comments.sh
new file mode 100755
index 00000000000..c31bbeaef44
--- /dev/null
+++ b/scripts/doc-comments.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+out=$(grep -nr "^--- @" lua)
+
+if [ "$out" ]; then
+	last_file=""
+	while read -r line; do
+		file="$(echo "$line" | cut -d: -f1)"
+		if [[ "$file" != "$last_file" ]]; then
+			echo "$file:" >&2
+			last_file="$file"
+		fi
+		echo "$line" | awk -F: '{ printf("  line %s: %s\n", $2, $3) }' >&2
+	done <<< "$out"
+	exit 1
+fi