markdownlint-cli
markdownlint-cli copied to clipboard
Add --statistics --count?
The Python linting tool Flake8 has useful options: --statistics and --count.
Basic use
$ flake8 .
./interactive_console.py:5:1: E402 module level import not at top of file
<snip>
./pytumblr/helpers.py:31:1: E302 expected 2 blank lines, found 1
With --statistics
$ flake8 . --statistics
./interactive_console.py:5:1: E402 module level import not at top of file
<snip>
./pytumblr/helpers.py:31:1: E302 expected 2 blank lines, found 1
1 E201 whitespace after '{'
1 E222 multiple spaces after operator
3 E265 block comment should start with '# '
2 E302 expected 2 blank lines, found 1
1 E305 expected 2 blank lines after class or function definition, found 1
18 E402 module level import not at top of file
90 E501 line too long (92 > 79 characters)
1 W293 blank line contains whitespace
With --count
$ flake8 . --count
./interactive_console.py:5:1: E402 module level import not at top of file
<snip>
./pytumblr/helpers.py:31:1: E302 expected 2 blank lines, found 1
117
With both
$ flake8 . --count --statistics
./interactive_console.py:5:1: E402 module level import not at top of file
<snip>
./pytumblr/helpers.py:31:1: E302 expected 2 blank lines, found 1
1 E201 whitespace after '{'
1 E222 multiple spaces after operator
3 E265 block comment should start with '# '
2 E302 expected 2 blank lines, found 1
1 E305 expected 2 blank lines after class or function definition, found 1
18 E402 module level import not at top of file
90 E501 line too long (92 > 79 characters)
1 W293 blank line contains whitespace
117
Any chance to include something like that here?
Thanks!
“statistics” seems more useful to me than “count“, but both should be doable here as a post-processing step on the results from linting.
Thanks! I'm applying markdownlint to a project, and there's over 600 errors...
Summarising the results helps decide which group to tackle next.
(Yes, --statistics is more useful than --count, although it's still useful to get the total sometimes.)
Any chance to see that enhancement in future versions?
Just FYI, I have added something like this to markdownlint-cli2: https://www.npmjs.com/package/markdownlint-cli2-formatter-summarize