Skip to content

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

Closed
@auvred

Description

@auvred

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    accepting prsGo ahead, send a pull request that resolves this issuedocumentationDocumentation ("docs") that needs adding/updatingrepo maintenancethings to do with maintenance of the repo, and not with code/docs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions