Add optional "information" property to custom rules to provide a link to more information.

This commit is contained in:
David Anson 2019-01-15 21:56:38 -08:00
parent b77dd5ccd3
commit ff86e1d7f1
14 changed files with 201 additions and 6 deletions

View file

@ -538,24 +538,28 @@ Output:
{ "lineNumber": 3,
"ruleNames": [ "MD010", "no-hard-tabs" ],
"ruleDescription": "Hard tabs",
"errorDetail": "Column: 17",
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md010",
"errorDetail": "Column: 19",
"errorContext": null,
"errorRange": [ 17, 1 ] },
"errorRange": [ 19, 1 ] },
{ "lineNumber": 1,
"ruleNames": [ "MD018", "no-missing-space-atx" ],
"ruleDescription": "No space after hash on atx style heading",
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md018",
"errorDetail": null,
"errorContext": "#bad.md",
"errorRange": [ 1, 2 ] },
{ "lineNumber": 3,
"ruleNames": [ "MD018", "no-missing-space-atx" ],
"ruleDescription": "No space after hash on atx style heading",
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md018",
"errorDetail": null,
"errorContext": "#This file fails\tsome rules.",
"errorRange": [ 1, 2 ] },
{ "lineNumber": 1,
"ruleNames": [ "MD041", "first-line-h1" ],
"ruleDescription": "First line in file should be a top level heading",
"ruleInformation": "https://github.com/DavidAnson/markdownlint/blob/v0.0.0/doc/Rules.md#md041",
"errorDetail": null,
"errorContext": "#bad.md",
"errorRange": null }