跳转到主要内容

检查reStructuredText和其中嵌套的代码块的语法

项目描述

通用

Maintenance - intended License Semantic Versioning - 2.0.0

Read the Docs - Build Status (latest)

CI

Test status Documentation status QA status pre-commit status

PyPI

PyPI - Package latest release PyPI - Supported Python Versions PyPI - Supported Implementations

PyPI - Format PyPI - Monthly downloads

Github

Github - Latest Release GitHub - Last Commit

Github - Stars Github - Forks Github - Contributors Github - Watchers

检查reStructuredText和其中嵌套的代码块的语法。

查看完整文档:read-the-docs

安装

从pip

$ pip install rstcheck

使用pyproject.toml进行配置

$ pip install rstcheck[toml]

添加sphinx支持

$ pip install rstcheck[sphinx]

代码块支持的语言

  • Bash

  • Doctest

  • C (C99)

  • C++ (C++11)

  • JSON

  • XML

  • Python

  • reStructuredText

示例

有不良Python语法

====
Test
====

.. code:: python

    print(
$ rstcheck bad_python.rst
bad_python.rst:7: (ERROR/3) (python) unexpected EOF while parsing

有不良C++语法

====
Test
====

.. code:: cpp

    int main()
    {
        return x;
    }
$ rstcheck bad_cpp.rst
bad_cpp.rst:9: (ERROR/3) (cpp) error: 'x' was not declared in this scope

reStructuredText文档本身有不良语法

====
Test
===
$ rstcheck bad_rst.rst
bad_rst.rst:1: (SEVERE/4) Title overline & underline mismatch.

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

rstcheck-6.2.4.tar.gz (24.5 kB 查看哈希值)

上传时间

构建分布

rstcheck-6.2.4-py3-none-any.whl (8.5 kB 查看哈希值)

上传时间 Python 3

由以下组织支持

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误日志 StatusPage StatusPage 状态页面