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 pre-commit hook to check for dead links in markdown files #524

Merged
merged 1 commit into from
Jul 15, 2022

Conversation

pankajkoti
Copy link
Collaborator

@pankajkoti pankajkoti commented Jul 14, 2022

The pre-commit hook checks that there are no dead links in the
markdown files of the repo.

Reference: https:/tcort/markdown-link-check

closes: #511

@pankajkoti
Copy link
Collaborator Author

pankajkoti commented Jul 14, 2022

Currently, there are no dead links in the repo, but I purposely modified a link to test that the hook works fine.

Below is the link I modified to a dead one.
Screenshot 2022-07-14 at 7 45 13 PM

And the outcome of the pre-commit hook is:
Screenshot 2022-07-14 at 7 44 34 PM

@pankajkoti pankajkoti requested a review from kaxil July 14, 2022 14:22
@codecov
Copy link

codecov bot commented Jul 14, 2022

Codecov Report

Merging #524 (1735113) into main (0a9e000) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #524   +/-   ##
=======================================
  Coverage   98.28%   98.28%           
=======================================
  Files          72       72           
  Lines        3972     3972           
=======================================
  Hits         3904     3904           
  Misses         68       68           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a9e000...1735113. Read the comment docs.

Copy link
Collaborator

@phanikumv phanikumv left a comment

Choose a reason for hiding this comment

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

Does this work if there is a dead link in CHANGELOG.rst. I guess it would..?

@pankajkoti
Copy link
Collaborator Author

Does this work if there is a dead link in CHANGELOG.rst. I guess it would..?

unfortunately, no, it doesn't. It only works for markdown files (files with .md extension)

@phanikumv phanikumv merged commit a59369d into main Jul 15, 2022
@phanikumv phanikumv deleted the 511-check-dead-links branch July 15, 2022 05:50
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 CI job to check for dead links
4 participants