Skip to content

Commit bdf672a

Browse files
committed
Test shell snippets in documentation code blocks
1 parent ce03744 commit bdf672a

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

.pre-commit-config.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@ repos:
4949
- id: file-contents-sorter
5050
files: spelling_private_dict\.txt$
5151
- 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"]
5752
- repo: local
5853
hooks:
5954
- id: actionlint
@@ -63,6 +58,19 @@ repos:
6358
pass_filenames: false
6459
types_or: [yaml]
6560

61+
- id: shellcheck
62+
name: shellcheck
63+
entry: shellcheck --shell bash
64+
language: system
65+
pass_filenames: false
66+
types_or: [shell]
67+
68+
- id: shellcheck-docs
69+
name: shellcheck-docs
70+
entry: doccmd --language=shell --language=console --command="shellcheck --shell=bash"
71+
language: system
72+
types_or: [markdown, rst]
73+
6674
- id: mypy
6775
name: mypy
6876
stages: [push]

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)