# Markdown linter - mdlint

## Running mdlint

    fx mdlint -root-dir $FUCHSIA_DIR/docs

For more options, see the [full command line reference](https://fuchsia.dev/reference/tools/fx/cmd/mdlint.md).

If it is not part of the current build configuration for some reason, re-run `fx set`
including the option to build mdlint: `--with //tools/mdlint`.

Markdown linter checks markdown:

## bad-headers

- One H1 header per file.
- Correct nesting of subheading levels.
- Duplicate headers.

## bad-lists

- newline before and after lists.

## casing-of-anchors

- Anchors must be lowercase.

## newline-before-fenced-code-block

- newline before and after fenced code blocks.

## no-extra-space-at-start-of-doc

- No blank lines at the beginning of a document.

## no-extra-space-on-right

- No trailing spaces.

## respect-col-length

- 80 character lines.

## respectful-code

Encourge respectful language in the documentation. See
[Modifying non-inclusive words in mdlint](https://fuchsia.dev/docs/contribute/docs/modify-mdlint-inclusive-language).

## simple-utf8-chars

Avoids utf-8 characters that can be represented in ASCII.

- `"`
- `"`
- `'`
- `'`
- `...`

[](https://issues.fuchsia.dev/issues/new?component=1439230&template=1881640&description=Issue+on:+https://fuchsia.dev/docs/contribute/docs/mdlint.md "Report a bug or suggest improvements on this page") [](https://cs.opensource.google/fuchsia/fuchsia/+/main:docs/contribute/docs/mdlint.md "View the source code of this page") [](https://ci.android.com/edit?repo=fuchsia/fuchsia/main&file=docs/contribute/docs/mdlint.md&cloneRepo=fuchsia/fuchsia:refs/heads/main&fullPath=fuchsia/docs/contribute/docs/mdlint.md "Edit the source code of this page")