Disable Comments#

You can suppress lint violations for specific lines or blocks by adding HTML comment directives directly in your Markdown file.

Directives#

Block disable / enable#

Disable all rules from the directive line onward until re-enabled:

<!-- gomarklint-disable -->
https://example.com
<!-- gomarklint-enable -->

Disable specific rules only:

<!-- gomarklint-disable no-bare-urls -->
https://example.com
<!-- gomarklint-enable no-bare-urls -->

Re-enable a specific rule inside a block that disabled everything:

<!-- gomarklint-disable -->
https://example.com
<!-- gomarklint-enable no-bare-urls -->
https://example.com   ← no-bare-urls is checked again here
<!-- gomarklint-enable -->

Single-line disable#

Suppress violations on the same line the directive appears:

https://example.com <!-- gomarklint-disable-line -->

https://example.com <!-- gomarklint-disable-line no-bare-urls -->

Next-line disable#

Suppress violations on the line immediately following the directive:

<!-- gomarklint-disable-next-line -->
https://example.com

<!-- gomarklint-disable-next-line no-bare-urls -->
https://example.com

Directive reference#

DirectiveScopeEffect
<!-- gomarklint-disable -->block startDisable all rules
<!-- gomarklint-disable rule [rule…] -->block startDisable named rules
<!-- gomarklint-enable -->block endRe-enable all rules
<!-- gomarklint-enable rule [rule…] -->block endRe-enable named rules
<!-- gomarklint-disable-line -->current lineDisable all rules
<!-- gomarklint-disable-line rule [rule…] -->current lineDisable named rules
<!-- gomarklint-disable-next-line -->next lineDisable all rules
<!-- gomarklint-disable-next-line rule [rule…] -->next lineDisable named rules

Notes#

  • A directive that disables all rules takes priority over one that disables only named rules when both apply to the same line.
  • Files without any gomarklint-disable comment are parsed with zero overhead — the directive scanner is skipped entirely.
  • Rule names match the keys listed in Rules.