Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

César Tomás
Hi everyone,

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:


INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs


I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

Regards,

_____________________________________________________

César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

Dinesh Bolkensteyn-2
Hi Cesar,

Could you send the screenshot of the window opened by the "tf workspace" command?

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

Thank you


On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:
Hi everyone,

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:


INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs


I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

Regards,

_____________________________________________________

César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  

Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

César Tomás
Hi Dinesh,

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

Imágenes integradas 2Imágenes integradas 1


I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

Imágenes integradas 3

Thanks in advance.


2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:
Hi Cesar,

Could you send the screenshot of the window opened by the "tf workspace" command?

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

Thank you


On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:
Hi everyone,

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:


INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs


I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

Regards,

_____________________________________________________

César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

Dinesh Bolkensteyn-2
Thanks for the info.

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

Is that file checked-in TFS, is it is a cloak folder?


On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:
Hi Dinesh,

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

Imágenes integradas 2Imágenes integradas 1


I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

Imágenes integradas 3

Thanks in advance.


2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:
Hi Cesar,

Could you send the screenshot of the window opened by the "tf workspace" command?

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

Thank you


On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:
Hi everyone,

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:


INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs


I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

Regards,

_____________________________________________________

César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  

Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

César Tomás
Hi Dinesh,

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 
I don't have any cloack folders in my workspace.

Regards,

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:
Thanks for the info.

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

Is that file checked-in TFS, is it is a cloak folder?


On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:
Hi Dinesh,

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

Imágenes integradas 2Imágenes integradas 1


I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

Imágenes integradas 3

Thanks in advance.


2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:
Hi Cesar,

Could you send the screenshot of the window opened by the "tf workspace" command?

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

Thank you


On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:
Hi everyone,

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:


INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs


I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

Regards,

_____________________________________________________

César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

Dinesh Bolkensteyn-2
It sadly looks like I won't be able to help you much.

I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.
Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.

Debugging further would probably be require you to get the sources of SonarTfsAnnotate:

You can try to remove the following check, and see if it (and how) the program still fails:

Let me know how that goes

Kind regards,


On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:
Hi Dinesh,

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 
I don't have any cloack folders in my workspace.

Regards,

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:
Thanks for the info.

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

Is that file checked-in TFS, is it is a cloak folder?


On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:
Hi Dinesh,

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

Imágenes integradas 2Imágenes integradas 1


I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

Imágenes integradas 3

Thanks in advance.


2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:
Hi Cesar,

Could you send the screenshot of the window opened by the "tf workspace" command?

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

Thank you


On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:
Hi everyone,

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:


INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs


I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

Regards,

_____________________________________________________

César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  

Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

Espen Berglund

Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes.

 

Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:19
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

It sadly looks like I won't be able to help you much.

 

I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.

Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.

 

Debugging further would probably be require you to get the sources of SonarTfsAnnotate:

 

You can try to remove the following check, and see if it (and how) the program still fails:

 

Let me know how that goes

 

Kind regards,


 

On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 

I don't have any cloack folders in my workspace.

 

Regards,

 

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Thanks for the info.

 

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

 

Is that file checked-in TFS, is it is a cloak folder?


 

On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

 

Imágenes integradas 2Imágenes integradas 1

 

 

I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

 

Imágenes integradas 3

 

Thanks in advance.

 

 

2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Hi Cesar,

 

Could you send the screenshot of the window opened by the "tf workspace" command?

 

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

 

Thank you


 

On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:

Hi everyone,

 

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:

 

 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs

 

 

I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

 

Regards,

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

Dinesh Bolkensteyn-2
Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled?

I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7


On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:

Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes.

 

Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:19
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

It sadly looks like I won't be able to help you much.

 

I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.

Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.

 

Debugging further would probably be require you to get the sources of SonarTfsAnnotate:

 

You can try to remove the following check, and see if it (and how) the program still fails:

 

Let me know how that goes

 

Kind regards,


 

On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 

I don't have any cloack folders in my workspace.

 

Regards,

 

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Thanks for the info.

 

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

 

Is that file checked-in TFS, is it is a cloak folder?


 

On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

 

Imágenes integradas 2Imágenes integradas 1

 

 

I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

 

Imágenes integradas 3

 

Thanks in advance.

 

 

2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Hi Cesar,

 

Could you send the screenshot of the window opened by the "tf workspace" command?

 

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

 

Thank you


 

On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:

Hi everyone,

 

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:

 

 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs

 

 

I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

 

Regards,

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 


Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

Espen Berglund

I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.

 

I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since.

 

Anyways…I’ll see if I can reproduce this.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:50
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled?

 

I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7


 

On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:

Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes.

 

Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:19
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

It sadly looks like I won't be able to help you much.

 

I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.

Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.

 

Debugging further would probably be require you to get the sources of SonarTfsAnnotate:

 

You can try to remove the following check, and see if it (and how) the program still fails:

 

Let me know how that goes

 

Kind regards,


 

On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 

I don't have any cloack folders in my workspace.

 

Regards,

 

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Thanks for the info.

 

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

 

Is that file checked-in TFS, is it is a cloak folder?


 

On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

 

Imágenes integradas 2Imágenes integradas 1

 

 

I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

 

Imágenes integradas 3

 

Thanks in advance.

 

 

2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Hi Cesar,

 

Could you send the screenshot of the window opened by the "tf workspace" command?

 

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

 

Thank you


 

On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:

Hi everyone,

 

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:

 

 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs

 

 

I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

 

Regards,

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 

Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

Espen Berglund

I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here.

 

From: Espen Berglund [mailto:[hidden email]]
Sent: 23. februar 2015 15:21
To: [hidden email]
Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.

 

I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since.

 

Anyways…I’ll see if I can reproduce this.

 

From: Dinesh Bolkensteyn [[hidden email]]
Sent: 23. februar 2015 14:50
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled?

 

I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7


 

On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:

Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes.

 

Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:19
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

It sadly looks like I won't be able to help you much.

 

I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.

Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.

 

Debugging further would probably be require you to get the sources of SonarTfsAnnotate:

 

You can try to remove the following check, and see if it (and how) the program still fails:

 

Let me know how that goes

 

Kind regards,


 

On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 

I don't have any cloack folders in my workspace.

 

Regards,

 

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Thanks for the info.

 

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

 

Is that file checked-in TFS, is it is a cloak folder?


 

On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

 

Imágenes integradas 2Imágenes integradas 1

 

 

I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

 

Imágenes integradas 3

 

Thanks in advance.

 

 

2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Hi Cesar,

 

Could you send the screenshot of the window opened by the "tf workspace" command?

 

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

 

Thank you


 

On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:

Hi everyone,

 

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:

 

 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs

 

 

I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

 

Regards,

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 

Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

César Tomás
In reply to this post by Espen Berglund
Hi Dinesh,

I have found that the problem is related to the path of the files that are passed to SonarTfsAnnotate.
If I execute in the command line the command that is causing the error using the absolute paths of the files it works fine. So, I think that the analysis fails because 
the sonar-scm-tfs plug-in pass wrong paths to SonarTfsAnnotate. Maybe the key is on https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java

If you need some help trying to solve this problem, please do not hesitate to telll us.
Thanks in advance,

César.

2015-02-23 15:21 GMT+01:00 Espen Berglund <[hidden email]>:

I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.

 

I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since.

 

Anyways…I’ll see if I can reproduce this.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:50


To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled?

 

I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7


 

On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:

Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes.

 

Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:19
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

It sadly looks like I won't be able to help you much.

 

I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.

Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.

 

Debugging further would probably be require you to get the sources of SonarTfsAnnotate:

 

You can try to remove the following check, and see if it (and how) the program still fails:

 

Let me know how that goes

 

Kind regards,


 

On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 

I don't have any cloack folders in my workspace.

 

Regards,

 

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Thanks for the info.

 

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

 

Is that file checked-in TFS, is it is a cloak folder?


 

On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

 

Imágenes integradas 2Imágenes integradas 1

 

 

I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

 

Imágenes integradas 3

 

Thanks in advance.

 

 

2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Hi Cesar,

 

Could you send the screenshot of the window opened by the "tf workspace" command?

 

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

 

Thank you


 

On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:

Hi everyone,

 

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:

 

 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs

 

 

I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

 

Regards,

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

César Tomás
In reply to this post by Espen Berglund
Hi Espen,

The error that you have reproduced and mine is the same because if we run SonarTfsAnnotate manually it works correctly. I think that the key is on  the paths that sonar-scm-tfs pass  to SonarTfsAnnotate.

Regards,

César

2015-02-24 8:42 GMT+01:00 Espen Berglund <[hidden email]>:

I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here.

 

From: Espen Berglund [mailto:[hidden email]]
Sent: 23. februar 2015 15:21
To: [hidden email]
Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.

 

I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since.

 

Anyways…I’ll see if I can reproduce this.

 

From: Dinesh Bolkensteyn [[hidden email]]
Sent: 23. februar 2015 14:50
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled?

 

I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7


 

On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:

Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes.

 

Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:19
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

It sadly looks like I won't be able to help you much.

 

I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.

Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.

 

Debugging further would probably be require you to get the sources of SonarTfsAnnotate:

 

You can try to remove the following check, and see if it (and how) the program still fails:

 

Let me know how that goes

 

Kind regards,


 

On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 

I don't have any cloack folders in my workspace.

 

Regards,

 

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Thanks for the info.

 

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

 

Is that file checked-in TFS, is it is a cloak folder?


 

On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

 

Imágenes integradas 2Imágenes integradas 1

 

 

I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

 

Imágenes integradas 3

 

Thanks in advance.

 

 

2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Hi Cesar,

 

Could you send the screenshot of the window opened by the "tf workspace" command?

 

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

 

Thank you


 

On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:

Hi everyone,

 

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:

 

 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs

 

 

I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

 

Regards,

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

Julien HENRY
Hi guys,

Thanks for the investigation. Do you confirm the following:

Given a project:
<project root>
  $tf
  module1
  module2
  ...

This works:
cd <project root>
SonarTfsAnnotate module1/someFile.cs


This don't work:
cd module1
SonarTfsAnnotate someFile.cs


This works:
SonarTfsAnnotate absolute\path\to\soneFile.cs

Thanks


2015-02-24 8:53 GMT+01:00 César Tomás <[hidden email]>:
Hi Espen,

The error that you have reproduced and mine is the same because if we run SonarTfsAnnotate manually it works correctly. I think that the key is on  the paths that sonar-scm-tfs pass  to SonarTfsAnnotate.

Regards,

César

2015-02-24 8:42 GMT+01:00 Espen Berglund <[hidden email]>:

I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here.

 

From: Espen Berglund [mailto:[hidden email]]
Sent: 23. februar 2015 15:21
To: [hidden email]
Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.

 

I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since.

 

Anyways…I’ll see if I can reproduce this.

 

From: Dinesh Bolkensteyn [[hidden email]]
Sent: 23. februar 2015 14:50
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled?

 

I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7


 

On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:

Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes.

 

Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:19
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

It sadly looks like I won't be able to help you much.

 

I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.

Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.

 

Debugging further would probably be require you to get the sources of SonarTfsAnnotate:

 

You can try to remove the following check, and see if it (and how) the program still fails:

 

Let me know how that goes

 

Kind regards,


 

On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 

I don't have any cloack folders in my workspace.

 

Regards,

 

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Thanks for the info.

 

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

 

Is that file checked-in TFS, is it is a cloak folder?


 

On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

 

Imágenes integradas 2Imágenes integradas 1

 

 

I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

 

Imágenes integradas 3

 

Thanks in advance.

 

 

2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Hi Cesar,

 

Could you send the screenshot of the window opened by the "tf workspace" command?

 

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

 

Thank you


 

On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:

Hi everyone,

 

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:

 

 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs

 

 

I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

 

Regards,

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  

Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

César Tomás
Hi Julien,

I have tested the three alternatives and all works fine for me. The problem appears when we try to run a Sonar analysis.

I think that the problem is that sonar-scm-tfs calls to SonarTfsAnnotate by this way:

SonarTfsAnnotate someFile.cs (without doing the 'cd module')

Regards,

César


2015-02-24 9:28 GMT+01:00 Julien HENRY <[hidden email]>:
Hi guys,

Thanks for the investigation. Do you confirm the following:

Given a project:
<project root>
  $tf
  module1
  module2
  ...

This works:
cd <project root>
SonarTfsAnnotate module1/someFile.cs


This don't work:
cd module1
SonarTfsAnnotate someFile.cs


This works:
SonarTfsAnnotate absolute\path\to\soneFile.cs

Thanks


2015-02-24 8:53 GMT+01:00 César Tomás <[hidden email]>:
Hi Espen,

The error that you have reproduced and mine is the same because if we run SonarTfsAnnotate manually it works correctly. I think that the key is on  the paths that sonar-scm-tfs pass  to SonarTfsAnnotate.

Regards,

César

2015-02-24 8:42 GMT+01:00 Espen Berglund <[hidden email]>:

I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here.

 

From: Espen Berglund [mailto:[hidden email]]
Sent: 23. februar 2015 15:21
To: [hidden email]
Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.

 

I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since.

 

Anyways…I’ll see if I can reproduce this.

 

From: Dinesh Bolkensteyn [[hidden email]]
Sent: 23. februar 2015 14:50
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled?

 

I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7


 

On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:

Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes.

 

Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:19
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

It sadly looks like I won't be able to help you much.

 

I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.

Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.

 

Debugging further would probably be require you to get the sources of SonarTfsAnnotate:

 

You can try to remove the following check, and see if it (and how) the program still fails:

 

Let me know how that goes

 

Kind regards,


 

On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 

I don't have any cloack folders in my workspace.

 

Regards,

 

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Thanks for the info.

 

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

 

Is that file checked-in TFS, is it is a cloak folder?


 

On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

 

Imágenes integradas 2Imágenes integradas 1

 

 

I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

 

Imágenes integradas 3

 

Thanks in advance.

 

 

2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Hi Cesar,

 

Could you send the screenshot of the window opened by the "tf workspace" command?

 

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

 

Thank you


 

On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:

Hi everyone,

 

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:

 

 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs

 

 

I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

 

Regards,

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

Julien HENRY
Strange, because it should cd to module base dir (see https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java#L131). Sorry guys but I have no idea of what's wrong.

2015-02-24 9:47 GMT+01:00 César Tomás <[hidden email]>:
Hi Julien,

I have tested the three alternatives and all works fine for me. The problem appears when we try to run a Sonar analysis.

I think that the problem is that sonar-scm-tfs calls to SonarTfsAnnotate by this way:

SonarTfsAnnotate someFile.cs (without doing the 'cd module')

Regards,

César


2015-02-24 9:28 GMT+01:00 Julien HENRY <[hidden email]>:
Hi guys,

Thanks for the investigation. Do you confirm the following:

Given a project:
<project root>
  $tf
  module1
  module2
  ...

This works:
cd <project root>
SonarTfsAnnotate module1/someFile.cs


This don't work:
cd module1
SonarTfsAnnotate someFile.cs


This works:
SonarTfsAnnotate absolute\path\to\soneFile.cs

Thanks


2015-02-24 8:53 GMT+01:00 César Tomás <[hidden email]>:
Hi Espen,

The error that you have reproduced and mine is the same because if we run SonarTfsAnnotate manually it works correctly. I think that the key is on  the paths that sonar-scm-tfs pass  to SonarTfsAnnotate.

Regards,

César

2015-02-24 8:42 GMT+01:00 Espen Berglund <[hidden email]>:

I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here.

 

From: Espen Berglund [mailto:[hidden email]]
Sent: 23. februar 2015 15:21
To: [hidden email]
Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.

 

I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since.

 

Anyways…I’ll see if I can reproduce this.

 

From: Dinesh Bolkensteyn [[hidden email]]
Sent: 23. februar 2015 14:50
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled?

 

I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7


 

On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:

Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes.

 

Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:19
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

It sadly looks like I won't be able to help you much.

 

I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.

Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.

 

Debugging further would probably be require you to get the sources of SonarTfsAnnotate:

 

You can try to remove the following check, and see if it (and how) the program still fails:

 

Let me know how that goes

 

Kind regards,


 

On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 

I don't have any cloack folders in my workspace.

 

Regards,

 

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Thanks for the info.

 

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

 

Is that file checked-in TFS, is it is a cloak folder?


 

On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

 

Imágenes integradas 2Imágenes integradas 1

 

 

I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

 

Imágenes integradas 3

 

Thanks in advance.

 

 

2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Hi Cesar,

 

Could you send the screenshot of the window opened by the "tf workspace" command?

 

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

 

Thank you


 

On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:

Hi everyone,

 

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:

 

 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs

 

 

I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

 

Regards,

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  

Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

Dinesh Bolkensteyn-2
First, there is no difference between the SonarTfsAnnotate.exe embedded in the plugin and the one available as an independent download.

The problem doesn't seem to be related to the current working directory : I can run SonarTfsAnnotate from the command line from anywhere and it works (passing it both relative and absolute paths).

Another idea... could it perhaps be related to user permissions?
For example, when you are logged in, you have some user A, but when running the SonarQube analysis, you are user B.


On Tue, Feb 24, 2015 at 10:14 AM, Julien HENRY <[hidden email]> wrote:
Strange, because it should cd to module base dir (see https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java#L131). Sorry guys but I have no idea of what's wrong.

2015-02-24 9:47 GMT+01:00 César Tomás <[hidden email]>:
Hi Julien,

I have tested the three alternatives and all works fine for me. The problem appears when we try to run a Sonar analysis.

I think that the problem is that sonar-scm-tfs calls to SonarTfsAnnotate by this way:

SonarTfsAnnotate someFile.cs (without doing the 'cd module')

Regards,

César


2015-02-24 9:28 GMT+01:00 Julien HENRY <[hidden email]>:
Hi guys,

Thanks for the investigation. Do you confirm the following:

Given a project:
<project root>
  $tf
  module1
  module2
  ...

This works:
cd <project root>
SonarTfsAnnotate module1/someFile.cs


This don't work:
cd module1
SonarTfsAnnotate someFile.cs


This works:
SonarTfsAnnotate absolute\path\to\soneFile.cs

Thanks


2015-02-24 8:53 GMT+01:00 César Tomás <[hidden email]>:
Hi Espen,

The error that you have reproduced and mine is the same because if we run SonarTfsAnnotate manually it works correctly. I think that the key is on  the paths that sonar-scm-tfs pass  to SonarTfsAnnotate.

Regards,

César

2015-02-24 8:42 GMT+01:00 Espen Berglund <[hidden email]>:

I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here.

 

From: Espen Berglund [mailto:[hidden email]]
Sent: 23. februar 2015 15:21
To: [hidden email]
Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.

 

I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since.

 

Anyways…I’ll see if I can reproduce this.

 

From: Dinesh Bolkensteyn [[hidden email]]
Sent: 23. februar 2015 14:50
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled?

 

I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7


 

On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:

Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes.

 

Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:19
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

It sadly looks like I won't be able to help you much.

 

I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.

Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.

 

Debugging further would probably be require you to get the sources of SonarTfsAnnotate:

 

You can try to remove the following check, and see if it (and how) the program still fails:

 

Let me know how that goes

 

Kind regards,


 

On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 

I don't have any cloack folders in my workspace.

 

Regards,

 

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Thanks for the info.

 

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

 

Is that file checked-in TFS, is it is a cloak folder?


 

On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

 

Imágenes integradas 2Imágenes integradas 1

 

 

I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

 

Imágenes integradas 3

 

Thanks in advance.

 

 

2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Hi Cesar,

 

Could you send the screenshot of the window opened by the "tf workspace" command?

 

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

 

Thank you


 

On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:

Hi everyone,

 

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:

 

 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs

 

 

I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

 

Regards,

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  


Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

Espen Berglund

I’m running everything on my own machine, e.g. database, sonarqube, sonar-runner etc. I don’t see permissions being an issue as everything should be run as me unless something special is within sonarqube/sonar-runner itself.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 24. februar 2015 10:33
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

First, there is no difference between the SonarTfsAnnotate.exe embedded in the plugin and the one available as an independent download.

 

The problem doesn't seem to be related to the current working directory : I can run SonarTfsAnnotate from the command line from anywhere and it works (passing it both relative and absolute paths).

 

Another idea... could it perhaps be related to user permissions?

For example, when you are logged in, you have some user A, but when running the SonarQube analysis, you are user B.


 

On Tue, Feb 24, 2015 at 10:14 AM, Julien HENRY <[hidden email]> wrote:

Strange, because it should cd to module base dir (see https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java#L131). Sorry guys but I have no idea of what's wrong.

 

2015-02-24 9:47 GMT+01:00 César Tomás <[hidden email]>:

Hi Julien,

 

I have tested the three alternatives and all works fine for me. The problem appears when we try to run a Sonar analysis.

 

I think that the problem is that sonar-scm-tfs calls to SonarTfsAnnotate by this way:

 

SonarTfsAnnotate someFile.cs (without doing the 'cd module')

 

Regards,

 

César

 

 

2015-02-24 9:28 GMT+01:00 Julien HENRY <[hidden email]>:

Hi guys,

Thanks for the investigation. Do you confirm the following:

Given a project:

<project root>

  $tf

  module1

  module2

  ...

This works:

cd <project root>
SonarTfsAnnotate module1/someFile.cs

 

This don't work:

cd module1
SonarTfsAnnotate someFile.cs

This works:
SonarTfsAnnotate absolute\path\to\soneFile.cs

Thanks

 

2015-02-24 8:53 GMT+01:00 César Tomás <[hidden email]>:

Hi Espen,

 

The error that you have reproduced and mine is the same because if we run SonarTfsAnnotate manually it works correctly. I think that the key is on  the paths that sonar-scm-tfs pass  to SonarTfsAnnotate.

 

Regards,

 

César

 

2015-02-24 8:42 GMT+01:00 Espen Berglund <[hidden email]>:

I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here.

 

From: Espen Berglund [mailto:[hidden email]]
Sent: 23. februar 2015 15:21
To: [hidden email]
Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.

 

I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since.

 

Anyways…I’ll see if I can reproduce this.

 

From: Dinesh Bolkensteyn [[hidden email]]
Sent: 23. februar 2015 14:50
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled?

 

I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7


 

On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:

Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes.

 

Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:19
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

It sadly looks like I won't be able to help you much.

 

I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.

Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.

 

Debugging further would probably be require you to get the sources of SonarTfsAnnotate:

 

You can try to remove the following check, and see if it (and how) the program still fails:

 

Let me know how that goes

 

Kind regards,


 

On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 

I don't have any cloack folders in my workspace.

 

Regards,

 

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Thanks for the info.

 

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

 

Is that file checked-in TFS, is it is a cloak folder?


 

On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

 

Imágenes integradas 2Imágenes integradas 1

 

 

I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

 

Imágenes integradas 3

 

Thanks in advance.

 

 

2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Hi Cesar,

 

Could you send the screenshot of the window opened by the "tf workspace" command?

 

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

 

Thank you


 

On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:

Hi everyone,

 

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:

 

 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs

 

 

I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

 

Regards,

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 

Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

César Tomás
Hi Dinesh,

Finally I solved the problem passing to sonarTfsAnnotate the absolute path of the file to analyse.
cl.addArgument(workingDirectory + "\\" + filename);

Could you consider to launch a new version of the plugin including this modification?

On the other hand, now I need to use login and password to access to TFS information because it appears this error related to authorization with TFS:

Excepci¢n no controlada: Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException: TF30063: You are not authorized to access XX.XX.XX.XX\DefaultCollection. ---> System.Net.WebException: Error en el servidor remoto: (401) No autorizado.
   en System.Net.HttpWebRequest.GetResponse()
   en Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequestAndGetResponse(HttpWebRequest webRequest, WebException& webException)
   
I've seen that you have an issue to add this feature to the plugin. Is it possible to include this in the new release?


Thanks in advance,

César.
   

   

2015-02-24 11:11 GMT+01:00 Espen Berglund <[hidden email]>:

I’m running everything on my own machine, e.g. database, sonarqube, sonar-runner etc. I don’t see permissions being an issue as everything should be run as me unless something special is within sonarqube/sonar-runner itself.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 24. februar 2015 10:33


To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

First, there is no difference between the SonarTfsAnnotate.exe embedded in the plugin and the one available as an independent download.

 

The problem doesn't seem to be related to the current working directory : I can run SonarTfsAnnotate from the command line from anywhere and it works (passing it both relative and absolute paths).

 

Another idea... could it perhaps be related to user permissions?

For example, when you are logged in, you have some user A, but when running the SonarQube analysis, you are user B.


 

On Tue, Feb 24, 2015 at 10:14 AM, Julien HENRY <[hidden email]> wrote:

Strange, because it should cd to module base dir (see https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java#L131). Sorry guys but I have no idea of what's wrong.

 

2015-02-24 9:47 GMT+01:00 César Tomás <[hidden email]>:

Hi Julien,

 

I have tested the three alternatives and all works fine for me. The problem appears when we try to run a Sonar analysis.

 

I think that the problem is that sonar-scm-tfs calls to SonarTfsAnnotate by this way:

 

SonarTfsAnnotate someFile.cs (without doing the 'cd module')

 

Regards,

 

César

 

 

2015-02-24 9:28 GMT+01:00 Julien HENRY <[hidden email]>:

Hi guys,

Thanks for the investigation. Do you confirm the following:

Given a project:

<project root>

  $tf

  module1

  module2

  ...

This works:

cd <project root>
SonarTfsAnnotate module1/someFile.cs

 

This don't work:

cd module1
SonarTfsAnnotate someFile.cs

This works:
SonarTfsAnnotate absolute\path\to\soneFile.cs

Thanks

 

2015-02-24 8:53 GMT+01:00 César Tomás <[hidden email]>:

Hi Espen,

 

The error that you have reproduced and mine is the same because if we run SonarTfsAnnotate manually it works correctly. I think that the key is on  the paths that sonar-scm-tfs pass  to SonarTfsAnnotate.

 

Regards,

 

César

 

2015-02-24 8:42 GMT+01:00 Espen Berglund <[hidden email]>:

I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here.

 

From: Espen Berglund [mailto:[hidden email]]
Sent: 23. februar 2015 15:21
To: [hidden email]
Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.

 

I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since.

 

Anyways…I’ll see if I can reproduce this.

 

From: Dinesh Bolkensteyn [[hidden email]]
Sent: 23. februar 2015 14:50
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled?

 

I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7


 

On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:

Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes.

 

Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:19
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

It sadly looks like I won't be able to help you much.

 

I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.

Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.

 

Debugging further would probably be require you to get the sources of SonarTfsAnnotate:

 

You can try to remove the following check, and see if it (and how) the program still fails:

 

Let me know how that goes

 

Kind regards,


 

On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 

I don't have any cloack folders in my workspace.

 

Regards,

 

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Thanks for the info.

 

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

 

Is that file checked-in TFS, is it is a cloak folder?


 

On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

 

Imágenes integradas 2Imágenes integradas 1

 

 

I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

 

Imágenes integradas 3

 

Thanks in advance.

 

 

2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Hi Cesar,

 

Could you send the screenshot of the window opened by the "tf workspace" command?

 

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

 

Thank you


 

On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:

Hi everyone,

 

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:

 

 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs

 

 

I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

 

Regards,

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  
Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

Dinesh Bolkensteyn-2
I'm glad you solved your issue Cesar.

@Espen: Does this fix also solve yours?


On Wed, Feb 25, 2015 at 5:00 PM, César Tomás <[hidden email]> wrote:
Hi Dinesh,

Finally I solved the problem passing to sonarTfsAnnotate the absolute path of the file to analyse.
cl.addArgument(workingDirectory + "\\" + filename);

Could you consider to launch a new version of the plugin including this modification?

On the other hand, now I need to use login and password to access to TFS information because it appears this error related to authorization with TFS:

Excepci¢n no controlada: Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException: TF30063: You are not authorized to access XX.XX.XX.XX\DefaultCollection. ---> System.Net.WebException: Error en el servidor remoto: (401) No autorizado.
   en System.Net.HttpWebRequest.GetResponse()
   en Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequestAndGetResponse(HttpWebRequest webRequest, WebException& webException)
   
I've seen that you have an issue to add this feature to the plugin. Is it possible to include this in the new release?


Thanks in advance,

César.
   

   

2015-02-24 11:11 GMT+01:00 Espen Berglund <[hidden email]>:

I’m running everything on my own machine, e.g. database, sonarqube, sonar-runner etc. I don’t see permissions being an issue as everything should be run as me unless something special is within sonarqube/sonar-runner itself.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 24. februar 2015 10:33


To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

First, there is no difference between the SonarTfsAnnotate.exe embedded in the plugin and the one available as an independent download.

 

The problem doesn't seem to be related to the current working directory : I can run SonarTfsAnnotate from the command line from anywhere and it works (passing it both relative and absolute paths).

 

Another idea... could it perhaps be related to user permissions?

For example, when you are logged in, you have some user A, but when running the SonarQube analysis, you are user B.


 

On Tue, Feb 24, 2015 at 10:14 AM, Julien HENRY <[hidden email]> wrote:

Strange, because it should cd to module base dir (see https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java#L131). Sorry guys but I have no idea of what's wrong.

 

2015-02-24 9:47 GMT+01:00 César Tomás <[hidden email]>:

Hi Julien,

 

I have tested the three alternatives and all works fine for me. The problem appears when we try to run a Sonar analysis.

 

I think that the problem is that sonar-scm-tfs calls to SonarTfsAnnotate by this way:

 

SonarTfsAnnotate someFile.cs (without doing the 'cd module')

 

Regards,

 

César

 

 

2015-02-24 9:28 GMT+01:00 Julien HENRY <[hidden email]>:

Hi guys,

Thanks for the investigation. Do you confirm the following:

Given a project:

<project root>

  $tf

  module1

  module2

  ...

This works:

cd <project root>
SonarTfsAnnotate module1/someFile.cs

 

This don't work:

cd module1
SonarTfsAnnotate someFile.cs

This works:
SonarTfsAnnotate absolute\path\to\soneFile.cs

Thanks

 

2015-02-24 8:53 GMT+01:00 César Tomás <[hidden email]>:

Hi Espen,

 

The error that you have reproduced and mine is the same because if we run SonarTfsAnnotate manually it works correctly. I think that the key is on  the paths that sonar-scm-tfs pass  to SonarTfsAnnotate.

 

Regards,

 

César

 

2015-02-24 8:42 GMT+01:00 Espen Berglund <[hidden email]>:

I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here.

 

From: Espen Berglund [mailto:[hidden email]]
Sent: 23. februar 2015 15:21
To: [hidden email]
Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.

 

I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since.

 

Anyways…I’ll see if I can reproduce this.

 

From: Dinesh Bolkensteyn [[hidden email]]
Sent: 23. februar 2015 14:50
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled?

 

I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7


 

On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:

Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes.

 

Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:19
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

It sadly looks like I won't be able to help you much.

 

I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.

Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.

 

Debugging further would probably be require you to get the sources of SonarTfsAnnotate:

 

You can try to remove the following check, and see if it (and how) the program still fails:

 

Let me know how that goes

 

Kind regards,


 

On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 

I don't have any cloack folders in my workspace.

 

Regards,

 

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Thanks for the info.

 

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

 

Is that file checked-in TFS, is it is a cloak folder?


 

On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

 

Imágenes integradas 2Imágenes integradas 1

 

 

I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

 

Imágenes integradas 3

 

Thanks in advance.

 

 

2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Hi Cesar,

 

Could you send the screenshot of the window opened by the "tf workspace" command?

 

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

 

Thank you


 

On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:

Hi everyone,

 

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:

 

 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs

 

 

I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

 

Regards,

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 




--
_____________________________________________________
César Tomás Franco   
Área de Innovación, Arquitectura y Calidad de Software
 t: 96 325 48 08

              
  

Reply | Threaded
Open this post in threaded view
|

Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

Espen Berglund

Given to issue looks like the same thing, I’m going to go for a yes, but I haven’t tested though.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 25. februar 2015 17:16
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

I'm glad you solved your issue Cesar.

 

@Espen: Does this fix also solve yours?


 

On Wed, Feb 25, 2015 at 5:00 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

Finally I solved the problem passing to sonarTfsAnnotate the absolute path of the file to analyse.

cl.addArgument(workingDirectory + "\\" + filename);

 

Could you consider to launch a new version of the plugin including this modification?

 

On the other hand, now I need to use login and password to access to TFS information because it appears this error related to authorization with TFS:

 

Excepci¢n no controlada: Microsoft.TeamFoundation.TeamFoundationServerUnauthorizedException: TF30063: You are not authorized to access XX.XX.XX.XX\DefaultCollection. ---> System.Net.WebException: Error en el servidor remoto: (401) No autorizado.

   en System.Net.HttpWebRequest.GetResponse()

   en Microsoft.TeamFoundation.Client.Channels.TfsHttpWebRequest.SendRequestAndGetResponse(HttpWebRequest webRequest, WebException& webException)

   

I've seen that you have an issue to add this feature to the plugin. Is it possible to include this in the new release?

 

 

Thanks in advance,

 

César.

   

 

   

 

2015-02-24 11:11 GMT+01:00 Espen Berglund <[hidden email]>:

I’m running everything on my own machine, e.g. database, sonarqube, sonar-runner etc. I don’t see permissions being an issue as everything should be run as me unless something special is within sonarqube/sonar-runner itself.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 24. februar 2015 10:33


To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

First, there is no difference between the SonarTfsAnnotate.exe embedded in the plugin and the one available as an independent download.

 

The problem doesn't seem to be related to the current working directory : I can run SonarTfsAnnotate from the command line from anywhere and it works (passing it both relative and absolute paths).

 

Another idea... could it perhaps be related to user permissions?

For example, when you are logged in, you have some user A, but when running the SonarQube analysis, you are user B.


 

On Tue, Feb 24, 2015 at 10:14 AM, Julien HENRY <[hidden email]> wrote:

Strange, because it should cd to module base dir (see https://github.com/SonarCommunity/sonar-scm-tfs/blob/master/src/main/java/org/sonar/plugins/scm/tfs/TfsBlameCommand.java#L131). Sorry guys but I have no idea of what's wrong.

 

2015-02-24 9:47 GMT+01:00 César Tomás <[hidden email]>:

Hi Julien,

 

I have tested the three alternatives and all works fine for me. The problem appears when we try to run a Sonar analysis.

 

I think that the problem is that sonar-scm-tfs calls to SonarTfsAnnotate by this way:

 

SonarTfsAnnotate someFile.cs (without doing the 'cd module')

 

Regards,

 

César

 

 

2015-02-24 9:28 GMT+01:00 Julien HENRY <[hidden email]>:

Hi guys,

Thanks for the investigation. Do you confirm the following:

Given a project:

<project root>

  $tf

  module1

  module2

  ...

This works:

cd <project root>
SonarTfsAnnotate module1/someFile.cs

 

This don't work:

cd module1
SonarTfsAnnotate someFile.cs

This works:
SonarTfsAnnotate absolute\path\to\soneFile.cs

Thanks

 

2015-02-24 8:53 GMT+01:00 César Tomás <[hidden email]>:

Hi Espen,

 

The error that you have reproduced and mine is the same because if we run SonarTfsAnnotate manually it works correctly. I think that the key is on  the paths that sonar-scm-tfs pass  to SonarTfsAnnotate.

 

Regards,

 

César

 

2015-02-24 8:42 GMT+01:00 Espen Berglund <[hidden email]>:

I’ve reproduced my error now (I also replied to your direct email yesterday). What’s really weird, Sonar-Runner fails with “The given file has not yet been checked-in”. If I try to run SonarTfsAnnotate manually on the file in question, it actually succeeds. Is there a difference between the embedded SonarTfsAnnotate in the plugin and the latest version? I’m not sure where to go from here.

 

From: Espen Berglund [mailto:[hidden email]]
Sent: 23. februar 2015 15:21
To: [hidden email]
Subject: RE: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

I don’t have the exact example in my head at the moment, but essentially it’s possible to have a file in TFS with only 1 history entry, and that may be Merge and not add. In this case I think FileAnnotator returns null. Looking at bit further in the source, I think I ended up with “The given file has not yet been checked-in”, so this is/was a different problem.

 

I actually sent you an email directly about this problem, but I never got any answer, so I just haven’t thought about it since.

 

Anyways…I’ll see if I can reproduce this.

 

From: Dinesh Bolkensteyn [[hidden email]]
Sent: 23. februar 2015 14:50
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

Could you elaborate a bit more Espen? What in these 2 files makes you think that merges are not handled?

 

I've created a ticket to keep track of this potential limitation: http://jira.codehaus.org/browse/SONARTFS-7


 

On Mon, Feb 23, 2015 at 2:41 PM, Espen Berglund <[hidden email]> wrote:

Could it be that your file is only merged into your project? I know I had an issue that prevent me to use TFS SCM which was that I have files which is only merged, not added or edited into the branch I tried to analyze. If I recall correct, SonarTfsAnnotate does not really work, at all, when working with different branches as it only takes into account added and edited changes.

 

Looking at https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/HistoryProvider.cs and https://github.com/SonarCommunity/sonar-tfs/blob/master/SonarTfsAnnotate/FileAnnotator.cs it seems at least this still is an issue.

 

From: Dinesh Bolkensteyn [mailto:[hidden email]]
Sent: 23. februar 2015 14:19
To: [hidden email]
Subject: Re: [sonar-user] Re: [sonar-dev] [VOTE] Release TFS Plugin 1.0

 

It sadly looks like I won't be able to help you much.

 

I'd recommend that you try to run the SonarTfsAnnotate tool manually to ensure it also fails there.

Perhaps, you could also give a try to the "tfpt annotate" command from the TFS Power Tools.

 

Debugging further would probably be require you to get the sources of SonarTfsAnnotate:

 

You can try to remove the following check, and see if it (and how) the program still fails:

 

Let me know how that goes

 

Kind regards,


 

On Mon, Feb 23, 2015 at 2:07 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

The XXXX.cs file always is the first file that Sonar try to analyze in all of my attempts. 

I don't have any cloack folders in my workspace.

 

Regards,

 

2015-02-23 13:50 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Thanks for the info.

 

Could you tell me more about the particular file the analysis is failing on, "XXXX.cs" ?

 

Is that file checked-in TFS, is it is a cloak folder?


 

On Mon, Feb 23, 2015 at 1:43 PM, César Tomás <[hidden email]> wrote:

Hi Dinesh,

 

I don't use the command line, I'm getting the workspace with the Team Foundation interface. I attach a screenshot of my workspace advanced configuration and the path of my workspace with the $tf folder. 

 

Imágenes integradas 2Imágenes integradas 1

 

 

I also attach a screenshot of my sonar properties (Jenkins properties) just in case:

 

Imágenes integradas 3

 

Thanks in advance.

 

 

2015-02-23 13:09 GMT+01:00 Dinesh Bolkensteyn <[hidden email]>:

Hi Cesar,

 

Could you send the screenshot of the window opened by the "tf workspace" command?

 

Moreover, could you also send the absolute paths of one of the file you are trying to analyze?

 

Thank you


 

On Mon, Feb 23, 2015 at 12:59 PM, César Tomás <[hidden email]> wrote:

Hi everyone,

 

I'm trying to use your TFS Plugin with SonarQube 5.0, but I can't perform any analysis because I obtain always an error like this:

 

 

INFO: ------------------------------------------------------------------------
INFO: EXECUTION FAILURE
INFO: ------------------------------------------------------------------------
Total time: 26.967s
Final Memory: 26M/376M
INFO: ------------------------------------------------------------------------
ERROR: Error during Sonar runner execution
ERROR: Unable to execute Sonar
ERROR: Caused by: The TFS blame command [C:\TFSPORT\.sonar\.sonartmp\SonarTfsAnnotate1424685705656-0.exe XXXX.cs] failed: The given file is not in a mapped TFS workspace: XXXX.cs

 

 

I have a local copy of my workspace with the $tf folder and I followed all the steps correctly. I tried with different workspaces and projects but I always get the same error. Is it possible that the problem will be solved with the issue SONAR CTFS-3? If not, how can I perform the analysis in order to obtain the TFS information?

 

Regards,

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

 



 

--

_____________________________________________________

César Tomás Franco   

Área de Innovación, Arquitectura y Calidad de Software

 t: 96 325 48 08

 

              

  

 

12