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

linter: add markdown-link-check to check links whether alive #2465

Merged

Conversation

allencloud
Copy link
Collaborator

@allencloud allencloud commented Nov 11, 2018

Signed-off-by: Allen Sun [email protected]

Ⅰ. Describe what this PR did

Dead links in document will bring lots of inconvenience for users.

Then we should add a rule for validating links in markdown files.

This pr adds markdown-link-check in circleci integration config. And pouchlinter has already add markdown-link-check in pr dragonflyoss/linter#4.

Ⅱ. Does this pull request fix one issue?

fix #2466

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

no need

Ⅳ. Describe how to verify it

the result shows some dead links in this repo.

Ⅴ. Special notes for reviews

none

@codecov
Copy link

codecov bot commented Nov 11, 2018

Codecov Report

Merging #2465 into master will increase coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2465      +/-   ##
==========================================
+ Coverage    69.2%   69.23%   +0.03%     
==========================================
  Files         277      277              
  Lines       18330    18330              
==========================================
+ Hits        12685    12691       +6     
+ Misses       4206     4201       -5     
+ Partials     1439     1438       -1
Flag Coverage Δ
#criv1alpha1test 31.6% <ø> (+0.18%) ⬆️
#criv1alpha2test 35.73% <ø> (+0.12%) ⬆️
#integrationtest 40.76% <ø> (ø) ⬆️
#nodee2etest 32.94% <ø> (-0.04%) ⬇️
#unittest 26.69% <ø> (ø) ⬆️
Impacted Files Coverage Δ
pkg/meta/store.go 66.15% <0%> (-1.54%) ⬇️
daemon/mgr/container_utils.go 85.44% <0%> (-1.27%) ⬇️
cri/v1alpha2/cri_wrapper.go 62.4% <0%> (-1.21%) ⬇️
daemon/mgr/spec_linux.go 78.3% <0%> (-1.02%) ⬇️
ctrd/container.go 58.89% <0%> (-0.4%) ⬇️
cri/v1alpha2/cri.go 70.03% <0%> (+0.37%) ⬆️
daemon/mgr/container.go 59% <0%> (+0.64%) ⬆️
cri/v1alpha1/cri.go 60.92% <0%> (+0.66%) ⬆️
ctrd/image.go 78.94% <0%> (+2.19%) ⬆️

@allencloud allencloud force-pushed the add-links-check branch 4 times, most recently from 91e1e15 to d016874 Compare November 11, 2018 14:00
@pouchrobot pouchrobot added size/S and removed size/XS labels Nov 11, 2018
@allencloud allencloud force-pushed the add-links-check branch 5 times, most recently from bb9b05a to ed53661 Compare November 11, 2018 14:20
@allencloud allencloud force-pushed the add-links-check branch 3 times, most recently from 625ecb8 to 7bd5577 Compare November 11, 2018 15:23
@allencloud allencloud force-pushed the add-links-check branch 3 times, most recently from 31d15cf to c805fc0 Compare November 11, 2018 15:30
@allencloud
Copy link
Collaborator Author

allencloud commented Nov 11, 2018

We have enabled markdown-link-check in this repo. And the result shows that the following docs have dead links:

FILE: ./docs/kubernetes/pouch_with_cri_introduction.md
[✖] https://git.k8s.io/kubernetes/pkg/kubelet/apis/cri/v1alpha1/runtime/api.proto

ERROR: dead links found!

FILE: ./docs/features/pouch_with_dragonfly.md
[✖] https://github.com/alibaba/Dragonfly/blob/master/docs/install_server.md
[✖] https://github.com/alibaba/Dragonfly/blob/master/docs/install_client.md
[✖] https://github.com/alibaba/Dragonfly/blob/master/docs/usage.md

ERROR: dead links found!

FILE: ./apis/README.md
[✖] ../docs/api/api.md

ERROR: dead links found!

FILE: ./storage/volume/README.md
[✖] ../docs/static_files/pouch_volume_architecture.png
[✖] volume/examples/demo/demo.go
[✖] docs/commandline/pouch_volume.md

Which is also recorded as an issue, #2466.

@allencloud
Copy link
Collaborator Author

allencloud commented Nov 22, 2018

And now we only have the following dead links of volume part, @rudyfly

FILE: ./storage/volume/README.md
[✖] ../docs/static_files/pouch_volume_architecture.png
[✖] volume/examples/demo/demo.go
[✖] docs/commandline/pouch_volume.md

ERROR: dead links found!

I have updated this part in the latest code. You can help review this. @rudyfly

@rudyfly
Copy link
Collaborator

rudyfly commented Nov 22, 2018

LGTM

@pouchrobot pouchrobot added the LGTM one maintainer or community participant agrees to merge the pull reuqest. label Nov 22, 2018
@allencloud allencloud merged commit c3f1b19 into AliyunContainerService:master Nov 22, 2018
@allencloud allencloud deleted the add-links-check branch November 22, 2018 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM one maintainer or community participant agrees to merge the pull reuqest. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[docs] dead links exist in markdown documentation
3 participants