diff --git a/test/atx_closed_heading_spacing.json b/test/atx_closed_heading_spacing.json index 2f37f5bb..103a42fc 100644 --- a/test/atx_closed_heading_spacing.json +++ b/test/atx_closed_heading_spacing.json @@ -1,4 +1,5 @@ { "default": true, - "MD002": false + "MD002": false, + "MD041": false } diff --git a/test/atx_heading_spacing.json b/test/atx_heading_spacing.json index 2f37f5bb..103a42fc 100644 --- a/test/atx_heading_spacing.json +++ b/test/atx_heading_spacing.json @@ -1,4 +1,5 @@ { "default": true, - "MD002": false + "MD002": false, + "MD041": false } diff --git a/test/blockquote_blank_lines.md b/test/blockquote_blank_lines.md index d21d4383..e46fe5e1 100644 --- a/test/blockquote_blank_lines.md +++ b/test/blockquote_blank_lines.md @@ -1,3 +1,5 @@ +# blockquote_blank_lines + Some text > a quote @@ -26,6 +28,6 @@ Some text Expected errors: -{MD028:5} {MD028:7} {MD028:8} {MD028:10} {MD028:17} -{MD009:10} (trailing space is intentional) -{MD012:8} (multiple blank lines are intentional) +{MD028:7} {MD028:9} {MD028:10} {MD028:12} {MD028:19} +{MD009:12} (trailing space is intentional) +{MD012:10} (multiple blank lines are intentional) diff --git a/test/blockquote_spaces.md b/test/blockquote_spaces.md index 50ce2fed..d775c185 100644 --- a/test/blockquote_spaces.md +++ b/test/blockquote_spaces.md @@ -1,3 +1,5 @@ +# blockquote_spaces + Some text > Hello world diff --git a/test/break-all-the-rules.json b/test/break-all-the-rules.json index 341c6760..09766334 100644 --- a/test/break-all-the-rules.json +++ b/test/break-all-the-rules.json @@ -2,7 +2,6 @@ "default": true, "MD002": true, "MD006": true, - "MD041": true, "MD043": { "headings": [ "## Heading 1 {MD002} {MD041}", diff --git a/test/bulleted_list_2_space_indent.md b/test/bulleted_list_2_space_indent.md index 268c9b05..7a9c47fa 100644 --- a/test/bulleted_list_2_space_indent.md +++ b/test/bulleted_list_2_space_indent.md @@ -1,3 +1,5 @@ +# bulleted_list_2_space_indent + This is a document where the lists are indented by 2 spaces, but the style is set to 4 space indents for lists: diff --git a/test/bulleted_list_4_space_indent.md b/test/bulleted_list_4_space_indent.md index 8079d913..2480f23e 100644 --- a/test/bulleted_list_4_space_indent.md +++ b/test/bulleted_list_4_space_indent.md @@ -1,3 +1,5 @@ +# bulleted_list_4_space_indent + * Test X * Test Y {MD007} * Test Z {MD007} diff --git a/test/code_block_consistency.md b/test/code_block_consistency.md index da1dc153..1f28a193 100644 --- a/test/code_block_consistency.md +++ b/test/code_block_consistency.md @@ -1,3 +1,5 @@ +# code_block_consistency + This is text. This is a @@ -6,6 +8,6 @@ This is text. And here is more text ```text -and here is a different {MD046:8} +and here is a different {MD046:10} code block ``` diff --git a/test/code_block_fenced.md b/test/code_block_fenced.md index 047264c5..f29e10d2 100644 --- a/test/code_block_fenced.md +++ b/test/code_block_fenced.md @@ -1,3 +1,5 @@ +# code_block_fenced + This is text. This is a {MD046} @@ -12,7 +14,7 @@ This is a code block that won't trigger. ```text This is code -with a line with trailing spaces. {MD009:14} +with a line with trailing spaces. {MD009:16} ``` But we'll do another: diff --git a/test/code_block_indented.md b/test/code_block_indented.md index 5576dcd8..7de4182f 100644 --- a/test/code_block_indented.md +++ b/test/code_block_indented.md @@ -1,3 +1,5 @@ +# code_block_indented + This is text. This is a @@ -6,7 +8,7 @@ This is text. And here is more text ```text -This is {MD046:8} also a code block. +This is {MD046:10} also a code block. ``` But we'll do another: diff --git a/test/code_fence_style_backtick.md b/test/code_fence_style_backtick.md index 0bf02b0c..820d6954 100644 --- a/test/code_fence_style_backtick.md +++ b/test/code_fence_style_backtick.md @@ -1,9 +1,11 @@ +# code_fence_style_backtick + ```text This is a code block ``` ~~~text -This is {MD048:5} a code block +This is {MD048:7} a code block ~~~ ```text @@ -14,6 +16,6 @@ This is fine ~~~text ``` -This is not {MD048:15} +This is not {MD048:17} ``` ~~~ diff --git a/test/code_fence_style_tilde.md b/test/code_fence_style_tilde.md index 5e44d02e..e26866a6 100644 --- a/test/code_fence_style_tilde.md +++ b/test/code_fence_style_tilde.md @@ -1,5 +1,7 @@ +# code_fence_style_tilde + ```text -This is {MD048:1} a code block +This is {MD048:3} a code block ``` ~~~text @@ -8,7 +10,7 @@ This is a code block ```text ~~~ -This is not fine {MD048:9} +This is not fine {MD048:11} ~~~ ``` diff --git a/test/consecutive_blank_lines.md b/test/consecutive_blank_lines.md index 95fde905..3468c6cb 100644 --- a/test/consecutive_blank_lines.md +++ b/test/consecutive_blank_lines.md @@ -1,7 +1,9 @@ +# consecutive_blank_lines + Some text -Some text {MD012:3} +Some text {MD012:5} This is a code block diff --git a/test/consistent_bullet_styles_asterisk.md b/test/consistent_bullet_styles_asterisk.md index ced4b371..a06162cd 100644 --- a/test/consistent_bullet_styles_asterisk.md +++ b/test/consistent_bullet_styles_asterisk.md @@ -1,3 +1,5 @@ +# consistent_bullet_styles_asterisk + * Item * Item * Item diff --git a/test/consistent_bullet_styles_dash.md b/test/consistent_bullet_styles_dash.md index 2d89e193..a41b13e4 100644 --- a/test/consistent_bullet_styles_dash.md +++ b/test/consistent_bullet_styles_dash.md @@ -1,3 +1,5 @@ +# consistent_bullet_styles_dash + - Item - Item - Item diff --git a/test/consistent_bullet_styles_plus.md b/test/consistent_bullet_styles_plus.md index 8f4f5208..6e73c106 100644 --- a/test/consistent_bullet_styles_plus.md +++ b/test/consistent_bullet_styles_plus.md @@ -1,3 +1,5 @@ +# consistent_bullet_styles_plus + + Item + Item + Item diff --git a/test/detailed-results-MD001-MD010.json b/test/detailed-results-MD001-MD010.json index 0fd42109..9f6ee9b4 100644 --- a/test/detailed-results-MD001-MD010.json +++ b/test/detailed-results-MD001-MD010.json @@ -1,5 +1,6 @@ { "default": true, "MD002": true, - "MD006": true + "MD006": true, + "MD041": false } diff --git a/test/byte-order-marker-utf8.json b/test/detailed-results-MD031-MD040.json similarity index 57% rename from test/byte-order-marker-utf8.json rename to test/detailed-results-MD031-MD040.json index 054e8566..7935d0c1 100644 --- a/test/byte-order-marker-utf8.json +++ b/test/detailed-results-MD031-MD040.json @@ -1,4 +1,4 @@ { "default": true, - "MD041": true + "MD041": false } diff --git a/test/detailed-results-MD041-MD050.json b/test/detailed-results-MD041-MD050.json index 8e917435..f5a8bcc3 100644 --- a/test/detailed-results-MD041-MD050.json +++ b/test/detailed-results-MD041-MD050.json @@ -1,6 +1,5 @@ { "default": true, - "MD041": true, "MD043": { "headings": [ "# Heading" diff --git a/test/detailed-results-front-matter.json b/test/detailed-results-front-matter.json index 636b736f..7fa6a470 100644 --- a/test/detailed-results-front-matter.json +++ b/test/detailed-results-front-matter.json @@ -2,6 +2,5 @@ "default": true, "MD009": { "br_spaces": 0 - }, - "MD041": true + } } diff --git a/test/emphasis_instead_of_headings.md b/test/emphasis_instead_of_headings.md index 2af778f5..72b8148d 100644 --- a/test/emphasis_instead_of_headings.md +++ b/test/emphasis_instead_of_headings.md @@ -1,3 +1,5 @@ +# emphasis_instead_of_headings + **Section 1: the first section {MD036}** Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor diff --git a/test/fenced_code_blocks.md b/test/fenced_code_blocks.md index c77583b0..e8a87671 100644 --- a/test/fenced_code_blocks.md +++ b/test/fenced_code_blocks.md @@ -1,3 +1,5 @@ +# fenced_code_blocks + This is a GFM-style fenced code block: ``` bash @@ -24,4 +26,4 @@ None of the above should trigger any heading related rules. Code block without a language specifier ``` -{MD040:23} {MD048:13} +{MD040:25} {MD048:15} diff --git a/test/fenced_code_without_blank_lines.json b/test/fenced_code_without_blank_lines.json index 29614326..78d25e72 100644 --- a/test/fenced_code_without_blank_lines.json +++ b/test/fenced_code_without_blank_lines.json @@ -1,4 +1,5 @@ { "default": true, - "MD040": false + "MD040": false, + "MD041": false } diff --git a/test/front-matter-no-crlf.json b/test/first_heading_bad_atx.json similarity index 57% rename from test/front-matter-no-crlf.json rename to test/first_heading_bad_atx.json index 054e8566..7935d0c1 100644 --- a/test/front-matter-no-crlf.json +++ b/test/first_heading_bad_atx.json @@ -1,4 +1,4 @@ { "default": true, - "MD041": true + "MD041": false } diff --git a/test/front-matter-title-json-spaces.json b/test/first_heading_bad_setext.json similarity index 57% rename from test/front-matter-title-json-spaces.json rename to test/first_heading_bad_setext.json index 054e8566..7935d0c1 100644 --- a/test/front-matter-title-json-spaces.json +++ b/test/first_heading_bad_setext.json @@ -1,4 +1,4 @@ { "default": true, - "MD041": true + "MD041": false } diff --git a/test/first_line_top_level_heading_atx.json b/test/first_line_top_level_heading_atx.json deleted file mode 100644 index d6fc777e..00000000 --- a/test/first_line_top_level_heading_atx.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "default": false, - "MD041": true -} diff --git a/test/first_line_top_level_heading_setext.json b/test/first_line_top_level_heading_setext.json deleted file mode 100644 index d6fc777e..00000000 --- a/test/first_line_top_level_heading_setext.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "default": false, - "MD041": true -} diff --git a/test/fix_102_extra_nodes_in_link_text.md b/test/fix_102_extra_nodes_in_link_text.md index 07d0bbad..74cc494e 100644 --- a/test/fix_102_extra_nodes_in_link_text.md +++ b/test/fix_102_extra_nodes_in_link_text.md @@ -1,3 +1,5 @@ +# fix_102_extra_nodes_in_link_text + [test _test_ test](www.test.com) [test `test` test](www.test.com) [test *test* test](www.test.com) diff --git a/test/front-matter-empty.json b/test/front-matter-embedded.json similarity index 57% rename from test/front-matter-empty.json rename to test/front-matter-embedded.json index 054e8566..7935d0c1 100644 --- a/test/front-matter-empty.json +++ b/test/front-matter-embedded.json @@ -1,4 +1,4 @@ { "default": true, - "MD041": true + "MD041": false } diff --git a/test/front-matter-no-title-h1.json b/test/front-matter-no-title-h1.json index 3c524e19..b077f0e1 100644 --- a/test/front-matter-no-title-h1.json +++ b/test/front-matter-no-title-h1.json @@ -1,5 +1,4 @@ { "default": true, - "MD013": false, - "MD041": true + "MD013": false } diff --git a/test/front-matter-no-title-no-h1.json b/test/front-matter-no-title-no-h1.json index 3c524e19..b077f0e1 100644 --- a/test/front-matter-no-title-no-h1.json +++ b/test/front-matter-no-title-no-h1.json @@ -1,5 +1,4 @@ { "default": true, - "MD013": false, - "MD041": true + "MD013": false } diff --git a/test/front-matter-title-h1.json b/test/front-matter-title-h1.json index 3c524e19..b077f0e1 100644 --- a/test/front-matter-title-h1.json +++ b/test/front-matter-title-h1.json @@ -1,5 +1,4 @@ { "default": true, - "MD013": false, - "MD041": true + "MD013": false } diff --git a/test/front-matter-title-h2.json b/test/front-matter-title-h2.json index 54223302..5fbf1fa3 100644 --- a/test/front-matter-title-h2.json +++ b/test/front-matter-title-h2.json @@ -3,6 +3,5 @@ "MD002": { "level": 2 }, - "MD013": false, - "MD041": true + "MD013": false } diff --git a/test/front-matter-title-json.json b/test/front-matter-title-json.json deleted file mode 100644 index 054e8566..00000000 --- a/test/front-matter-title-json.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "default": true, - "MD041": true -} diff --git a/test/front-matter-title-no-h1.json b/test/front-matter-title-no-h1.json index 3c524e19..b077f0e1 100644 --- a/test/front-matter-title-no-h1.json +++ b/test/front-matter-title-no-h1.json @@ -1,5 +1,4 @@ { "default": true, - "MD013": false, - "MD041": true + "MD013": false } diff --git a/test/front-matter-title-pandoc-spaces.json b/test/front-matter-title-pandoc-spaces.json deleted file mode 100644 index 054e8566..00000000 --- a/test/front-matter-title-pandoc-spaces.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "default": true, - "MD041": true -} diff --git a/test/front-matter-title-pandoc.json b/test/front-matter-title-pandoc.json deleted file mode 100644 index 054e8566..00000000 --- a/test/front-matter-title-pandoc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "default": true, - "MD041": true -} diff --git a/test/front-matter-title-spaces.json b/test/front-matter-title-spaces.json index 3c524e19..b077f0e1 100644 --- a/test/front-matter-title-spaces.json +++ b/test/front-matter-title-spaces.json @@ -1,5 +1,4 @@ { "default": true, - "MD013": false, - "MD041": true + "MD013": false } diff --git a/test/front-matter-title-toml-spaces.json b/test/front-matter-title-toml-spaces.json deleted file mode 100644 index 054e8566..00000000 --- a/test/front-matter-title-toml-spaces.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "default": true, - "MD041": true -} diff --git a/test/front-matter-title-toml.json b/test/front-matter-title-toml.json deleted file mode 100644 index 054e8566..00000000 --- a/test/front-matter-title-toml.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "default": true, - "MD041": true -} diff --git a/test/front-matter.json b/test/front-matter.json deleted file mode 100644 index 054e8566..00000000 --- a/test/front-matter.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "default": true, - "MD041": true -} diff --git a/test/hard-line-breaks.json b/test/hard-line-breaks.json index d965ba0b..1ffb8a6f 100644 --- a/test/hard-line-breaks.json +++ b/test/hard-line-breaks.json @@ -1,6 +1,6 @@ { - "default": true, - "MD009": { - "strict": true - } + "default": true, + "MD009": { + "strict": true } +} diff --git a/test/heading_mutliple_h1_no_toplevel.json b/test/heading_mutliple_h1_no_toplevel.json new file mode 100644 index 00000000..7935d0c1 --- /dev/null +++ b/test/heading_mutliple_h1_no_toplevel.json @@ -0,0 +1,4 @@ +{ + "default": true, + "MD041": false +} diff --git a/test/headings_with_spaces_at_the_beginning.json b/test/headings_with_spaces_at_the_beginning.json index 8ad79fd3..cb702d63 100644 --- a/test/headings_with_spaces_at_the_beginning.json +++ b/test/headings_with_spaces_at_the_beginning.json @@ -1,4 +1,5 @@ { "default": true, - "MD003": false + "MD003": false, + "MD041": false } diff --git a/test/hr_style_dashes.md b/test/hr_style_dashes.md index 9a692250..3d90b12b 100644 --- a/test/hr_style_dashes.md +++ b/test/hr_style_dashes.md @@ -1,3 +1,5 @@ +# hr_style_dashes + *** * * * @@ -18,5 +20,5 @@ _____ *** -{MD035:1} {MD035:3} {MD035:5} {MD035:9} {MD035:11} {MD035:13} {MD035:15} -{MD035:17} {MD035:19} +{MD035:3} {MD035:5} {MD035:7} {MD035:11} {MD035:13} {MD035:15} {MD035:17} +{MD035:19} {MD035:21} diff --git a/test/hr_style_inconsistent.md b/test/hr_style_inconsistent.md index df3cc726..20d4c745 100644 --- a/test/hr_style_inconsistent.md +++ b/test/hr_style_inconsistent.md @@ -1,3 +1,5 @@ +# hr_style_inconsistent + *** * * * @@ -18,5 +20,5 @@ _____ *** -{MD035:3} {MD035:5} {MD035:7} {MD035:9} {MD035:11} {MD035:13} {MD035:15} -{MD035:17} +{MD035:5} {MD035:7} {MD035:9} {MD035:11} {MD035:13} {MD035:15} {MD035:17} +{MD035:19} diff --git a/test/hr_style_long.md b/test/hr_style_long.md index 0e9b1db2..c5524a04 100644 --- a/test/hr_style_long.md +++ b/test/hr_style_long.md @@ -1,3 +1,5 @@ +# hr_style_long + *** * * * @@ -18,5 +20,5 @@ _____ *** -{MD035:1} {MD035:3} {MD035:5} {MD035:7} {MD035:9} {MD035:11} {MD035:13} -{MD035:15} {MD035:19} +{MD035:3} {MD035:5} {MD035:7} {MD035:9} {MD035:11} {MD035:13} {MD035:15} +{MD035:17} {MD035:21} diff --git a/test/hr_style_stars.md b/test/hr_style_stars.md index df3cc726..b096afb0 100644 --- a/test/hr_style_stars.md +++ b/test/hr_style_stars.md @@ -1,3 +1,5 @@ +# hr_style_stars + *** * * * @@ -18,5 +20,5 @@ _____ *** -{MD035:3} {MD035:5} {MD035:7} {MD035:9} {MD035:11} {MD035:13} {MD035:15} -{MD035:17} +{MD035:5} {MD035:7} {MD035:9} {MD035:11} {MD035:13} {MD035:15} {MD035:17} +{MD035:19} diff --git a/test/hugo-quickstart-example-blank.json b/test/hugo-quickstart-example-blank.json index 24ff05a4..55364c86 100644 --- a/test/hugo-quickstart-example-blank.json +++ b/test/hugo-quickstart-example-blank.json @@ -2,6 +2,5 @@ "default": true, "MD025": { "front_matter_title": "" - }, - "MD041": true + } } diff --git a/test/hugo-quickstart-example-clean.json b/test/hugo-quickstart-example-clean.json index 24ff05a4..55364c86 100644 --- a/test/hugo-quickstart-example-clean.json +++ b/test/hugo-quickstart-example-clean.json @@ -2,6 +2,5 @@ "default": true, "MD025": { "front_matter_title": "" - }, - "MD041": true + } } diff --git a/test/hugo-quickstart-example-json.json b/test/hugo-quickstart-example-json.json deleted file mode 100644 index 054e8566..00000000 --- a/test/hugo-quickstart-example-json.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "default": true, - "MD041": true -} diff --git a/test/inconsistent_bullet_styles_asterisk.md b/test/inconsistent_bullet_styles_asterisk.md index f383ded2..378c7f49 100644 --- a/test/inconsistent_bullet_styles_asterisk.md +++ b/test/inconsistent_bullet_styles_asterisk.md @@ -1,3 +1,5 @@ +# inconsistent_bullet_styles_asterisk + * Item + Item {MD004} - Item {MD004} diff --git a/test/inconsistent_bullet_styles_dash.md b/test/inconsistent_bullet_styles_dash.md index 15c5dfc7..8d243e28 100644 --- a/test/inconsistent_bullet_styles_dash.md +++ b/test/inconsistent_bullet_styles_dash.md @@ -1,3 +1,5 @@ +# inconsistent_bullet_styles_dash + - Item * Item {MD004} + Item {MD004} diff --git a/test/inconsistent_bullet_styles_plus.md b/test/inconsistent_bullet_styles_plus.md index fe4c497f..9a737276 100644 --- a/test/inconsistent_bullet_styles_plus.md +++ b/test/inconsistent_bullet_styles_plus.md @@ -1,3 +1,5 @@ +# inconsistent_bullet_styles_plus + + Item * Item {MD004} - Item {MD004} diff --git a/test/incorrect_bullet_style_asterisk.md b/test/incorrect_bullet_style_asterisk.md index dd6b3f0a..bc5add7b 100644 --- a/test/incorrect_bullet_style_asterisk.md +++ b/test/incorrect_bullet_style_asterisk.md @@ -1,3 +1,5 @@ +# incorrect_bullet_style_asterisk + * Item - Item {MD004} + Item {MD004} diff --git a/test/incorrect_bullet_style_dash.md b/test/incorrect_bullet_style_dash.md index bfbbf91a..8f8eef32 100644 --- a/test/incorrect_bullet_style_dash.md +++ b/test/incorrect_bullet_style_dash.md @@ -1,3 +1,5 @@ +# incorrect_bullet_style_dash + * Item {MD004} - Item + Item {MD004} diff --git a/test/incorrect_bullet_style_plus.md b/test/incorrect_bullet_style_plus.md index 460a299d..2c9a156f 100644 --- a/test/incorrect_bullet_style_plus.md +++ b/test/incorrect_bullet_style_plus.md @@ -1,3 +1,5 @@ +# incorrect_bullet_style_plus + * Item {MD004} - Item {MD004} + Item diff --git a/test/inline_html-allowed_elements.md b/test/inline_html-allowed_elements.md index defaf1e3..d19569c4 100644 --- a/test/inline_html-allowed_elements.md +++ b/test/inline_html-allowed_elements.md @@ -1,3 +1,5 @@ +# inline_html-allowed_elements +

This is allowed.

This is not allowed. {MD033}

diff --git a/test/links-with-markup.md b/test/links-with-markup.md index 8585ec7a..44d5f33e 100644 --- a/test/links-with-markup.md +++ b/test/links-with-markup.md @@ -1,3 +1,5 @@ +# links-with-markup + [This link is plain](link) [This link has `code`](link) diff --git a/test/lists-and-headings.json b/test/lists-and-headings.json new file mode 100644 index 00000000..7935d0c1 --- /dev/null +++ b/test/lists-and-headings.json @@ -0,0 +1,4 @@ +{ + "default": true, + "MD041": false +} diff --git a/test/lists_without_blank_lines.md b/test/lists_without_blank_lines.md index 6e593efe..ecc1041c 100644 --- a/test/lists_without_blank_lines.md +++ b/test/lists_without_blank_lines.md @@ -1,3 +1,5 @@ +# lists_without_blank_lines + * list (on first line) text @@ -58,7 +60,7 @@ text text -* list {MD032} {MD031:62} +* list {MD032} {MD031:64} ``` code ``` @@ -68,7 +70,7 @@ text ``` code ``` -* list {MD032} {MD031:70} +* list {MD032} {MD031:72} text diff --git a/test/long_lines_100.md b/test/long_lines_100.md index 18df4b8c..672a2b9d 100644 --- a/test/long_lines_100.md +++ b/test/long_lines_100.md @@ -1,3 +1,5 @@ +# long_lines_100 + This is a very very very very very very very very long line over 80 chars but less than 100 This is a very very very very very very very very very very long line over 80 chars, and also over 100. {MD013} diff --git a/test/long_lines_code-default.md b/test/long_lines_code-default.md index 2d81f169..05b25fc6 100644 --- a/test/long_lines_code-default.md +++ b/test/long_lines_code-default.md @@ -1,3 +1,5 @@ +# long_lines_code-default + This is a short line. This is a very very very very very very very very very very very very very very very very very very very very long line. {MD013} diff --git a/test/long_lines_code.md b/test/long_lines_code.md index 9481ee56..db177bf4 100644 --- a/test/long_lines_code.md +++ b/test/long_lines_code.md @@ -1,3 +1,5 @@ +# long_lines_code + This is a short line. This is a very very very very very very very very very very very very very very very very very very very very long line. {MD013} diff --git a/test/markdownlint-test-default-config.json b/test/markdownlint-test-default-config.json deleted file mode 100644 index 3eb7f83b..00000000 --- a/test/markdownlint-test-default-config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "MD041": false -} diff --git a/test/markdownlint-test-scenarios.js b/test/markdownlint-test-scenarios.js index 21f86bbc..f246bd02 100644 --- a/test/markdownlint-test-scenarios.js +++ b/test/markdownlint-test-scenarios.js @@ -7,11 +7,9 @@ const path = require("path"); const { promisify } = require("util"); const tape = require("tape"); require("tape-player"); -const packageJson = require("../package.json"); +const { version } = require("../package.json"); const markdownlint = require("../lib/markdownlint"); const helpers = require("../helpers"); -const defaultConfig = require("./markdownlint-test-default-config.json"); -const version = packageJson.version; /** * Create a test function for the specified test file. @@ -27,7 +25,7 @@ function createTestForFile(file) { const resultsFile = file.replace(/\.md$/, ".results.json"); const fixedFile = file.replace(/\.md$/, ".md.fixed"); const configFile = file.replace(/\.md$/, ".json"); - let mergedConfig = null; + let config = null; const actualPromise = fs.promises.stat(configFile) .then( function configFileExists() { @@ -38,14 +36,15 @@ function createTestForFile(file) { return {}; }) .then( - function lintWithConfig(config) { - mergedConfig = { - ...defaultConfig, - ...config - }; + function captureConfig(configResult) { + config = configResult; + } + ) + .then( + function lintWithConfig() { return markdownlintPromise({ "files": [ file ], - "config": mergedConfig, + config, "resultVersion": detailedResults ? 2 : 3 }); }) @@ -55,7 +54,7 @@ function createTestForFile(file) { Promise.all([ markdownlintPromise({ "files": [ file ], - "config": mergedConfig, + config, "resultVersion": 3 }), fs.promises.readFile(file, "utf8"), @@ -150,7 +149,7 @@ function createTestForFile(file) { "strings": { "input": corrections }, - "config": mergedConfig, + config, "resultVersion": 3 }); }) diff --git a/test/markdownlint-test.js b/test/markdownlint-test.js index f4c28e71..c8ab1e0d 100644 --- a/test/markdownlint-test.js +++ b/test/markdownlint-test.js @@ -12,14 +12,11 @@ const pluginTexMath = require("markdown-it-texmath"); const tape = require("tape"); require("tape-player"); const tv4 = require("tv4"); -const packageJson = require("../package.json"); +const { homepage, version } = require("../package.json"); const markdownlint = require("../lib/markdownlint"); const rules = require("../lib/rules"); const customRules = require("./rules/rules.js"); -const defaultConfig = require("./markdownlint-test-default-config.json"); const configSchema = require("../schema/markdownlint-config-schema.json"); -const homepage = packageJson.homepage; -const version = packageJson.version; const pluginTexMathOptions = { "engine": { @@ -133,7 +130,9 @@ tape("stringInputLineEndings", (test) => { "crlf": "One\r\nTwo\r\n#Three\n", "mixed": "One\rTwo\n#Three\n" }, - "config": defaultConfig, + "config": { + "MD041": false + }, "resultVersion": 0 }; markdownlint(options, function callback(err, actualResult) { @@ -774,8 +773,7 @@ tape("missingStringValue", (test) => { "undefined": undefined, "null": null, "empty": "" - }, - "config": defaultConfig + } }, function callback(err, result) { test.ifError(err); const expectedResult = { @@ -1491,7 +1489,7 @@ tape("texmath-content-in-lists with texmath plugin", (test) => { tape("getVersion", (test) => { test.plan(1); const actual = markdownlint.getVersion(); - const expected = packageJson.version; + const expected = version; test.equal(actual, expected, "Version string not correct."); test.end(); }); diff --git a/test/md022-line-number-out-of-range.json b/test/md022-line-number-out-of-range.json index 4970b843..0d599577 100644 --- a/test/md022-line-number-out-of-range.json +++ b/test/md022-line-number-out-of-range.json @@ -1,4 +1,5 @@ { "default": true, + "MD041": false, "MD047": false } diff --git a/test/no_first_line_heading.json b/test/no_first_line_heading.json deleted file mode 100644 index 054e8566..00000000 --- a/test/no_first_line_heading.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "default": true, - "MD041": true -} diff --git a/test/no_first_line_top_level_heading.json b/test/no_first_line_top_level_heading.json deleted file mode 100644 index 054e8566..00000000 --- a/test/no_first_line_top_level_heading.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "default": true, - "MD041": true -} diff --git a/test/ordered_list_item_prefix-paren.md b/test/ordered_list_item_prefix-paren.md index f4adfbd9..1797bd85 100644 --- a/test/ordered_list_item_prefix-paren.md +++ b/test/ordered_list_item_prefix-paren.md @@ -1,3 +1,5 @@ +# ordered_list_item_prefix-paren + Good list: 1) Do this. diff --git a/test/ordered_list_item_prefix.md b/test/ordered_list_item_prefix.md index f5ab9564..c98b8820 100644 --- a/test/ordered_list_item_prefix.md +++ b/test/ordered_list_item_prefix.md @@ -1,3 +1,5 @@ +# ordered_list_item_prefix + Good list: 1. Do this. diff --git a/test/ordered_list_item_prefix_ordered-paren.md b/test/ordered_list_item_prefix_ordered-paren.md index 1c530ed5..7fdf371d 100644 --- a/test/ordered_list_item_prefix_ordered-paren.md +++ b/test/ordered_list_item_prefix_ordered-paren.md @@ -1,3 +1,5 @@ +# ordered_list_item_prefix_ordered-paren + Good list: 1) Do this. diff --git a/test/ordered_list_item_prefix_ordered.md b/test/ordered_list_item_prefix_ordered.md index 1d9895d3..72d5ec4c 100644 --- a/test/ordered_list_item_prefix_ordered.md +++ b/test/ordered_list_item_prefix_ordered.md @@ -1,3 +1,5 @@ +# ordered_list_item_prefix_ordered + Good list: 1. Do this. diff --git a/test/required-headings-missing-first.json b/test/required-headings-missing-first.json index 9b762888..4baec6da 100644 --- a/test/required-headings-missing-first.json +++ b/test/required-headings-missing-first.json @@ -1,5 +1,6 @@ { "default": true, + "MD041": false, "MD043": { "headings": [ "# One", diff --git a/test/reversed_link.md b/test/reversed_link.md index 60bfa109..d27d69ea 100644 --- a/test/reversed_link.md +++ b/test/reversed_link.md @@ -1,3 +1,5 @@ +# reversed_link + Go to (this website)[https://www.example.com] {MD011} However, this shouldn't trigger inside code blocks: diff --git a/test/spaces_after_list_marker.md b/test/spaces_after_list_marker.md index 6c71da5f..ae0a55bf 100644 --- a/test/spaces_after_list_marker.md +++ b/test/spaces_after_list_marker.md @@ -1,3 +1,5 @@ +# spaces_after_list_marker + Normal list * Foo diff --git a/test/spaces_inside_codespan_elements.md b/test/spaces_inside_codespan_elements.md index 12f70138..c8c0f4ed 100644 --- a/test/spaces_inside_codespan_elements.md +++ b/test/spaces_inside_codespan_elements.md @@ -1,3 +1,5 @@ +# spaces_inside_codespan_elements + `normal codespan element` ` codespan element with space inside left` {MD038} diff --git a/test/sublist-bullet-style.md b/test/sublist-bullet-style.md index a61ca6bf..4786984c 100644 --- a/test/sublist-bullet-style.md +++ b/test/sublist-bullet-style.md @@ -1,3 +1,5 @@ +# sublist-bullet-style + 1. item 1. item + item diff --git a/test/trailing_spaces_br.md b/test/trailing_spaces_br.md index 826fce7b..0882a70d 100644 --- a/test/trailing_spaces_br.md +++ b/test/trailing_spaces_br.md @@ -1,6 +1,8 @@ +# trailing_spaces_br + This line has a single trailing space {MD009} This line has two trailing spaces and should be allowed This line has three trailing spaces {MD009} This line has four trailing spaces {MD009} -{MD009:5} +{MD009:7} diff --git a/test/whitespace_issues.md b/test/whitespace_issues.md index 7c50dfb2..ecf17b4d 100644 --- a/test/whitespace_issues.md +++ b/test/whitespace_issues.md @@ -1,3 +1,5 @@ +# whitespace_issues + Some text {MD009} Some more text {MD010} Some more text