Fix: Weigh programming language tallies by file size (bytes) instead … Fixes #3868#4733
Fix: Weigh programming language tallies by file size (bytes) instead … Fixes #3868#4733RajX-dev wants to merge 3 commits intoaboutcode-org:developfrom
Conversation
…of file count Previously, language summaries were calculated based on the number of files, causing languages with many small files (e.g., C header files) to incorrectly appear as the primary language over languages with fewer but larger files (e.g., C++ source). This change uses file size (bytes) as the weight for the tally, ensuring the primary language reflects the code mass rather than file count. Fallback to count=1 if size is 0. Signed-off-by: Raj Shekhar <sraj4090ti@gmail.com>
66ef6c9 to
da2166b
Compare
Signed-off-by: Raj Shekhar <sraj4090ti@gmail.com>
ac76353 to
c1866c4
Compare
Signed-off-by: Raj Shekhar <sraj4090ti@gmail.com>
c1866c4 to
a941f39
Compare
|
Ready for review! @DennisClark @AyanSinhaMahapatra All checks are passing. 🟢 I have finalized the changes and verified the build. Here is a summary of the fixes included in this PR: 1-Feature Implementation: Switched programming language tallies to use byte counts instead of file counts (Fixes #3868). |
Fixed an issue where programming languages were tallied by file count instead of file size. This caused projects with many small files (like C headers) to be misidentified as C instead of C++. Changed logic to sum file sizes (bytes) for the tally.