Skip to content

Avoid all literal blocks without explicitly set language #2807

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

Merged
merged 2 commits into from
Jul 14, 2025

Conversation

felixfontein
Copy link
Collaborator

Fixes all literal blocks w/o language that are still around, and adjusts checker to flag these as well.

Copy link
Contributor

@oraNod oraNod left a comment

Choose a reason for hiding this comment

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

Thanks @felixfontein

I've kicked off a run of the package docs build just to see. I'd also like to take a closer look at the source later today.

Can you also remind me... once this merges, we should be able to unpin rstcheck and carry on with this PR right?

@felixfontein
Copy link
Collaborator Author

Can you also remind me... once this merges, we should be able to unpin rstcheck and carry on with this PR right?

Yes, hopefully... (until we hit other rstcheck bugs - I recently saw a similar issue due to some .. include::)

@oraNod
Copy link
Contributor

oraNod commented Jul 14, 2025

in retrospect maybe I didn't need to build package docs off this branch. hurts nothing though. build logs here.

$ grep -rE "\.\. code-block::\s*$" ./docs/docsite/rst --include="*.rst" doesn't find anything. If I then remove the language from a code-block and run nox -s "checkers(rst-yamllint)" I see the warnings. 👍

Copy link
Contributor

@oraNod oraNod left a comment

Choose a reason for hiding this comment

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

Thanks @felixfontein

@felixfontein felixfontein merged commit c047609 into ansible:devel Jul 14, 2025
12 checks passed
Copy link

patchback bot commented Jul 14, 2025

Backport to stable-2.19: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-2.19/c0476092c6729535a2d87644436f0942565392d4/pr-2807

Backported as #2814

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein felixfontein deleted the docs branch July 14, 2025 19:45
@felixfontein
Copy link
Collaborator Author

@oraNod thanks for reviewing this!

patchback bot pushed a commit that referenced this pull request Jul 14, 2025
* Avoid code-blocks without language.

* Adjust checker to catch such code blocks as well.

(cherry picked from commit c047609)
felixfontein added a commit that referenced this pull request Jul 14, 2025
* Avoid code-blocks without language.

* Adjust checker to catch such code blocks as well.

(cherry picked from commit c047609)

Co-authored-by: Felix Fontein <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-2.19 Automatically create a backport for the stable-2.19 branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants