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

linkcheck: Check the source URL of raw directives that use the url option #10757

Merged
merged 1 commit into from Aug 23, 2022
Merged

linkcheck: Check the source URL of raw directives that use the url option #10757

merged 1 commit into from Aug 23, 2022

Conversation

n-peugnet
Copy link
Contributor

Subject: linkcheck: Check the source URL of raw directives

Feature or Bugfix

  • Feature

Purpose

The source URL of raw directives that use the url option is now checked by linkcheck. This is especially useful to catch redirections.

Relates

Closes #10755

sphinx/builders/linkcheck.py Outdated Show resolved Hide resolved
sphinx/builders/linkcheck.py Outdated Show resolved Hide resolved
@francoisfreitag francoisfreitag added type:enhancement enhance or introduce a new feature builder:linkcheck labels Aug 17, 2022
@n-peugnet
Copy link
Contributor Author

@francoisfreitag can you allow this pull request to run the workflows?

I can squash back these changes into two (or only one) commit(s) if needed.

Copy link
Contributor

@francoisfreitag francoisfreitag left a comment

Choose a reason for hiding this comment

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

Looking good, thank you! 🎉
Can you squash all commits into a single commit? I’ll leave the PR open for a couple of days in case others want to take a look, and integrate it by the end of the week if no concerns are voiced.

Add raw directives' source URL to the list of links to check with linkcheck.
By the way, refactor HyperlinkCollector by adding `add_uri` function.
Add test for linkcheck raw directives source URL
@n-peugnet
Copy link
Contributor Author

Done with 1553cc3.

@francoisfreitag francoisfreitag merged commit e32301c into sphinx-doc:5.x Aug 23, 2022
@n-peugnet n-peugnet deleted the linkcheck-raw-source-url branch August 23, 2022 18:43
@AA-Turner AA-Turner added this to the 5.2.0 milestone Aug 28, 2022
@AA-Turner
Copy link
Member

Can you squash all commits into a single commit?

@francoisfreitag FYI you can choose "squash and merge" in the GitHub UI -- I do this for all merges by default.

A

@francoisfreitag
Copy link
Contributor

Thanks Adam! Will do that in the future 😃

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
builder:linkcheck type:enhancement enhance or introduce a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

linkcheck should check URLs of raw directives
3 participants