Skip to content

Add GitHub action to check links with Lychee - #5965

Merged
DanTup merged 5 commits into
Dart-Code:masterfrom
Peter080202:add-test-to-check-hyperlinks
Mar 9, 2026
Merged

DanTup merged 5 commits into
Dart-Code:masterfrom
Peter080202:add-test-to-check-hyperlinks

Conversation

@Peter080202

Copy link
Copy Markdown
Contributor

Description

Introduced link_check workflow to automatically verify links in source code, Markdown files and package.json.

Issue link: #4617

- Introduce 'link_check' workflow to automatically verify links in source code, Markdown files and package.json.
@Peter080202

Copy link
Copy Markdown
Contributor Author

@codex review

/gemini review

@chatgpt-codex-connector

Copy link
Copy Markdown

To use Codex here, create a Codex account and connect to github.

@Peter080202

Copy link
Copy Markdown
Contributor Author

@DanTup could you review this one please?

@DanTup DanTup left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for looking at this!

I've added some feedback below. I also see there are some failures currently picked up, I'll take a scan through them and fix them or determine if they need to be excluded somehow.

Comment thread .github/workflows/build-and-test.yml Outdated
Comment thread .github/workflows/build-and-test.yml Outdated
Comment thread .github/workflows/build-and-test.yml Outdated
Comment thread .github/workflows/build-and-test.yml Outdated
DanTup added a commit that referenced this pull request Mar 9, 2026
To enable lychee, see #5965
@DanTup

DanTup commented Mar 9, 2026

Copy link
Copy Markdown
Member

@Peter080202 I've pushed some changes to master that fix some of the failures, but there are two remaining that are URLs with variables in them:

I think maybe they could be handled with something like --exclude "://.*$"?

@DanTup DanTup added this to the v3.132.0 milestone Mar 9, 2026
@DanTup DanTup added the is enhancement An enhancement or improvement that should be listed in release notes but is not a bug fix. label Mar 9, 2026
@Peter080202
Peter080202 requested a review from DanTup March 9, 2026 11:38
Comment thread .lycheeignore Outdated
@Peter080202
Peter080202 force-pushed the add-test-to-check-hyperlinks branch from eefad3d to c2c06db Compare March 9, 2026 12:00
@DanTup
DanTup requested a review from Copilot March 9, 2026 12:01
@DanTup

DanTup commented Mar 9, 2026

Copy link
Copy Markdown
Member

Thanks!

Looks like it's still complaining about this:

[404] https://dartcode.org/releases/v$%7BversionLink%7D/ | Rejected status code: 404 Not Found (configurable with "accept" option)

I'm not sure why, the regex looks reasonable to me. If you don't want to spend more time on this, I'm happy to debug it further later or tomorrow :-)

Thanks again!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds automated link validation to the repository’s CI by introducing a new link_check job in the main build-and-test workflow, aligning with the request to detect broken links in code and metadata over time.

Changes:

  • Added a new link_check GitHub Actions job that runs Lychee against src/**/*.ts, top-level Markdown, .license files, and package.json.
  • Configured Lychee with exclusions intended to skip private and file links.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread .github/workflows/build-and-test.yml
Comment thread .github/workflows/build-and-test.yml Outdated
@DanTup

DanTup commented Mar 9, 2026

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c2c06db127

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/build-and-test.yml Outdated
@Peter080202
Peter080202 force-pushed the add-test-to-check-hyperlinks branch from 3c8c849 to cd841dc Compare March 9, 2026 12:53
@Peter080202

Copy link
Copy Markdown
Contributor Author

@DanTup it should work now 🤞

@Peter080202

Copy link
Copy Markdown
Contributor Author

🎉

| Status         | Count |
|----------------|-------|
| 🔍 Total       | 119   |
| ✅ Successful  | 96    |
| ⏳ Timeouts    | 0     |
| 🔀 Redirected  | 16    |
| 👻 Excluded    | 5     |
| ❓ Unknown     | 0     |
| 🚫 Errors      | 0     |
| ⛔ Unsupported | 2     |

@DanTup

DanTup commented Mar 9, 2026

Copy link
Copy Markdown
Member

@Peter080202 perfect, thank you!

@DanTup
DanTup merged commit 7c1345e into Dart-Code:master Mar 9, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

is enhancement An enhancement or improvement that should be listed in release notes but is not a bug fix.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants