markdown/fences
Checks JSON, JSONC, TOML, YAML, Bash, JavaScript, JSX, TypeScript, TSX, and Python code fences in Markdown (.md) files for syntax errors.
Part of the markdown configuration, at the recommended level. It runs at the commit stage, per file. gspot runs this check itself.
A code block that fails to parse shows readers a program that cannot run.
What to do
Section titled “What to do”Fix the code, or label the block text when it holds prose.
Example
Section titled “Example”A bash fence with if then reports a syntax error. Correct the Bash, or label the block text when it holds no code.
Turn it off
Section titled “Turn it off”Turn it off for some files, with a reason:
gspot ignore markdown/fences --paths "<glob>" --reason "<why>"