Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Comments

feat(docs/ci): add automatic formatting checks for code blocks in the Cookbook#2980

Merged
anton-trunov merged 3 commits intomainfrom
closes-2925
May 1, 2025
Merged

feat(docs/ci): add automatic formatting checks for code blocks in the Cookbook#2980
anton-trunov merged 3 commits intomainfrom
closes-2925

Conversation

@novusnota
Copy link
Member

Issue

Closes #2925.

The Reference section won't need additional formatting checks because it'll be eventually generated from the well-formatted stdlib, while the Book section has way too many examples that won't pass the type checking even when wrapped in a fun example() {} body. Not to mention abundance of vertical comment alignment and eol comments that continue on the next line.

The comments part can be fixed by making them a bit more ugly, i.e., by aligning the first non-whitespace characters as opposed to // (see my comments in #2925). But the type checking bit won't be resolved that easily, since some examples simply need to show unhandled errors or invalid syntax, at the very least so that people can Google/search for their errors in the docs.

@novusnota novusnota added this to the Doc: 2025-04 milestone Apr 29, 2025
@novusnota novusnota requested a review from a team as a code owner April 29, 2025 23:24
@anton-trunov anton-trunov merged commit b3eced8 into main May 1, 2025
26 checks passed
@anton-trunov anton-trunov deleted the closes-2925 branch May 1, 2025 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add automatic formatting checks for the code blocks in the cookbook

2 participants