You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -111,7 +111,7 @@ test('linting of incorrect Markdown file fails and prints issues', async t => {
111
111
t.fail();
112
112
}catch(error){
113
113
t.is(error.stdout,'');
114
-
constexpected=['incorrect.md:1 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## header 2"]','incorrect.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## header 2"]','incorrect.md:2 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "# header"]'].join('\n');
114
+
constexpected=['incorrect.md:1 error MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## header 2"]','incorrect.md:1 warning MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## header 2"]','incorrect.md:2 error MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "# header"]'].join('\n');
115
115
t.is(error.stderr,expected);
116
116
t.is(error.exitCode,1);
117
117
}
@@ -337,7 +337,9 @@ test('linting results are sorted by file/line/names/description', async t => {
constexpected=['incorrect.md:1 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## header 2"]','incorrect.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## header 2"]','incorrect.md:2 MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "# header"]','incorrect.md:5:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]','incorrect.md:11:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]','incorrect.md:17:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]','incorrect.md:23:1 MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]'].join('\n');
340
+
constexpected=['incorrect.md:1 error MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: "## header 2"]','incorrect.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## header 2"]','incorrect.md:2 error MD022/blanks-around-headings Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: "# header"]','incorrect.md:5:1 error MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]','incorrect.md:11:1 error MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]','incorrect.md:17:1 error MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]','incorrect.md:23:1 error MD014/commands-show-output Dollar signs used before commands without showing output [Context: "$ code"]'].join(
341
+
'\n'
342
+
);
341
343
t.is(error.stdout,'');
342
344
t.is(error.stderr,expected);
343
345
t.is(error.exitCode,1);
@@ -527,7 +529,7 @@ function getCwdConfigFileTest(extension) {
527
529
});
528
530
t.fail();
529
531
}catch(error){
530
-
constexpected=["heading-dollar.md:1:10 MD026/no-trailing-punctuation Trailing punctuation in heading [Punctuation: '$']"].join('\n');
532
+
constexpected=["heading-dollar.md:1:10 error MD026/no-trailing-punctuation Trailing punctuation in heading [Punctuation: '$']"].join('\n');
531
533
t.is(error.stdout,'');
532
534
t.is(error.stderr,expected);
533
535
t.is(error.exitCode,1);
@@ -601,7 +603,7 @@ test('Custom rule from single file loaded', async t => {
constexpected=['stdin:1 test-rule-1 Test rule broken','stdin:1 test-rule-2 Test rule 2 broken','stdin:1 test-rule-3 Test rule 3 broken','stdin:1 test-rule-4 Test rule 4 broken'].join('\n');
632
+
constexpected=['stdin:1 error test-rule-1 Test rule broken','stdin:1 error test-rule-2 Test rule 2 broken','stdin:1 error test-rule-3 Test rule 3 broken','stdin:1 error test-rule-4 Test rule 4 broken'].join('\n');
631
633
t.is(error.stdout,'');
632
634
t.is(error.stderr,expected);
633
635
t.is(error.exitCode,1);
@@ -640,7 +642,7 @@ test('Custom rules from glob loaded', async t => {
constexpected=['stdin:1 test-rule-1 Test rule broken','stdin:1 test-rule-2 Test rule 2 broken','stdin:1 test-rule-3 Test rule 3 broken','stdin:1 test-rule-4 Test rule 4 broken'].join('\n');
645
+
constexpected=['stdin:1 error test-rule-1 Test rule broken','stdin:1 error test-rule-2 Test rule 2 broken','stdin:1 error test-rule-3 Test rule 3 broken','stdin:1 error test-rule-4 Test rule 4 broken'].join('\n');
644
646
t.is(error.stdout,'');
645
647
t.is(error.stderr,expected);
646
648
t.is(error.exitCode,1);
@@ -653,7 +655,7 @@ test('Custom rule from node_modules package loaded', async t => {
constexpected=['stdin:1 markdownlint-cli-local-test-rule Test rule package broken','stdin:1 markdownlint-cli-local-test-rule-other Test rule package other broken'].join('\n');
714
+
constexpected=['stdin:1 error markdownlint-cli-local-test-rule Test rule package broken','stdin:1 error markdownlint-cli-local-test-rule-other Test rule package other broken'].join('\n');
713
715
t.is(error.stdout,'');
714
716
t.is(error.stderr,expected);
715
717
t.is(error.exitCode,1);
@@ -736,7 +738,7 @@ test('fixing errors in a file yields fewer errors', async t => {
constexpected=[fixFileA+':1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## header 2"]'].join('\n');
741
+
constexpected=[fixFileA+':1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## header 2"]'].join('\n');
740
742
t.is(error.stdout,'');
741
743
t.is(error.stderr,expected);
742
744
t.is(error.exitCode,1);
@@ -783,7 +785,7 @@ test('.markdownlintignore is applied correctly', async t => {
783
785
});
784
786
t.fail();
785
787
}catch(error){
786
-
constexpected=['incorrect.md:1:8 MD047/single-trailing-newline Files should end with a single newline character','subdir/incorrect.markdown:1:8 MD047/single-trailing-newline Files should end with a single newline character'].join('\n');
788
+
constexpected=['incorrect.md:1:8 error MD047/single-trailing-newline Files should end with a single newline character','subdir/incorrect.markdown:1:8 error MD047/single-trailing-newline Files should end with a single newline character'].join('\n');
787
789
t.is(error.stdout,'');
788
790
t.is(error.stderr.replaceAll('\\','/'),expected);
789
791
t.is(error.exitCode,1);
@@ -797,7 +799,7 @@ test('.markdownlintignore works with semi-absolute paths', async t => {
797
799
});
798
800
t.fail();
799
801
}catch(error){
800
-
constexpected=['./incorrect.md:1:8 MD047/single-trailing-newline Files should end with a single newline character'].join('\n');
802
+
constexpected=['./incorrect.md:1:8 error MD047/single-trailing-newline Files should end with a single newline character'].join('\n');
801
803
t.is(error.stdout,'');
802
804
t.is(error.stderr,expected);
803
805
t.is(error.exitCode,1);
@@ -811,7 +813,7 @@ test('--ignore-path works with .markdownlintignore', async t => {
811
813
});
812
814
t.fail();
813
815
}catch(error){
814
-
constexpected=['incorrect.md:1:8 MD047/single-trailing-newline Files should end with a single newline character','subdir/incorrect.markdown:1:8 MD047/single-trailing-newline Files should end with a single newline character'].join('\n');
816
+
constexpected=['incorrect.md:1:8 error MD047/single-trailing-newline Files should end with a single newline character','subdir/incorrect.markdown:1:8 error MD047/single-trailing-newline Files should end with a single newline character'].join('\n');
815
817
t.is(error.stdout,'');
816
818
t.is(error.stderr.replaceAll('\\','/'),expected);
817
819
t.is(error.exitCode,1);
@@ -825,7 +827,7 @@ test('--ignore-path works with .ignorefile', async t => {
825
827
});
826
828
t.fail();
827
829
}catch(error){
828
-
constexpected=['incorrect.markdown:1:8 MD047/single-trailing-newline Files should end with a single newline character'].join('\n');
830
+
constexpected=['incorrect.markdown:1:8 error MD047/single-trailing-newline Files should end with a single newline character'].join('\n');
829
831
t.is(error.stdout,'');
830
832
t.is(error.stderr,expected);
831
833
t.is(error.exitCode,1);
@@ -893,7 +895,7 @@ test('--enable flag', async t => {
893
895
t.fail();
894
896
}catch(error){
895
897
t.is(error.stdout,'');
896
-
t.is(error.stderr,'incorrect.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## header 2"]');
898
+
t.is(error.stderr,'incorrect.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## header 2"]');
897
899
t.is(error.exitCode,1);
898
900
}
899
901
});
@@ -904,7 +906,7 @@ test('--enable flag does not modify already enabled rules', async t => {
@@ -915,7 +917,7 @@ test('--enable flag accepts rule alias', async t => {
915
917
t.fail();
916
918
}catch(error){
917
919
t.is(error.stdout,'');
918
-
t.is(error.stderr,'incorrect.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## header 2"]');
920
+
t.is(error.stderr,'incorrect.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## header 2"]');
919
921
t.is(error.exitCode,1);
920
922
}
921
923
});
@@ -932,7 +934,7 @@ test('--disable flag', async t => {
932
934
t.fail();
933
935
}catch(error){
934
936
t.is(error.stdout,'');
935
-
t.is(error.stderr,'incorrect.md:1 MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## header 2"]');
937
+
t.is(error.stderr,'incorrect.md:1 error MD041/first-line-heading/first-line-h1 First line in a file should be a top-level heading [Context: "## header 2"]');
0 commit comments