Skip to content

Repo: add a test asserting that all code blocks in docs are syntactically valid #8134

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

Closed
auvred opened this issue Dec 26, 2023 · 0 comments · Fixed by #8142
Closed

Repo: add a test asserting that all code blocks in docs are syntactically valid #8134

auvred opened this issue Dec 26, 2023 · 0 comments · Fixed by #8142
Labels
accepting prs Go ahead, send a pull request that resolves this issue documentation Documentation ("docs") that needs adding/updating repo maintenance things to do with maintenance of the repo, and not with code/docs

Comments

@auvred
Copy link
Member

auvred commented Dec 26, 2023

Suggestion

Follow up to #8133

I propose adding a new docs test that will assert that the code blocks (with Open in Playground button) contain at least syntatically valid code

Perhaps we could also test that code under Incorrect tab contains at least one lint error, and Correct code contains no errors

I wrote a simple test that tries to parse content of all code blocks. It turns out that the following files contain code block with syntax error:

docs/rules/consistent-type-assertions.md
docs/rules/explicit-function-return-type.md
docs/rules/member-ordering.md
docs/rules/no-empty-function.md
docs/rules/no-unnecessary-type-constraint.md
docs/rules/prefer-enum-initializers.md
docs/rules/prefer-readonly-parameter-types.md
docs/rules/space-before-blocks.md
docs/rules/typedef.md
@auvred auvred added repo maintenance things to do with maintenance of the repo, and not with code/docs triage Waiting for team members to take a look labels Dec 26, 2023
@Josh-Cena Josh-Cena added documentation Documentation ("docs") that needs adding/updating accepting prs Go ahead, send a pull request that resolves this issue and removed triage Waiting for team members to take a look labels Dec 26, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepting prs Go ahead, send a pull request that resolves this issue documentation Documentation ("docs") that needs adding/updating repo maintenance things to do with maintenance of the repo, and not with code/docs
Projects
None yet
2 participants