wakatime / wakatime-cli

Command line interface used by all WakaTime text editor plugins
https://wakatime.com/plugins
BSD 3-Clause "New" or "Revised" License
274 stars 41 forks source link

Feature Request - Track Lines of Code #609

Open WesDowney opened 4 years ago

WesDowney commented 4 years ago

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

alanhamlett commented 1 year ago

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 commented 10 months ago

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 commented 10 months ago

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

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

TENX-S commented 7 months ago

This is an interesting feature. Any progress on this?

alanhamlett commented 7 months ago

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.