Replies: 2 comments 10 replies
-
Hi 👋 ! If you're talking about the However it should be possible to fetch the first commit of each repositories through the GitHub API and get the diff stats. The revelant code is here: metrics/source/plugins/lines/index.mjs Lines 23 to 38 in 79b80b1 To add a new option, you just need to patch the revelant And then you can extract it through metrics/source/plugins/lines/index.mjs Line 10 in 79b80b1 If you're satisfied with the result and feel like it'd be a great addition, feel free to open a PR ! |
Beta Was this translation helpful? Give feedback.
-
@ctjlewis, out of curiousity, could you clarify why excluding initial commits would be a more accurate representation of actual lines written? I see you have "12.5m added, 4.34m removed" which is a mean feat, and needs some revising downwards to be believable unless you've been hammering out code constantly for 50 years, and somehow miraculously GitHub has it all with your authorship on it. I am also skeptical of my "860k added", but my "17.3k removed" is a bit more believable. It seems the plugin is iterating over the users repositories - so I wonder if that is including forks as well - i.e. is the same/similar commit in a fork and the upstream being counted, which would be a quick way of inflating the numbers, but only by double, which probably isnt enough to explain your "12.5m added". It would be nice to see the lines plugin have a table/chart mode, so we can see which repos are at the top - they are likely where we will find the inflation occurring, and maybe this could then be remedied by using adding skip parameters. Could it be that your numbers include a lot of generated JS derived (multiple times for different JS flavours) from the TS which you authored? And/Or is this forks of another project which you've radically revised as your first commit in a repo which stretches back before you? It looks like |
Beta Was this translation helpful? Give feedback.
-
Hey Simon, hope work on this tool has been going well.
I’ve been looking at my SLOC count and was wondering what it would be if initial commits were exempted, since that’s a more accurate representation of actual lines written.
Can you point me to the relevant part of the codebase where I might maybe add this flag, if I wanted to PR (and would you entertain a merge)?
Beta Was this translation helpful? Give feedback.
All reactions