Skip to content

Commit c1d4b8a

Browse files
authored
Check for broken links in CI (#1124)
Check for broken links as part of the `soundness` job. The job will fail if a link returns a non 200 HTTP status code. Fixes a broken link in `./docs/contributor/test-strategy.md`
1 parent 63fb56b commit c1d4b8a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

docs/contributor/test-strategy.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Swift for Visual Studio Code test strategy
22

3-
This document covers the structure of tests as well as plans for the future. For a more in depth explanation of how to write and structure tests for your contributions, please see the [Writing Effective Tests](./writing-effective-tests.md) document in this repository
3+
This document covers the structure of tests as well as plans for the future. For a more in depth explanation of how to write and structure tests for your contributions, please see the [Writing Tests for VS Code Swift](./writing-tests-for-vscode-swift.md) document in this repository.
44

55
The recommended way for [testing extensions](https://code.visualstudio.com/api/working-with-extensions/testing-extension) involves using either the new [vscode-test-cli](https://github.com/microsoft/vscode-test-cli) or creating your [own mocha test runner](https://code.visualstudio.com/api/working-with-extensions/testing-extension#advanced-setup-your-own-runner). Either approach results in Visual Studio Code getting downloaded, and a window spawned. This is necessary to have access the the APIs of the `vscode` namespace, to stimulate behaviour (ex. `vscode.tasks.executeTasks`) and obtain state (ex. `vscode.languages.getDiagnostics`).
66

scripts/soundness.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -123,4 +123,8 @@ EOF
123123
)
124124
done
125125

126-
rm "$tmp"
126+
rm "$tmp"
127+
128+
printf "=> Checking for broken links in documentation... "
129+
find . -name node_modules -prune -o -name \*.md -print0 | xargs -0 -n1 npx markdown-link-check
130+
printf "\033[0;32mokay.\033[0m\n"

0 commit comments

Comments
 (0)