#!/bin/bash
# check_adoc_tables.sh - quick sanity checker for AsciiDoc tables
# Usage: ./check_adoc_tables.sh SDP_Guide.Unix.adoc
file="$1"
cols=0
in_table=false
lineno=0
while IFS= read -r line; do
((lineno++))
# Detect table start
if [[ $line =~ ^\[cols=\"([0-9]+)\* ]]; then
cols="${BASH_REMATCH[1]}"
fi
if [[ $line == "|===" && $in_table == false ]]; then
in_table=true
continue
fi
if [[ $line == "|===" && $in_table == true ]]; then
in_table=false
cols=0
continue
fi
if $in_table; then
# Count pipes in this line
pc=$(grep -o '|' <<<"$line" | wc -l)
if [[ $pc -gt 0 && $pc -lt $cols ]]; then
echo "Line $lineno: Too few cells ($pc) for $cols-col table: $line"
fi
if [[ $line =~ ^\|$ ]]; then
echo "Line $lineno: Bare '|' found (likely missing content)."
fi
fi
done < "$file"
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #1 | 33565 | Claude (AI Agent by Anthropic) | Initial population of r26.1.0 from main. | ||
| //p4-sdp/main/Unsupported/doc/check_adoc_tables.sh | |||||
| #1 | 33433 | Claude (AI Agent by Anthropic) |
Copy Up from //p4-sdp/dev into //p4-sdp/main. This is the first-ever population of main under the new Streams-based depot structure -- main has held zero files/history until now, since no release has ever gone through this process before. 463 files, covering the entire 2026.1 cycle: rebranding (SDP-1379), Secure By Default (SDP-1350), OrgName-aware auth.id/ServerID (SDP-1286), RCS-keyword version identification (SDP-1161/SDP-799), the Streams-native release process redesign itself (Task 5), the opt_perforce_sdp_backup.sh false-error fix, the P4D 2026.1 test-suite targeting, refreshed P4*.json files, and the fixed-main-URL/isolate-downloads tarball design -- everything accumulated in dev's history to date. Isolated paths (ai_dev_support/, Version, doc/*.html, doc/*.pdf, doc/gen/*.man.txt, doc/gen/sdp_install.cfg, Unsupported/doc/*.html, Unsupported/doc/*.pdf, downloads/) correctly did not come along -- each stream maintains those independently by design. Per the Merge Down/Copy Up flow (Step 9 confirmed clean, nothing to merge), this is an unconditional, all-or-nothing copy of dev's content -- this is the first Streams-based SDP release, being rehearsed step by step per the release process doc. Agent: Claude Code, Model: Claude Sonnet 5 (claude-sonnet-5), operating as bot_Claude_Anthropic. |
||
| //p4-sdp/dev/Unsupported/doc/check_adoc_tables.sh | |||||
| #1 | 31861 | C. Thomas Tyler |
p4 merge -b SDP_Classic_to_Streams p4 resolve -as |
||
| //guest/perforce_software/sdp/dev/Unsupported/doc/check_adoc_tables.sh | |||||
| #1 | 31855 | C. Thomas Tyler | Added utility to help fix AsciiDoctor table/column formatting errors. | ||