Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,25 @@
redirect in `src/data/redirects.ts` does not satisfy the check.
- Link to this site with relative paths (`/admin/config/site-config`), never
`https://sourcegraph.com/docs/…` or `https://docs.sourcegraph.com/…`.
- To also probe the external links you added:
- main has hundreds of pre-existing findings. To see only the ones your
branch adds, as CI does, record the merge base with `--format json` and
pass it as `--baseline`; `--diff` does not filter findings, it only scopes
`--check-external` and the review comments to added lines:

```sh
pnpm run check links --check-anchors --check-self-links \
--check-external --diff <(git diff -U0 origin/main)
base=$(git merge-base origin/main HEAD)
git worktree add --detach /tmp/docs-base "$base"
node dev/check-links.mjs --check-anchors --check-self-links --format json \
--root /tmp/docs-base > /tmp/docs-base-links.json
git worktree remove /tmp/docs-base
git diff -U0 "$base" | pnpm run check links --check-anchors --check-self-links \
--check-external --baseline /tmp/docs-base-links.json --diff /dev/stdin
```

- Pipe the diff to `--diff /dev/stdin`, not `--diff <(git diff ...)`:
`dev/checks.mjs` spawns the check with only stdin/stdout/stderr, so the
process-substitution descriptor is gone and the check fails with `EBADF`

### PR check comments

The spelling, links, redirects, and example hostnames checks comment on the
Expand Down
1 change: 1 addition & 0 deletions cspell-allow-list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ drwxr
dshm
dumpall
eastus
EBADF
eksctl
ELEC
elif
Expand Down
Loading