Skip to content

Conversation

@gitsomebit
Copy link

@gitsomebit gitsomebit commented Jul 25, 2025

closes #27

This pr does the following:

  • adds a total column at the end of the table for md and default output.
  • simplify code for printing seperator lines
  • fix spacing of files column

I tested on the gocloc repo with the following results:

default

Screenshot 2025-07-25 160912 Screenshot 2025-07-25 160953

markdown

Screenshot 2025-07-25 161105 Screenshot 2025-07-25 161044

Additional comments:

  • adding the total column made me realize that gocloc does not count all lines, with the total value being 1 less than the length of files. I am not sure if this is intended, so I wanted to mention it
  • xml and json was not implemented, but wanted to get this out as a progressive enhancement
  • when using gocloc on the gocloc repo I realized that for some reason gocloc by default excludes some folders. this seems to be the case for the .github folder as seen in the following output:
Screenshot 2025-07-25 162549 Screenshot 2025-07-25 162537

@gitsomebit
Copy link
Author

@hhatto is something blocking this? would like to have this merged before opening another pr

@gitsomebit
Copy link
Author

I would like to open a PR for custom OutputSeparators, but it would require this PR to be merged first

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show totals for each language

1 participant