SonarQube C#
  1. SonarQube C#
  2. SONARCS-179

Property sonar.branch cannot be used

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      When using sonar.branch parameter the analysis fails.
      Below the exception stack trace :

      Caused by: java.lang.NullPointerException
      at org.sonar.plugins.csharp.api.sensor.AbstractTestCSharpSensor.shouldExecuteOnProject(AbstractTestCSharpSensor.java:45)
      at org.sonar.plugins.csharp.gallio.TestReportSensor.shouldExecuteOnProject(TestReportSensor.java:78)
      at org.sonar.api.batch.BatchExtensionDictionnary.shouldKeep(BatchExtensionDictionnary.java:115)
      at org.sonar.api.batch.BatchExtensionDictionnary.getFilteredExtensions(BatchExtensionDictionnary.java:105)
      at org.sonar.api.batch.BatchExtensionDictionnary.select(BatchExtensionDictionnary.java:63)
      at org.sonar.batch.phases.SensorsExecutor.<init>(SensorsExecutor.java:49)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.picocontainer.injectors.AbstractInjector.newInstance(AbstractInjector.java:147)

      I think that the root of the problem is in MicrosoftWindowsEnvironment.getProjectByName().
      The name of the project is the concatenation of the VS project name with the branch name. In the map projectsByName, the keys are just the VS project name, without the branch name.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Fabrice Bellingard
            Reporter:
            Alexandre Victoor
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: