Skip to content

Commit d05e5af

Browse files
author
Michael Buchar
committed
ci(markdownlint): add Markdown linting (#735)
1 parent 1dcc563 commit d05e5af

File tree

7 files changed

+168
-148
lines changed

7 files changed

+168
-148
lines changed

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,20 @@ jobs:
124124
npm install jsonlint --global
125125
./run-tests.sh --check-jsonlint
126126
127+
lint-markdownlint:
128+
runs-on: ubuntu-24.04
129+
steps:
130+
- name: Checkout
131+
uses: actions/checkout@v4
132+
133+
- name: Setup Node
134+
uses: actions/setup-node@v4
135+
136+
- name: Lint Markdown files
137+
run: |
138+
npm install markdownlint-cli2 --global
139+
./run-tests.sh --check-markdownlint
140+
127141
format-shfmt:
128142
runs-on: ubuntu-24.04
129143
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 (for different releases)
4+
MD024: false

CHANGELOG.md

Lines changed: 137 additions & 144 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
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.
4+
If you find a demonstrable problem that is caused by the REANA code, please:
55

66
1. Search for [already reported problems](https://github.com/reanahub/reana-server/issues).
77
2. Check if the issue has been fixed or is still reproducible on the

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
## About
1111

1212
REANA-Server is a component of the [REANA](http://www.reana.io/) reusable and
13-
reproducible research data analysis platform. It implements the API Server that takes and
14-
performs REST API calls issued by REANA clients.
13+
reproducible research data analysis platform. It implements the API Server
14+
that takes and performs REST API calls issued by REANA clients.
1515

1616
## Features
1717

docs/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<!-- markdownlint-disable MD041 -->
2+
<!-- markdownlint-disable MD033 -->
3+
14
```{include} ../README.md
25
:end-before: "## About"
36
```

run-tests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ check_dockerfile() {
131131
docker run -i --rm docker.io/hadolint/hadolint:v2.12.0 <Dockerfile
132132
}
133133

134+
check_markdownlint() {
135+
markdownlint-cli2 "**/*.md"
136+
}
137+
134138
check_docker_build() {
135139
docker build -t docker.io/reanahub/reana-server .
136140
}
@@ -154,6 +158,7 @@ check_all() {
154158
check_jsonlint
155159
check_yamllint
156160
check_shfmt
161+
check_markdownlint
157162
}
158163

159164
if [ $# -eq 0 ]; then
@@ -178,5 +183,6 @@ case $arg in
178183
--check-jsonlint) check_jsonlint ;;
179184
--check-yamllint) check_yamllint ;;
180185
--check-shfmt) check_shfmt ;;
186+
--check-markdownlint) check_markdownlint ;;
181187
*) echo "[ERROR] Invalid argument '$arg'. Exiting." && exit 1 ;;
182188
esac

0 commit comments

Comments
 (0)