Skip to content

Fix linkchecker by remapping root-relative links to learn.microsoft.com#152

Merged
Dickson-Mwendia merged 4 commits into
mainfrom
link-checker
May 19, 2026
Merged

Fix linkchecker by remapping root-relative links to learn.microsoft.com#152
Dickson-Mwendia merged 4 commits into
mainfrom
link-checker

Conversation

@Dickson-Mwendia
Copy link
Copy Markdown
Collaborator

Add --remap flag to lychee args so root-relative links (e.g. /entra/...) are rewritten to https://learn.microsoft.com/... and validated against the live site instead of failing as unresolvable local paths.

Add --remap flag to lychee args so root-relative links (e.g. /entra/...)
are rewritten to https://learn.microsoft.com/... and validated against
the live site instead of failing as unresolvable local paths.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@learn-build-service-prod
Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown

Learn Build status updates of commit 303c799:

✅ Validation status: passed

File Status Preview URL Details
.github/workflows/linkvalidator.yml ✅Succeeded

For more details, please refer to the build report.

The unanchored regex '/(.+)' was matching '/' inside absolute
URLs (https://, file:///), producing mangled double-protocol
URLs like 'https://https//learn.microsoft.com//github.com/...'.

Adding '^' ensures only root-relative links (/entra/...) are
remapped to learn.microsoft.com.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@learn-build-service-prod
Copy link
Copy Markdown

Learn Build status updates of commit 857a404:

✅ Validation status: passed

File Status Preview URL Details
.github/workflows/linkvalidator.yml ✅Succeeded

For more details, please refer to the build report.

@learn-build-service-prod
Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

Replace the lychee --remap flag with a sed pre-processing step
(matching the approach used in MSAL Java) that rewrites
root-relative markdown links like [text](/path) to
[text](https://learn.microsoft.com/path) before lychee runs.

The --remap regex approach couldn't intercept root-relative links
before lychee's own root-relative resolver rejected them.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@learn-build-service-prod
Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown

Learn Build status updates of commit 22d860c:

✅ Validation status: passed

File Status Preview URL Details
.github/workflows/linkvalidator.yml ✅Succeeded

For more details, please refer to the build report.

Link 'official APIs' to the acquiring-tokens doc, which
documents the standard MSAL Python token acquisition methods
that the migrate page contrasts with.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@learn-build-service-prod
Copy link
Copy Markdown

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod
Copy link
Copy Markdown

Learn Build status updates of commit 9487468:

✅ Validation status: passed

File Status Preview URL Details
.github/workflows/linkvalidator.yml ✅Succeeded
msal-python-conceptual/advanced/migrate.md ✅Succeeded View

For more details, please refer to the build report.

@Dickson-Mwendia Dickson-Mwendia merged commit d1571e5 into main May 19, 2026
4 checks passed
@Dickson-Mwendia Dickson-Mwendia deleted the link-checker branch May 19, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant