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

VisualStudioProject.java - Can pick wrong build configuration

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.1
    • Component/s: (Deprecated) .Net Core
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Bar.java
       if (StringUtils.isEmpty(buildConfigurations) || StringUtils.contains(buildConfigurations, "Debug")) {
              buildConfiguration = new BuildConfiguration("Debug", buildPlatform);
            } else {
              // get the first one found
              String buildName = Arrays.asList(StringUtils.split(buildConfigurations, ",; ")).get(0);
              buildConfiguration = new BuildConfiguration(buildName, buildPlatform);
            }
      

      Recently experienced an issue when using the sonar-project.properties configuration "sonar.dotnet.buildConfiguration=Debug40". The code should not be checking the hardcoded string "Debug" but should be checking the default sonar-project.properties configuration "sonar.dotnet.buildConfiguration" for an exact match first.

        Activity

        Hide
        Fabrice Bellingard added a comment -

        No need for IT. Covered by UTs.

        Show
        Fabrice Bellingard added a comment - No need for IT. Covered by UTs.

          People

          • Assignee:
            Fabrice Bellingard
            Reporter:
            Anonymous
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: