hyperonecom / h1-cli

Command-line interface for HyperOne platform
MIT License
6 stars 4 forks source link

Add linter to markdown #57

Open ad-m opened 6 years ago

ad-m commented 6 years ago

To avoid #56 we should add markdown linter. There is no rules to verify ending code_block, so we have add it. There is no way to add custom lint rules in markdownlint-cli yet.
https://github.com/igorshubovych/markdownlint-cli/pull/40

DavidAnson commented 6 years ago

Can you please show an example of the Markdown problem you want to detect? (I visited the issue above, but could not tell.) There may already be a rule for what you want.

ad-m commented 6 years ago

@DavidAnson , we use small files to build large documentation & help text for CLI. The problem is an unclosed code block like in file https://github.com/hyperonecom/h1-cli/blob/6e013277c051708fda6c22d8a5643f07ebd35392/bin/firewall/rule/examples.md (take awareness on last block of code) which concatenated generate invalid files like in https://github.com/hyperonecom/h1-cli/blob/6e013277c051708fda6c22d8a5643f07ebd35392/docs/firewall.md#add-firewall-to-allow-any-incoming-http-traffic-to-1017722 .

DavidAnson commented 6 years ago

I think this would be an easy rule to write, especially internally as there is a helper I think could be leveraged.

I think this problem only affects code fences. Have you considered using 4-space code blocks instead?