Ability to summarize rule data
See original GitHub issueIt would be useful to have a --summary
flag or similar that can output a summary of which rules have failures and a count of how many exist in the files that were linted.
For example:
yarn ember-template-lint . --summary
> no-action - 34 errors
> no-implicit-this - 69 errors
> no-curly-component-invocation - 125 errors
This would be useful to help teams know how widespread a particular problem is, so they can make reasonable estimates for planning work to address linting failures.
This feature can work in tandem with the --include-todo
flag to include TODOs in the summary, perhaps like so:
yarn ember-template-lint . --summary --include-todo
> no-action - 54 errors (20 todo)
> no-implicit-this - 70 errors (1 todo)
> no-curly-component-invocation - 125 errors (0 todo)
It could also output a range of due dates for each rule, based on the individual TODOs:
yarn ember-template-lint . --summary --include-todo
> no-action - 54 errors (20 todo - Due in 20-34 days)
> no-implicit-this - 70 errors (1 todo - Due in 15 days)
> no-curly-component-invocation - 125 errors (0 todo)
It may also be useful to have a way to output this summary only for TODOs, but I think the above suggestion that displays how many of the errors came from TODOs might solve that nicely without needing another command specific to TODOs. However, I could see there being additional TODO-related enhancements like sorting the summary by due date to help prioritize TODOs that will become errors soon.
If I were to simplify it, I’d say we need a formatter that clearly displays the following information, grouped by rule:
# of Errors
# of Warnings
# of TODOs
Due Date Range for the TODOs in that group
The exact text format is less important to me as long as we’re able to cover those pieces of data.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:15 (15 by maintainers)
Top GitHub Comments
Right now using the external formatter, but that’s presumably because I need to update
ember-template-lint
(currently on 3.5.x and getting an “invalid time value” error).Assuming upgrading fixes my issues then nothing technically is preventing me from using the external formatter, but the performance issue is disappointing and even though this is a good enough workaround for me there’s still the discoverability issue.
Again, I’m happy to help here if the timeline issue is bandwidth.
I updated the proposed “spec” above to include displaying a range of due dates for TODOs for each rule.