-
Notifications
You must be signed in to change notification settings - Fork 287
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
VIP support for additional linters (html-proofer link checker) #410
Conversation
f5f1379
to
1f2e42f
Compare
@@ -0,0 +1,327 @@ | |||
personal_ws-1.1 en 0 utf-8 |
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.
This file looks like it will become a challenge to maintain. What is the plan to keep this up to date?
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.
Yeah I know that this is not ideal.
This is actually how rust-book manages spellchecking in their CI.
A contributor would have to add missing words as lines to somewgere in the dictionary.txt . The spellchecker already uses aspell-en dictionary so most English vocabulary is already present and some technical lingo and variable names still need to be added.
I really like this idea. I'm not sure if CI is the right place for it though. Doesn't Travis prevent you from making external calls? |
Surprisingly it does not! This approach to CI linkchecking seams to be fairly common with jeckyl blogs. The only problem is that the communication is not fully deterministic and large number of concurrent requests also causes spurious failures (html-proofer does not seam to have an easy way to throttle the connection count). |
c1d9ada
to
04dac3f
Compare
I'm relatively happy with the setup now.
Do you have any thoughts @AndyGauge? |
the spell checker works pretty good locally. I would suggest adding a message explaining how to add entries to the dictionary that displays in CI if there's a failure. htmlproofer found 2556 dead links in my reorganize branch, and I'm trying to figure out what is going wrong. It has to do with relative paths, so I'd like to figure that out. EDIT The only workaround I could find for the spurious errors was --external-only |
Hmm it looks like the html-proofer does not handle the internal sidebar links of html files in subdirectories (only these exhibit problems mentioned by you). The sidebar links are relative to the index.html location while the html-proofer seams to assume that these would be relative to the origin html location I do not experience the problem due to flat structure of the original cookbook. On the other side using We probably need to choose another linkchecker tool. By the way I love hov the reorganization work starts to look like ❤️ ! @AndyGauge EDIT: |
It looks like the mdBook uses |
That does look like the problem, but I'm seeing this gjtorikian/html-proofer#358 Let me do some experimentation to see if html proofer just needs a PR to fix the issue. |
I've written a small link checker in python https://github.com/budziq/link-checker that seams to work ok (minus few false positives in docs.rs most likely due to to many connections) on restructured cookbook (supports |
@budziq What about rust's linkchecker? https://github.com/rust-lang/rust/tree/master/src/tools/linkchecker Edit: It actually wouldn't be a good fit for the CI environment, even adapted. I found it looking around rust-lang/mdBook#279 |
@AndyGauge the linkchecker I've written works fairly well now and should have nonfalse positives for local links https://github.com/budziq/link-checker I'll try to find some time next week to workout the remaining kinks and integrate it into this PR. I guess I'll split the linkchecking tontwo phases
|
- added additional test matrix item just for linters - install and build mdbook only when needed to speedup CI - reorganized the travis scripts
also fixed minor typos
d5dc51e
to
86aae58
Compare
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 ran pip3 install link-checker
and then ran link-checker
and it says command not found. I'll dig into it more.
@AndyGauge if youbhave any outputbfrom instalation process then please post it as an issuebto the link-checker repo. It might be error with packaging. But most likely you have installed itbas a user and nit system wide and the location of user installed pip executables is nit addedbto your PATH |
I was able to get it to install with a few hoops. It was my first pip install so some of the workflow wasn't obvious. I was able to get all the dead links resolved in Do you want me to do the updates to the template/Contributing to support this? |
🙂
That would be awesome. I'm really low on time these days :/ |
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'd like to approve this PR as is and add another PR for the templates.
support for additional linters (link-checker & aspell) (rust-lang-nursery#410) * Added support for additional linters (html-proofer link checker) - added additional test matrix item just for linters - install and build mdbook only when needed to speedup CI - reorganized the travis scripts * Added spellchecking script from rust-book to CI also fixed minor typos * updated and moved serde_json links to propper position * move link checking to link-checker Move errors reorganize datetime add contributing instructions merge master Renamed categories to avoid confusion fixed broken links Use mdbook master branch until 0.1.8 releases Revert "Use mdbook master branch until 0.1.8 releases" This reverts commit a8dd8e3.
This is very much work in progress so please do not merge for now.
TODO:
update contributing and PR template with information about the linters workflowfixes #356
fixes #358