facebook / flow

Adds static typing to JavaScript to improve developer productivity and code quality.
https://flow.org/
MIT License
22.08k stars 1.86k forks source link

Total coverage #2127

Open agentcooper opened 8 years ago

agentcooper commented 8 years ago

I built a simple tool to print coverage for all Flow-typed files matched by a glob — https://github.com/agentcooper/flow-stats. I plan to add more stats, like how many files contain @flow directive.

Here is an example output:

$ flow-stats --glob 'src/components/**.js'
Matching src/components/**.js, found 44 file(s):

97.83 src/components/List.js
96.89 src/components/EditableTitle.js
86.77 src/components/Color.js
75.65 src/components/Popup.js
50.22 src/components/Selection.js

Are you interested in adding support for this to flow coverage or as a separate command? I am interested in helping with this.

avikchaudhuri commented 8 years ago

Sounds like a cool idea, I wouldn't mind having this part of the flow coverage command. Please send a PR. (And sorry for the late reply.)

sibelius commented 6 years ago

check this package https://github.com/rpl/flow-coverage-report