Innaccuracies with language plugins stats
See original GitHub issueWhile investigating on #513 I noticed some flaws in the languages plugin.
It is actually not very well defined whether it should count your effective language stats (meaning stats from the current state of each repo) or cumulative language stats (meaning stats should include previous state of each repo, including code that has been refactored, moved or deleted).
Currently, the languages indepth analyzers is doing the following:
- Clone locally repository
- Call linguist on it
git log --patch
on each user commit to find which lines were added by user and update bytes count using detected language by linguist- Remove locally cloned repository
For now, it leans more toward cumulative stats rather effective stats.
Since tracking deleted files is currently impossible because they don’t exist when linguist analyze the repository (so detected language for a deleted file is always null
), deleted/moved files are never taken into account so some lines are actually lost
Also renamed file may be counted multiple times, need to check whether an option exists to detect them (maybe --follow
?)
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Superseded by #857
Ok so I removed “indepth” and it seems better representative of the repositories.
I think that’s linked to what you describe in this issue, as it shows only current state. And I think it reads the last commit of each file (or something like that) so only few lines are registered (and not the whole file). A typo fix would then count as 1 line for a whole file.