Skip to content

Commit

Permalink
Add checks for reST content (#273)
Browse files Browse the repository at this point in the history
* Add pre-commit check of RST content

* Ignore unsupported sphinx directives in rstcheck config file

rstcheck doesn't have awareness of sphinx-specific directives or
extensions.

* Fix rstcheck errors

* Redundant reference "contributing" matches the title of the document.
* Change duplicate references named "yarn" to anonymous references.
* Fix code block by adding blank line after directive line.

* Move rstcheck config into pre-commit config

---------

Co-authored-by: Nicolas Brichet <[email protected]>
  • Loading branch information
mfisher87 and brichet authored Jan 3, 2025
1 parent 90abbb8 commit fab1a41
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ repos:
- id: ruff
args: ['--fix']
- id: ruff-format

- repo: https://github.com/rstcheck/rstcheck
rev: v6.2.4
hooks:
- id: rstcheck
args: ['--ignore-directives=tabs,toctree,autoclass', '--report-level=warning']
7 changes: 3 additions & 4 deletions docs/contributing.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.. _contributing:

============
Contributing
============
Expand All @@ -12,8 +10,8 @@ Development install
You will need `Node.js <https://nodejs.org/>`_ to build the extension package.

The ``jlpm`` command is JupyterLab's pinned version of
`yarn <https://yarnpkg.com/>`_ that is installed with JupyterLab. You may use
`yarn <https://yarnpkg.com/>`_ or `npm <https://www.npmjs.com/>`_ in lieu of ``jlpm`` below.
`yarn <https://yarnpkg.com/>`__ that is installed with JupyterLab. You may use
`yarn <https://yarnpkg.com/>`__ or `npm <https://www.npmjs.com/>`_ in lieu of ``jlpm`` below.


Clone the source
Expand Down Expand Up @@ -65,6 +63,7 @@ Install dependencies and build
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

.. code-block:: bash
# Install JupyterLab for jlpm
python -m pip install jupyterlab
Expand Down

0 comments on commit fab1a41

Please sign in to comment.