-
Notifications
You must be signed in to change notification settings - Fork 196
CI: Add markdown checker #1542
CI: Add markdown checker #1542
Conversation
/test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not going to admit to having read every line... :-)
For the overall intention and final results, lgtm.
Do we think it is possible to fire a Depends PR over on the docs repo to show this in action?
import ( | ||
"strings" | ||
|
||
bf "gopkg.in/russross/blackfriday.v2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still suspect using the same markup tools that github itself uses to do the check might have made more sense:
https://github.com/github/markup
https://github.com/gjtorikian/commonmarker
https://github.com/github/cmark-gfm
The last one looks to be the core library, which is in C, so not too avant-garde or arduous maybe. c'est la vie.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point already taken but:
-
This tool was based on a test tool I had already half-written a while back.
Although I think there is a lot more this tool could be made to do, I just want the checking integrated into the CI asap as we continue to see doc breakages and this tool will stop them (frankly, I'm surprised GitHub doesn't offer this sort of functionality already).
Once we have "something" in the CI to perform the checks, we can always replace it with "something else" later.
-
markup is ruby and I'm very rusty on that.
-
the other 2 packages are written in C which -- although I love it -- is not a language we should probably be writing new code in.
-
writing it in go means the rest of the team will understand it (hopefully :-) but we can also leverage all the go goodness we rely on so much (
go test
,gofmt
, etc).
Of course, if you or anyone else in the community would like to take up the gauntlet and rewrite this in ruby/rust/blah, be my guest - I won't be offended! 😄
c684fa0
to
ddb6f9a
Compare
/retest |
ddb6f9a
to
20cde2b
Compare
/retest |
Add a simple tool that checks markdown files to ensure all links are valid. Updated the static checker script to call this tool to ensure that documents with broken links are not merged. Note that when the tool detects a broken link, it is often able to suggest the correct link name so looking at its output is beneficial. Fixes kata-containers#1485. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
20cde2b
to
53968b8
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@klynnrif - ptal at the new |
The sooner we have "borked link protection" in the CI, the better for everyone imho. Hence, working on the assumption that "something is better than nothing", let's merge this and fix up any doc issues on a follow-up PR... |
@jodh-intel apologies, I missed this ping. Would you still like a review on this? |
No problem - you can review if you wish and I'll raise a new PR. But I'm about to raise a follow-up PR which will have a few doc changes so you could wait for that if you want? |
@jodh-intel I'll wait for the follow-up PR. Thanks! |
Add a simple tool that checks markdown files to ensure all links are valid.
Updated the static checker script to call this tool to ensure that documents with broken links are not merged.
Note that when the tool detects a broken link, it is often able to suggest the correct link name so looking at its output is beneficial.
Fixes #1485.
Signed-off-by: James O. D. Hunt james.o.hunt@intel.com