[GRASS-dev] How to reformat markdown to pass pre-commit?

Markus Neteler neteler at osgeo.org
Wed Sep 13 12:08:50 PDT 2023


Hi,

I have updated doc/infrastructure.md in my local Git copy and fail to
commit it in a new PR due to pre-commit linting checks:

markdownlint.............................................................Failed
- hook id: markdownlint
- exit code: 1

doc/infrastructure.md:33:81 MD013/line-length Line length [Expected:
80; Actual: 107]
doc/infrastructure.md:34:1 MD007/ul-indent Unordered list indentation
[Expected: 2; Actual: 4]
doc/infrastructure.md:54:1 MD007/ul-indent Unordered list indentation
[Expected: 2; Actual: 4]
doc/infrastructure.md:55:1 MD007/ul-indent Unordered list indentation
[Expected: 4; Actual: 8]
...
doc/infrastructure.md:148:1 MD007/ul-indent Unordered list indentation
[Expected: 2; Actual: 5]
doc/infrastructure.md:148:81 MD013/line-length Line length [Expected:
80; Actual: 90]
doc/infrastructure.md:149:81 MD013/line-length Line length [Expected:
80; Actual: 120]
doc/infrastructure.md:151:1 MD007/ul-indent Unordered list indentation
[Expected: 2; Actual: 5]
doc/infrastructure.md:152:81 MD013/line-length Line length [Expected:
80; Actual: 153]
doc/infrastructure.md:177:1 MD007/ul-indent Unordered list indentation
[Expected: 2; Actual: 4]
doc/infrastructure.md:178:1 MD007/ul-indent Unordered list indentation
[Expected: 2; Actual: 4]
doc/infrastructure.md:179:1 MD007/ul-indent Unordered list indentation
[Expected: 2; Actual: 4]
doc/infrastructure.md:180:1 MD007/ul-indent Unordered list indentation
[Expected: 2; Actual: 4]
doc/infrastructure.md:232:33 MD034/no-bare-urls Bare URL used
[Context: "https://github.com/OSGeo/grass..."]
...

I tried to use `mdformat` on the file but the result isn't compatible
with markdownlint.

Is there any other tool to auto-format the file (even a 90% solution is fine)?

Thanks
Markus


More information about the grass-dev mailing list