Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Show percentage for every language #325

Closed
Etile0 opened this issue Mar 17, 2022 · 4 comments
Closed

Feature request: Show percentage for every language #325

Etile0 opened this issue Mar 17, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@Etile0
Copy link

Etile0 commented Mar 17, 2022

I think it would be useful if scc has an option to show percentages for each language. Perhaps a new column or maybe even something like this:

------------------------------------------------------------------------------
 Language         Files     Blank          Comment           Code       Total 
------------------------------------------------------------------------------
 Lua                2    24193 (00%)    193544 (00%)    169351 (00%)   387088 
 Rust               4      110 (00%)        31 (00%)      1061 (00%)     1202 
 C                  4       75 (00%)       155 (00%)       470 (00%)      700 
 Markdown           2       40 (00%)         0 (00%)       273 (00%)      313 
 Bourne Shell       3       18 (00%)         7 (00%)        59 (00%)       84 
 YAML               1       13 (00%)        19 (00%)        57 (00%)       89 
 Ada                2       12 (00%)         9 (00%)        32 (00%)       53 
 Toml               1        4 (00%)         2 (00%)        17 (00%)       23 
 Gherkin            1        2 (00%)         2 (00%)         8 (00%)       12 
 OCaml              1        4 (00%)         6 (00%)         3 (00%)       13 
 Ruby               1        0 (00%)         2 (00%)         2 (00%)        4 
 Handlebars         1        0 (00%)         2 (00%)         2 (00%)        4 
------------------------------------------------------------------------------
 Total             23    24471 (00%)    193779 (00%)    171335 (00%)   389585 
------------------------------------------------------------------------------

(Taken from a similar issue for loc )

I would love this tool to have this feature because the only similar tool I found that can do this is enry but that's slow and unmaintained.

@boyter
Copy link
Owner

boyter commented Mar 18, 2022

Perhaps as another output type similar to JSON, CSV and such.... I don't think there is enough room currently since when you get into larger repositories its problematic...

@boyter boyter added the enhancement New feature or request label Mar 18, 2022
@Etile0
Copy link
Author

Etile0 commented Mar 18, 2022

Hmm... yeah... that quickly turns into a problem. Maybe make a column for the percentage of the lines of code? The other things aren't really that important.

But another output type works too

@boyter
Copy link
Owner

boyter commented May 9, 2024

Been playing around with this, and maybe something like this would work

$ go run . -i go,java -p
───────────────────────────────────────────────────────────────────────────────
Language                 Files     Lines   Blanks  Comments     Code Complexity
───────────────────────────────────────────────────────────────────────────────
Go                          30      9359     1460       456     7443       1517
                                   70.5%    64.7%     41.2%    75.1%      73.5%
Java                        24      3913      798       651     2464        547
                                   29.5%    35.3%     58.8%    24.9%      26.5%
───────────────────────────────────────────────────────────────────────────────
Total                       54     13272     2258      1107     9907       2064
───────────────────────────────────────────────────────────────────────────────

@boyter
Copy link
Owner

boyter commented May 10, 2024

Merged in. If you are around @Etile0 you can build from master to get this feature.

@boyter boyter closed this as completed May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants