mdl 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mdl/doc.rb +1 -1
- data/lib/mdl/version.rb +1 -1
- data/mdl.gemspec +3 -3
- metadata +4 -266
- data/.github/ISSUE_TEMPLATE/BUG_TEMPLATE.md +0 -22
- data/.github/ISSUE_TEMPLATE/DESIGN_PROPOSAL.md +0 -40
- data/.github/ISSUE_TEMPLATE/ENHANCEMENT_REQUEST.md +0 -20
- data/.github/ISSUE_TEMPLATE/RULE_REQUEST.md +0 -20
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -23
- data/.gitignore +0 -13
- data/.pre-commit-hooks.yaml +0 -6
- data/.travis.yml +0 -12
- data/CHANGELOG.md +0 -218
- data/CONTRIBUTING.md +0 -76
- data/MAINTAINERS.md +0 -21
- data/README.md +0 -87
- data/Rakefile +0 -8
- data/docs/RULES.md +0 -1089
- data/docs/configuration.md +0 -99
- data/docs/creating_rules.md +0 -90
- data/docs/creating_styles.md +0 -47
- data/docs/rolling_a_release.md +0 -51
- data/example/markdown_spec.md +0 -897
- data/test/fixtures/default_mdlrc +0 -1
- data/test/fixtures/dir_with_md_and_markdown/bar.markdown +0 -1
- data/test/fixtures/dir_with_md_and_markdown/foo.md +0 -1
- data/test/fixtures/front_matter/jekyll_post.md +0 -16
- data/test/fixtures/front_matter/jekyll_post_2.md +0 -17
- data/test/fixtures/mdlrc_disable_rules +0 -1
- data/test/fixtures/mdlrc_disable_tags +0 -1
- data/test/fixtures/mdlrc_enable_rules +0 -1
- data/test/fixtures/mdlrc_enable_tags +0 -1
- data/test/fixtures/my_ruleset.rb +0 -6
- data/test/rule_tests/alternate_top_level_header.md +0 -3
- data/test/rule_tests/alternate_top_level_header_style.rb +0 -4
- data/test/rule_tests/atx_closed_header_spacing.md +0 -17
- data/test/rule_tests/atx_header_spacing.md +0 -5
- data/test/rule_tests/blockquote_blank_lines.md +0 -31
- data/test/rule_tests/blockquote_spaces.md +0 -23
- data/test/rule_tests/bulleted_list_2_space_indent.md +0 -6
- data/test/rule_tests/bulleted_list_2_space_indent_style.rb +0 -3
- data/test/rule_tests/bulleted_list_4_space_indent.md +0 -3
- data/test/rule_tests/bulleted_list_not_at_beginning_of_line.md +0 -14
- data/test/rule_tests/code_block_consistency.md +0 -11
- data/test/rule_tests/code_block_consistency_style.rb +0 -1
- data/test/rule_tests/code_block_dollar.md +0 -33
- data/test/rule_tests/code_block_dollar_fence.md +0 -29
- data/test/rule_tests/code_block_fenced.md +0 -17
- data/test/rule_tests/code_block_fenced_style.rb +0 -1
- data/test/rule_tests/code_block_indented.md +0 -17
- data/test/rule_tests/code_block_indented_style.rb +0 -1
- data/test/rule_tests/consecutive_blank_lines.md +0 -11
- data/test/rule_tests/consistent_bullet_styles_asterisk.md +0 -3
- data/test/rule_tests/consistent_bullet_styles_dash.md +0 -3
- data/test/rule_tests/consistent_bullet_styles_plus.md +0 -3
- data/test/rule_tests/default_test_style.rb +0 -5
- data/test/rule_tests/emphasis_instead_of_headers.md +0 -42
- data/test/rule_tests/empty_doc.md +0 -0
- data/test/rule_tests/fenced_code_blocks.md +0 -27
- data/test/rule_tests/fenced_code_with_nesting.md +0 -73
- data/test/rule_tests/fenced_code_without_blank_lines.md +0 -42
- data/test/rule_tests/fenced_code_without_blank_lines_style.rb +0 -3
- data/test/rule_tests/first_header_bad_atx.md +0 -1
- data/test/rule_tests/first_header_bad_setext.md +0 -2
- data/test/rule_tests/first_header_good_atx.md +0 -1
- data/test/rule_tests/first_header_good_setext.md +0 -2
- data/test/rule_tests/first_line_top_level_header_atx.md +0 -3
- data/test/rule_tests/first_line_top_level_header_atx_style.rb +0 -2
- data/test/rule_tests/first_line_top_level_header_setext.md +0 -4
- data/test/rule_tests/first_line_top_level_header_setext_style.rb +0 -2
- data/test/rule_tests/fix_102_extra_nodes_in_link_text.md +0 -8
- data/test/rule_tests/header_duplicate_content.md +0 -11
- data/test/rule_tests/header_duplicate_content_different_nesting.md +0 -11
- data/test/rule_tests/header_duplicate_content_different_nesting_style.rb +0 -1
- data/test/rule_tests/header_duplicate_content_no_different_nesting.md +0 -13
- data/test/rule_tests/header_multiple_toplevel.md +0 -3
- data/test/rule_tests/header_mutliple_h1_no_toplevel.md +0 -5
- data/test/rule_tests/header_trailing_punctuation.md +0 -11
- data/test/rule_tests/header_trailing_punctuation_customized.md +0 -14
- data/test/rule_tests/header_trailing_punctuation_customized_style.rb +0 -2
- data/test/rule_tests/headers_bad.md +0 -7
- data/test/rule_tests/headers_good.md +0 -5
- data/test/rule_tests/headers_good_setext_with_atx.md +0 -7
- data/test/rule_tests/headers_good_setext_with_atx_style.rb +0 -2
- data/test/rule_tests/headers_good_with_issue_numbers.md +0 -12
- data/test/rule_tests/headers_surrounding_space_atx.md +0 -12
- data/test/rule_tests/headers_surrounding_space_setext.md +0 -15
- data/test/rule_tests/headers_with_spaces_at_the_beginning.md +0 -20
- data/test/rule_tests/hr_style_dashes.md +0 -22
- data/test/rule_tests/hr_style_dashes_style.rb +0 -3
- data/test/rule_tests/hr_style_inconsistent.md +0 -22
- data/test/rule_tests/hr_style_long.md +0 -22
- data/test/rule_tests/hr_style_long_style.rb +0 -3
- data/test/rule_tests/hr_style_stars.md +0 -22
- data/test/rule_tests/hr_style_stars_style.rb +0 -3
- data/test/rule_tests/inconsistent_bullet_indent_same_level.md +0 -4
- data/test/rule_tests/inconsistent_bullet_styles_asterisk.md +0 -3
- data/test/rule_tests/inconsistent_bullet_styles_dash.md +0 -3
- data/test/rule_tests/inconsistent_bullet_styles_plus.md +0 -3
- data/test/rule_tests/incorrect_bullet_style_asterisk.md +0 -3
- data/test/rule_tests/incorrect_bullet_style_asterisk_style.rb +0 -3
- data/test/rule_tests/incorrect_bullet_style_dash.md +0 -3
- data/test/rule_tests/incorrect_bullet_style_dash_style.rb +0 -3
- data/test/rule_tests/incorrect_bullet_style_plus.md +0 -3
- data/test/rule_tests/incorrect_bullet_style_plus_style.rb +0 -3
- data/test/rule_tests/incorrect_header_atx.md +0 -6
- data/test/rule_tests/incorrect_header_atx_closed.md +0 -6
- data/test/rule_tests/incorrect_header_atx_closed_style.rb +0 -2
- data/test/rule_tests/incorrect_header_atx_style.rb +0 -2
- data/test/rule_tests/incorrect_header_setext.md +0 -6
- data/test/rule_tests/incorrect_header_setext_style.rb +0 -2
- data/test/rule_tests/inline_html.md +0 -13
- data/test/rule_tests/links.md +0 -9
- data/test/rule_tests/lists_without_blank_lines.md +0 -75
- data/test/rule_tests/long_lines.md +0 -3
- data/test/rule_tests/long_lines_100.md +0 -7
- data/test/rule_tests/long_lines_100_style.rb +0 -3
- data/test/rule_tests/long_lines_code.md +0 -45
- data/test/rule_tests/long_lines_code_style.rb +0 -3
- data/test/rule_tests/mixed_header_types_atx.md +0 -6
- data/test/rule_tests/mixed_header_types_atx_closed.md +0 -6
- data/test/rule_tests/mixed_header_types_setext.md +0 -6
- data/test/rule_tests/no_first_line_header.md +0 -1
- data/test/rule_tests/no_first_line_header_style.rb +0 -1
- data/test/rule_tests/no_first_line_top_level_header.md +0 -1
- data/test/rule_tests/no_first_line_top_level_header_style.rb +0 -1
- data/test/rule_tests/ordered_list_item_prefix.md +0 -13
- data/test/rule_tests/ordered_list_item_prefix_ordered.md +0 -13
- data/test/rule_tests/ordered_list_item_prefix_ordered_style.rb +0 -3
- data/test/rule_tests/reversed_link.md +0 -7
- data/test/rule_tests/spaces_after_list_marker.md +0 -74
- data/test/rule_tests/spaces_after_list_marker_style.rb +0 -5
- data/test/rule_tests/spaces_inside_codespan_elements.md +0 -7
- data/test/rule_tests/spaces_inside_emphasis_markers.md +0 -35
- data/test/rule_tests/spaces_inside_link_text.md +0 -28
- data/test/rule_tests/trailing_spaces_br.md +0 -4
- data/test/rule_tests/trailing_spaces_br_style.rb +0 -3
- data/test/rule_tests/whitespace_issues.md +0 -3
- data/test/setup_tests.rb +0 -5
- data/test/test_cli.rb +0 -301
- data/test/test_ruledocs.rb +0 -52
- data/test/test_rules.rb +0 -58
- data/tools/README.md +0 -3
- data/tools/docker/Dockerfile +0 -13
- data/tools/docker/README.md +0 -19
- data/tools/test_location.rb +0 -20
- data/tools/view_markdown.rb +0 -11
data/test/fixtures/default_mdlrc
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# Blank .mdlrc
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
## Second Header First
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
## Second Header First
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
layout: post
|
|
3
|
-
title: Hello World!
|
|
4
|
-
category: Meta
|
|
5
|
-
tags:
|
|
6
|
-
- tag
|
|
7
|
-
- another tag
|
|
8
|
-
- one more tag
|
|
9
|
-
url: http://example.com
|
|
10
|
-
excerpt: Hello World! Vestibulum imperdiet adipiscing arcu, quis aliquam dolor condimentum dapibus. Aliquam fermentum leo aliquet quam volutpat et molestie mauris mattis. Suspendisse semper consequat velit in suscipit.
|
|
11
|
-
---
|
|
12
|
-
# header1
|
|
13
|
-
|
|
14
|
-
This is just a sample post.
|
|
15
|
-
|
|
16
|
-
### offending header3
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
layout: post
|
|
3
|
-
title: Hello World!
|
|
4
|
-
category: Meta
|
|
5
|
-
tags:
|
|
6
|
-
- tag
|
|
7
|
-
- another tag
|
|
8
|
-
- one more tag
|
|
9
|
-
url: http://example.com
|
|
10
|
-
excerpt: Hello World! Vestibulum imperdiet adipiscing arcu, quis aliquam dolor condimentum dapibus. Aliquam fermentum leo aliquet quam volutpat et molestie mauris mattis. Suspendisse semper consequat velit in suscipit.
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
# header1
|
|
14
|
-
|
|
15
|
-
This is just a sample post.
|
|
16
|
-
|
|
17
|
-
### offending header3
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
rules "~MD001", "~MD002"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
tags "ul", "~indentation"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
rules "MD001", "MD002"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
tags "headers", "whitespace"
|
data/test/fixtures/my_ruleset.rb
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
Some text
|
|
2
|
-
|
|
3
|
-
> a quote
|
|
4
|
-
> same quote
|
|
5
|
-
|
|
6
|
-
> blank line above me
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
> two blank lines above me
|
|
10
|
-
|
|
11
|
-
> space above me
|
|
12
|
-
|
|
13
|
-
* List with embedded blockquote
|
|
14
|
-
|
|
15
|
-
> Test
|
|
16
|
-
> Test
|
|
17
|
-
|
|
18
|
-
> Test
|
|
19
|
-
|
|
20
|
-
* Item 2
|
|
21
|
-
|
|
22
|
-
> Test. The blank line below should _not_ trigger MD028 as one blockquote is
|
|
23
|
-
> inside the list, and the other is outside it.
|
|
24
|
-
|
|
25
|
-
> Test
|
|
26
|
-
|
|
27
|
-
Expected errors:
|
|
28
|
-
|
|
29
|
-
{MD028:5} {MD028:8} {MD028:10} {MD028:17}
|
|
30
|
-
{MD009:10} (trailing space is intentional)
|
|
31
|
-
{MD012:8} (multiple blank lines are intentional)
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
Some text
|
|
2
|
-
|
|
3
|
-
> Hello world
|
|
4
|
-
> Foo {MD027}
|
|
5
|
-
> Bar {MD027}
|
|
6
|
-
|
|
7
|
-
This tests other things embedded in the blockquote:
|
|
8
|
-
|
|
9
|
-
> *Hello world*
|
|
10
|
-
> *foo* {MD027}
|
|
11
|
-
> **bar** {MD027}
|
|
12
|
-
> "Baz" {MD027}
|
|
13
|
-
> `qux` {MD027}
|
|
14
|
-
> *foo* more text
|
|
15
|
-
> **bar** more text
|
|
16
|
-
> 'baz' more text
|
|
17
|
-
> `qux` more text
|
|
18
|
-
|
|
19
|
-
Test the first line being indented too much:
|
|
20
|
-
|
|
21
|
-
> Foo {MD027}
|
|
22
|
-
> Bar {MD027}
|
|
23
|
-
> Baz
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
rule 'MD046', :style => :consistent
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
The following code block shouldn't have $ before the commands:
|
|
2
|
-
|
|
3
|
-
$ ls {MD014}
|
|
4
|
-
$ less foo
|
|
5
|
-
|
|
6
|
-
$ cat bar
|
|
7
|
-
|
|
8
|
-
However the following code block shows output, and $ can be used to
|
|
9
|
-
distinguish between command and output:
|
|
10
|
-
|
|
11
|
-
$ ls
|
|
12
|
-
foo bar
|
|
13
|
-
$ less foo
|
|
14
|
-
Hello world
|
|
15
|
-
|
|
16
|
-
$ cat bar
|
|
17
|
-
baz
|
|
18
|
-
|
|
19
|
-
The following code block uses variable names, and likewise shouldn't fire:
|
|
20
|
-
|
|
21
|
-
$foo = 'bar';
|
|
22
|
-
$baz = 'qux';
|
|
23
|
-
|
|
24
|
-
The following code block doesn't have any dollar signs, and shouldn't fire:
|
|
25
|
-
|
|
26
|
-
ls foo
|
|
27
|
-
cat bar
|
|
28
|
-
|
|
29
|
-
The following (fenced) code block doesn't have any content at all, and
|
|
30
|
-
shouldn't fire:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
```
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# header
|
|
2
|
-
|
|
3
|
-
```fence
|
|
4
|
-
$ code
|
|
5
|
-
```
|
|
6
|
-
|
|
7
|
-
text
|
|
8
|
-
|
|
9
|
-
```fence
|
|
10
|
-
$ code
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
text
|
|
14
|
-
|
|
15
|
-
```fence
|
|
16
|
-
$ code
|
|
17
|
-
$ code
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
text
|
|
21
|
-
|
|
22
|
-
```fence
|
|
23
|
-
$ code
|
|
24
|
-
$ code
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
text
|
|
28
|
-
|
|
29
|
-
{MD014:3} {MD014:9} {MD014:15} {MD014:22}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
rule 'MD046', :style => :fenced
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
rule 'MD046', :style => :indented
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
**Section 1: the first section {MD036}**
|
|
2
|
-
|
|
3
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
|
|
4
|
-
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
|
|
5
|
-
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
6
|
-
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
|
|
7
|
-
eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
8
|
-
in culpa qui officia deserunt mollit anim id est laborum.
|
|
9
|
-
|
|
10
|
-
__Section 1.1: another section {MD036}__
|
|
11
|
-
|
|
12
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
|
|
13
|
-
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
|
|
14
|
-
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
15
|
-
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
|
|
16
|
-
eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
17
|
-
in culpa qui officia deserunt mollit anim id est laborum.
|
|
18
|
-
|
|
19
|
-
*Section 2: yet more sections {MD036}*
|
|
20
|
-
|
|
21
|
-
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
|
|
22
|
-
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
|
|
23
|
-
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
|
|
24
|
-
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
|
|
25
|
-
eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt
|
|
26
|
-
in culpa qui officia deserunt mollit anim id est laborum.
|
|
27
|
-
|
|
28
|
-
_Section 3: oh no more sections {MD036}_
|
|
29
|
-
|
|
30
|
-
This is a normal paragraph
|
|
31
|
-
**that just happens to have emphasized text in**
|
|
32
|
-
even though the emphasized text is on its own line.
|
|
33
|
-
|
|
34
|
-
This is another **normal** paragraph with some text in it. This also should
|
|
35
|
-
not trigger the rule.
|
|
36
|
-
|
|
37
|
-
**This is an entire paragraph that has been emphasized, and shouldn't be
|
|
38
|
-
detected as a header because it's on multiple lines**
|
|
39
|
-
|
|
40
|
-
**This also shouldn't be detected as a header as it ends in punctuation.**
|
|
41
|
-
|
|
42
|
-
**[This as well since it is a link](https://example.com)**
|
|
File without changes
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
This is a GFM-style fenced code block:
|
|
2
|
-
|
|
3
|
-
``` bash
|
|
4
|
-
#!/bin/bash
|
|
5
|
-
|
|
6
|
-
# Print something to stdout:
|
|
7
|
-
echo "Hello"
|
|
8
|
-
echo "World"
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
This is a kramdown-style fenced code block:
|
|
12
|
-
|
|
13
|
-
~~~ bash
|
|
14
|
-
#!/bin/bash
|
|
15
|
-
|
|
16
|
-
# Print something to stdout:
|
|
17
|
-
echo "Hello"
|
|
18
|
-
echo "World"
|
|
19
|
-
~~~
|
|
20
|
-
|
|
21
|
-
None of the above should trigger any heading related rules.
|
|
22
|
-
|
|
23
|
-
```
|
|
24
|
-
Code block without a language specifier
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
{MD040:23}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
# header
|
|
2
|
-
|
|
3
|
-
text
|
|
4
|
-
```fence {MD031}
|
|
5
|
-
code
|
|
6
|
-
``` {MD031}
|
|
7
|
-
text
|
|
8
|
-
~~~fence {MD031}
|
|
9
|
-
code
|
|
10
|
-
~~~ {MD031}
|
|
11
|
-
text
|
|
12
|
-
```fence {MD031}
|
|
13
|
-
~~~fence
|
|
14
|
-
code
|
|
15
|
-
~~~
|
|
16
|
-
``` {MD031}
|
|
17
|
-
text
|
|
18
|
-
~~~fence {MD031}
|
|
19
|
-
```fence
|
|
20
|
-
code
|
|
21
|
-
```
|
|
22
|
-
~~~ {MD031}
|
|
23
|
-
text
|
|
24
|
-
```fence {MD031}
|
|
25
|
-
|
|
26
|
-
~~~fence
|
|
27
|
-
code
|
|
28
|
-
~~~
|
|
29
|
-
|
|
30
|
-
``` {MD031}
|
|
31
|
-
text
|
|
32
|
-
~~~fence {MD031}
|
|
33
|
-
|
|
34
|
-
```fence
|
|
35
|
-
code
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
~~~ {MD031}
|
|
39
|
-
text
|
|
40
|
-
```fence {MD031}
|
|
41
|
-
code
|
|
42
|
-
~~~
|
|
43
|
-
``` {MD031}
|
|
44
|
-
text
|
|
45
|
-
~~~fence {MD031}
|
|
46
|
-
code
|
|
47
|
-
```
|
|
48
|
-
~~~ {MD031}
|
|
49
|
-
text
|
|
50
|
-
````fence {MD031}
|
|
51
|
-
```fence
|
|
52
|
-
code
|
|
53
|
-
```
|
|
54
|
-
```` {MD031}
|
|
55
|
-
text
|
|
56
|
-
~~~~fence {MD031}
|
|
57
|
-
~~~fence
|
|
58
|
-
code
|
|
59
|
-
~~~
|
|
60
|
-
~~~~ {MD031}
|
|
61
|
-
text
|
|
62
|
-
````fence {MD031}
|
|
63
|
-
```fence
|
|
64
|
-
code
|
|
65
|
-
```
|
|
66
|
-
````` {MD031}
|
|
67
|
-
text
|
|
68
|
-
~~~~fence {MD031}
|
|
69
|
-
~~~fence
|
|
70
|
-
code
|
|
71
|
-
~~~
|
|
72
|
-
~~~~~ {MD031}
|
|
73
|
-
text
|