src-d / style-analyzer

Lookout Style Analyzer: fixing code formatting and typos during code reviews
GNU Affero General Public License v3.0
32 stars 21 forks source link

Add tests and proper report generation #734

Closed zurk closed 5 years ago

zurk commented 5 years ago

For now, report will look like:

# Report for the commits with typo dataset

## Metrics

|                    metric | value    |
|--------------------------:|:---------|
|       detection_precision | 0.000    |
|          detection_recall | 0.000    |
|   detection_true_positive | 0.000    |
|  detection_false_positive | 584.000  |
| detection_false_negatives | 6.000    |
|              fix_accuracy | 0.000    |
|         top3_fix_accuracy | 0.000    |
|                   support | 4262.000 |
|               review_time | 44.465   |

## Versions

* Style-analyzer package version is local
* Commit is f73814c7c183b9ecd711ebf4bd36da0fff8b0a55 (dirty)

I think it is a necessary minimum and we can improve it later as we wish

All changes not related to tests is about constructing this report + CLI. The rest is tests.

zurk commented 5 years ago

@vmarkovtsev tests are passed 🎉