pass-otp
pass-otp copied to clipboard
Lint for markdown
Thoughts on adding pymarkdownlint to make lint?
$ markdownlint README.md
README.md:1: R1 Line exceeds max length (119>80)
README.md:51: R1 Line exceeds max length (107>80)
README.md:83: R1 Line exceeds max length (111>80)
README.md:84: R1 Line exceeds max length (111>80)
README.md:85: R1 Line exceeds max length (93>80)
README.md:86: R1 Line exceeds max length (85>80)
README.md:87: R1 Line exceeds max length (97>80)
README.md:88: R1 Line exceeds max length (105>80)
README.md:89: R1 Line exceeds max length (103>80)
README.md:90: R1 Line exceeds max length (91>80)
README.md:91: R1 Line exceeds max length (95>80)
README.md:92: R1 Line exceeds max length (101>80)
README.md:93: R1 Line exceeds max length (93>80)
README.md:94: R1 Line exceeds max length (95>80)
README.md:95: R1 Line exceeds max length (101>80)
README.md:96: R1 Line exceeds max length (97>80)
README.md:97: R1 Line exceeds max length (89>80)
README.md:98: R1 Line exceeds max length (93>80)
README.md:99: R1 Line exceeds max length (111>80)
README.md:100: R1 Line exceeds max length (111>80)
README.md:101: R1 Line exceeds max length (111>80)
README.md:141: R1 Line exceeds max length (85>80)
$ markdownlint CHANGELOG.md
CHANGELOG.md:10: R1 Line exceeds max length (97>80)
CHANGELOG.md:18: R1 Line exceeds max length (122>80)
NOTE: PyMarkDownLint is no longer under active development.
Would be nice to use one supported by popular linter plugins, if any. Vale in particular has been on my radar.
Do long lines in the readme impact the readability or maintainability of the project documentation?
Looks like you already enforce 80 chars, except for URLs, which is common.
Edit: An 80 char limit is great for split-screen use or smaller floating windows.
I tried vale
$ vale CHANGELOG.md
✔ 0 errors, 0 warnings and 0 suggestions in 1 file.
$ vale README.md
README.md
165:1 warning Consider removing 'Note that' vale.Editorializing
✖ 0 errors, 1 warning and 0 suggestions in 1 file.
I tried adding some "errors" to the README.md
-df
- dslk
- kldf
- dsklj
"
[
``
dgfsj
and neither replied with anything useful. Perhaps markdown is defined too loosely to lint, :roll_eyes: .
Perhaps make checkdoc or something could call grip and xdg-open to preview the markdown before a commit.
Oh, Vale lints prose, not markup syntax.
Yeah I write the docs with auto-fill-mode enabled in Emacs, so I'll probably not introduce many long-lines issues.
Here is the approach I'm thinking of to visually review markdown before making a commit. https://github.com/humanxrobot/pass-mount/blob/master/Makefile#L34