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


exclude = [
# Disabled until https://github.com/lycheeverse/lychee/issues/1729 is fixed
"^https://github.com/.*#.*$",
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not ideal as it completely disables checking github links. Have you considered using the remap option. Perhaps that could be used to strip the anchor from github links?

Copy link
Member Author

Choose a reason for hiding this comment

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

good idea!

Copy link
Member Author

Choose a reason for hiding this comment

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

copilot suggested to add a remap that actually (with a little bit of tweaking) checking all anchors instead of discarding them.

Here's a link that is now verified as correct:

https://raw.githubusercontent.com/open-telemetry/opentelemetry-specification/v1.20.0/specification/resource/sdk.md#specifying-resource-information-via-an-environment-variable

Several are not correct - not not fixed in this PR (yet)

[./CHANGELOG.md]:                                                                                                                                                                                  
   [ERROR] https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/jmx-metrics#jmx-metric-insight | Cannot find fragment                                    

[./consistent-sampling/README.md]:
   [ERROR] https://raw.githubusercontent.com/open-telemetry/opentelemetry-specification/main/specification/trace/tracestate-probability-sampling.md#always-off-sampler | Cannot find fragment      
   [ERROR] https://raw.githubusercontent.com/open-telemetry/opentelemetry-specification/main/specification/trace/tracestate-probability-sampling.md#always-on-consistent-probability-sampler | Cannot find fragment
   [ERROR] https://raw.githubusercontent.com/open-telemetry/opentelemetry-specification/main/specification/trace/tracestate-probability-sampling.md#consistentprobabilitybased-sampler | Cannot find fragment
   [ERROR] https://raw.githubusercontent.com/open-telemetry/opentelemetry-specification/main/specification/trace/tracestate-probability-sampling.md#parentconsistentprobabilitybased-sampler | Cannot find fragment
   [ERROR] https://raw.githubusercontent.com/open-telemetry/opentelemetry-specification/main/specification/trace/tracestate-probability-sampling.md#requirement-combine-multiple-consistent-probability-samplers-using-the-minimum-p-value | Cannot find fragment

[./jmx-scraper/README.md]:
     [400] https://raw.githubusercontent.com/open-telemetry/opentelemetry-java-instrumentation/main/instrumentation/jmx-metrics/library/src/main/resources/jmx/rules/ | Rejected status code (this depends on your "accept" configuration): Bad Request

Copy link
Member

Choose a reason for hiding this comment

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

wow, love that! 😍

Copy link
Member Author

Choose a reason for hiding this comment

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

wow, love that! 😍

all credits go to @laurit and copilot - they are an incredible combo 😜

# excluding links to pull requests and issues is done for performance
"^https://github.com/open-telemetry/opentelemetry-java-contrib/(issues|pull)/\\d+$",
]
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.lint-local-links]
run = 'lychee --verbose --scheme file --include-fragments {{arg(name="files", default=".")}}'
Expand Down
Loading