Skip to content

Commit 8a6b09f

Browse files
Merge pull request #2371 from VWS-Python/test-docs
Test shell snippets in documentation code blocks
2 parents a78c28a + d6538f7 commit 8a6b09f

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

.pre-commit-config.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ ci:
3030
- spelling
3131
- vulture
3232
- vulture-docs
33+
- shellcheck
34+
- shellcheck-docs
3335

3436
default_install_hook_types: [pre-commit, pre-push, commit-msg]
3537
repos:
@@ -49,11 +51,6 @@ repos:
4951
- id: file-contents-sorter
5052
files: spelling_private_dict\.txt$
5153
- id: trailing-whitespace
52-
- repo: https://github.com/shellcheck-py/shellcheck-py
53-
rev: v0.10.0.1
54-
hooks:
55-
- id: shellcheck
56-
args: ["--shell", "bash"]
5754
- repo: local
5855
hooks:
5956
- id: actionlint
@@ -63,6 +60,19 @@ repos:
6360
pass_filenames: false
6461
types_or: [yaml]
6562

63+
- id: shellcheck
64+
name: shellcheck
65+
entry: shellcheck --shell bash
66+
language: system
67+
pass_filenames: false
68+
types_or: [shell]
69+
70+
- id: shellcheck-docs
71+
name: shellcheck-docs
72+
entry: doccmd --language=shell --language=console --command="shellcheck --shell=bash"
73+
language: system
74+
types_or: [markdown, rst]
75+
6676
- id: mypy
6777
name: mypy
6878
stages: [push]

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Installation
88
99
$ pip install vws-python
1010
11-
This is tested on Python 3.8+.
11+
This is tested on Python 3.12+.
1212
Get in touch with ``adamdangoor@gmail.com`` if you would like to use this with another language.
1313

1414
Usage

docs/source/release-process.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ Perform a Release
1717
.. code-block:: console
1818
:substitutions:
1919
20-
$ gh workflow run release.yml --repo |github-owner|/|github-repository|
20+
$ gh workflow run release.yml --repo "|github-owner|/|github-repository|"
2121
2222
.. _Install GitHub CLI: https://cli.github.com/

0 commit comments

Comments
 (0)