I'm looking for reporting tools for TFS, I need to get Lines of Code for individual developer between 2 dates, do you think it is doable via TFS?
Lines Of Code in Team foundation server
Asked Answered
I did it once per Management request. This may not be the perfect solution but it works. I reported LOC added for a TFS branch. I'm attaching TFS cube screenshot from old version (TFS 2008) since TFS version is missing here. I'm sure new version will be similar.
Do note that this code churn view (still present in 2015) does not distinguish between code you wrote for a feature, and code that was "created by you" as part of a branching operation or any other type of bulk movement. –
Berwick
This is how I get lines of code for TFS/Visual Studio projects:
- Open solution
- Open window: View -> Other Windows -> Code Metrics Results
- Run metrics: Click the icon at the top left - Calculate Code Metrics for Solution
- Metrics collected
- Has Lines of Code column
Does Code Metrics take into account form.Designer.cs code when calculating Lines of Code? –
Primula
In case anyone is wondering about the above, Code Metrics does include Windows Forms designer code - "Code generated for Windows forms is not ignored, because it is code that the developer can see and change." –
Monseigneur
Code Metrics in VS does not support by-programmer...would need SCM like VSTS, GitHub, etc. A less-than-perfect solution is to: 1. Run metrics before the programmer's code contribution. 2. Run metrics after the programmer's code contribution. 3. Compare LoC differences. –
Virginiavirginie
I did it once per Management request. This may not be the perfect solution but it works. I reported LOC added for a TFS branch. I'm attaching TFS cube screenshot from old version (TFS 2008) since TFS version is missing here. I'm sure new version will be similar.
Do note that this code churn view (still present in 2015) does not distinguish between code you wrote for a feature, and code that was "created by you" as part of a branching operation or any other type of bulk movement. –
Berwick
Option 2:
- Open Solution.
- Select "Analyze" on the toolbar.
- Click Calculate Code Metrics.
- If you have clicked on a file, it will allow you to calculate for the file, otherwise, select "For solution"
Option 3:
- Open Solution.
- In the Solution Explorer window, right click on the solution and select "Calculate code metrics"
- This again will generate the metrics in the "Code Metrics Results" window.
© 2022 - 2024 — McMap. All rights reserved.
Total Churn
which can be filtered by person and date. Again, I'm not 100% how this is counted. Also, the issues both Dans, Sten, and discens provided are true and I agree with them about using code churn as a metric to gauge people on is quite horrendous. – Viceregent