Skip to content

Conversation

@jasonmatos23-git
Copy link
Contributor

Closes #3
Broken and redirected link rule and test added. It uses the same logic as UDOIT 2.8.X to curl links. On detection of either broken or redirected link, the rule sets the anchor as an issue. In the redirected case, the new link ends up saved to the issue metadata.
Tests are for the baseline functions of: Is a non-redirected link detected as an issue (e.g., "https://google.com" not being flagged as redirected because the link changed to "https://www.google.com")? Is a redirected link detected? Is a broken link detected? Do redirected links save the new link to the metadata?

@jasonmatos23-git jasonmatos23-git changed the title Issue/3 New broken and redirected link rule WIP: Issue/3 New broken and redirected link rule Oct 15, 2021
@jasonmatos23-git
Copy link
Contributor Author

Left to do @bagofarms:

  • Consider if there is a way to separate this into two separate rules as is done in UDOIT 2.8.

@AlanFCMV
Copy link
Contributor

AlanFCMV commented Oct 25, 2021

I took over from where Cris left off, since he will no longer be working on this. Major changes:

  • Refactored to split broken links from redirected links as two separate rules
  • Only permanent redirections are considered problematic, as temporary redirects are, well, temporary.
  • BrokenLink rule now considers any error code greater than or equal to 400 as a broken link

@cidilabs cidilabs merged commit ac72341 into cidilabs:master Oct 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add broken and redirected link checker from UDOIT 2.8

3 participants