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

Add check for Markdown links in CI #276

Merged
merged 6 commits into from
Feb 17, 2023
Merged

Conversation

chykon
Copy link
Contributor

@chykon chykon commented Feb 17, 2023

Description & Motivation

Motivation

Since the ROHD project uses Markdown for writing documentation and tutorials, it would be nice to make things easier to work with. One of them is link checking. As evidence of the urgency of the problem, you can refer here:

  1. ROHD landing page website structure #221 (comment)
  2. Chapter 1 - bootcamp (Introduction to ROHD) #266 (comment)

The proposed changes will completely solve the problem from the first point and mitigate the problem from the second point.

Description

The changes themselves are:

  • Add a new step to CI, during which a link health check will be performed.
  • Add a configuration file, in particular allowing to overcome false positives.

The risks of adding a new action are minimal as it is executed in a job without permissions (permissions: {}).

The configuration file comes with the address already added to the ignore list because there were false positives. An attempt to go to the address from a personal device without a proxy also failed, but the site is accessible when using a proxy. Probably DDoS protection applied.

Problems

Limited anchor link checking: available in beta and only for headers located in the document itself (there is an open issue: tcort/markdown-link-check#212).

Some alternative solutions have been explored, but all have a problem with handling anchor links pointing to other documents.

Related Issue(s)

No.

Testing

Several launches were made on our own branch:

  1. (https://github.com/chykon/rohd/actions/runs/4196972120/jobs/7278680046) First run with a false positive. FAILURE.
  2. (https://github.com/chykon/rohd/actions/runs/4197452723/jobs/7279783587) Second run with added ignore rule. SUCCESS.
  3. (https://github.com/chykon/rohd/actions/runs/4197728761/jobs/7280432455) Third run with test files test_a.md and test_b.md demonstrating the ability to test anchor links. FAILURE.

Backwards-compatibility

Is this a breaking change that will not be backwards-compatible? If yes, how so?

No.

Documentation

Does the change require any updates to documentation? If so, where? Are they included?

No.

Copy link
Contributor

@mkorbel1 mkorbel1 left a comment

Choose a reason for hiding this comment

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

This looks great, thank you!!

@mkorbel1
Copy link
Contributor

Filed issues to implement this same thing in ROHD Cosim and ROHD-VF:
intel/rohd-cosim#24
intel/rohd-vf#37

@mkorbel1 mkorbel1 merged commit da23c8b into intel:main Feb 17, 2023
@chykon chykon deleted the check-markdown-links branch February 24, 2023 07:30
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.

2 participants