hhatto / gocloc

A little fast cloc(Count Lines Of Code)
MIT License
803 stars 81 forks source link

Show totals for each language #27

Open acsbendi opened 5 years ago

acsbendi commented 5 years ago

Currently, the totals are only displayed for each line type. It would be useful to see it for each language as well.

For example, this:

Language                     files          blank        comment       code
-------------------------------------------------------------------------------
Go                            16             306          238           1607
XML                           7               0            0            209
HCL                           5               19           0            134
Bourne Shell                  1               6            21            1
JSON                          2               0            15            0
Markdown                      1              16            38            0 
YAML                          2              10           352            0 
-------------------------------------------------------------------------------
TOTAL                         34            357           664           1951
-------------------------------------------------------------------------------

would become this:

Language                     files          blank        comment       code        TOTAL
-------------------------------------------------------------------------------------------
Go                            16             306          238           1607       2167
XML                           7               0            0            209        216
HCL                           5               19           0            134        158
Bourne Shell                  1               6            21            1         29
JSON                          2               0            15            0         17
Markdown                      1              16            38            0         55
YAML                          2              10           352            0         364
-------------------------------------------------------------------------------------------
TOTAL                         34            357           664           1951      3006
-------------------------------------------------------------------------------------------