-
Notifications
You must be signed in to change notification settings - Fork 406
test: check links #958
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
test: check links #958
Conversation
|
@shcheklein I presume sorting out the current errors is for a different PR? See the output below: dvc.org (check-links)$ pre-commit run --all-files | grep -v OK
Dead URL Checker.........................................................Failed
- hook id: dead-url
- exit code: 3 |
|
in term of the pre-commit hooks - we already use husky (?) and something is being installed with |
afe085b to
8bdadd2
Compare
|
@shcheklein I don't quite follow - While we could add check-links there I don't think we should use it as it would check all files (takes about a minute). For checking patches, I thought we should use whatever the main repo does (currently |
|
@casperdcl when you just run |
shcheklein
left a comment
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.
Good stuff! Please check a few comments. Especially, not clear how does it integrate with the existing hooks.
shcheklein
left a comment
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.
looks great! let me know when we are ready to merge it
13c50f5 to
2b55fe6
Compare
|
@shcheklein there's just
It's probably not that relevant since the |
casperdcl
left a comment
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.
good to merge now
- complete overhaul of circleci included in order to use daily cron jobs
.pre-commit-hooks.yamlincluded for others to use but not actually used by us (yet) due to potential lack of windows supportyarn/huskypre-commit hook also not used for same reason- problematic links to be fixed in different issue/PR
|
thanks, @casperdcl ! |
| https://github.com/iterative/dvc.org/blob/master/public$ | ||
| https://github.com/iterative/dvc/releases/download/$ |
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.
Oh so it's actually matching the $ character for cases like below?
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.
Yes my regexes match only up to the literal $. It seems a good compromise between blacklisting false negatives and programming false negatives detection.
|
Very neat! Should we briefly document how this thing works somewhere? Is there a follow up PR or issues on the few unchecked boxes from the description above? Thanks |
|
I think decisions were made, links were fixed already (or added to exclusions) ... not sure we need to document it tbh. Quite internal stuff, similar to redirects. May be some message to the script can be added that explains how to change the files if needed. Again not a top priority. |
|
I have one more Q @shcheklein I see you added some excluded URLs in ba42034...32f63df#diff-01c133d99b04d1390925d3d06f3bbe77 but they are valid. Specifically: Why?
In general I was just a bit worried that it would be tricky to maintain this list manually. Remembering to add or remove sample links so they're not checked. But I guess if you don't add it the CI check will fail, and if you don't remove it, nothing bad will happen. |
|
@jorgeorpinel some of them do not work from cli and work from the browser. for some of them I would check the script once again. |
|
Yes for example circleci does weird non-standard redirection |
|
Got it.
UPDATE: Got UPDATE's UPDATE: Got GNU |
|
Yes that's one of the reasons why this is a CI-only check by default rather than a pre-commit hook... no guarantee that it'll run on dev machines |
()0xx,3xxetc) be counted as errors instead (see test: check links #958 (comment))?config.yml(for local repo)hooks.yml(for other repos to use)document developer usage of pre-commit hooks?yarn.scripts.link-checkyarn.scripts.link-check-diffaddhusky.hooks.pre-commit.github/inallthisyarn.scriptschecksrun: yarn link-checklink-checkeverywhere for consistency.huskyrc.jschecking for OS compatibility?bashtopy?bashtojs?