Skip to content

Comments

Add --no-hborder#476

Merged
boyter merged 2 commits intoboyter:masterfrom
arp242:hborder
Jun 10, 2024
Merged

Add --no-hborder#476
boyter merged 2 commits intoboyter:masterfrom
arp242:hborder

Conversation

@arp242
Copy link
Contributor

@arp242 arp242 commented Jun 7, 2024

This removes the horizontal border lines, making for more compact output.

For example:

% scc --min-gen --no-complexity --no-cocomo --no-size
───────────────────────────────────────────────────────────────────────────────
Language                     Files       Lines     Blanks    Comments      Code
───────────────────────────────────────────────────────────────────────────────
Go                              10        1374        114         199      1061
License                          1          20          4           0        16
Markdown                         1          94         23           0        71
YAML                             1           1          0           0         1
───────────────────────────────────────────────────────────────────────────────
Total                           13        1489        141         199      1149
───────────────────────────────────────────────────────────────────────────────

% scc --min-gen --no-complexity --no-cocomo --no-size --no-hborder
Language                     Files       Lines     Blanks    Comments      Code
Go                              10        1374        114         199      1061
License                          1          20          4           0        16
Markdown                         1          94         23           0        71
YAML                             1           1          0           0         1
Total                           13        1489        141         199      1149

Removing those four lines makes a relatively large difference.

I named it "hborder" so that it won't be problematic with any potential future vertical borders. Maybe at some point an option for something like this will be added:

Language │ Files │  Lines │ Blanks │ Comments  │ Code
─────────┼───────┼────────┼────────┼───────────┼─────
Go       │    10 │   1374 │    114 │      199  │ 1061
License  │     1 │     20 │      4 │        0  │   16
Markdown │     1 │     94 │     23 │        0  │   71
YAML     │     1 │      1 │      0 │        0  │    1
─────────┼───────┼────────┼────────┼───────────┼─────
Total    │    13 │   1489 │    141 │      199  │ 1149

Or something along those lines.

arp242 added 2 commits June 8, 2024 00:11
This removes the horizontal border lines, making for more compact
output.

For example:

	% scc --min-gen --no-complexity --no-cocomo --no-size
	───────────────────────────────────────────────────────────────────────────────
	Language                     Files       Lines     Blanks    Comments      Code
	───────────────────────────────────────────────────────────────────────────────
	Go                              10        1374        114         199      1061
	License                          1          20          4           0        16
	Markdown                         1          94         23           0        71
	YAML                             1           1          0           0         1
	───────────────────────────────────────────────────────────────────────────────
	Total                           13        1489        141         199      1149
	───────────────────────────────────────────────────────────────────────────────

	% scc --min-gen --no-complexity --no-cocomo --no-size --no-hborder
	Language                     Files       Lines     Blanks    Comments      Code
	Go                              10        1374        114         199      1061
	License                          1          20          4           0        16
	Markdown                         1          94         23           0        71
	YAML                             1           1          0           0         1
	Total                           13        1489        141         199      1149

Removing those four lines makes a relatively large difference.

I named it "hborder" so that it won't be problematic with any potential
future vertical borders. Maybe at some point an option for something
like this will be added:

	Language │ Files │  Lines │ Blanks │ Comments  │ Code
	─────────┼───────┼────────┼────────┼───────────┼─────
	Go       │    10 │   1374 │    114 │      199  │ 1061
	License  │     1 │     20 │      4 │        0  │   16
	Markdown │     1 │     94 │     23 │        0  │   71
	YAML     │     1 │      1 │      0 │        0  │    1
	─────────┼───────┼────────┼────────┼───────────┼─────
	Total    │    13 │   1489 │    141 │      199  │ 1149

Or something along those lines.
@arp242
Copy link
Contributor Author

arp242 commented Jun 7, 2024

This also has a second somewhat related commit: it would always print an empty line at the end:

% scc
[..]
───────────────────────────────────────────────────────────────────────────────
Processed 40917 bytes, 0.041 megabytes (SI)
───────────────────────────────────────────────────────────────────────────────

%

I don't know if that's intentional? Seemed rather unexpected to me.

@boyter boyter merged commit b630cad into boyter:master Jun 10, 2024
@boyter
Copy link
Owner

boyter commented Jun 10, 2024

I like this. Merged.

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.

2 participants