Generate Rules.md and md###.md files from metadata, improve Parameters documentation by referencing schema.

This commit is contained in:
David Anson 2022-10-29 23:21:45 -07:00
parent 32c75ebfd9
commit 37baddcf27
110 changed files with 3875 additions and 179 deletions

54
doc/md013.md Normal file
View file

@ -0,0 +1,54 @@
# MD013 - Line length
Tags: line_length
Aliases: line-length
Parameters:
* `code_block_line_length`: Number of characters for code blocks (`integer`, default `80`)
* `code_blocks`: Include code blocks (`boolean`, default `true`)
* `headers`: Include headings (`boolean`, default `true`)
* `heading_line_length`: Number of characters for headings (`integer`, default `80`)
* `headings`: Include headings (`boolean`, default `true`)
* `line_length`: Number of characters (`integer`, default `80`)
* `stern`: Stern length checking (`boolean`, default `false`)
* `strict`: Strict length checking (`boolean`, default `false`)
* `tables`: Include tables (`boolean`, default `true`)
> If `headings` is not provided, `headers` (deprecated) will be used.
This rule is triggered when there are lines that are longer than the
configured `line_length` (default: 80 characters). To fix this, split the line
up into multiple lines. To set a different maximum length for headings, use
`heading_line_length`. To set a different maximum length for code blocks, use
`code_block_line_length`
This rule has an exception when there is no whitespace beyond the configured
line length. This allows you to still include items such as long URLs without
being forced to break them in the middle. To disable this exception, set the
`strict` parameter to `true` to report an issue when any line is too long.
To warn for lines that are too long and could be fixed but allow lines without
spaces, set the `stern` parameter to `true`.
For example (assuming normal behavior):
```markdown
IF THIS LINE IS THE MAXIMUM LENGTH
This line is okay because there are-no-spaces-beyond-that-length
And this line is a violation because there are
This-line-is-also-okay-because-there-are-no-spaces
```
In `strict` or `stern` modes, the two middle lines above are a violation. The
third line is a violation in `strict` mode but allowed in `stern` mode.
You have the option to exclude this rule for code blocks, tables, or headings.
To do so, set the `code_blocks`, `tables`, or `headings` parameter(s) to false.
Code blocks are included in this rule by default since it is often a
requirement for document readability, and tentatively compatible with code
rules. Still, some languages do not lend themselves to short lines.
Rationale: Extremely long lines can be difficult to work with in some editors.
More information: <https://cirosantilli.com/markdown-style-guide#line-wrapping>.