mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-31 11:52:10 +00:00
Fix language stat calculation (#11692)
* Fix language stat calculation * Group languages and ignore 0 size files * remove unneeded code
This commit is contained in:
parent
ea4c139cd2
commit
9d652002c6
3 changed files with 29 additions and 41 deletions
|
@ -39,7 +39,5 @@ func TestRepoStatsIndex(t *testing.T) {
|
|||
assert.Equal(t, "65f1bf27bc3bf70f64657658635e66094edbcb4d", status.CommitSha)
|
||||
langs, err := repo.GetTopLanguageStats(5)
|
||||
assert.NoError(t, err)
|
||||
assert.Len(t, langs, 1)
|
||||
assert.Equal(t, "other", langs[0].Language)
|
||||
assert.Equal(t, float32(100), langs[0].Percentage)
|
||||
assert.Empty(t, langs)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue