#157 Update scripts, fix check-links warnings
Merged by oturpe. Opened by oturpe.
fedora-docs/ oturpe/package-maintainer-docs remove-unneeded-scripts  into  main

Download 157.patch

Both build.sh and preview.sh have been replaced with builder.sh,
and already did nothing but return a removal notice. builder.sh itself has
been replaced by docsbuilder.sh. Switch to the newest, leave removal
notice in place of the second newest solution, remove removal notices older
than that.

check-link.sh w as using a parameter since then removed from linkcheck.
Remove that parameter. Add --ignore-url parameters to fix much output that
does not signal an actual problem. Fix many other output entries that were valid
findings.

check-links.sh works for me with --complete removed.

If you are going to push forward with removal, please also remove the matching section from README.md.

check-links.sh works for me with --complete removed.

It does. Maybe you are right, that the script still has some value. The huge number of false positives has to dealt with somehow, though. I put a little more effort into looking at the output, and at least these kinds could be ignored with clever --ignore-urlregexes:

URL        `file:///antora/modules/ROOT/pages/index.adoc'
Name       `Edit this Page'
Parent URL http://localhost:8080/package-maintainers/, line 198, col 29
Real URL   file:///antora/modules/ROOT/pages/index.adoc
Result     Error: LinkCheckerError: local files are only checked without parent URL or when the parent URL is also a file

Edit this Page comes from the stylesheet and is not expected to work with local build.

URL        `../../en-US/package-maintainers/'
Name       `en English'
Parent URL http://localhost:8080/package-maintainers/, line 195, col 9
Real URL   http://localhost:8080/en-US/package-maintainers/
Result     Error: 404 File not found

Language selector also comes from the stylesheet, and is not expected to work with local build.

URL        `/legal/privacy/'
Name       `Privacy Statement'
Parent URL http://localhost:8080/package-maintainers/, line 390, col 11
Real URL   http://localhost:8080/legal/privacy/
Result     Error: 404 File not found

(And a couple others that are alike) Again, from the stylesheet, and not expected to work.

Finally, there is the large problem that when other Fedora Docs sites are linked to using xref:othersite:::page.adoc, an error won't be shown even if the link is not correct. So there is a clear risk of false negatives, too.

I'll try to come up with suitable regexes and instead improve the script so that it may be useful.

rebased onto d9ddad66f5525678ab79b4e53381ab3987c0660a

OK, I removed the removed option from check-links.sh, went through its output and either added --ignore-url parameters or actually fixed something for almost all output. Some items still remain unprocessed, because I considered them too difficult to fix, and got weary from fixing so many already.

Also, I updated builder.sh to its (presumably better) successor docsbuilder.sh.

rebased onto df2a29ff48dca5860d5439b0f8790c9f2acd3864

No comments in almost 4 weeks. so I consider this good. Merging now.

Pull-Request has been merged by oturpe

Metadata