Skip to content

Commit 86b7343

Browse files
refactor: simplify total lines output by removing 'Other' count
The 'Other' lines calculation and display was removed from the total lines statistics output since it's redundant (can be derived from total - code - comments). The output string format in total_lines.cpp was simplified accordingly.
1 parent f842c67 commit 86b7343

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

modules/total_lines.cpp

+2-3
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ void LineCounterModule::print_stats() const { // Print line cou
1414
size_t other = total - total_count.code - total_count.comments; // Calculate other lines
1515

1616
// create string with results for "Total Lines" section
17-
std::string total_result_str = std::format("{} (Total) = {} (Code) + {} (Comm.) + {} (Other)\n",
17+
std::string total_result_str = std::format("{} (Total) = {} (Code) + {} (Comm.)\n",
1818
OutputFormatter::format_large_number(total),
1919
OutputFormatter::format_large_number(total_count.code),
20-
OutputFormatter::format_large_number(total_count.comments),
21-
OutputFormatter::format_large_number(other));
20+
OutputFormatter::format_large_number(total_count.comments));
2221

2322
std::cout << "⚑ Total Lines" << std::endl;
2423
std::cout << "╰─ " << total_result_str << std::endl;

0 commit comments

Comments
 (0)