wakatime-cli icon indicating copy to clipboard operation
wakatime-cli copied to clipboard

Feature Request - Track Lines of Code

Open WesDowney opened this issue 4 years ago • 5 comments

It would be cool if Wakatime was also able to track lines of code added and deleted.

WesDowney avatar Jun 11 '20 21:06 WesDowney

We track the total number of lines in the currently focused file, so we could extrapolate the number of lines added/deleted. However, I think using Git for this info works better.

alanhamlett avatar Aug 16 '23 20:08 alanhamlett

We explored this in #946 and found counting the number of additions/deletions as integers at a given point in time (when sending heartbeats) could be displayed as a line area chart green/red lines. Like the Code Frequency chart: Screenshot_2023-10-24-19-30-28-72_40deb401b9ffe8e1df2f1cc5ba480b12

Would having this data from WakaTime provide any benefit over how it's already provided by GitHub?

alanhamlett avatar Oct 24 '23 17:10 alanhamlett

Related discussion from GitHub asking for product feedback on their Code Frequency graph:

https://github.com/orgs/community/discussions/39757

alanhamlett avatar Oct 24 '23 18:10 alanhamlett

This is an interesting feature. Any progress on this?

TENX-S avatar Jan 24 '24 08:01 TENX-S

We should have the editor plugins keep counters of added and deleted lines as two separate integers, sending along with other heartbeat params to wakatime-cli like --line-additions 2 --line-deletions 3. After sending the counts, the editor plugins should reset the two counts to zero.

alanhamlett avatar Jan 24 '24 17:01 alanhamlett