activity-heatmap READMEThis extension allows you to visualize the areas of your code that are most often changed. The closer the color is to red, the more changes there were. To use once installed, open the command palette, and enter Hotspot and overall file temperature reportIn-file overlay(don't worry. it can be hidden with the The process can take a while, so be patient. The more files it has to iterate through, the longer it will take, so use the settings to be sure you're only looking at the files you care about. This extension uses the following
If you want to add any extra args onto the end of that command, you can use the For example, if you set
and it would only match commits that have messages that have lines starting with
When calculating individual file temperatures overall, those arguments will also be used, and it will look something like this:
It's the same thing as the individual line command except that it's applying to the whole file. The reason this is calculated as well as the individual line temps, is because a single file could have hundreds of changes inside it, while each line inside it only has a few. If a single file is the source for most changes, even if no line in particular has had many changes, that's still a red flag. How the matches are countedWhether it's looking at an individual line, or the file as a whole, the default command arguments used (i.e.
Note: for
Calculating line temp by number of text matches (rather than the number of matching commits)Instead of relying on the number of commit messages that come up for a given line (given how the extension is configured) to determine how "hot" each line is, you may instead want to base it on the number of times a pattern is matched in the git log for each line. This can be useful if you have things like octopus merges, where several commits were bundled together, and there's possibly multiple instances of a pattern in each commit message that you want to account for. Note: in the event of an octopus merge, this tool won't be able to distinguish between the changes made by each individual commit that was part of the octopus merge, so be mindful when using this approach. If you enable
and the results will be parsed in JavaScript, where the pattern provided in So it will be up to you to make sure the formatting of the commit messages will jive with the match pattern you're using. The As an example, if you want to consider the following commit message as adding 2 to the line temperature:
then you can set More advancedIf you want to use a more advanced means of determining a line's temperature, then one option is to leverage For example, if you want to match on the same lines as before, and you're on a system with This extension uses Performance considerationsThis extension isn't incredibily efficient, and can take a very long amount of time to build the heatmap cache. You can leverage these settings to come up with your own means of identifying problematic changes with reasonable performance. RequirementsThe workspace that is opened, must also be the folder that contains the Extension SettingsThis extension contributes the following settings:
Known Issues
|