Skip to content
Snippets Groups Projects
Commit e422b437 authored by Martin Schroschk's avatar Martin Schroschk
Browse files

Merge branch 'fix_linter' into 'preview'

Fix linter

See merge request zih/hpc-compendium/hpc-compendium!137
parents 7fb5ce28 1ff7fe27
No related branches found
No related tags found
3 merge requests!322Merge preview into main,!319Merge preview into main,!137Fix linter
File moved
...@@ -221,13 +221,14 @@ Installation ...@@ -221,13 +221,14 @@ Installation
~ [sudo] npm [-g] install markdownlint-cli ~ [sudo] npm [-g] install markdownlint-cli
``` ```
The configuration is stored in `.markdownlint.json`. The tool `markdownlint` can be run in dry or The configuration is stored in `.markdownlintrc`.
fix mode. The *dry* mode (default) only outputs findings, whereas in *fix* mode it resolves basic The tool `markdownlint` can be run in dry or fix mode.
The *dry* mode (default) only outputs findings, whereas in *fix* mode it resolves basic
errors directly in the markdown files. errors directly in the markdown files.
```Shell Session ```Shell Session
~ cd doc.zih.tu-dresden.de/ ~ cd doc.zih.tu-dresden.de/
~ markdownlint [--config .markdownlint.json] [--fix] docs/index.md ~ markdownlint [--fix] docs/index.md
docs/index.md:8:131 MD013/line-length Line length [Expected: 130; Actual: 138] docs/index.md:8:131 MD013/line-length Line length [Expected: 130; Actual: 138]
``` ```
......
...@@ -21,13 +21,14 @@ Installation ...@@ -21,13 +21,14 @@ Installation
~ npm install markdownlint-cli ~ npm install markdownlint-cli
``` ```
The configuration is stored in `.markdownlint.json`. The tool `markdownlint` can be run in dry or The configuration is stored in `.markdownlintrc`.
fix mode. The *dry* mode (default) only outputs findings, whereas in *fix* mode it resolves basic The tool `markdownlint` can be run in dry or fix mode.
The *dry* mode (default) only outputs findings, whereas in *fix* mode it resolves basic
errors directly in the markdown files. errors directly in the markdown files.
```Shell Session ```Shell Session
~ cd doc.zih.tu-dresden.de/ ~ cd doc.zih.tu-dresden.de/
~ markdownlint [--config .markdownlint.json] [--fix] docs/index.md ~ markdownlint [--fix] docs/index.md
docs/index.md:8:131 MD013/line-length Line length [Expected: 130; Actual: 138] docs/index.md:8:131 MD013/line-length Line length [Expected: 130; Actual: 138]
``` ```
......
...@@ -20,7 +20,7 @@ git checkout -b RomeNodes ...@@ -20,7 +20,7 @@ git checkout -b RomeNodes
## 3. Run the linter: ## 3. Run the linter:
```Bash ```Bash
markdownlint --config .markdownlint.json ./docs/use_of_hardware/RomeNodes.md markdownlint ./docs/use_of_hardware/RomeNodes.md
``` ```
If there are still errors: go to step 2 If there are still errors: go to step 2
......
FROM debian:buster
###############
# Linkchecker #
###############
RUN apt update && apt install -y linkchecker
WORKDIR /src/linkchecker
ENTRYPOINT ["/usr/bin/linkchecker"]
CMD ["--help"]
FROM webpage:base
##########
# Linter #
##########
RUN apt update && apt install -y nodejs npm
RUN npm install -g markdownlint-cli
WORKDIR /src/linter
ENTRYPOINT ["/usr/local/bin/markdownlint"]
CMD ["--help"]
{
"default": false,
"first-heading-h1": true,
"header-increment": true,
"heading-style": { "style": "atx" },
"no-missing-space-atx": true,
"no-multiple-space-atx": true,
"blanks-around-headings": true,
"no-emphasis-as-heading": true,
"first-line-heading": true,
"single-title": true,
"no-empty-links": true,
"no-alt-text": true,
"no-multiple-blanks": true,
"single-trailing-newline": true,
"blanks-around-fences": true,
"blanks-around-lists": true,
"commands-show-output": true,
"line-length": { "line_length": 100, "code_blocks": false, "tables": false}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment