gecko-dev/python/mozlint
Andrew Halberstadt 2f6a0dfa63 Bug 1434974 - [mozlint] Create a SummaryFormatter to help triage paths, r=jmaher
This formatter is useful for triaging paths when enabling new linters or
expanding existing ones. It works well with the -n/--no-filter option.

For example, if I wanted to look for candidates of new directories to enable
the codespell linter on, I could run:

./mach lint -l codespell -nf summary

This will print something like:
accessible: 429
dom: 142
layout: 15
testing: 53
etc..

If desired, you can also specify a depth by setting MOZLINT_SUMMARY_DEPTH. A
depth of 2 means results will be aggregated further down, e.g:

accesible/build: 129
accesible/ipc: 300
dom/indexedDB: 100
dom/workers: 42
etc..

The depth is always relative to the common path prefix of all results, so
running:

./mach lint -l codespell -nf python/mozbuild

Would expand all the directories under python/mozbuild (not topsrdir).

MozReview-Commit-ID: OiihLTpULA

--HG--
extra : rebase_source : eaaabc1d5cdc8e3942808d01b24e22081fea752e
2018-01-29 16:37:21 -05:00
..
mozlint Bug 1434974 - [mozlint] Create a SummaryFormatter to help triage paths, r=jmaher 2018-01-29 16:37:21 -05:00
test Bug 1434974 - [mozlint] Create a SummaryFormatter to help triage paths, r=jmaher 2018-01-29 16:37:21 -05:00
setup.py Bug 1397423 - Enable py2 linter on python/mozlint. r=ahal 2017-09-06 22:52:46 -04:00