SublimeLinter / SublimeLinter-flow

SublimeLinter plugin for JavaScript static type checking, using flow.
MIT License
116 stars 24 forks source link

Coverage #49

Closed davidaurelio closed 7 years ago

davidaurelio commented 7 years ago

Add support for flow coverage.

If a user enables coverage explicitly in the linter settings or inline, source code not covered by flow will be highlighted as a warning.

Since flow implements type checks and coverage in different commands, the linter is invoked twice. Flow runs as a daemon/server, i.e. it only adds negligible overhead.

Check and coverage results are combined into a single JSON string within the run method, and parsed as JSON array in find_errors.

davidaurelio commented 7 years ago

This is on top of #48 and therefore contains all of its commits, too. Sorry for the confusion. This should look cleaner after #48 got merged.

davidaurelio commented 7 years ago

Here’s a video of the feature in action:

flow coverage in SublimeLinter-flow

ckaznocha commented 7 years ago

Thanks @davidaurelio!

nit: do you mind making sure flak8 passes?

davidaurelio commented 7 years ago

Updated

ckaznocha commented 7 years ago

Closes #46