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 formatting for all metrics in typo report #750

Closed zurk closed 5 years ago

zurk commented 5 years ago

I run a report and get such metrics:

|                    metric |      value |
|--------------------------:|-----------:|
|       detection_precision |   0.699    |
|          detection_recall |   0.498    |
|   detection_true_positive | 370        |
|  detection_false_positive | 159        |
| detection_false_negatives | 373        |
|              fix_accuracy |   0.914    |
|         top3_fix_accuracy |   1        |
|                   support |   2.65e+03 |
|               review_time |  10.1      |

I do not like 2.65e+03 so I should regenerate it with this changes. Also I include zip function to jinja2 template loading because it is not the first time we need this function.

Also I fix detection_true_positive metric calculation. It should not depend whether fix was correct or not.