Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change blame delimiter from space to tab. #3

Closed
wants to merge 1 commit into from

Conversation

jabbera
Copy link
Contributor

@jabbera jabbera commented May 13, 2015

There is an issue where the parser of the SonarTfsAnnotate output won’t support spaces in the username of a checkin field. (This is supported by TFS)

Running sonar-runner with TFS SCM enabled results in the following abbreviated exception:

Caused by: java.lang.NumberFormatException: For input string: "Build"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at org.sonar.plugins.scm.tfs.TfsBlameCommand.blame(TfsBlameCommand.java:116)
at org.sonar.batch.scm.ScmSensor.execute(ScmSensor.java:84)
at org.sonar.batch.scan.SensorWrapper.analyse(SensorWrapper.java:59)

As you can see it’s trying to turn the word Build into a number.
Here is the tail of the TFS blame for the file it’s having issues with:

210210 [hidden email] 1320321472733 // by using the '*' as shown below:
281840 Versioning Build Process 1383062082897 [assembly: AssemblyVersion("1.1.0.0")]
348400 BBB 1431338438423 [assembly: AssemblyFileVersion("2.0.15131.1")]

As you can see the username for the second line is “Versioning Build Process”

This changes the delimiter from space to tab.

@dbolkensteyn
Copy link
Contributor

Merged in 28f5eb7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants