From ea7adf9d8cc2bc81a5b4ab7e95cd260bccaa9a18 Mon Sep 17 00:00:00 2001 From: Daniel Mundra Date: Tue, 19 Mar 2024 15:37:04 -0700 Subject: [PATCH 1/2] Dropped the extra space for remark lint message format --- fmts/markdown.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fmts/markdown.go b/fmts/markdown.go index e157c96..f59cbd3 100644 --- a/fmts/markdown.go +++ b/fmts/markdown.go @@ -7,8 +7,8 @@ func init() { Name: "remark-lint", Errorformat: []string{ `%-P%f`, - `%#%l:%c %# %trror %m`, - `%#%l:%c %# %tarning %m`, + `%#%l:%c %# %trror %m`, + `%#%l:%c %# %tarning %m`, `%-Q`, `%-G%.%#`, }, From 449bddc0404bd6ceafe11cc85c1f975e0f9a75b2 Mon Sep 17 00:00:00 2001 From: Daniel Mundra Date: Tue, 19 Mar 2024 15:45:34 -0700 Subject: [PATCH 2/2] Updated remark-lint test data. --- fmts/testdata/remark-lint.in | 96 ++++++++++++++++++------------------ fmts/testdata/remark-lint.ok | 96 ++++++++++++++++++------------------ 2 files changed, 96 insertions(+), 96 deletions(-) diff --git a/fmts/testdata/remark-lint.in b/fmts/testdata/remark-lint.in index cfabd32..61b3ac6 100644 --- a/fmts/testdata/remark-lint.in +++ b/fmts/testdata/remark-lint.in @@ -1,55 +1,55 @@ resources/markdown/README.md - 25:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 26:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 27:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 29:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 30:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 31:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 33:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 34:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 35:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 39:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 40:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 41:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 42:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 43:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 44:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 45:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 25:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 26:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 27:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 29:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 30:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 31:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 33:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 34:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 35:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 39:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 40:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 41:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 42:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 43:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 44:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 45:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint resources/markdown/subfolder/subFile.md - 25:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 26:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 27:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 29:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 30:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 31:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 33:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 34:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 35:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 39:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 40:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 41:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 42:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 43:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 44:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 45:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 25:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 26:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 27:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 29:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 30:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 31:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 33:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 34:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 35:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 39:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 40:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 41:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 42:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 43:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 44:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 45:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint resources/markdown/subfolder/subSubFolder/subSubFile.md - 25:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 26:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 27:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 29:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 30:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 31:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 33:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 34:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 35:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint - 39:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 40:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 41:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 42:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 43:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 44:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint - 45:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 25:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 26:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 27:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 29:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 30:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 31:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 33:3 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 34:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 35:5 warning Incorrect list-item indent: add 2 spaces list-item-indent remark-lint + 39:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 40:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 41:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 42:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 43:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 44:7 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint + 45:4 warning Incorrect list-item indent: add 1 space list-item-indent remark-lint ⚠ 48 warnings diff --git a/fmts/testdata/remark-lint.ok b/fmts/testdata/remark-lint.ok index b15e85c..7e997f2 100644 --- a/fmts/testdata/remark-lint.ok +++ b/fmts/testdata/remark-lint.ok @@ -1,48 +1,48 @@ -resources/markdown/README.md|25 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/README.md|26 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/README.md|27 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/README.md|29 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/README.md|30 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/README.md|31 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/README.md|33 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/README.md|34 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/README.md|35 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/README.md|39 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/README.md|40 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/README.md|41 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/README.md|42 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/README.md|43 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/README.md|44 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/README.md|45 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|25 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|26 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|27 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|29 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|30 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|31 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|33 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|34 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|35 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|39 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|40 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|41 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|42 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|43 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|44 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/subfolder/subFile.md|45 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|25 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|26 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|27 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|29 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|30 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|31 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|33 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|34 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|35 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|39 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|40 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|41 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|42 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|43 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|44 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint -resources/markdown/subfolder/subSubFolder/subSubFile.md|45 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/README.md|25 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/README.md|26 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/README.md|27 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/README.md|29 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/README.md|30 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/README.md|31 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/README.md|33 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/README.md|34 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/README.md|35 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/README.md|39 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/README.md|40 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/README.md|41 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/README.md|42 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/README.md|43 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/README.md|44 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/README.md|45 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|25 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|26 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|27 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|29 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|30 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|31 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|33 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|34 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|35 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|39 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|40 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|41 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|42 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|43 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|44 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/subfolder/subFile.md|45 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|25 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|26 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|27 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|29 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|30 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|31 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|33 col 3 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|34 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|35 col 5 warning| Incorrect list-item indent: add 2 spaces list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|39 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|40 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|41 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|42 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|43 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|44 col 7 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint +resources/markdown/subfolder/subSubFolder/subSubFile.md|45 col 4 warning| Incorrect list-item indent: add 1 space list-item-indent remark-lint