Skip to content

Fix Visual Studio rebuilding issue (LT-22423) #426

Fix Visual Studio rebuilding issue (LT-22423)

Fix Visual Studio rebuilding issue (LT-22423) #426

Workflow file for this run

name: lint-docs
on:
pull_request:
types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-docs:
name: Verify component docs and catalog links
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Verify AGENTS.md presence under Src and src-catalog links
shell: bash
run: |
set -euo pipefail
missing=()
not_listed=()
if [[ ! -f .github/src-catalog.md ]]; then
echo "ERROR: .github/src-catalog.md is missing."
exit 1
fi
echo "Scanning immediate subfolders of Src/ for AGENTS.md..."
while IFS= read -r -d '' dir; do
name=$(basename "$dir")
if [[ ! -f "$dir/AGENTS.md" ]]; then
missing+=("$name")
fi
if ! grep -qi "${name}" .github/src-catalog.md; then
not_listed+=("$name")
fi
done < <(find Src -mindepth 1 -maxdepth 1 -type d -print0)
echo "--- Summary ---"
if (( ${#missing[@]} > 0 )); then
printf 'Missing AGENTS.md for: %s\n' "${missing[@]}"
else
echo "All immediate subfolders of Src have AGENTS.md"
fi
if (( ${#not_listed[@]} > 0 )); then
printf 'Not referenced in .github/src-catalog.md: %s\n' "${not_listed[@]}"
else
echo ".github/src-catalog.md references all immediate subfolders of Src"
fi
if (( ${#missing[@]} > 0 || ${#not_listed[@]} > 0 )); then
echo "Documentation lint failed."
exit 1
fi
echo "Documentation lint passed."