Skip to content

Commit 83db970

Browse files
author
Michael Buchar
committed
ci(markdownlint): add markdownlint code formatting checks (#655)
Also adds basic `.markdownlint.yaml` configuration since this is the primary way how to align markdown lint styles.
1 parent 285fab0 commit 83db970

7 files changed

Lines changed: 229 additions & 100 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,20 @@ jobs:
143143
pip install yamllint
144144
./run-tests.sh --check-yamllint
145145
146+
lint-markdownlint:
147+
runs-on: ubuntu-24.04
148+
steps:
149+
- name: Checkout
150+
uses: actions/checkout@v4
151+
152+
- name: Setup Node
153+
uses: actions/setup-node@v4
154+
155+
- name: Lint Markdown files
156+
run: |
157+
npm install markdownlint-cli2 --global
158+
./run-tests.sh --check-markdownlint
159+
146160
docs-sphinx:
147161
runs-on: ubuntu-24.04
148162
steps:

.markdownlint.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Allow prompt dollar sign in console examples without showing output
2+
MD014: false
3+
# Allow multiple headings with same content (but for different versions)
4+
MD024: false

CHANGELOG.md

Lines changed: 192 additions & 91 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Contributing
22

3-
Bug reports, issues, feature requests, and other contributions are welcome. If you find
4-
a demonstrable problem that is caused by the REANA code, please:
3+
Bug reports, issues, feature requests, and other contributions are welcome. If
4+
you find a demonstrable problem that is caused by the REANA code, please:
55

6-
1. Search for [already reported problems](https://github.com/reanahub/reana-workflow-controller/issues).
7-
2. Check if the issue has been fixed or is still reproducible on the
8-
latest `master` branch.
6+
1. Search for
7+
[already reported problems](https://github.com/reanahub/reana-workflow-controller/issues).
8+
2. Check if the issue has been fixed or is still reproducible on the latest
9+
`master` branch.
910
3. Create an issue, ideally with **a test case**.
1011

1112
If you create a pull request fixing a bug or implementing a feature, you can run

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010
## About
1111

12-
REANA-Workflow-Controller is a component of the [REANA](http://www.reana.io/) reusable
13-
and reproducible research data analysis platform. It takes care of instantiating and
14-
managing computational workflows.
12+
REANA-Workflow-Controller is a component of the [REANA](http://www.reana.io/)
13+
reusable and reproducible research data analysis platform. It takes care of
14+
instantiating and managing computational workflows.
1515

1616
## Features
1717

docs/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# REANA Workflow Controller
2+
13
```{include} ../README.md
24
:end-before: "## About"
35
```
@@ -10,7 +12,8 @@
1012
## REST API
1113

1214
The REANA-Workflow-Controller component offers a REST API for managing
13-
workflows. Detailed REST API documentation can be found <a href="_static/api.html">here</a>.
15+
workflows. Detailed REST API documentation can be found
16+
[in openapi.json under the docs directory](https://github.com/reanahub/reana-workflow-controller/blob/master/docs/openapi.json).
1417

1518
```{eval-rst}
1619
.. automodule:: reana_workflow_controller.rest.workflows

run-tests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@ check_yamllint() {
119119
yamllint .
120120
}
121121

122+
check_markdownlint() {
123+
markdownlint-cli2 "**/*.md"
124+
}
125+
122126
check_pytest() {
123127
clean_old_db_container
124128
start_db_container
@@ -149,6 +153,7 @@ check_all() {
149153
check_docker_build
150154
check_shfmt
151155
check_yamllint
156+
check_markdownlint
152157
}
153158

154159
if [ $# -eq 0 ]; then
@@ -171,5 +176,6 @@ case $arg in
171176
--check-docker-build) check_docker_build ;;
172177
--check-shfmt) check_shfmt ;;
173178
--check-yamllint) check_yamllint ;;
179+
--check-markdownlint) check_markdownlint ;;
174180
*) echo "[ERROR] Invalid argument '$arg'. Exiting." && exit 1 ;;
175181
esac

0 commit comments

Comments
 (0)