Change blame delimiter from space to tab. #3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.