Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

link-checker fails with relative URLs #86

Open
gkellogg opened this issue Jun 12, 2021 · 5 comments
Open

link-checker fails with relative URLs #86

gkellogg opened this issue Jun 12, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@gkellogg
Copy link
Member

Using w3c/spec-prod@v2

See https://github.com/w3c/N3/runs/2793542809?check_suite_focus=true for example, but also failing in https://github.com/w3c/rdf-star/runs/2810861457?check_suite_focus=true.

Both specs contain an href to a file relative to the spec source, and link-checker fails on them.

From https://github.com/w3c/N3/runs/2793542809?check_suite_focus=true

page not found from index.html to ../ns/crypto.html
page not found from index.html to ../ns/list.html
page not found from index.html to ../ns/log.html
page not found from index.html to ../ns/math.html
page not found from index.html to ../ns/string.html
page not found from index.html to ../ns/time.html
page not found from index.html to ../grammar/n3.ebnf

From https://github.com/w3c/rdf-star/runs/2810861457?check_suite_focus=true:

page not found from editors_draft.html to ../tests/index.html
page not found from editors_draft.html to ../UCR/rdf-star-ucr.html#annotate-statements-from-other-named-graphs-and-datasets
page not found from editors_draft.html to ../UCR/rdf-star-ucr.html#annotate-commit-deltas
page not found from editors_draft.html to ../UCR/rdf-star-ucr.html#meta-properties-over-properties

cc/ @pchampin @william-vw

@sidvishnoi sidvishnoi added the bug Something isn't working label Jun 17, 2021
@sidvishnoi
Copy link
Member

sidvishnoi commented Jun 17, 2021

@marcoscaceres This appears to be a limitation of 'link-checker' npm package, as it expects a base directory instead of a file. Maybe we can skip ../ URLs?

@gkellogg
Copy link
Member Author

Before I started using w3c/spec-prod, I worked with lycheeverse/lychee-action for doing link checks. It wasn't perfect, either, but did have some options and patterns to limit the links it would follow:

json-ld/json-ld-star@0c9b640#diff-b803fcb7f17ed9235f1e5cb1fcd2f5d3b2838429d4368ae4c57ce4436577f03f

@sidvishnoi
Copy link
Member

@gkellogg Thanks for introducing me to lychee. I'll try it out, and if it doesn't work well enough, I'll fix href-checker. Maybe this weekend.

@gkellogg
Copy link
Member Author

gkellogg commented Jul 5, 2021

Is there a workaround, perhaps to just skip the link checker? It's interfering with various update processes.

@sidvishnoi
Copy link
Member

Link checker is currently opt-in, so you can skip the link checker by removing VALIDATE_LINKS option from the workflow file, or setting VALIDATE_LINKS: false if you prefer to be explicit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants