CLI#

gomarklint [files or directories] [flags]

If no paths are given, the tool will use include from .gomarklint.json if present, otherwise error out with:

“please provide a markdown file or directory (or set ‘include’ in .gomarklint.json)”

Flags#

FlagTypeDefaultDescription
--configstring.gomarklint.jsonPath to config file. Loaded if the file exists.
--min-headingint2Minimum heading level considered by the heading-level rule.
--enable-link-checkboolfalseEnable external link checking.
--enable-heading-level-checkbooltrueEnable heading level validation.
--enable-duplicate-heading-checkbooltrueEnable duplicate heading detection.
--enable-no-multiple-blank-lines-checkbooltrueEnable check that disallows multiple consecutive blank lines.
--enable-no-setext-headings-checkbooltrueEnable check that disallows Setext-style headings.
--enable-final-blank-line-checkbooltrueEnable check that enforces a final blank line at end of file.
--skip-link-patternsstring[] (regex)[]Regex patterns; matching URLs are skipped by link check. Can be passed multiple times.
--outputtext | jsontextOutput format. Any other value is rejected.

Notes#

  • Flags override config values when explicitly provided.
  • Only existing files or directories are accepted; matching paths are then filtered by ignore (from config).
  • Exit behavior: the command returns a non-nil error (non-zero exit) if issues are found, zero otherwise.