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

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:",
]