Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
16 changes: 16 additions & 0 deletions .github/config/lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,23 @@ max_concurrency = 4
# Check link anchors
include_fragments = true

# Include additional file types beyond the default markdown/HTML
include = [
"**/*.md",
"**/*.java",
"**/*.yml",
"**/*.yaml"
Copy link
Owner

Choose a reason for hiding this comment

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

@copilot is *.yaml applicable in this repo?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, *.yaml is applicable. Found 2 .yaml files in the repo:

  • ./buildscripts/templates/registry/java/weaver.yaml
  • ./buildscripts/templates/registry/incubating_java/weaver.yaml

These files don't contain HTTP links, but the pattern ensures they're checked if links are added in the future.

]

remap = [
# workaround for https://github.com/lycheeverse/lychee/issues/1729
"https://github.com/(.*?)/(.*?)/blob/(.*?)/(.*#.*)$ https://raw.githubusercontent.com/$1/$2/$3/$4",
"https://docs.oracle.com/(.*)#.*$ https://docs.oracle.com/$1"
Copy link
Owner

Choose a reason for hiding this comment

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

@copilot check if any links in this repo need this

Copy link
Author

Choose a reason for hiding this comment

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

Yes, this remap is needed. Found 8 Oracle docs links with anchors:

  • 5 in JvmIncubatingAttributes.java (#getName, #getGcAction, #getGcCause, #getGcName, #getName)
  • 3 in JvmAttributes.java (#getGcAction, #getGcName, #getName)

These links have anchor fragments that lychee cannot check properly without the remap workaround.

Copy link
Owner

Choose a reason for hiding this comment

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

@copilot does lychee check links in Java files?

if not, can it?

Copy link
Author

Choose a reason for hiding this comment

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

By default, lychee only checks markdown and HTML files. It doesn't check Java files by default, but it can. Added include patterns in 9c45c73 to check .java and .yml/.yaml files in addition to markdown.

Copy link
Author

Choose a reason for hiding this comment

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

By default, lychee only checks markdown and HTML files. It doesn't check Java files by default, but it can. Added include patterns in 9c45c73 to check .java and .yml/.yaml files in addition to markdown.

]

exclude = [
# workaround for https://github.com/lycheeverse/lychee/issues/1729
'^https://github.com/.*#issuecomment-.*$',
Comment on lines +26 to +27
Copy link
Owner

Choose a reason for hiding this comment

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

@copilot check if any links in this repo need this

Copy link
Author

Choose a reason for hiding this comment

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

Yes, this exclusion is needed. Found 1 GitHub issue comment link in .github/workflows/codeql.yml:
https://github.com/github/codeql-action/issues/1555#issuecomment-1452228433

This type of link cannot be reliably checked by lychee.

Copy link
Owner

Choose a reason for hiding this comment

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

@copilot does lychee check links in yml files?

if not, can it?

Copy link
Author

Choose a reason for hiding this comment

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

By default, lychee only checks markdown and HTML files. It doesn't check YAML files by default, but it can. Added include patterns in 9c45c73 to check .yml/.yaml and .java files in addition to markdown.

Copy link
Author

Choose a reason for hiding this comment

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

By default, lychee only checks markdown and HTML files. It doesn't check YAML files by default, but it can. Added include patterns in 9c45c73 to check .yml/.yaml and .java files in addition to markdown.

"^http://localhost:",
"^http://0.0.0.0:",
]
2 changes: 1 addition & 1 deletion mise.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tools]
lychee = "0.18.1"
lychee = "0.20.1"

[tasks.link-check]
run = 'lychee --verbose --config .github/config/lychee.toml .'
Expand Down